/*
 * Formatted text (.prose): the Rich text block (policy pages) and other long-form text.
 */

.prose {
    max-width: var(--prose-width);
    color: var(--neutral-800);
    font-size: 17px;
    line-height: 1.7;
}

.prose > * + * {
    margin-top: 1em;
}

.prose > :first-child {
    margin-top: 0;
}

.prose :is(h1, h2, h3, h4) {
    scroll-margin-top: calc(var(--header-pinned, var(--header-height)) + 16px);
    color: var(--black);
    font-style: normal;
    letter-spacing: .01em;
    line-height: 1.25;
}

.prose h2 {
    margin-top: 1em;
    font-size: 28px;
    font-weight: 100;
}

.prose h3 {
    margin-top: 1em;
    font-size: 20px;
    font-weight: 500;
}

.prose h4 {
    margin-top: 1em;
    font-size: 18px;
    font-weight: 500;
}

.prose :is(.has-small-font-size, .page-prose-updated) {
    color: var(--neutral-700);
    font-size: 14px;
}

.prose :is(ul, ol) {
    padding-left: 1.4em;
}

.prose li {
    color: inherit;
}

.prose li + li {
    margin-top: .4em;
}

.prose a {
    color: var(--tertiary-600);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose figure {
    margin: 1.4em 0 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
}

.prose .wp-block-table,
.prose .table-wrap {
    overflow-x: auto;
}

.prose table + * {
    margin-top: 88px;
}

.prose :is(th, td) {
    padding: 10px 12px;
    border: 0;
    text-align: left;
    vertical-align: top;
}

.prose th {
    background: var(--neutral-100);
    color: var(--black);
    font-weight: 600;
}

.prose blockquote {
    padding-left: 1.2em;
    border-left: 3px solid var(--tertiary-300);
}

@media (max-width: 600px) {
    .prose {
        font-size: 16px;
    }

    .prose h2 {
        font-size: 24px;
    }
}

/* [cookie_settings] (Cookie Settings page) */
.cookie-settings {
    margin-top: 1.4em;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius);
}

.cookie-settings__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 18px 20px;
}

.cookie-settings__row + .cookie-settings__row {
    border-top: 1px solid var(--neutral-200);
}

.cookie-settings__row p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
}

.cookie-settings__title {
    margin-bottom: 4px !important;
    color: var(--black);
    font-weight: 600;
}

.cookie-settings__status {
    margin: 0;
    padding: 0 20px;
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
}

.cookie-settings__status:not(:empty) {
    padding-bottom: 16px;
}

@media (max-width: 600px) {
    .cookie-settings__row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Table of contents (helios_toc_box): sticky beside the text ---------- */

.with-toc {
    display: grid;
    grid-template-columns: minmax(0, var(--prose-width));
    justify-content: center;
    gap: var(--space-md);
}

.with-toc.has-toc {
    grid-template-columns: 260px minmax(0, var(--prose-width));
    justify-content: start;
}

.toc {
    position: sticky;
    top: calc(var(--header-pinned, var(--bar-height, 72px)) + 32px);
    align-self: start;
}

.toc__heading {
    display: block;
    margin-bottom: 12px;
    color: var(--black);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    list-style: none;
    cursor: default;
}

.toc__heading::-webkit-details-marker {
    display: none;
}

.toc__list {
    max-height: calc(100vh - var(--header-pinned, var(--bar-height, 72px)) - 120px);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    border-left: 1px solid var(--neutral-200);
    list-style: none;
    scrollbar-width: thin;
}

.toc__list ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc__list li,
.toc__list li + li {
    margin: 0;
}

.toc__list a {
    display: block;
    margin-left: -1px;
    padding: 6px 0 6px 16px;
    border-left: 2px solid transparent;
    color: var(--neutral-700);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}

.toc__list ol a {
    padding-left: 30px;
    font-size: 13px;
}

.toc__list a:hover {
    color: var(--black);
}

.toc__list a.is-current {
    border-left-color: var(--tertiary-600);
    color: var(--black);
    font-weight: 500;
}

/* Smaller screens: a collapsed "On this page" box above the text */
@media (max-width: 1024px) {
    .with-toc.has-toc {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        gap: var(--step-7);
    }

    .toc {
        position: static;
        padding: 16px 20px;
        border: 1px solid var(--neutral-200);
        border-radius: var(--radius);
    }

    .toc__heading {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 0;
        cursor: pointer;
    }

    .toc__heading::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
        transition: transform .2s ease;
    }

    .toc__details[open] .toc__heading::after {
        transform: rotate(-135deg);
    }

    .toc__details[open] .toc__list {
        margin-top: 12px;
    }

    .toc__list {
        max-height: none;
    }
}
