/* ==========================================================================
   pages.css: главная, путеводитель, история, маршрут, регион, источники
   ========================================================================== */

/* ---------- Заголовок внутренней страницы ---------- */
.p-head { position: relative; overflow: hidden; padding: clamp(26px, 4vw, 52px) 0 clamp(22px, 3vw, 38px); border-bottom: 1px solid var(--line); }
.p-head .eyebrow { margin-bottom: 12px; }
.p-head h1 { max-width: 940px; font-size: clamp(2.4rem, 5.8vw, 4.4rem); }
.p-head p { max-width: 740px; margin-top: 14px; color: var(--muted); font-size: 1.04rem; }
.p-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; }
.p-head__row .row { flex: 0 1 auto; max-width: 100%; }
.p-head__mark { position: absolute; right: 2%; top: 50%; width: clamp(130px, 19vw, 280px); height: clamp(130px, 19vw, 280px); transform: translateY(-46%); color: var(--ink); opacity: .055; pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.p-head__mark .ico { width: 100%; height: 100%; stroke-width: 1; }
.p-head--dark { background: var(--volga); border-color: transparent; color: #fff; }
.p-head--dark h1 { color: #fff; }
.p-head--dark p { color: rgba(255, 255, 255, .8); }
.p-head--dark .eyebrow { color: var(--gold-2); }
.p-head--dark .p-head__mark { color: #fff; opacity: .08; }
/* На планшетах и телефонах водяной знак оказывается поверх текста — не показываем его */
@media (max-width: 1023px) { .p-head__mark { display: none; } }
.p-head--img { color: #fff; background: var(--volga-ink); padding-block: clamp(70px, 11vw, 150px) clamp(36px, 5vw, 64px); }
.p-head--img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.p-head--img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 40, 51, .5), rgba(13, 40, 51, .25) 45%, rgba(13, 40, 51, .92)); }
.p-head--img .wrap { position: relative; z-index: 1; }
.p-head--img h1, .p-head--img h2 { color: #fff; }
.p-head--img p { color: rgba(255, 255, 255, .86); }
.p-head--img .eyebrow { color: var(--gold-2); }

/* ==========================================================================
   ГЛАВНАЯ
   ========================================================================== */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(600px, 100svh, 900px); overflow: hidden; background: var(--volga); color: #fff; }
.hero--noimg { background: radial-gradient(120% 90% at 82% 8%, #2C6A7F 0%, var(--volga) 52%, var(--volga-ink) 100%); }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 62%; animation: heroZoom 16s var(--ease) both; }
/* на широком экране монастырь уходит вправо и не спорит с заголовком */
@media (min-width: 1100px) { .hero__img { object-position: 0% 62%; } }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(13, 40, 51, .58) 0%, rgba(13, 40, 51, .12) 36%, rgba(13, 40, 51, .6) 70%, rgba(13, 40, 51, .92) 100%),
  linear-gradient(90deg, rgba(13, 40, 51, .8) 0%, rgba(13, 40, 51, .3) 52%, rgba(13, 40, 51, 0) 100%); }
.hero__in { padding-top: calc(var(--header-h) + clamp(36px, 9vh, 120px)); padding-bottom: clamp(24px, 4vh, 44px); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 7px 15px 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .26); color: var(--gold-2); font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero__eyebrow .ico { width: 1.35em; height: 1.35em; }
.hero__title { margin-left: -.035em; color: #fff; font-size: clamp(4.2rem, 14vw, 11.5rem); line-height: .84; letter-spacing: -.012em; text-shadow: 0 8px 46px rgba(0, 0, 0, .38); }
.hero__sub { max-width: 700px; margin: 30px 0 0; font-family: var(--font-read); font-style: italic; font-size: clamp(1.12rem, 2.3vw, 1.68rem); line-height: 1.35; color: var(--gold-2); }
.hero__lead { max-width: 590px; margin: 14px 0 0; font-size: clamp(1rem, 1.25vw, 1.13rem); line-height: 1.6; color: rgba(255, 255, 255, .9); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; padding-bottom: 22px; }
.hero__stats .stat { padding: 14px 18px 12px; border: 0; border-top: 1px solid rgba(255, 255, 255, .18); border-radius: 0; background: none; }

/* Заголовок раздела в одну строку с кнопкой */
.s-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; max-width: none; }
.s-head--row > div { max-width: 760px; }
.s-head--row .btn { flex: none; margin-bottom: 6px; }

/* Лента времени (горизонтальная) */
.tl--h { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(230px, 24vw, 300px); gap: 14px; margin-top: 26px; padding: 4px 4px 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--volga) 62%, var(--paper)) transparent; cursor: grab; }
.tl--h.is-drag { cursor: grabbing; scroll-snap-type: none; }
.tl--h::-webkit-scrollbar { height: 8px; }
.tl--h::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--volga) 62%, var(--paper)); border: 2px solid transparent; border-radius: 8px; background-clip: padding-box; }
.tl--h::-webkit-scrollbar-thumb:hover { background: var(--volga); }
.tl--h::-webkit-scrollbar-track { background: transparent; }
.tl__i { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px 22px 20px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tl__i::before { content: ''; position: absolute; left: 24px; top: -20px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--paper); }
.tl__i::after { content: ''; position: absolute; left: 44px; right: -22px; top: -15px; height: 2px; background: var(--line-2); }
.tl__i:last-child::after { display: none; }
.tl--h { padding-top: 24px; }
.tl__i.is-approx::before { background: var(--gold); }
.tl__year { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--red); }
.is-approx .tl__year { color: var(--gold); }
.tl__t { font-weight: 600; line-height: 1.35; }
.tl__i p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Плитки «Что внутри» */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 24px 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); }
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); color: var(--ink); border-color: var(--line-2); }
.tile__ic { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 14px; background: var(--gold-soft); color: var(--red); }
.tile__ic .ico { width: 26px; height: 26px; }
.tile h3 { font-size: 1.12rem; }
.tile p { margin: 0; color: var(--muted); font-size: .9rem; }
.tile__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; color: var(--red); font-weight: 600; font-size: .9rem; }
.tile__more .ico { transition: transform var(--t) var(--ease); }
.tile:hover .tile__more .ico { transform: translateX(4px); }
.tile--lg { grid-column: span 2; grid-row: span 2; background: var(--volga); border-color: transparent; }
.tile--lg:hover { border-color: transparent; background: var(--volga-2); }
.tile--lg::after { content: ''; position: absolute; right: -70px; bottom: -70px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(228, 196, 118, .32), transparent 68%); pointer-events: none; }
.tile--lg .tile__ic { background: rgba(255, 255, 255, .12); color: var(--gold-2); }
.tile__n { display: block; margin-top: auto; font-family: var(--font-display); font-size: clamp(4.2rem, 7vw, 6.2rem); line-height: .9; color: var(--gold-2); }
.tile__cap { display: block; margin: -2px 0 10px; color: rgba(255, 255, 255, .72); font-size: .92rem; }
.tile--lg h3 { color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; }
.tile--lg p { color: rgba(255, 255, 255, .82); font-size: .98rem; max-width: 420px; }
.tile--lg .tile__more { color: var(--gold-2); }

