/* Temporary reading layout. Content remains native, editable WordPress blocks. */
.wp-site-blocks img:not(.avatar):not(.emoji):not(.wp-smiley),
.kirpichiki-home img,
.kirpichiki-publications img,
.evo-section-index__thumb {
    border-radius: 4px;
}
body.single-post .wp-site-blocks > main > .wp-block-group.alignfull {
    padding-top: clamp(32px, 5vw, 64px) !important;
    padding-bottom: 40px !important;
}
body.single-post .wp-block-post-title,
body.single-post .wp-block-post-content,
body.single-post .wp-site-blocks > main > .wp-block-group.alignfull > .wp-block-group {
    width: min(720px, calc(100% - 48px));
}
body.single-post main h1.wp-block-post-title {
    margin-bottom: 16px !important;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
body.single-post .wp-site-blocks > main > .wp-block-group.alignfull > .wp-block-group {
    margin-bottom: 28px !important;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 6px;
}
body.single-post .wp-block-post-content {
    font-size: 18px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
body.single-post .wp-block-post-content > *:not(.alignfull):not(.alignwide):not(.wrapp):not(script):not(style) {
    max-width: 100% !important;
}
body.single-post .wp-block-post-content p,
body.single-post .wp-block-post-content li {
    font-size: inherit;
    line-height: inherit;
}
body.single-post .wp-block-post-content > p {margin-block: 0 1.2em;}
body.single-post .wp-block-post-content h2 {
    margin-block: 2em 0.65em;
    font-size: clamp(25px, 3vw, 32px);
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
}
body.single-post .wp-block-post-content h3 {
    margin-block: 1.6em 0.6em;
    font-size: 23px;
    line-height: 1.3;
}
body.single-post .wp-block-post-content ul,
body.single-post .wp-block-post-content ol {
    margin-block: 0.8em 1.5em;
    padding-inline-start: 1.35em;
}
body.single-post .wp-block-post-content li + li {margin-top: 0.3em;}
body.single-post .wp-block-post-content a {
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}
body.single-post .wp-block-post-content > figure,
body.single-post .wp-block-post-content > .wp-block-image,
body.single-post .wp-block-post-content > p:has(> img),
body.single-post .wp-block-post-content > p:has(> a > img) {
    width: 100%;
    max-width: 100% !important;
    margin: 28px 0 !important;
    left: auto;
    transform: none;
}
body.single-post .wp-block-post-content > .wp-block-image img {
    width: auto;
    max-width: 100%;
    max-height: 620px;
    height: auto;
    margin-inline: auto;
}
body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}
body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images > figure.wp-block-image {
    width: 100% !important;
    margin: 0 !important;
    display: block;
    flex: none !important;
}
body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images > figure.wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 4px;
}
body.single-post .wp-block-post-content figcaption {
    margin-top: 9px;
    font-size: 14px;
    font-style: normal;
    line-height: 1.5;
    text-align: left;
    color: #746f67;
}
body.single-post .wp-block-post-navigation-link {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
@media (min-width: 900px) {
    body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images:has(> figure:nth-child(3)):not(:has(> figure:nth-child(4))) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    body.single-post .wp-block-post-title,
    body.single-post .wp-block-post-content,
    body.single-post .wp-site-blocks > main > .wp-block-group.alignfull > .wp-block-group {
        width: 100%;
    }
    body.single-post .wp-site-blocks > main > .wp-block-group.alignfull {padding-inline: 20px !important;}
    body.single-post .wp-block-post-content {font-size: 17px; line-height: 1.7;}
    body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images {grid-template-columns: minmax(0, 1fr); gap: 16px;}
    body.single-post .wp-block-post-content .wp-block-gallery.has-nested-images > figure.wp-block-image img {
        width: auto;
        max-width: 100%;
        max-height: 420px;
        margin-inline: auto;
    }
}

/* Keep related publication titles separate from the article heading. */
body.single-post main .wp-block-query .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
body.single-post main .wp-block-query .wp-block-post-title {
    width: auto;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 500;
    margin-bottom: 8px !important;
}
body.single-post main .wp-block-query .wp-block-post-date {font-size: 13px; color: #746f67;}
@media(max-width:600px) {
    body.single-post main .wp-block-query .wp-block-post-template {grid-template-columns: minmax(0, 1fr);}
}
