/* ==========================================================================
   Лабиринты Истории — дизайн-система
   Тёплая бумага, чернила, охристый акцент. Серифы для чтения, гротеск для UI.
   ========================================================================== */

:root {
  --paper: #f6efe3;
  --paper-2: #efe3cf;
  --paper-3: #e7d9c2;
  --card: #fffdf8;
  --ink: #211b15;
  --ink-2: #3a3027;
  --muted: #77695a;
  --muted-2: #968674;
  --line: #d8c8b0;
  --line-2: #e8dcc9;
  --oxblood: #7c2f2a;
  --oxblood-2: #5f211d;
  --gold: #b08a4f;
  --olive: #4e5a42;
  --teal: #2f5b57;
  --navy: #24303b;
  --ink-bg: #1d1814;
  --ink-bg-2: #29221b;
  --cream: #f4e9d6;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --shadow-sm: 0 1px 2px rgba(33, 27, 21, 0.05);
  --shadow-md: 0 10px 30px -18px rgba(33, 27, 21, 0.35), 0 2px 6px rgba(33, 27, 21, 0.05);
  --shadow-lg: 0 30px 70px -40px rgba(33, 27, 21, 0.55), 0 8px 20px -12px rgba(33, 27, 21, 0.18);
  --radius: 3px;
  --wrap: min(1200px, 92vw);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(176, 138, 79, 0.1), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(124, 47, 42, 0.07), transparent 45%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: var(--radius);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

.icon {
  flex: none;
  display: inline-block;
  vertical-align: -0.18em;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.muted {
  color: var(--muted);
}

.dot {
  margin: 0 0.55em;
  color: var(--muted-2);
}

/* ------------------------------------------------------------------ кнопки */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, color 0.18s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  --btn-bg: var(--oxblood);
  --btn-fg: #fff7ea;
  box-shadow: 0 10px 24px -16px rgba(124, 47, 42, 0.9);
}

.btn--primary:hover {
  --btn-bg: var(--oxblood-2);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(33, 27, 21, 0.04);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--cream);
  border-color: rgba(244, 233, 214, 0.4);
}

.btn--outline-light:hover {
  border-color: var(--cream);
  background: rgba(244, 233, 214, 0.08);
}

