/* var.16 grafo74 — approved article sheets, footer-teal controls, fullscreen thumbnails */
:root {
  --site-footer-green: #0d5c63;
  --site-footer-green-hover: #094950;
  --article-sheet-bg: #f4faff;
  --article-sheet-edge: rgba(128,174,201,.34);
}

/* A4-inspired sheets: 30/15/15/15 mm proportions, square corners. */
.article-paper-section > .Rules__container > .Rules__body > .items__item:first-child,
.article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text {
  position: relative !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  width: min(100%, 1120px) !important;
  margin: 24px auto !important;
  padding: clamp(34px, 7.1429cqw, 76px) clamp(24px, 7.1429cqw, 76px) clamp(34px, 7.1429cqw, 76px) clamp(86px, 14.2857cqw, 152px) !important;
  overflow: hidden !important;
  border: 1px solid var(--article-sheet-edge) !important;
  border-radius: 0 !important;
  background: radial-gradient(ellipse at 52% 43%, #fff 0%, #f8fcff 56%, #e7f4fb 100%) !important;
  box-shadow: 0 24px 44px -25px rgba(31,57,72,.24), 0 8px 20px -15px rgba(31,57,72,.30), inset -18px -12px 34px rgba(115,177,214,.10) !important;
}

/* Always circular holes: explicit equal width/height circles repeated vertically. */
.article-paper-section > .Rules__container > .Rules__body > .items__item:first-child::before,
.article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text::before {
  content: "" !important;
  position: absolute !important;
  z-index: 7 !important;
  top: 34px !important;
  bottom: 34px !important;
  left: clamp(22px, 3.45cqw, 42px) !important;
  width: 20px !important;
  pointer-events: none !important;
  background-image: radial-gradient(circle 8px at 10px 10px,
    rgba(104,113,119,.78) 0 5px,
    rgba(190,199,205,.72) 5.5px 7px,
    rgba(255,255,255,.98) 7.5px 8.5px,
    transparent 9px) !important;
  background-size: 20px clamp(92px, 12.4cqw, 132px) !important;
  background-position: 0 0 !important;
  background-repeat: repeat-y !important;
  filter: drop-shadow(1px 2px 2px rgba(33,47,56,.20)) !important;
}

/* Lifted paper corner: white face, blue underside, clear cast shadow. */
.article-paper-section > .Rules__container > .Rules__body > .items__item:first-child::after,
.article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text::after {
  content: "" !important;
  position: absolute !important;
  z-index: 8 !important;
  top: -1px !important;
  right: -1px !important;
  width: clamp(68px, 9.6cqw, 108px) !important;
  height: clamp(68px, 9.6cqw, 108px) !important;
  pointer-events: none !important;
  clip-path: polygon(28% 0,100% 0,100% 100%,78% 79%,26% 70%) !important;
  background: linear-gradient(225deg,
    transparent 0 32%,
    #fff 33% 57%,
    #dceef8 58% 69%,
    #9fc8df 70% 100%) !important;
  box-shadow: -15px 17px 22px rgba(45,76,94,.23), -5px 6px 8px rgba(45,76,94,.17) !important;
}

.article-paper-section .text_hide_wrap {
  overflow: visible !important;
}
.article-paper-section .text_hide_wrap > .item_text > * {
  position: relative;
  z-index: 3;
}

/* One canonical green: exactly the established footer teal. */
.article-index-page .main-block__button,
.article-detail-page .main-block__button,
.article-detail-page .io_button,
.article-index-page .io_button,
.article-detail-page button,
.article-index-page button,
.main-block__button_green,
.io_button {
  border-color: var(--site-footer-green) !important;
  background: var(--site-footer-green) !important;
  color: #fff !important;
}
.article-index-page .main-block__button:hover,
.article-detail-page .main-block__button:hover,
.article-detail-page .io_button:hover,
.article-index-page .io_button:hover,
.main-block__button_green:hover,
.io_button:hover {
  border-color: var(--site-footer-green-hover) !important;
  background: var(--site-footer-green-hover) !important;
  color: #fff !important;
}

/* “Читать больше” follows its text instead of spanning the section. */
.article-index-page .io_button_wrap,
.article-detail-page .io_button_wrap {
  justify-content: center !important;
}
.article-index-page .io_button,
.article-detail-page .io_button,
.article-index-page .text_hide_wrap + .io_button_wrap .io_button,
.article-detail-page .text_hide_wrap + .io_button_wrap .io_button {
  width: auto !important;
  max-width: max-content !important;
  min-width: 0 !important;
  padding-inline: 1.35rem !important;
  white-space: nowrap !important;
}

/* Fullscreen thumbnail recovery on the three affected pages. */
body.three-pages-thumb-stable .viewer2026-overlay__thumbs,
body.three-pages-thumb-stable .viewer28__thumbs,
body.three-pages-thumb-stable .viewer29__thumbs,
body.three-pages-thumb-stable .viewer30__thumbs,
body.three-pages-thumb-stable .viewer4.open .viewer4__thumbs {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 112px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}
body.three-pages-thumb-stable .viewer2026-overlay__thumb,
body.three-pages-thumb-stable .viewer28__thumbs .viewer2026-overlay__thumb,
body.three-pages-thumb-stable .viewer29__thumbs .viewer2026-overlay__thumb,
body.three-pages-thumb-stable .viewer30__thumbs .viewer2026-overlay__thumb,
body.three-pages-thumb-stable .viewer4.open .viewer4__thumb {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: hidden !important;
}
body.three-pages-thumb-stable .viewer2026-overlay__thumb img,
body.three-pages-thumb-stable .viewer28__thumbs img,
body.three-pages-thumb-stable .viewer29__thumbs img,
body.three-pages-thumb-stable .viewer30__thumbs img,
body.three-pages-thumb-stable .viewer4.open .viewer4__thumb img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  transform: none !important;
  object-fit: contain !important;
  background: #fff !important;
  position: relative !important;
  z-index: 3 !important;
}

@media (max-width: 720px) {
  .article-paper-section > .Rules__container > .Rules__body > .items__item:first-child,
  .article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text {
    padding: 30px 20px 30px 68px !important;
  }
  .article-paper-section > .Rules__container > .Rules__body > .items__item:first-child::before,
  .article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text::before {
    left: 18px !important;
    width: 18px !important;
    background-image: radial-gradient(circle 7px at 9px 9px, rgba(104,113,119,.78) 0 4.5px, rgba(190,199,205,.72) 5px 6px, #fff 6.5px 7.5px, transparent 8px) !important;
    background-size: 18px 96px !important;
  }
  .article-index-page .io_button,
  .article-detail-page .io_button { width: auto !important; }
}

@media print {
  .article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text {
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 15mm 15mm 15mm 30mm !important;
    margin: 0 auto !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text::before,
  .article-paper-section > .Rules__container > .Rules__body > .text_hide_wrap > .item_text::after { display:none !important; }
}
