@font-face {
  font-family: "PT Sans Narrow";
  src: url("/fonts/ptsans-narrow-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* Цвета топографической карты: горизонтали, вода, лес, краска метки тропы */
:root {
  --paper: #eef1ec;
  --ink: #1d2a22;
  --ink-soft: #4d5d53;
  --contour: #9a5b2e;
  --water: #2a6696;
  --forest: #d5e2cf;
  --mark: #c8352b;
  --mark-white: #ffffff;
  --rule: #b9c5bb;
  --on-mark: #ffffff;
  --display: "PT Sans Narrow", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "PT Serif", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131b16;
    --ink: #e3eae4;
    --ink-soft: #a6b5ab;
    --contour: #d49b6b;
    --water: #8cbfe6;
    --forest: #213229;
    --mark: #f0675b;
    --mark-white: #e3eae4;
    --rule: #34453a;
    --on-mark: #131b16;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.7 var(--text);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--water); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--water); outline-offset: 3px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.4rem 0.8rem; z-index: 2; }

.wrap { max-width: 46rem; margin: 0 auto; padding-inline: 1.25rem; }

/* Шапка */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-block: 1.5rem 1.1rem;
}
.name {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 700 1.85rem/1 var(--display); color: var(--ink); text-decoration: none;
}
.mark { width: 0.95rem; height: 1.35rem; flex: none; }
.m-red { fill: var(--mark); }
.m-white { fill: var(--mark-white); stroke: var(--rule); stroke-width: 0.6; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }
.top nav a { font: 700 1.12rem/1.6 var(--display); color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--water); }
.top nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--mark); }

.where { font: 700 1.02rem/1.3 var(--display); color: var(--contour); }
.where.note { color: var(--ink-soft); }

/* Главный поход: горизонтали на фоне и профиль высот */
.hero { position: relative; padding-block: 0.8rem 0.4rem; margin-bottom: 2.2rem; }
.contours {
  position: absolute; inset: -0.5rem -1.25rem auto; height: 15rem; width: calc(100% + 2.5rem);
  z-index: -1; pointer-events: none;
}
.contours polygon { fill: none; stroke: var(--contour); stroke-width: 1; opacity: 0.22; }
.hero > .where { margin: 0; }
.hero h1 {
  font: 700 clamp(2.15rem, 6.2vw, 3.6rem)/1.02 var(--display);
  margin: 0.35rem 0 0.6rem; max-width: 18ch; letter-spacing: -0.005em;
}
.hero h1 a { color: var(--ink); text-decoration: none; }
.hero h1 a:hover { color: var(--water); }
.facts { font: 700 1.15rem/1.4 var(--display); color: var(--ink-soft); margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.hero-lead { margin: 0.4rem 0 0; max-width: 40rem; }

.track { margin: 0 0 1.6rem; }
.profile { display: block; width: 100%; height: auto; overflow: visible; }
.pf-area { fill: var(--forest); }
.pf-line { fill: none; stroke: var(--contour); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pf-grid { stroke: var(--rule); stroke-width: 1; }
.pf-night { stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 2 4; }
.pf-t { font: 700 13px var(--display); fill: var(--ink-soft); }
.pf-day { fill: var(--ink); }
.pf-dot { fill: var(--mark); stroke: var(--paper); stroke-width: 2.5; }
.pf-n { font: 700 12px var(--display); fill: var(--on-mark); }
.track figcaption { font-size: 0.95rem; color: var(--ink-soft); }
.track figcaption p { margin: 0.3rem 0 0; }
.points {
  margin: 0.5rem 0 0; padding: 0; list-style: none; counter-reset: pt;
  display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem;
}
.points li { counter-increment: pt; display: inline-flex; gap: 0.45rem; align-items: baseline; }
.points li::before {
  content: counter(pt); font: 700 0.8rem/1.45rem var(--display); color: var(--on-mark); background: var(--mark);
  min-width: 1.45rem; height: 1.45rem; border-radius: 50%; text-align: center; flex: none;
}

h2 { font: 700 1.8rem/1.15 var(--display); margin: 2.4rem 0 0.8rem; }

/* Список записей */
.entries { list-style: none; padding: 0; margin: 0; }
.entries li {
  display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 1.6rem; align-items: start;
  border-top: 1px solid var(--rule); padding-block: 1.15rem 1.25rem;
}
.entries li:last-child { border-bottom: 1px solid var(--rule); }
.meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1rem; margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.entries h3 { font: 700 1.55rem/1.15 var(--display); margin: 0.35rem 0 0.35rem; }
.entries h3 a { color: var(--ink); text-decoration: none; }
.entries h3 a:hover { color: var(--water); text-decoration: underline; text-decoration-thickness: 2px; }
.entries .body > p:last-child { margin: 0; }
.side { width: 8.5rem; padding-top: 0.4rem; }
.side p { margin: 0.2rem 0 0; font: 700 0.98rem/1.3 var(--display); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.spark { display: block; width: 100%; height: auto; }
.spark .pf-line { stroke-width: 1.6; }

/* Закрытый раздел */
.members {
  margin-block: 2.8rem 1rem; padding: 1.1rem 1.3rem; background: var(--forest);
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
}
.members .lock { width: 1.9rem; height: 1.9rem; margin-top: 0.25rem; color: var(--contour); }
.members h2 { margin: 0 0 0.2rem; font-size: 1.5rem; }
.members p { margin: 0; }

/* Страницы */
.page-title, .article h1 { font: 700 clamp(2rem, 5.4vw, 3.1rem)/1.05 var(--display); margin: 0.5rem 0 0.8rem; }
.lead { font-size: 1.18rem; line-height: 1.55; margin: 0 0 1.2rem; }
.article > .meta { margin-top: 0.6rem; }
.article ul, .article ol:not(.points) { padding-left: 1.4rem; }
.article li { margin-bottom: 0.5rem; }
.article li::marker { font-family: var(--display); font-weight: 700; color: var(--contour); }
.article blockquote { margin: 1.6rem 0; padding: 0.1rem 0 0.1rem 1.1rem; border-left: 4px solid var(--mark); font-style: italic; }
.next { margin-top: 2.6rem; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
.next p { margin: 0.3rem 0; }

.table { overflow-x: auto; margin-block: 1rem 1.4rem; }
.table table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.table th, .table td { text-align: left; padding: 0.5rem 0.8rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font: 700 1.02rem/1.3 var(--display); }
.table td.n, .table th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 0; }

.foot { margin-top: 4rem; padding-block: 1.2rem 2.4rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.92rem; }
.foot p { margin: 0.2rem 0; }

@media (max-width: 34rem) {
  body { font-size: 1rem; }
  .name { font-size: 1.65rem; }
  .pf-axis { display: none; }
  .pf-t { font-size: 20px; }
  .pf-n { font-size: 15px; }
  .pf-dot { r: 12px; }
  .entries li { grid-template-columns: 1fr; }
  .side { width: 9rem; padding-top: 0.2rem; }
  .entries h3 { font-size: 1.4rem; }
}