.btn--sm {
  padding: 9px 15px;
  font-size: 13px;
  gap: 7px;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.icon-btn:hover {
  background: rgba(33, 27, 21, 0.06);
}

/* ------------------------------------------------------------------- шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 239, 227, 0.88);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  flex: none;
}

.brand__mark {
  color: var(--oxblood);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(-8deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
  font-family: var(--serif);
}

.brand__top {
  font-size: 19px;
  letter-spacing: 0.01em;
}

.brand__bottom {
  font-size: 12.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  border-radius: var(--radius);
  transition: color 0.18s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 1.5px;
  background: var(--oxblood);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}

.nav__link:hover {
  color: var(--oxblood);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--oxblood);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.header-account {
  gap: 8px;
}

.menu-toggle {
  display: none;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink-bg);
  color: var(--cream);
  padding: 92px 0 80px;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  opacity: 0.9;
  filter: saturate(0.92) contrast(1.03);
  transform: scale(1.04);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(21, 16, 12, 0.95) 0%,
      rgba(21, 16, 12, 0.9) 34%,
      rgba(21, 16, 12, 0.72) 62%,
      rgba(21, 16, 12, 0.5) 100%
    ),
    radial-gradient(circle at 18% 42%, rgba(18, 13, 10, 0.55), transparent 62%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  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.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero__art {
  position: absolute;
  right: -8%;
  top: -12%;
  width: min(920px, 78vw);
  height: 124%;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 64px;
  align-items: center;
}

.hero__text {
  max-width: 640px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 233, 214, 0.6);
}

.hero__rule {
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--gold);
}

.hero__title {
  margin: 0 0 24px;
  font-size: clamp(50px, 7.2vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #fbf3e4;
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  color: #e4c185;
}

.hero__lead {
  max-width: 520px;
  margin: 0 0 34px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(244, 233, 214, 0.78);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 233, 214, 0.16);
  max-width: 520px;
}

.hero__stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.hero__stats dt {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 233, 214, 0.5);
}

.hero__stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  color: #f0dcb8;
  line-height: 1;
}

.hero-card {
  display: block;
  background: rgba(22, 17, 13, 0.58);
  backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid rgba(244, 233, 214, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.hero-card:hover {
  transform: translateY(-4px);
  border-color: rgba(228, 193, 133, 0.6);
  background: rgba(255, 253, 248, 0.07);
}

.hero-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.hero-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.hero-card:hover .hero-card__cover img {
  transform: scale(1.03);
}

.hero-card__badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 10px;
  background: rgba(29, 24, 20, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 233, 214, 0.22);
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0dcb8;
}

.hero-card__body {
  display: block;
  padding: 22px 24px 24px;
}

.hero-card__kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 233, 214, 0.55);
}

.hero-card__title {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.18;
  color: #fbf3e4;
  margin-bottom: 12px;
}

.hero-card__meta {
  display: block;
  font-size: 12.5px;
  color: rgba(244, 233, 214, 0.55);
}

/* ---------------------------------------------------------------- секции */

.section {
  padding: 88px 0;
}

.section--tinted {
  background: linear-gradient(180deg, rgba(231, 217, 194, 0.45), rgba(246, 239, 227, 0.2));
  border-block: 1px solid var(--line-2);
}

.section--dark {
  background: var(--ink-bg);
  color: var(--cream);
}

.section--dark .section__title {
  color: #f7ecd9;
}

.section--dark .eyebrow {
  color: var(--gold);
}

.section--dark .link-more {
  color: #e4c185;
}

.section--related {
  padding-top: 24px;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section__head-text {
  max-width: 720px;
}

.section__title {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.02em;
}

.section__note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--oxblood);
  border-bottom: 1px solid rgba(124, 47, 42, 0.3);
  white-space: nowrap;
  transition: gap 0.2s, border-color 0.2s;
}

.link-more:hover {
  gap: 12px;
  border-color: var(--oxblood);
}

/* ------------------------------------------------------------------- сетки */

.grid {
  display: grid;
  gap: 28px;
}

.grid--latest {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--books {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--maps,
.grid--videos,
.grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--catalog {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ------------------------------------------------------------------- карточки */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper-2);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.card__media--portrait {
  aspect-ratio: 3 / 4;
}

.card__media--video {
  aspect-ratio: 16 / 9;
}

.card__media--map {
  aspect-ratio: 4 / 3;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transition: transform 0.55s var(--ease), filter 0.3s;
}

.card:hover .card__media img {
  transform: scale(1.035);
}

.card__media-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  backdrop-filter: blur(4px);
}

.card__media-badge .badge {
  border: 0;
  padding: 0;
  background: none;
}

.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff8ea;
}

.card__play::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(29, 24, 20, 0.55);
  border: 1px solid rgba(255, 248, 234, 0.55);
  backdrop-filter: blur(3px);
  transition: transform 0.25s var(--ease), background 0.25s;
}

.card:hover .card__play::before {
  transform: scale(1.08);
  background: rgba(124, 47, 42, 0.8);
}

.card__play svg {
  position: relative;
  margin-left: 4px;
}

.card__duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 7px;
  border-radius: 2px;
  background: rgba(29, 24, 20, 0.8);
  color: #f4e9d6;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.card__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.card:hover .card__zoom {
  opacity: 1;
  transform: none;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
  flex: 1;
}

.card__kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__date,
.card__era {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.card__kicker .card__era + .card__date::before,
.card__kicker .badge + .card__date::before {
  content: "·";
  margin-right: 8px;
  color: var(--muted-2);
}

.card__title {
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.card__title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease), color 0.2s;
}

.card:hover .card__title a {
  color: var(--oxblood);
}