/* Избранные места в арках */
.archs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.archcard { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink); }
.archcard .arch { width: 100%; max-width: 330px; }
.archcard:nth-child(2) { margin-top: 44px; }
.archcard__no { position: relative; z-index: 2; display: inline-grid; place-items: center; min-width: 54px; height: 34px; margin-top: -17px; padding: 0 12px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--font-display); font-size: 1.2rem; line-height: 1; }
.archcard h3 { margin-top: 4px; font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; }
.archcard__short { color: var(--red); font-weight: 600; font-size: .9rem; }
.archcard p { max-width: 370px; margin: 0; color: var(--muted); font-size: .94rem; }
.archcard:hover { color: var(--ink); }

/* Анонс повести */
.teaser { position: relative; overflow: hidden; background: var(--volga-ink); color: #fff; }
.teaser::before { content: ''; position: absolute; inset: 0; background:
  radial-gradient(70% 110% at 100% 0%, rgba(192, 138, 43, .36), transparent 62%),
  radial-gradient(55% 90% at 0% 100%, rgba(181, 52, 31, .42), transparent 62%); }
.teaser__in { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(28px, 5vw, 76px); padding-block: clamp(56px, 8vw, 104px); }
.teaser__in--solo { grid-template-columns: 1fr; }
.teaser h2 { color: #fff; }
.teaser p { color: rgba(255, 255, 255, .84); font-size: 1.04rem; }
.teaser .eyebrow { color: var(--gold-2); }
.teaser__quote { position: relative; margin: 0; padding: 30px 32px 26px; border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .06); font-family: var(--font-read); font-style: italic; font-size: 1.1rem; line-height: 1.75; white-space: pre-line; }
.teaser__quote cite { display: block; margin-top: 14px; font-family: var(--font-ui); font-style: normal; font-size: .84rem; color: rgba(255, 255, 255, .66); }

/* Призыв к действию */
.cta__in { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 54px); text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.cta__p { max-width: 560px; margin: 14px auto 0; color: var(--muted); font-size: 1.04rem; }
.cta .eyebrow { justify-content: center; }

/* ==========================================================================
   ПУТЕВОДИТЕЛЬ
   ========================================================================== */
.toolbar { position: sticky; top: var(--header-h); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 22px; padding: 14px 0; border-bottom: 1px solid var(--line); background: rgba(244, 237, 223, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.toolbar__spacer { flex: 1 1 0; }
.seg { display: inline-flex; flex: none; padding: 4px; border-radius: 999px; background: var(--paper-2); }
.seg button { padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: .88rem; line-height: 1.2; transition: background-color var(--t), color var(--t); }
.seg button:hover { color: var(--ink); }
.seg button.is-active { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--muted)); }
.chip.is-active .dot { background: var(--gold-2); }
.search { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 220px; max-width: 330px; height: 40px; padding: 0 8px 0 14px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--muted); transition: border-color var(--t), box-shadow var(--t); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--gold-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); font-size: .93rem; }
.search input::placeholder { color: var(--muted); }
.search button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.result-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; color: var(--muted); font-size: .9rem; }
.guide-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); align-items: stretch; }
.card__addr { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__addr .ico { width: .95em; height: .95em; color: var(--red); }
.card__foot .btn { flex: none; }
.card .sight__short { color: var(--red); font-weight: 600; font-size: .9rem; }
.card__media.noimg { display: grid; place-items: center; }
.card__media.noimg::after { content: ''; width: 23%; aspect-ratio: 1; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M12 1.5v2'/><path d='M8.6 7.6 12 3.4l3.4 4.2z'/><path d='M8.6 7.6h6.8v4.6H8.6z'/><path d='M10.7 12.2v-1.9a1.3 1.3 0 0 1 2.6 0v1.9'/><path d='M7.4 12.2h9.2'/><path d='M9.4 12.2 8.2 21M14.6 12.2l1.2 8.8'/><path d='M11.1 21v-2.3a.9.9 0 0 1 1.8 0V21'/><path d='M5 21h14'/></svg>") center / contain no-repeat; }
.select { max-width: 100%; min-width: 0; height: 36px; padding: 0 34px 0 14px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B4035' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") right 12px center / 16px no-repeat; -webkit-appearance: none; appearance: none; color: var(--ink); font-size: .88rem; font-weight: 500; cursor: pointer; }
.select:focus-visible { outline: 3px solid var(--gold); }
.search button[hidden] { display: none; }
.empty { padding: 50px 24px; text-align: center; background: var(--card); border: 1.5px dashed var(--line-2); border-radius: var(--radius-lg); color: var(--muted); }
.empty h3 { margin-bottom: 6px; }

/* Карточка места (окно) */
.sight-dlg { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: start; gap: clamp(18px, 2.6vw, 36px); }
.sight-dlg__media { position: sticky; top: 8px; }
.sight-dlg__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: linear-gradient(135deg, var(--volga), var(--volga-2)); }
.sight-dlg__img img { width: 100%; height: 100%; object-fit: cover; }
.sight-dlg__img.noimg { display: grid; place-items: center; }
.sight-dlg__img.noimg::after { content: ''; width: 22%; aspect-ratio: 1; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.45' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><path d='M12 1.5v2'/><path d='M8.6 7.6 12 3.4l3.4 4.2z'/><path d='M8.6 7.6h6.8v4.6H8.6z'/><path d='M10.7 12.2v-1.9a1.3 1.3 0 0 1 2.6 0v1.9'/><path d='M7.4 12.2h9.2'/><path d='M9.4 12.2 8.2 21M14.6 12.2l1.2 8.8'/><path d='M11.1 21v-2.3a.9.9 0 0 1 1.8 0V21'/><path d='M5 21h14'/></svg>") center / contain no-repeat; }
.sight-dlg__credit { display: block; margin-top: 8px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.sight-dlg__credit a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); }
.sight-dlg__body { min-width: 0; overflow-wrap: anywhere; }
.sight-dlg__body > :first-child { margin-top: 4px; }
.sight-dlg h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.sight-dlg__off { margin: 2px 0 10px; color: var(--muted); font-size: .92rem; }
.sight-dlg__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sight-dlg__lead { font-family: var(--font-read); font-size: 1.1rem; line-height: 1.65; color: var(--ink) !important; }
.sight-dlg h3 { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 400; font-size: 1.65rem; }
.sight-dlg h3 .ico { color: var(--red); width: 1.1em; height: 1.1em; }
.sight-dlg p { color: var(--ink-2); font-size: 1rem; line-height: 1.7; }
.facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: f; }
.facts li { position: relative; padding: 12px 14px 12px 50px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-2); font-size: .95rem; line-height: 1.55; counter-increment: f; }
.facts li::before { content: counter(f); position: absolute; left: 13px; top: 12px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--red); font-size: .8rem; font-weight: 700; }
.looklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.looklist li { position: relative; padding: 4px 0 4px 32px; color: var(--ink-2); }
.looklist li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 14px; height: 14px; border: 2px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--paper); }
.sight-dlg__visit { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font-size: .94rem; }
.sight-dlg__visit dt { color: var(--muted); font-weight: 500; white-space: nowrap; }
.sight-dlg__visit dd { margin: 0; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.sight-dlg__act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sight-dlg__act .btn { white-space: normal; text-align: center; }
/* Статус объекта бывает очень длинным («Объект культурного наследия народов РФ федерального значения») — плашка переносится, а не растягивает карточку */
.sight-dlg .pill { white-space: normal; text-align: left; }
.sight-dlg p .pill { text-wrap: balance; }
.sight-dlg__src { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.sight-dlg__src a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); }
.sight-dlg__src li { margin: 3px 0; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  /* Узкий экран: картинка над текстом, колонка строго по ширине окна (minmax(0, …) — чтобы длинная строка не раздвинула карточку),
     а крестик стоит над картинкой, а не поверх неё */
  .sight-dlg { grid-template-columns: minmax(0, 1fr); margin-top: 52px; }
  .sight-dlg__media { position: static; min-width: 0; }
  .sight-dlg__img { aspect-ratio: 16 / 10; }
}

