.tolstoy-article .story-g__hero-grid {
  min-height: 0;
  background: var(--g-paper);
}

.tolstoy-article .story-g__hero-copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 82px 24px 24px;
}

.tolstoy-article .story-g__breadcrumbs {
  flex-wrap: wrap;
  white-space: normal;
}

.tolstoy-article .story-g__hero-copy > p {
  max-width: 34rem;
  margin: 24px auto 0;
}

.tolstoy-article .story-g__hero-pattern {
  position: static;
  width: min(100%, 545px);
  height: auto;
  aspect-ratio: 844 / 312;
  object-fit: contain;
  margin: auto auto 0;
  padding-top: 0;
}

.tolstoy-article .story-g__hero-copy > p + .story-g__hero-pattern {
  margin-top: 24px;
}

.tolstoy-article .story-g__hero-art {
  min-height: 0;
  padding: 54px 0 76px;
  background: var(--g-city-zheleznovodsk, #7dae99);
}

.tolstoy-hero-photo {
  position: relative;
  z-index: 1;
  margin: 0;
}

.tolstoy-hero-photo .story-g__hero-card {
  width: 100%;
}

.tolstoy-hero-photo .story-g__hero-front {
  height: auto;
}

.tolstoy-hero-photo figcaption {
  margin-top: 24px;
  color: #25233a;
  text-align: center;
}

.tolstoy-article .tolstoy-split-grid {
  display: grid;
  align-items: center;
}

.tolstoy-split-copy {
  margin-inline: auto;
}

.tolstoy-split-media {
  min-width: 0;
  justify-self: center;
}

.tolstoy-article .tolstoy-figure {
  min-width: 0;
  margin: 0;
}

.tolstoy-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--article-photo-radius);
}

.tolstoy-figure figcaption {
  margin-top: 10px;
  text-align: center;
  text-wrap: pretty;
}

.tolstoy-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
}

.tolstoy-media-column {
  display: grid;
  gap: inherit;
  align-content: start;
}

.tolstoy-media-column:nth-child(2) {
  margin-top: clamp(16px, 3vw, 38px);
}

.tolstoy-painting img {
  filter: url(#tolstoy-painting-light);
}

.tolstoy-image-filter {
  position: absolute;
}

.tolstoy-illustrations figcaption {
  margin-top: 10px;
  text-align: center;
}

.tolstoy-artwork {
  position: relative;
  overflow: hidden;
  border-radius: var(--article-photo-radius);
}

.tolstoy-artwork img {
  width: 100%;
  height: auto;
  display: block;
}

.tolstoy-artwork--cossacks-lukashka {
  aspect-ratio: 308 / 432;
}

.tolstoy-artwork--cossacks-lukashka img {
  position: absolute;
  top: -1.85%;
  left: -2.6%;
  width: 105.2%;
  max-width: none;
  filter: brightness(1.38) contrast(.94);
}

.tolstoy-artwork--cossacks-maryana img {
  filter: brightness(1.12);
}

.tolstoy-artwork--lanceray-rider-1917 {
  aspect-ratio: 812 / 947;
}

.tolstoy-artwork--lanceray-rider-1917 img {
  position: absolute;
  top: -33.9%;
  left: -22%;
  width: 146.4%;
  max-width: none;
}

#tsvetnik .tolstoy-figure img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 70%;
}

#park-gallery {
  padding-bottom: 0;
}

#tsvetnik {
  padding-top: clamp(12px, 1.4vw, 20px);
}

.tolstoy-article .tolstoy-video {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
}

#route-video .tolstoy-video {
  width: min(calc(100% - 64px), 410px);
}

.tolstoy-video-frame {
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--article-photo-radius);
  overflow: hidden;
  background: #17241b;
}

.tolstoy-video-play,
.tolstoy-video-play img,
.tolstoy-video-frame > video {
  display: block;
  width: 100%;
  height: 100%;
}

.tolstoy-video-play {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tolstoy-video-play:focus-visible,
.tolstoy-video-frame > video:focus-visible {
  outline: 3px solid white;
  outline-offset: -4px;
}

.tolstoy-video-play img {
  object-fit: cover;
}

.tolstoy-video-play-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgb(61 50 138 / 86%);
  color: white;
}

.tolstoy-video > .story-g__pin {
  pointer-events: none;
}

.tolstoy-video-frame[data-playing] + .story-g__pin {
  visibility: hidden;
}

.tolstoy-video-frame video::cue {
  color: white;
  background-color: rgb(0 0 0 / 76%);
}

.tolstoy-video-frame video.has-caption-layer:not(:fullscreen)::cue {
  opacity: 0;
  color: transparent;
  background-color: transparent;
  text-shadow: none;
}

.tolstoy-video-caption-layer {
  position: absolute;
  inset-inline: .5rem;
  inset-inline: clamp(.25rem, 2cqw, .7rem);
  inset-block-end: clamp(3.75rem, 14%, 7rem);
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.tolstoy-video-caption-layer[hidden] {
  display: none;
}

.tolstoy-video-caption {
  box-sizing: border-box;
  max-inline-size: 100%;
  padding: .46em .9em .5em;
  padding-inline: clamp(.4rem, 3.6cqw, .9em);
  border-radius: .56rem;
  background: rgb(61 50 138 / 72%);
  color: #fffaf0;
  font-family: "PT Sans Local", system-ui, sans-serif;
  font-size: 1rem;
  font-size: clamp(.875rem, 4.85cqw, 1.25rem);
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.tolstoy-video figcaption {
  margin-top: 10px;
  text-align: center;
}

#route-video {
  padding-top: 32px;
}

#stagecoaches {
  padding-bottom: 0;
}

