/* Shared blog layout fixes. Both themes. 2026-11-08. Loaded only for /blog/. */
body.site_s3 .detail .content-text img { border:0!important; }
body.site_s3 .detail .am-editorial .am-fmt__media { border:0!important; }
body.site_s3 .detail .am-editorial .am-panel.am-panel--course a {
 color:var(--oil-accent,#713083)!important;
 text-decoration-color:currentColor!important;
}
body.site_s3 .detail .am-editorial .am-season-table td { vertical-align:middle; }
body.site_s3 .detail .am-editorial .am-season-table td::before { color:inherit!important; }
body.site_s3 .detail .am-editorial .am-grid>.am-panel:has(>.am-fmt) { display:flex; flex-direction:column; }
body.site_s3 .detail .am-editorial .am-grid>.am-panel>p:last-child:has(.am-buy-btn) {
 margin-top:auto!important; padding-top:12px;
}
body.site_s3 .detail .am-editorial .am-season-table :is(.am-format-choice,.sh-format) {
 display:flex; align-items:center; justify-content:flex-start; gap:10px;
}
body.site_s3 .detail .am-editorial .am-season-table :is(.am-format-choice,.sh-format) img {
 margin:0!important; flex-shrink:0; object-fit:contain!important;
}
body.site_s3 .detail .am-editorial .am-season-table .sh-format img {
 width:44px!important; height:52px!important; flex-basis:44px;
}

/* Video follows article photo width instead of occupying the entire text column. */
body.site_s3 .detail .am-editorial .am-video {
 width:100%!important; max-width:620px!important;
 height:auto!important; min-height:0!important; aspect-ratio:16/9;
 padding:0!important; margin:28px auto!important;
 position:relative; overflow:hidden;
}
body.site_s3 .detail .am-editorial .am-video>iframe {
 position:absolute; inset:0; width:100%!important; height:100%!important; border:0;
}


/* Shared article CTA interaction states; override the dark base !important. */
body.site_s3.theme-dark .detail.blog .content-text
  :is(a.am-buy-btn, a.am-link-button):is(:hover, :focus-visible) {
  background: #85429a !important;
  border-color: #b878cc !important;
  color: #fff !important;
}
body.site_s3.theme-dark .detail.blog .content-text
  :is(a.am-buy-btn, a.am-link-button):focus-visible {
  outline: 2px solid #dfb5ef !important;
  outline-offset: 3px;
}
body.site_s3.theme-dark .detail.blog .content-text
  :is(a.am-buy-btn, a.am-link-button):active {
  background: #713083 !important;
  border-color: #b878cc !important;
  color: #fff !important;
}

/* Course and registration: illustration beside the heading at every width.
   Keep the existing illustration and let the description use the full card. */
body.site_s3 .detail .am-editorial .am-panel:is(.am-panel--course,.am-panel--accent:has(a[href*="kak-pokupat-efirnye-masla-doterra-so-skidkoy"])):has(> h4:first-child) {
 display:grid!important;
 grid-template-columns:56px minmax(0,1fr)!important;
 column-gap:12px!important;
 row-gap:14px!important;
 align-items:center;
 padding:20px!important;
 min-height:0!important;
}
body.site_s3 .detail .am-editorial .am-panel:is(.am-panel--course,.am-panel--accent:has(a[href*="kak-pokupat-efirnye-masla-doterra-so-skidkoy"])):has(> h4:first-child)::before {
 position:static!important;
 display:block!important;
 grid-column:1!important;
 grid-row:1!important;
 width:56px!important;
 height:56px!important;
 margin:0!important;
 align-self:center;
}
body.site_s3 .detail .am-editorial .am-panel:is(.am-panel--course,.am-panel--accent:has(a[href*="kak-pokupat-efirnye-masla-doterra-so-skidkoy"])):has(> h4:first-child) > h4:first-child {
 grid-column:2!important;
 grid-row:1!important;
 margin:0!important;
 min-width:0;
 align-self:center;
}
body.site_s3 .detail .am-editorial .am-panel:is(.am-panel--course,.am-panel--accent:has(a[href*="kak-pokupat-efirnye-masla-doterra-so-skidkoy"])):has(> h4:first-child) > :not(h4:first-child) {
 grid-column:1 / -1!important;
 min-width:0;
 margin-top:0!important;
 margin-bottom:0!important;
}
body.site_s3 .detail .am-editorial .am-panel:is(.am-panel--course,.am-panel--accent:has(a[href*="kak-pokupat-efirnye-masla-doterra-so-skidkoy"])):has(> h4:first-child) > a.am-link-button {
 justify-self:start;
 max-width:100%;
 box-sizing:border-box;
}
@media(max-width:600px) {
 body.site_s3 .detail .am-editorial .am-panel:is(.am-panel--course,.am-panel--accent:has(a[href*="kak-pokupat-efirnye-masla-doterra-so-skidkoy"])):has(> h4:first-child) {
  padding:16px!important;
 }
}

/* Nested entries inherit the number of their parent section. */
body.site_s3 .am-editorial.am-article-refresh .article-toc li li::before {
  content: counters(am-toc, ".") !important;
}

/* Visible interaction for blog navigation cards in the dark palette. */
body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card {
 transition:background-color .2s,border-color .2s,box-shadow .2s;
}
body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card .am-oil-nav__btn {
 transition:background-color .2s;
}
body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card:is(:hover,:focus-visible) {
 background:#332a3c!important;
 border-color:#b07ac6!important;
 box-shadow:0 7px 22px rgba(0,0,0,.4),0 0 0 1px rgba(176,122,198,.2)!important;
}
body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card:is(:hover,:focus-visible) .am-oil-nav__btn {
 background:#8d4ca5!important;
 color:#fff!important;
}
body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card:focus-visible {
 outline:2px solid #deb5ee!important;
 outline-offset:4px;
}
@media(prefers-reduced-motion:reduce){
 body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card,
 body.site_s3.theme-dark .detail.blog .content-text .am-editorial[data-oil-site="aromat"] .am-oil-nav a.am-oil-nav__card .am-oil-nav__btn{transition:none}
}

/* Article bodies that use unboxed sections for the main text. */
.am-editorial.am-article-refresh[data-am-article]:has(> section:not([class]) > h2) {
    --am-article-section-gap: 32px;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]):has(> h2) + :is(section, #tovary) {
    margin-top: var(--am-article-section-gap, 32px) !important;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > h2 {
    margin: 0 0 12px !important;
    scroll-margin-top: 90px;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > p:has(+ :is(.am-photo, .am-photo-pair)) {
    margin-bottom: 0 !important;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > .table-responsive + p {
    margin-top: 16px !important;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > :is(.am-photo, .am-photo-pair) {
    margin: 16px 0 0;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > .am-photo {
    max-width: 800px;
}

.am-editorial.am-article-refresh[data-am-article] .am-photo-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 1060px;
}

.am-editorial.am-article-refresh[data-am-article] .am-photo-pair > figure,
.am-editorial.am-article-refresh[data-am-article] > section:not([class]) .am-photo > img {
    margin: 0;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) .am-photo > figcaption {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
}

.am-editorial.am-article-refresh[data-am-article]:has(> section:not([class]) > h2) > .am-mp {
    clear: both;
    padding: 20px 24px;
    margin: 20px 0 24px;
    background: #f7f0fa;
    border: 1px solid #e6d7ed;
    border-left: 4px solid #a25eb5;
    border-radius: 14px;
}

.am-editorial.am-article-refresh[data-am-article]:has(> section:not([class]) > h2) > .am-mp > p {
    margin: 0 !important;
}

.am-editorial.am-article-refresh[data-am-article]:has(> section:not([class]) > h2) > .am-mp :is(.am-mp__title, p > strong:first-child) {
    display: block;
    margin-bottom: 8px !important;
    font-size: 20px;
    font-weight: 700;
}

.am-editorial.am-article-refresh[data-am-article]:where(:has(> section:not([class]) > h2)) :is(.am-grid a.am-buy-btn, .am-panel a.am-link-button) {
    display: inline-block !important;
    padding: 8px 18px !important;
    border: 2px solid #713083 !important;
    border-radius: 8px !important;
    background: #f5eff8 !important;
    color: #713083 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

.am-editorial.am-article-refresh[data-am-article]:where(:has(> section:not([class]) > h2)) :is(.am-grid a.am-buy-btn, .am-panel a.am-link-button):is(:hover, :focus-visible) {
    background: #713083 !important;
    color: #fff !important;
}

@media (min-width: 768px) {
    .am-editorial.am-article-refresh[data-am-article][data-am-intro="flow"]:has(> section:not([class]) > h2) > .am-mp {
        clear: none;
        display: flow-root;
    }
}

@media (max-width: 767px) {
    .am-editorial.am-article-refresh[data-am-article]:has(> section:not([class]) > h2) {
        --am-article-section-gap: 24px;
    }
    .am-editorial.am-article-refresh[data-am-article] .am-photo-pair {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

.am-editorial.am-article-refresh .am-guide-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px !important;
}

.am-editorial.am-article-refresh .am-guide-heading > h3 {
    margin: 0 !important;
    min-width: 0;
}

.am-editorial.am-article-refresh .am-guide-heading > .am-guide-icon {
    display: block !important;
    flex: 0 0 56px;
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    margin: 0 !important;
    object-fit: contain !important;
}

.am-editorial.am-article-refresh ol.am-guide-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.am-editorial.am-article-refresh ol.am-guide-steps > li {
    margin: 0;
}

.am-editorial.am-article-refresh ol.am-guide-steps > li::marker {
    content: "";
}

.am-editorial.am-article-refresh section.am-plan-block {
    margin-block: 24px 0;
    scroll-margin-top: 90px;
}

.am-editorial.am-article-refresh .am-plan-block > :is(.am-panel, .table-responsive, .am-photo-pair) + p {
    margin-top: 16px !important;
}

.am-editorial.am-article-refresh .am-plan-block > .am-photo-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 16px auto 0;
    max-width: 920px;
}

.am-editorial.am-article-refresh .am-plan-block .am-photo-pair > .am-photo {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin: 0 auto;
    width: 100%;
}

.am-editorial.am-article-refresh .am-plan-block .am-photo-pair img {
    display: block;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: 340px;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    align-self: center;
    margin: 0;
}

.am-editorial.am-article-refresh .am-plan-block .am-photo-pair figcaption {
    margin: 8px 0 0 !important;
    text-align: center;
}

@media (max-width: 767px) {
    .am-editorial.am-article-refresh ol.am-guide-steps,
    .am-editorial.am-article-refresh .am-plan-block > .am-photo-pair {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .am-editorial.am-article-refresh section.am-plan-block {
        margin-block-start: 20px;
    }
}

/* Editorial photos. Product thumbnails and article covers use their own components. */
.am-editorial.am-article-refresh[data-oil-site="aromat"] figure.am-photo img {
    border-radius: 14px;
}

.am-editorial.am-article-refresh[data-oil-site="aromat"] > .am-photo,
.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > .am-photo,
.am-editorial.am-article-refresh[data-oil-site="aromat"] .am-plan-block > .am-photo {
    clear: both;
    margin-inline: auto;
}

.am-editorial.am-article-refresh[data-am-article] > section:not([class]) > .am-photo > img,
.am-editorial.am-article-refresh[data-am-article] .am-editorial-gallery > .am-photo > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
}

.am-editorial.am-article-refresh[data-am-article] .am-editorial-gallery {
    --am-photo-gap: 20px;
    clear: both;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--am-photo-gap);
    max-width: 1060px;
    margin: 18px auto 22px;
}

.am-editorial.am-article-refresh[data-am-article] .am-editorial-gallery > .am-photo {
    min-width: 0;
    margin: 0;
}

.am-editorial.am-article-refresh[data-am-article] .am-editorial-gallery:has(> .am-photo:only-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
}

@media (min-width: 768px) {
    .am-editorial.am-article-refresh[data-am-article] .am-editorial-gallery > .am-photo:last-child:nth-child(odd):not(:only-child) {
        grid-column: 1 / -1;
        width: calc((100% - var(--am-photo-gap)) / 2);
        justify-self: center;
    }
}

@media (max-width: 767px) {
    .am-editorial.am-article-refresh[data-am-article] .am-editorial-gallery {
        grid-template-columns: minmax(0, 1fr);
        --am-photo-gap: 16px;
    }
}

/* Full-size editorial product thumbnails selected in the article markup. */
body.site_s3 .detail .am-editorial[data-am-thumbnails="76"] .am-fmt > .am-fmt__media {
    box-sizing: border-box;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    padding: 0;
}
body.site_s3 .detail .am-editorial[data-am-thumbnails="76"] .am-fmt__media > img.am-fmt__img {
    width: 76px !important;
    height: 76px !important;
    max-width: 100% !important;
    object-fit: contain;
}