.card__title--lead {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.13;
}

.card__subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.card__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
}

.card__read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.card__tags {
  color: var(--gold);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__meta-line {
  font-size: 12.5px;
  color: var(--muted);
}

.card__thumb {
  display: block;
  flex: none;
  width: 132px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card--row {
  flex-direction: row;
  align-items: stretch;
}

.card--row:hover .card__thumb img {
  transform: scale(1.04);
}

.card--row .card__body {
  padding: 16px 18px;
  gap: 6px;
}

.card--row .card__title {
  font-size: 18px;
  line-height: 1.25;
}

.card--row .card__subtitle {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.byline {
  font-weight: 550;
  color: var(--ink-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink-2);
  background: rgba(255, 253, 248, 0.6);
  transition: border-color 0.2s, color 0.2s;
}

a.badge:hover {
  border-color: var(--oxblood);
  color: var(--oxblood);
}

.badge--section {
  border-color: rgba(176, 138, 79, 0.45);
  color: #6d5527;
  background: rgba(176, 138, 79, 0.08);
}

/* --------------------------------------------------------------- рубрики */

.rubrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}

.rubric {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 172px;
  padding: 26px 26px 24px;
  background: var(--card);
  transition: background 0.25s, color 0.25s;
}

.rubric:hover {
  background: var(--ink-bg);
  color: var(--cream);
}

.rubric__count {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.rubric:hover .rubric__count {
  color: rgba(244, 233, 214, 0.55);
}

.rubric__title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.rubric__text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.rubric:hover .rubric__text {
  color: rgba(244, 233, 214, 0.65);
}

.rubric__arrow {
  position: absolute;
  right: 22px;
  top: 22px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.25s, transform 0.25s;
  color: var(--gold);
}

.rubric:hover .rubric__arrow {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ CTA */

.cta-band {
  background: var(--oxblood);
  color: #fff3e3;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 55%);
}

.cta-band__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-band .eyebrow {
  color: rgba(255, 243, 227, 0.6);
}

.cta-band h2 {
  font-size: clamp(26px, 3vw, 38px);
  margin-bottom: 10px;
}

.cta-band p {
  max-width: 560px;
  color: rgba(255, 243, 227, 0.8);
  font-size: 15px;
}

.cta-band .btn--primary {
  --btn-bg: #f7e7cf;
  --btn-fg: var(--oxblood-2);
  flex: none;
}

.cta-band .btn--primary:hover {
  --btn-bg: #fff6e7;
}

/* ------------------------------------------------------------- заголовки */

.page-head {
  padding: 40px 0 48px;
  border-bottom: 1px solid var(--line-2);
}

.page-head .crumbs {
  margin-bottom: 22px;
}

.page-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.page-head__title {
  font-size: clamp(38px, 4.6vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1;
}

.page-head__title--xl {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.08;
  max-width: 900px;
}

.page-head__lead {
  max-width: 620px;
  margin-top: 16px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
}

.page-head--search {
  background: linear-gradient(180deg, var(--paper-2), transparent);
}

.page-head--about {
  padding-bottom: 64px;
}

/* --------------------------------------------------------------- хлебные */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--oxblood);
}

.crumbs__sep {
  color: var(--line);
}

.crumbs [aria-current] {
  color: var(--ink-2);
  max-width: 52ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- каталог */

.catalog-search {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
}

.input,
.select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}

.input::placeholder {
  color: var(--muted-2);
}

.input:focus,
.select:focus {
  outline: 2px solid rgba(124, 47, 42, 0.25);
  border-color: var(--oxblood);
}

.catalog-search .input {
  width: 220px;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
}

.active-tag a {
  color: var(--oxblood);
  border-bottom: 1px solid rgba(124, 47, 42, 0.3);
}

.catalog {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 56px;
  padding: 40px 0 96px;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  font-size: 14px;
}

.filters__group {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-2);
}

.filters__title {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.filters__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
}

.filters__item:hover {
  background: rgba(33, 27, 21, 0.05);
}

.filters__item.is-active {
  background: var(--ink);
  color: var(--cream);
}

.filters__count {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.filters__item.is-active .filters__count {
  color: rgba(244, 233, 214, 0.6);
}

.filters__note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.filters__note svg {
  color: var(--gold);
}

.filters__note a {
  color: var(--oxblood);
  border-bottom: 1px solid rgba(124, 47, 42, 0.3);
}

.catalog__main {
  min-width: 0;
}

.catalog__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
}

.catalog__count {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.sort .select {
  width: auto;
  padding: 7px 30px 7px 10px;
  font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2377695a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
}

/* --------------------------------------------------------------- пагинация */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
  font-size: 13.5px;
}

.pager__step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-weight: 550;
}

.pager__step:hover {
  color: var(--oxblood);
}

.pager__step.is-disabled {
  color: var(--muted-2);
  opacity: 0.5;
}

.pager__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pager__page {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 8px;
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.pager__page:hover {
  background: rgba(33, 27, 21, 0.06);
}

.pager__page.is-active {
  background: var(--ink);
  color: var(--cream);
}

.pager__dots {
  padding: 0 6px;
  color: var(--muted-2);
}

/* ------------------------------------------------------------------ чипсы */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--card);
  font-size: 13px;
  color: var(--ink-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.chip:hover {
  border-color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.chip__count {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chip.is-active .chip__count {
  color: rgba(244, 233, 214, 0.6);
}

/* ------------------------------------------------------------------ поиск */

.search-form {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  max-width: 760px;
}

.search-form__input {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
}

.search-form__input:focus {
  outline: 2px solid rgba(124, 47, 42, 0.22);
  border-color: var(--oxblood);
}

.search-form__hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.search-results {
  padding: 40px 0 96px;
}

.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.search-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.search-empty {
  max-width: 640px;
  padding: 40px 0;
}

.search-empty h2 {
  font-size: 30px;
  margin-bottom: 16px;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ статья */

.item__head {
  padding: 36px 0 0;
}

.item__head-inner {
  max-width: 860px;
  margin: 0 auto;
}

.item__head .crumbs {
  margin-bottom: 26px;
}

.item__kicker {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.item__title {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.item__title--sm {
  font-size: clamp(30px, 3.4vw, 44px);
}

.item__lead {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 720px;
}

.item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.item__author {
  color: var(--ink-2);
  font-weight: 600;
}

.item__cover {
  width: min(1120px, 92vw);
  margin: 44px auto 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
}

.item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.item__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 72px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.item__body {
  min-width: 0;
  max-width: 760px;
}

.item__aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.item__foot {
  padding: 24px 0 8px;
}

.item__source {
  max-width: 760px;
  padding: 22px 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.6);
  font-size: 13px;
  color: var(--muted);
}

.item__source-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.item__source a {
  color: var(--oxblood);
  border-bottom: 1px solid rgba(124, 47, 42, 0.3);
}

/* ------------------------------------------------------------------- TOC */

.toc {
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.7);
}

.toc__title {
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-left: 1px solid var(--line);
}

.toc__item {
  padding-left: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.toc__item a:hover {
  color: var(--oxblood);
}

.toc__item--h3 {
  padding-left: 24px;
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------- автор и пр. */

.author-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--card);
}

.author-card__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 16px;
  color: var(--oxblood);
}

.author-card__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.author-card__name {
  font-family: var(--serif);
  font-size: 17px;
  margin: 2px 0 4px;
}

.author-card__bio {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.aside-card {
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.7);
}

.aside-card__title {
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.aside-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--oxblood);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.7);
  transition: border-color 0.15s, color 0.15s;
}

.tag:hover {
  border-color: var(--oxblood);
  color: var(--oxblood);
}

.share__title {
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.share__links {
  display: flex;
  gap: 8px;
}

.share__links a,
.share__copy {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 34px;
  padding-inline: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.share__links a:hover,
.share__copy:hover {
  border-color: var(--oxblood);
  color: var(--oxblood);
}

.facts {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.facts__row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 13px;
}

.facts__row:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------- книга */

.book__layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 36px 0 8px;
}

.book__layout .crumbs {
  grid-column: 1 / -1;
}

.book__cover {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--paper-2);
}

.book__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book__info {
  padding-top: 12px;
}

.book__author {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--muted);
}

.book__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.book__pending {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* -------------------------------------------------------------------- карта */

.map-viewer {
  padding-top: 40px;
}

.map-viewer__frame {
  position: relative;
  display: block;
  width: 100%;
  max-height: 74vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  cursor: zoom-in;
}

.map-viewer__frame img {
  width: 100%;
  height: 100%;
  max-height: 74vh;
  object-fit: contain;
  background: var(--paper-3);
  transition: transform 0.4s var(--ease);
}

.map-viewer__frame:hover img {
  transform: scale(1.01);
}

.map-viewer__hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 253, 248, 0.92);
  font-size: 12px;
  color: var(--ink-2);
  backdrop-filter: blur(4px);
}