.tolstoy-article .story-g__slide > img {
  height: var(--article-gallery-photo-height);
  object-fit: cover;
}

/* Full-frame role from the museum/Beshtau galleries: preserve the common
   track height and show each restored reproduction in full. */
.tolstoy-article #park-gallery .story-g__slide:has(> .tolstoy-gallery-full):not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--article-gallery-photo-height) auto;
}

.tolstoy-article #park-gallery .story-g__slide > .tolstoy-gallery-full {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  place-self: center;
  object-fit: contain;
}

#young-tolstoy .tolstoy-split-media,
#caucasian-impressions .tolstoy-split-media {
  width: min(100%, clamp(370px, 35vw, 450px));
}

.tolstoy-article .story-g__paper > p {
  width: 100%;
}

.tolstoy-article .tolstoy-papers .narzan-paper-row:not(:last-child) .story-g__paper > p:has(> em:first-child) {
  margin-top: .35em;
}

.tolstoy-article .tolstoy-papers {
  --tolstoy-icon-width: 96px;
  --tolstoy-icon-drop: 20px;
  padding-top: 54px;
}

.tolstoy-article .tolstoy-papers .article-paper-icon {
  z-index: 2;
  width: var(--tolstoy-icon-width);
  top: calc(var(--tolstoy-icon-drop) - var(--tolstoy-icon-width) * var(--tolstoy-icon-rise));
  right: clamp(18px, 2vw, 28px);
}

.tolstoy-article .tolstoy-papers .article-paper-icon img {
  width: 100%;
  height: auto;
}

.tolstoy-article .tolstoy-papers .tolstoy-paper-letter {
  --tolstoy-icon-rise: .42;
}

.tolstoy-article .tolstoy-papers .tolstoy-paper-forest {
  --tolstoy-icon-rise: .37;
  --tolstoy-icon-width: 144px;
  right: clamp(36px, 4.5vw, 72px);
}

.tolstoy-article .tolstoy-papers .tolstoy-paper-diary {
  --tolstoy-icon-rise: .29;
  --tolstoy-icon-width: 132px;
}

.tolstoy-article .tolstoy-papers .article-paper-connector {
  height: 72px;
}

#museum-life {
  padding-bottom: clamp(20px, 3vw, 42px);
}

#finale {
  padding-block: clamp(12px, 2vw, 28px) clamp(16px, 2.5vw, 36px);
}

/* Marina's 19 November adjustment for this article: a wider acknowledgement
   lets the existing copy use two lines without changing logo or type size. */
.tolstoy-article #institution-thanks .narzan-thanks {
  max-width: 860px;
}

.tolstoy-article #institution-thanks .narzan-thanks p {
  max-width: none;
}

.tolstoy-finale-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 60px);
  width: min(calc(100% - 48px), 1320px);
  align-items: center;
}

.tolstoy-finale-copy {
  grid-column: 1 / -1;
  max-width: 630px;
  margin-inline: auto;
  text-align: center;
}

.tolstoy-finale-copy .article-final-note {
  margin-bottom: 24px;
}

.tolstoy-article .tolstoy-finale-photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tolstoy-article .tolstoy-finale-photo--left {
  transform: rotate(-5deg);
}

.tolstoy-article .tolstoy-finale-photo--right {
  transform: rotate(5deg);
}

.g-readable .tolstoy-article .story-g__hero-art {
  background: white;
}

@media (min-width: 640px) {
  .tolstoy-article .tolstoy-papers {
    --tolstoy-icon-width: 130px;
    --tolstoy-icon-drop: 12px;
  }

  .tolstoy-article .tolstoy-papers .tolstoy-paper-diary {
    --tolstoy-icon-width: 180px;
  }

  .tolstoy-article .tolstoy-papers .tolstoy-paper-forest {
    --tolstoy-icon-width: 200px;
  }
}

@media (min-width: 768px) {
  .tolstoy-finale-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 3.2fr) minmax(0, 1fr);
  }

  .tolstoy-finale-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .tolstoy-finale-photo--left {
    grid-column: 1;
    grid-row: 1;
  }

  .tolstoy-finale-photo--right {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (min-width: 1024px) {
  .tolstoy-article .story-g__hero-copy {
    padding: 112px 8% 46px;
    justify-content: center;
  }

  .tolstoy-article .story-g__hero-art {
    padding-block: 54px;
  }

  #stagecoaches .tolstoy-split-grid,
  #first-works .tolstoy-split-grid {
    align-items: start;
  }

  .tolstoy-split--media-left .tolstoy-split-media {
    grid-column: 1;
    grid-row: 1;
}

  .tolstoy-split--media-left .tolstoy-split-copy {
    grid-column: 2;
    grid-row: 1;
}

  .tolstoy-article .tolstoy-papers {
    --tolstoy-icon-width: 150px;
  }

  .tolstoy-article .tolstoy-papers .tolstoy-paper-diary {
    --tolstoy-icon-width: 210px;
  }

  .tolstoy-article .tolstoy-papers .tolstoy-paper-forest {
    --tolstoy-icon-width: 240px;
  }
}

@media (min-width: 1280px) {
  #park-gallery .story-g__slide figcaption {
    min-block-size: 3em;
  }
}
