/* Документы об образовании и редакционный раздел. */
.education-documents {
  width: min(1120px, calc(100vw - 48px));
  margin-top: 36px;
}
.education-documents__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.education-documents__head h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 400;
  line-height: 1.2;
}
.education-documents__head p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.document-gallery {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 14px;
  outline: none;
}
.document-gallery:focus-visible .document-gallery__viewport {
  outline: 3px solid rgba(157, 61, 43, .32);
  outline-offset: 4px;
}
.document-gallery__viewport {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(58, 51, 43, .22);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(65, 54, 43, .11);
}
.document-gallery__slide {
  display: block;
  margin: 0;
  background: #fff;
}
.document-gallery__slide[hidden] { display: none; }
.document-gallery__slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2573 / 1822;
  object-fit: contain;
}
.document-gallery__arrow {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(109, 43, 40, .28);
  border-radius: 50%;
  color: var(--accent-dark);
  background: rgba(248, 245, 239, .92);
  box-shadow: 0 8px 22px rgba(65, 54, 43, .08);
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.document-gallery__arrow:hover:not(:disabled) {
  border-color: rgba(109, 43, 40, .55);
  background: #fffaf2;
  transform: translateY(-1px);
}
.document-gallery__arrow:focus-visible {
  outline: 3px solid rgba(157, 61, 43, .32);
  outline-offset: 3px;
}
.document-gallery__arrow:disabled {
  cursor: default;
  opacity: .32;
}
.document-gallery__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 66px 0;
  color: var(--muted-2);
  font-size: 14px;
}
.document-gallery__open {
  color: var(--accent-dark);
  text-underline-offset: 4px;
}
.blog-shell, .article-shell {
  position: relative;
  z-index: 2;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(54px, 7vw, 88px) 0 clamp(78px, 9vw, 120px);
}
.blog-head { max-width: 800px; padding-bottom: clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line-strong); }
.blog-head h1, .article-head h1 {
  margin: 13px 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(45px, 7vw, 82px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.blog-head__lead, .article-head__lead { max-width: 690px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.65; }
.blog-empty { max-width: 690px; padding: clamp(42px, 6vw, 70px) 0; }
.blog-empty h2 { margin: 0 0 12px; font-family: var(--font-serif); font-size: clamp(27px, 3.5vw, 38px); font-weight: 400; line-height: 1.2; }
.blog-empty p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* Карточки появляются в оглавлении только после настоящей публикации. */
.editorial-section { padding-top: clamp(42px, 6vw, 70px); }
.editorial-section__title { margin: 0 0 28px; font-family: var(--font-serif); font-size: clamp(30px, 4vw, 45px); font-weight: 400; line-height: 1.15; }
.editorial-feature, .editorial-entry { min-width: 0; border-top: 1px solid var(--line-strong); }
.editorial-feature { display: grid; grid-template-columns: minmax(0, .35fr) minmax(0, .65fr); gap: clamp(20px, 4vw, 48px); padding: 29px 0 42px; }
.editorial-feature__mark { margin: 0; color: var(--accent-dark); font-family: var(--font-serif); font-size: clamp(45px, 7vw, 75px); line-height: 1; }
.editorial-feature__body, .editorial-entry__body { min-width: 0; }
.editorial-feature h3, .editorial-entry h3 { margin: 13px 0 14px; font-family: var(--font-serif); font-weight: 400; line-height: 1.16; overflow-wrap: anywhere; }
.editorial-feature h3 { font-size: clamp(30px, 4.2vw, 47px); }
.editorial-entry h3 { font-size: clamp(24px, 3vw, 32px); }
.editorial-feature h3 a, .editorial-entry h3 a { color: inherit; text-decoration-thickness: 1px; text-decoration-color: transparent; text-underline-offset: 5px; }
.editorial-feature h3 a:hover, .editorial-entry h3 a:hover, .editorial-feature h3 a:focus-visible, .editorial-entry h3 a:focus-visible { text-decoration-color: currentColor; }
.editorial-feature p, .editorial-entry p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.62; }
.editorial-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; color: var(--muted-2); font-size: 12px; letter-spacing: .035em; }
.editorial-meta__type { color: var(--accent-dark); font-weight: 600; }
.editorial-list { border-bottom: 1px solid var(--line); }
.editorial-entry { display: grid; grid-template-columns: minmax(0, .2fr) minmax(0, .8fr); gap: 22px; padding: 29px 0 35px; }
.editorial-entry__date { color: var(--muted-2); font-size: 13px; }
.editorial-link-label { display: inline-block; margin-top: 20px; color: var(--accent-dark); text-underline-offset: 4px; }

