/* AGLASHAY: всё содержимое страницы — по ширине шапки #ags (27.11.2026).
 * Бар: .wrap max-width 1180px, padding 0 20px → ширина min(1140px, 100% - 40px); до 820px padding 14px → 100% - 28px.
 * Подключается на /shop, /en/shop, /knowledge, /en/knowledge и статьях журнала (RU/EN). */
html{--agl-bar-gutter:20px;--agl-bar-max:1140px}
@media(max-width:820px){html{--agl-bar-gutter:14px}}
html body #allrecords{overflow-x:clip}
@supports not (overflow:clip){html body #allrecords{overflow-x:hidden}}

/* Основные контейнеры страниц */
html:root:root:root body :is(#agl-nlp-article,#agl-techniques,#agl-research,#agl-books,#agl-books-continuation,#agj),
html:root:root:root body #agl-app>.shell,
html:root:root:root body #rec3758103001 .t-container:not(.t2823__container_buttons){
  width:calc(100% - var(--agl-bar-gutter)*2)!important;max-width:var(--agl-bar-max)!important;
  margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important}
html:root:root:root body #rec3758103001 .t-container:not(.t2823__container_buttons){padding-left:0!important;padding-right:0!important}
html:root:root:root body #rec3758103001 .t-container:not(.t2823__container_buttons)>.t-col{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}

/* Блоки, которые раньше растягивались на всю ширину экрана */
html body #allrecords :is(#discussion,.agl-tests-promo,#agl-newsletter-v4-root){
  width:calc(100% - var(--agl-bar-gutter)*2)!important;max-width:var(--agl-bar-max)!important;
  margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important}
html body #allrecords #discussion{border-radius:24px!important;overflow:hidden}
html body #allrecords #agl-app{background:transparent!important}

/* Декоративные кольца в герое магазина не выходят за край */
html body #allrecords #agl-app .agsfan .fg-ring.a{inset:5%!important}
html body #allrecords #agl-app .agsfan .fg-ring.b{inset:0!important}
