/*
 * Article content styles (.prose) — shared by the frontend article page and the TinyMCE editor.
 * Values follow cosmodatapro-static. Theme tokens come from the site stylesheet;
 * the fallbacks below are the static light theme, so the editor renders without it.
 *
 * Markup (see admin TinyMCE styles):
 *   p.intro, p.slogan, h2 (auto-numbered 01, 02...), h3
 *   ul.chips, ul.ticks, ul.flow, ul.flow.plus  > li
 *   ul.benefits, ul.features > li > strong (title) + br + text
 */

.prose {
    counter-reset: sec;
    font-size: 17px;
    line-height: 1.7;
    color: #24324f;
}

/* Block rhythm (static: flex column with gap 16px) */
.prose > * { margin: 0; }
.prose > * + * { margin-top: 16px; }

.prose p { max-width: 72ch; }
.prose a { color: var(--accent, #2a4ba8); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-2, #1b3480); }

.prose .intro { font-size: 19px; line-height: 1.65; color: var(--ink, #0b1b3a); }
.prose > .intro + .intro { margin-top: 12px; }

/* Headings */
.prose h2,
.prose h3 { font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--ink, #0b1b3a); }

.prose h2 {
    counter-increment: sec;
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: clamp(24px, 2.6vw, 30px);
    scroll-margin-top: 96px;
    text-wrap: balance;
}
.prose > h2 { margin-top: 32px; }
.prose > * + h2 { margin-top: 48px; }
.prose h2::before {
    content: counter(sec, decimal-leading-zero);
    flex: none;
    padding-top: 6px;
    border-top: 2px solid var(--accent, #2a4ba8);
    font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--accent, #2a4ba8);
}

.prose h3 { font-size: 20px; }
.prose > * + h3 { margin-top: 40px; }

/* Plain lists (no style chosen) */
.prose ul:not([class]),
.prose ol { padding-left: 1.4em; }
.prose ul:not([class]) { list-style: disc; }
.prose ol { list-style: decimal; }
.prose ul:not([class]) > li + li,
.prose ol > li + li { margin-top: 4px; }

/* Styled lists: reset */
.prose ul[class] { list-style: none; padding: 0; }

/* Chips */
.prose ul.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.prose ul.chips > li,
.prose ul.flow > li {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--line, #e3e8f2);
    border-radius: 999px;
    background: var(--soft, #f3f6fb);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink, #0b1b3a);
}

/* Flow: Step → Step → Step (ul.flow.plus: Step + Step) */
.prose ul.flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--navy, #0b1b3a);
}
.prose ul.flow > li {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(159, 182, 255, .35);
    color: #fff;
}
.prose ul.flow > li + li { position: relative; margin-left: 26px; }
.prose ul.flow > li + li::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background: var(--pale, #9fb6ff);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose ul.flow.plus > li + li::before {
    content: "+";
    height: auto;
    background: none;
    -webkit-mask: none;
            mask: none;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    color: var(--pale, #9fb6ff);
}

/* Check icon (benefits, ticks) */
.prose ul.benefits > li::before,
.prose ul.ticks > li::before {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--accent, #2a4ba8);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Ticks: ✓ item */
.prose ul.ticks { display: flex; flex-direction: column; gap: 10px; }
.prose ul.ticks > li { position: relative; padding-left: 32px; }
.prose ul.ticks > li::before { top: 3px; }

/* Card lists: title (first strong) + text; the <br> after the title is only for the editor */
.prose ul.benefits > li > strong:first-child,
.prose ul.features > li > strong:first-child { display: block; font-weight: 800; color: var(--ink, #0b1b3a); }
.prose ul.benefits > li > strong:first-child + br,
.prose ul.features > li > strong:first-child + br { display: none; }

/* Benefits: soft panel, ✓ + title + text */
.prose ul.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background: var(--soft, #f3f6fb);
}
.prose ul.benefits > li { position: relative; padding-left: 34px; font-size: 15px; line-height: 1.55; color: var(--muted, #4a5878); }
.prose ul.benefits > li::before { top: 2px; }
.prose ul.benefits > li > strong:first-child { font-size: 16px; line-height: 1.35; }

/* Features: cards with accent bar */
.prose ul.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 16px;
}
.prose ul.features > li {
    padding: 20px;
    border: 1px solid var(--line, #e3e8f2);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted, #4a5878);
}
.prose ul.features > li > strong:first-child { margin-bottom: 8px; font-size: 17px; line-height: 1.3; }
.prose ul.features > li > strong:first-child::before {
    content: "";
    display: block;
    width: 24px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: var(--accent, #2a4ba8);
}

/* Card lists sit 8px further from their neighbours (static: margin 8px 0) */
.prose > ul.benefits,
.prose > ul.features,
.prose > ul.benefits + *,
.prose > ul.features + * { margin-top: 24px; }
.prose > ul.benefits + h2,
.prose > ul.features + h2 { margin-top: 56px; }
.prose > ul.benefits + h3,
.prose > ul.features + h3,
.prose > ul.benefits + .slogan,
.prose > ul.features + .slogan { margin-top: 48px; }

/* Slogan */
.prose .slogan {
    max-width: none;
    padding: 24px 28px;
    border-radius: 14px;
    background: var(--navy, #0b1b3a);
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
}
.prose > .slogan { margin-top: 40px; }

/* Dark theme (tokens are switched by the site stylesheet) */
:root[data-theme="dark"] .prose { color: #c6cdd8; }
:root[data-theme="dark"] .prose ul.features > li { background: #151a21; }