.map-viewer__caption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------------------------------------------ видео */

.video-player {
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: #0d0b09;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.video-player__iframe,
.video-player__video {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--cream);
  background: var(--ink-bg);
}

.video-player__empty p:first-child {
  font-family: var(--serif);
  font-size: 24px;
}

.video-player__empty .muted {
  color: rgba(244, 233, 214, 0.55);
  font-size: 13px;
}

/* ------------------------------------------------------------------- текст */

.prose {
  font-family: var(--serif);
  font-size: 19.5px;
  line-height: 1.72;
  color: var(--ink-2);
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose p {
  margin: 0;
}

.prose > p:first-of-type::first-letter {
  float: left;
  margin: 0.04em 0.09em 0 0;
  font-size: 3.55em;
  line-height: 0.82;
  color: var(--oxblood);
  font-weight: 600;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h4 {
  margin-top: 1.4em;
  font-size: 20px;
}

.prose a {
  color: var(--oxblood);
  border-bottom: 1px solid rgba(124, 47, 42, 0.32);
  transition: border-color 0.15s, background 0.15s;
}

.prose a:hover {
  border-color: var(--oxblood);
  background: rgba(124, 47, 42, 0.05);
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose em {
  font-style: italic;
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
}

.prose li {
  margin-top: 0.45em;
}

.prose li::marker {
  color: var(--gold);
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 24px;
  border-left: 2px solid var(--gold);
  font-size: 1.13em;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink);
}

.prose blockquote p + p {
  margin-top: 0.8em;
}

.prose hr {
  margin: 2.4em auto;
  width: 120px;
  border: 0;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: visible;
}

.prose hr::after {
  content: "◆";
  position: absolute;
  left: 50%;
  top: -0.72em;
  transform: translateX(-50%);
  padding: 0 10px;
  background: var(--paper);
  color: var(--gold);
  font-size: 10px;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.12em 0.38em;
  border-radius: 2px;
  background: rgba(33, 27, 21, 0.07);
  color: var(--ink);
}

.prose pre {
  margin: 1.6em 0;
  padding: 20px 22px;
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #26201a;
  color: #f4e9d6;
  font-size: 14px;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.prose img {
  border-radius: var(--radius);
}

.prose .md-figure {
  margin: 2em 0;
  text-align: center;
}

.prose .md-figure img {
  width: auto;
  max-width: 100%;
  max-height: 640px;
  margin-inline: auto;
  border: 1px solid var(--line-2);
}

.prose .md-figure figcaption {
  text-align: left;
}

.prose figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.prose .md-video {
  margin: 2em 0;
}

.prose .md-video__frame,
.prose .md-video video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.prose .md-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.prose .md-table {
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
}

.prose th {
  padding: 11px 14px;
  text-align: left;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose .md-callout {
  margin: 2em 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(176, 138, 79, 0.07);
  font-size: 0.94em;
}

.prose .md-callout__title {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a35;
}

.prose .md-callout--warning {
  border-left-color: var(--oxblood);
  background: rgba(124, 47, 42, 0.06);
}

.prose .md-callout--warning .md-callout__title {
  color: var(--oxblood);
}

.prose .md-callout--tip {
  border-left-color: var(--olive);
  background: rgba(78, 90, 66, 0.07);
}

.prose .md-callout--tip .md-callout__title {
  color: var(--olive);
}

.prose .md-anchor {
  margin-left: 0.3em;
  border: 0;
  color: var(--muted-2);
  opacity: 0;
  font-family: var(--sans);
  font-size: 0.6em;
  vertical-align: 0.2em;
}

.prose h2:hover .md-anchor,
.prose h3:hover .md-anchor {
  opacity: 1;
}

.prose mark {
  background: rgba(176, 138, 79, 0.25);
  color: inherit;
  padding: 0.05em 0.2em;
}

/* ----------------------------------------------------------------- об авторе */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 72px;
  padding: 56px 0 80px;
}

.about__main {
  max-width: 720px;
}

.about__main h2 {
  margin-top: 1.9em;
  font-size: 30px;
}

.about__main h2:first-child {
  margin-top: 0;
}

.about__aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}

.about__stats div {
  padding: 18px;
  background: var(--card);
}

.about__stats span {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  color: var(--oxblood);
  line-height: 1;
}

.about__stats p {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.about__contact {
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--card);
}

.about__contact h2 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.about__contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.about__contact a:hover {
  color: var(--oxblood);
}

.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.team__card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--card);
}

