/*
 * ioann-karpovka rich text (task 20): .ik-prose styles admin-authored HTML (news body; reusable by text pages).
 * Design: docs/design/Site.dc.html?page=article (lines 381-389: body, h2, quote figure) and the DS tokens.
 * The clamp() sizes scale the text down on mobile, so no breakpoint rules are needed here.
 * Lists: flower bullets (task 47); tables scroll, words never split (task 48); iframes: no border, video embeds 16/9 (task 49).
 * overflow-wrap: break-word (not anywhere) is intentional: anywhere shrinks min-content and splits table cells mid-word.
 * Breakpoints, if ever added: desktop = (min-width: 768px); mobile = `not all and (min-width: 768px)`; never max-width (task 36).
 */
.ik-prose {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    font: 400 18px/1.7 var(--font-body);
    color: var(--iskm-navy-400);
    overflow-wrap: break-word;   /* task 48: long URLs wrap, min-content stays at whole words so tables scroll */
}
.ik-prose > *,
.ik-prose p { margin: 0; }

.ik-prose h1,
.ik-prose h2 {
    margin: 16px 0 0;
    font: 600 clamp(28px, 3vw, 34px)/1.1 var(--font-title);
    color: var(--iskm-navy);
    text-wrap: balance;
}
.ik-prose h3,
.ik-prose h4 {
    margin: 8px 0 0;
    font: 600 24px/1.2 var(--font-title);
    color: var(--iskm-navy);
    text-wrap: balance;
}

.ik-prose ol { padding-left: 1.4em; }
.ik-prose ol > li::marker { color: var(--iskm-mauve-700); font-weight: 500; }

/* Flower bullets (DS: 14px list bullet; design lists: flower + 12px gap, Site.dc.html lines 187-190). */
.ik-prose ul { list-style: none; padding-left: 0; }
.ik-prose ul > li {
    position: relative;
    list-style: none;            /* beats an inline list-style-type on the ul */
    padding-left: 26px;          /* 14px flower + 12px gap; wrapped lines align under the text */
}
.ik-prose ul > li::marker { content: none; }
.ik-prose ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: calc(0.85em - 7px);     /* centred on the first 1.7 line */
    width: 14px;
    height: 14px;
    background: url(../img/ornament/flower-ochre.png) center / contain no-repeat;
}
/* Nested lists: the design's smaller teal flower, a little closer to the text. */
.ik-prose li > ul,
.ik-prose li > ol { margin-top: 0.4em; }
.ik-prose li ul > li { padding-left: 24px; }
.ik-prose li ul > li::before {
    top: calc(0.85em - 6px);
    width: 12px;
    height: 12px;
    background-image: url(../img/ornament/flower-teal.png);
}
.ik-prose li + li { margin-top: 0.4em; }
.ik-prose li > p { margin: 0; }

.ik-prose a {
    color: var(--iskm-navy);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
    transition: color var(--dur) var(--ease);
}
@media (hover: hover) {
    .ik-prose a:hover { color: var(--link-hover); }
}

.ik-prose img,
.ik-prose video { max-width: 100%; }
.ik-prose img,
.ik-prose video {
    display: block;
    height: auto;
    border-radius: 12px;
}
/* Embeds: no UA inset border (DS: never grey), media radius. Video players scale 16/9 from the column width;
   other iframes (maps, forms) keep their width/height attributes. */
.ik-prose iframe {
    display: block;
    max-width: 100%;
    border: 0;
    border-radius: 12px;
}
.ik-prose iframe:is([src*="youtube.com/"], [src*="youtube-nocookie.com/"], [src*="youtu.be/"],
    [src*="vk.com/video_ext"], [src*="vkvideo.ru/"], [src*="rutube.ru/"], [src*="player.vimeo.com/"],
    [src*="dzen.ru/embed"]) {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}
.ik-prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}
.ik-prose th,
.ik-prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.ik-prose pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--iskm-cream);
    font-size: 15px;
    line-height: 1.5;
}
.ik-prose hr { border: 0; border-top: 1px solid var(--line); width: 100%; }

/* Figures (quote or image with a caption): 20px own margin + 20px flow gap = the design's 40px around the quote. */
.ik-prose figure {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-block: 20px;
    margin-inline: 0;
}
.ik-prose figure:has(> blockquote),
.ik-prose figure > blockquote + figcaption { text-align: center; }

/*
 * Quote: a flower rule above it, drawn in CSS so TinyMCE's bare blockquote needs no extra markup. The flower
 * is 20px wide, the hairlines stop 16px from it (26px = 10px half flower + 16px gap on each side of the centre).
 */
.ik-prose blockquote {
    margin-block: 20px;
    margin-inline: 0;
    text-align: center;
    font: italic 400 clamp(24px, 2.8vw, 32px)/1.3 var(--font-title);
    color: var(--iskm-navy);
    text-wrap: balance;
}
.ik-prose figure > blockquote { margin: 0; }
.ik-prose blockquote::before {
    content: "";
    display: block;
    height: 20px;
    margin-bottom: 20px;
    background:
        url(../img/ornament/flower-mauve-ochre.png) center / 20px 20px no-repeat,
        linear-gradient(to right, var(--line) calc(50% - 26px), transparent calc(50% - 26px), transparent calc(50% + 26px), var(--line) calc(50% + 26px)) center / 100% 1px no-repeat;
}
.ik-prose blockquote p { margin: 0; }
.ik-prose blockquote > * + * { margin-top: 0.5em; }

.ik-prose figcaption,
.ik-prose blockquote cite,
.ik-prose blockquote footer {
    display: block;
    font: 400 14px/1.4 var(--font-body);
    font-style: normal;
    color: var(--iskm-mauve-700);
}

/* Template legal page «Публичная оферта» (DefaultPages, 2026-11-09): the document title centred, place and date on one
   line (wrapping on narrow screens). */
.ik-prose .ik-offer__title { text-align: center; color: var(--iskm-navy); text-wrap: balance; }
.ik-prose .ik-offer__place { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