@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--lg { grid-column: span 2; }
  .archs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 14px; }
  .archcard:nth-child(2) { margin-top: 24px; }
}
@media (max-width: 980px) {
  .toolbar { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .search { max-width: none; flex-basis: 100%; }
  .teaser__in { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero { min-height: max(560px, 100svh); }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
  .hero__stats .stat { padding: 12px 10px 10px 0; }
}
@media (max-width: 640px) {
  .s-head--row { flex-direction: column; align-items: flex-start; }
  .tiles { grid-template-columns: 1fr; }
  .tile--lg { grid-column: auto; grid-row: auto; }
  .archs { grid-template-columns: 1fr; gap: 34px; }
  .archcard:nth-child(2) { margin-top: 0; }
  .tl--h { grid-auto-columns: 82%; }
  .p-head__row .row { width: 100%; }
  .p-head__row .row > .btn { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   МАРШРУТ
   ========================================================================== */
.p-head--img .row { margin-top: 22px; }
.route-about { display: grid; grid-template-columns: 1.05fr .95fr; align-items: start; gap: clamp(24px, 4vw, 60px); }
.route-about h2 { margin-bottom: 14px; }
.route-about__text p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.7; }
.route-parts { display: grid; gap: 10px; margin-top: 22px; }
.route-parts__i { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: start; gap: 14px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.route-parts__r { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--red); }
.route-parts__i b { display: block; }
.route-parts__i p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.route-map { position: sticky; top: calc(var(--header-h) + 16px); }
#route-map { height: 500px; border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: var(--paper-2); }
.route-map__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; color: var(--muted); font-size: .86rem; }
.stop.is-target .stop__card { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft), var(--shadow-md); }
.stops { position: relative; margin: 0; padding: 0 0 0 84px; list-style: none; }
.stops::before { content: ''; position: absolute; left: 26px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: repeating-linear-gradient(180deg, var(--red) 0 10px, transparent 10px 18px); }
.stop { position: relative; padding-bottom: 24px; }
.stop:last-child { padding-bottom: 0; }
.stop__n { position: absolute; left: -84px; top: 0; z-index: 2; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--font-display); font-size: 1.7rem; line-height: 1; box-shadow: 0 0 0 7px var(--paper-2), 0 8px 18px rgba(181, 52, 31, .35); }
.stop__card { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color var(--t), box-shadow var(--t); }
.stop__media { position: relative; display: block; min-height: 280px; overflow: hidden; background: linear-gradient(135deg, var(--volga), var(--volga-2)); }
.stop__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.stop__media:hover img { transform: scale(1.045); }
.stop__body { display: flex; flex-direction: column; gap: 8px; padding: clamp(18px, 2.4vw, 30px); }
.stop__body h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.65rem, 2.5vw, 2.25rem); line-height: 1.08; }
.stop__body h3 a { color: inherit; }
.stop__short { margin: 0; color: var(--red); font-weight: 600; }
.stop__lead { margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.65; }
.stop__more { margin-top: 4px; border-top: 1px solid var(--line); }
.stop__more summary { display: flex; align-items: center; gap: 8px; padding: 12px 0 2px; color: var(--red); font-weight: 600; font-size: .93rem; cursor: pointer; list-style: none; }
.stop__more summary::-webkit-details-marker { display: none; }
.stop__more summary .ico { transition: transform var(--t); }
.stop__more[open] summary .ico { transform: rotate(90deg); }
.stop__more h4 { margin: 16px 0 6px; color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.stop__more p { color: var(--ink-2); font-size: .95rem; line-height: 1.65; }
.stop__more .looklist { margin-top: 4px; }
.stop__acts { margin-top: auto; padding-top: 12px; }
.stop__next { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; margin-top: 12px; }
.stop__why, .stop__walk { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink-2); font-size: .93rem; }
.stop__why { border-left: 4px solid var(--gold); }
.stop__walk { border-left: 4px solid var(--cat-museum); }
.stop__next b { display: block; margin-bottom: 4px; color: var(--ink); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.stop__next p { margin: 0; line-height: 1.55; }
.stop__dist { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--volga); font-weight: 600; }
.stop__part { position: relative; margin: 4px 0 26px; padding: 20px 24px; border-radius: var(--radius); background: var(--volga); color: #fff; }
.stop__part span { color: var(--gold-2); font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.stop__part h3 { margin-top: 4px; color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
.stop__part p { max-width: 780px; margin: 6px 0 0; color: rgba(255, 255, 255, .84); font-size: .95rem; }
.tip { padding: 22px 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tip > .ico { width: 30px; height: 30px; color: var(--red); }
.tip h3 { margin-top: 10px; }
.tip p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 980px) {
  .route-about { grid-template-columns: 1fr; }
  .route-map { position: static; }
  #route-map { height: 420px; }
}
@media (max-width: 820px) {
  .stops { padding-left: 0; }
  .stops::before { display: none; }
  .stop { padding-bottom: 36px; }
  .stop__n { position: relative; left: 0; top: 0; width: 46px; height: 46px; margin: 0 0 -23px 16px; font-size: 1.35rem; box-shadow: 0 0 0 5px var(--paper-2); }
  .stop__card { grid-template-columns: 1fr; }
  .stop__media { min-height: 0; aspect-ratio: 16 / 9; }
  .stop__media img { position: static; }
  .stop__next { grid-template-columns: 1fr; }
  .route-parts__i { grid-template-columns: 40px minmax(0, 1fr); padding: 12px 14px; }
  .route-parts__r { font-size: 1.5rem; }
}

/* ==========================================================================
   ИСТОРИЯ
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.periods { display: grid; grid-template-columns: 310px minmax(0, 1fr); align-items: start; gap: clamp(20px, 3.5vw, 48px); }
.periods__nav { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 6px; }
.periods__btn { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: left; color: var(--ink); transition: border-color var(--t), background-color var(--t), transform var(--t) var(--ease); }
.periods__btn .r { font-family: var(--font-display); font-size: 1.55rem; line-height: 1; color: var(--muted); }
.periods__btn b { display: block; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.periods__btn small { display: block; color: var(--muted); font-size: .8rem; }
.periods__btn:hover { border-color: var(--line-2); transform: translateX(3px); }
.periods__btn.is-active, .periods__btn.is-active:hover { background: var(--volga); border-color: var(--volga); color: #fff; transform: none; }
.periods__btn.is-active .r { color: var(--gold-2); }
.periods__btn.is-active small { color: rgba(255, 255, 255, .7); }
.period { padding: clamp(22px, 3.2vw, 44px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); animation: fadeIn .5s ease both; }
.period h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.period__years { display: inline-block; margin: 0 0 10px; padding: 4px 13px; border-radius: 999px; background: var(--gold-soft); color: #7A5512; font-size: .8rem; font-weight: 600; }
.period__lead { margin: 10px 0 4px; font-family: var(--font-read); font-size: 1.16rem; line-height: 1.6; color: var(--ink) !important; }
.period p { color: var(--ink-2); font-family: var(--font-read); font-size: 1.06rem; line-height: 1.8; }
.period__img { margin: 18px 0 6px; }
.period__img img { width: 100%; height: auto; max-height: 440px; object-fit: cover; border-radius: var(--radius); }
.period__img figcaption { margin-top: 8px; color: var(--muted); font-size: .82rem; }
/* две иллюстрации к периоду: пара одинаковых кадров или узкий портрет сбоку */
.period__figs { display: grid; gap: 18px; margin: 18px 0 6px; }
.period__figs .period__img { margin: 0; }
.period__figs:not(.period__figs--side) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.period__figs:not(.period__figs--side) img { aspect-ratio: 16 / 10; max-height: none; }
.period__figs .period__img:only-child { grid-column: 1 / -1; }
.period__figs--side { grid-template-columns: minmax(0, 1fr) 220px; align-items: start; }
.period__figs--side img { max-height: 330px; }
.period__figs--side figure:last-child img { max-height: none; object-fit: contain; }
@media (max-width: 640px) {
  .period__figs:not(.period__figs--side) { grid-template-columns: 1fr; }
  .period__figs:not(.period__figs--side) img { aspect-ratio: auto; max-height: 440px; }
  .period__figs--side { grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; }
}

.tl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.tl-bar > * { min-width: 0; max-width: 100%; } /* иначе длинные названия периодов в списке растягивают панель шире экрана */
.tl-v { position: relative; margin: 0; padding: 0; list-style: none; }
.tl-v::before { content: ''; position: absolute; left: 121px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: repeating-linear-gradient(180deg, var(--line-2) 0 10px, transparent 10px 18px); }
.tl-v__i { position: relative; display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 56px; padding: 7px 0; }
.tl-v__y { padding-top: 10px; text-align: right; font-family: var(--font-display); font-size: 2.3rem; line-height: 1.1; color: var(--muted); }
.is-key .tl-v__y { color: var(--red); }
.tl-v__i::before { content: ''; position: absolute; left: 114px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper-2); border: 4px solid var(--line-2); }
.is-key.tl-v__i::before { border-color: var(--red); background: #fff; box-shadow: 0 0 0 5px var(--red-soft); }
.tl-v__c { padding: 15px 20px 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.is-key .tl-v__c { border-left: 4px solid var(--red); }
.tl-v__c b { font-weight: 600; font-size: 1.02rem; }
.tl-v__c .pill { margin-left: 8px; vertical-align: middle; }
.tl-v__c p { margin: 4px 0 0; color: var(--ink-2); font-size: .93rem; }
#tl-more[hidden] { display: none; }

.legends { display: grid; gap: 16px; }
.legend { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.legend__t { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 22px; background: var(--volga); color: #fff; }
.legend__t .no { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--gold-2); }
.legend__t h3 { color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; }
.legend__c { padding: 22px; }
.legend__c + .legend__c { border-left: 1px solid var(--line); }
.legend__c h4 { margin-bottom: 8px; color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.legend__c--myth h4 { color: var(--red); }
.legend__c--truth h4 { color: var(--moss); }
.legend__c p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.65; }

.lit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lit__c { display: flex; flex-direction: column; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.lit__c .who { color: var(--red); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.lit__c h3 { margin-top: 8px; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.lit__c blockquote { margin: 14px 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--gold); font-family: var(--font-read); font-style: italic; font-size: 1.02rem; line-height: 1.6; color: var(--ink); }
.lit__c p { color: var(--ink-2); font-size: .94rem; }
.lit__c .s-more { margin-top: auto; }

@media (max-width: 980px) {
  .periods { grid-template-columns: 1fr; }
  .periods__nav { position: static; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .periods__nav::-webkit-scrollbar { display: none; }
  .legend { grid-template-columns: 1fr; }
  .legend__c + .legend__c { border-left: 0; border-top: 1px solid var(--line); }
  .lit { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tl-v::before { left: 7px; }
  .tl-v__i { grid-template-columns: 1fr; gap: 0; padding: 8px 0 8px 34px; }
  .tl-v__i::before { left: 0; top: 14px; }
  .tl-v__y { padding: 0 0 4px; text-align: left; font-size: 1.7rem; }
  .legend__t { padding: 18px 20px; }
  .legend__c { padding: 18px 20px; }
}