.team__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 20px;
  color: var(--oxblood);
}

.team__name {
  font-family: var(--serif);
  font-size: 18px;
}

.team__role {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2px 0 8px;
}

.team__bio {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------------------------------------------------------------- пустые */

.empty {
  padding: 72px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.4);
}

.empty__icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--oxblood);
  background: var(--card);
}

.empty h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.empty p {
  max-width: 460px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------------------------------- 404 */

.notfound {
  padding: 120px 0 140px;
  background: var(--ink-bg);
  color: var(--cream);
  min-height: 62vh;
}

.notfound__code {
  font-family: var(--serif);
  font-size: clamp(90px, 16vw, 200px);
  line-height: 0.8;
  color: rgba(228, 193, 133, 0.18);
  letter-spacing: -0.05em;
}

.notfound h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin: 8px 0 18px;
}

.notfound p {
  color: rgba(244, 233, 214, 0.7);
  max-width: 480px;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.notfound .btn--ghost {
  --btn-fg: var(--cream);
  border-color: rgba(244, 233, 214, 0.3);
}

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

.site-footer {
  background: var(--ink-bg);
  color: rgba(244, 233, 214, 0.75);
  padding-top: 64px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 52px;
}

.site-footer__about {
  margin-top: 18px;
  max-width: 340px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(244, 233, 214, 0.55);
}

.brand--footer {
  color: var(--cream);
}

.brand--footer .brand__mark {
  color: var(--gold);
}

.brand--footer .brand__bottom {
  color: rgba(244, 233, 214, 0.55);
}

.site-footer__title {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 233, 214, 0.45);
}