/* Статья: узкая колонка, обычные ссылки, сноски и крупные цитаты. */
.article-shell { width: min(980px, calc(100% - 48px)); }
.article-back { display: inline-block; margin-bottom: 39px; color: var(--accent-dark); text-underline-offset: 4px; }
.article-head { max-width: 780px; padding-bottom: 33px; border-bottom: 1px solid var(--line-strong); }
.article-head h1 { font-size: clamp(38px, 6vw, 69px); }
.article-head__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 29px 0 0; color: var(--muted-2); font-size: 13px; }
.article-body { max-width: 720px; padding: 37px 0 30px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.75; overflow-wrap: break-word; }
.article-body p { margin: 0 0 1.45em; }
.article-body h2, .article-body h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; scroll-margin-top: 95px; }
.article-body h2 { margin: 2.2em 0 .7em; font-size: clamp(29px, 3.6vw, 39px); }
.article-body h3 { margin: 1.9em 0 .6em; font-size: clamp(23px, 2.8vw, 29px); }
.article-body a, .article-notes a, .article-afterword a { color: var(--accent-dark); text-underline-offset: 3px; }
.article-body blockquote { margin: 2em 0; padding: 4px 0 4px clamp(20px, 3.8vw, 38px); border-left: 2px solid var(--accent-dark); font-family: var(--font-serif); font-size: clamp(21px, 2.6vw, 27px); line-height: 1.45; }
.article-body blockquote p { margin: 0; }
.article-body blockquote cite { display: block; margin-top: 12px; color: var(--muted-2); font-family: var(--font-sans); font-size: 13px; font-style: normal; }
.article-body ul, .article-body ol { padding-left: 1.45em; margin: 0 0 1.6em; }
.article-body li + li { margin-top: .45em; }
.article-body figure { margin: 2em 0; }
.article-body figcaption { margin-top: 10px; color: var(--muted-2); font-size: 13px; line-height: 1.5; }
.article-body img, .article-body svg { display: block; max-width: 100%; height: auto; }
.article-equation { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; padding: 16px 0; }
.article-equation math { font-size: 1.15em; }
.article-body pre { max-width: 100%; overflow-x: auto; padding: 18px; background: rgba(51, 41, 32, .06); font-size: .8em; line-height: 1.55; }
.article-body code { overflow-wrap: anywhere; }
.article-body sup { line-height: 0; }
.article-notes, .article-afterword, .article-author { max-width: 720px; border-top: 1px solid var(--line-strong); padding: 30px 0; }
.article-notes h2, .article-afterword h2, .article-author h2 { margin: 0 0 16px; font-family: var(--font-serif); font-size: 27px; font-weight: 400; }
.article-notes ol { margin: 0; padding-left: 1.4em; color: var(--muted); font-size: 14px; line-height: 1.65; }
.article-notes li { scroll-margin-top: 100px; padding-left: 5px; }
.article-notes li + li { margin-top: 10px; }
.article-afterword p, .article-author p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.article-afterword p:last-child, .article-author p:last-child { margin-bottom: 0; }
.article-author { border-bottom: 1px solid var(--line); }
@media (max-width: 767px) {
  .education-documents {
    width: calc(100vw - 32px);
    margin-left: calc((100vw - 32px - 100%) / -2);
    margin-top: 30px;
  }
  .education-documents__head {
    display: block;
    padding: 0 4px;
  }
  .education-documents__head p { margin-top: 8px; font-size: 14px; }
  .document-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .document-gallery__viewport { border-radius: 7px; }
  .document-gallery__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 42px;
    height: 42px;
    transform: translateY(-50%);
    background: rgba(248,245,239,.94);
    font-size: 27px;
  }
  .document-gallery__arrow:hover:not(:disabled) { transform: translateY(-50%); }
  .document-gallery__arrow--prev { left: 8px; }
  .document-gallery__arrow--next { right: 8px; }
  .document-gallery__meta { padding: 12px 4px 0; font-size: 13px; }
  .blog-shell, .article-shell { width: calc(100% - 32px); padding-top: 36px; }
  .blog-head h1 { font-size: clamp(39px, 9vw, 58px); }
  .editorial-feature, .editorial-entry { grid-template-columns: 1fr; gap: 8px; }
  .editorial-feature__mark { font-size: 43px; }
  .editorial-entry__date { margin-bottom: 3px; }
  .article-back { margin-bottom: 28px; }
  .article-body { padding-top: 25px; }
  .article-body blockquote { margin-left: 0; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .document-gallery__arrow { transition: none; }
}