.site-footer__col a {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  color: rgba(244, 233, 214, 0.8);
  transition: color 0.15s;
}

.site-footer__col a:hover {
  color: var(--cream);
}

.site-footer__note {
  display: block;
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(244, 233, 214, 0.4);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(244, 233, 214, 0.12);
  font-size: 11.5px;
  color: rgba(244, 233, 214, 0.4);
}

/* --------------------------------------------------------------- лайтбокс */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(14, 11, 9, 0.94);
  backdrop-filter: blur(6px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid rgba(244, 233, 214, 0.18);
  background: var(--paper-3);
}

.lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3vh;
  text-align: center;
  color: rgba(244, 233, 214, 0.75);
  font-size: 13px;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(244, 233, 214, 0.25);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}

.lightbox__close:hover {
  background: rgba(244, 233, 214, 0.1);
}

/* ------------------------------------------------------------------ заявка */

.page-head--apply {
  padding-bottom: 40px;
}

.apply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 64px;
  padding: 48px 0 96px;
}

.apply__main {
  max-width: 720px;
}

.apply__main h2 {
  margin-top: 1.7em;
  font-size: clamp(24px, 2.4vw, 30px);
}

.apply__main h2:first-child {
  margin-top: 0;
}

.apply__aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}

.apply__card {
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.apply__eyebrow {
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.apply__status {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.apply__status--ok {
  color: var(--olive);
}

.apply__email {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.apply__hint {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.apply__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.header-apply {
  padding: 8px 12px;
  border: 1px solid rgba(124, 47, 42, 0.3);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--oxblood);
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}

.header-apply:hover {
  background: rgba(124, 47, 42, 0.06);
  border-color: var(--oxblood);
}

.btn--yandex {
  --btn-bg: #fc3f1d;
  --btn-fg: #ffffff;
}

.btn--yandex:hover {
  --btn-bg: #e5350f;
}

.btn__ya {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 2px;
  border-radius: 50%;
  background: #ffffff;
  color: #fc3f1d;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

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

@media (max-width: 1120px) {
  .header-apply {
    display: none;
  }

  .grid--latest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--latest .card--lead {
    grid-column: 1 / -1;
  }

  .grid--books {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__inner {
    gap: 40px;
  }

  .item__layout {
    gap: 48px;
  }

  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .site-footer__col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 4vw 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    padding: 14px 8px;
    font-size: 17px;
    border-bottom: 1px solid var(--line-2);
  }

  .nav__link::after {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-account span {
    display: none;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero__art {
    opacity: 0.4;
    width: 120vw;
    right: -30%;
  }

  .hero-card {
    max-width: 460px;
  }

  .section {
    padding: 64px 0;
  }

  .grid--maps,
  .grid--videos,
  .grid--related,
  .rubrics,
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .filters {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-2);
  }

  .filters__group {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .filters__note {
    grid-column: 1 / -1;
  }

  .item__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding-top: 40px;
  }

  .item__aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .item__aside > * {
    flex: 1 1 260px;
  }

  .toc {
    flex-basis: 100%;
  }

  .book__layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .about__aside {
    flex-direction: row;
  }

  .about__stats,
  .about__contact {
    flex: 1;
  }

  .page-head__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .apply {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 32px 0 64px;
  }

  .apply__aside {
    position: static;
  }

  .search-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-band__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .grid--latest,
  .grid--books,
  .grid--maps,
  .grid--videos,
  .grid--related,
  .grid--catalog,
  .rubrics,
  .team,
  .filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--latest .card--lead {
    grid-column: auto;
  }

  .card--lead .card__media {
    aspect-ratio: 3 / 2;
  }

  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .hero__title {
    font-size: clamp(38px, 11vw, 52px);
  }

  .page-head {
    padding: 28px 0 32px;
  }

  .catalog-search {
    width: 100%;
  }

  .catalog-search .input {
    width: 100%;
  }

  .catalog__toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pager__pages {
    display: none;
  }

  .pager {
    justify-content: space-between;
  }

  .item__meta {
    font-size: 12px;
  }

  .item__cover {
    margin-top: 28px;
    aspect-ratio: 4 / 3;
  }

  .book__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .book__cover {
    max-width: 260px;
  }

  .about__aside {
    flex-direction: column;
  }

  .prose {
    font-size: 18px;
  }

  .prose > p:first-of-type::first-letter {
    font-size: 3em;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 8px;
  }

  .card--row .card__thumb {
    width: 104px;
  }

  .cta-band {
    padding: 44px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .item__aside,
  .section--related,
  .share,
  .cta-band {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .item__layout {
    display: block;
    padding: 0;
  }

  .prose {
    font-size: 12pt;
  }
}
