/* Long-form text pages (article, event, case study, legal): typography, table of contents, share links, sidebar blocks, layouts */

/* Prose: rich text typography. Lists are styled only as direct children (or nested in a list item), so embedded
   components keep their own styles; a list that is a component itself takes the `not-prose` class. */

.prose {
    font-size: 18px;
    line-height: 1.75;
    color: var(--c-ink-2);
}

.prose--sm {
    font-size: 17px;
    line-height: 1.7;
}

.prose > * + * {
    margin-top: 20px;
}

.prose > h2 {
    margin-top: 52px;
    font-size: clamp(24px, .5vw + 20px, 30px);
    line-height: 1.2;
    color: var(--c-ink);
}

.prose > h3 {
    margin-top: 36px;
    font-size: 20px;
    line-height: 1.3;
    color: var(--c-ink);
}

.prose > h2 + *,
.prose > h3 + * {
    margin-top: 14px;
}

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

.prose > h2,
.prose > h3 {
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose :is(p, li, dd, td) > a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--c-pink-200);
    transition: text-decoration-color .2s, color .2s;
}

.prose :is(p, li, dd, td) > a:hover {
    text-decoration-color: currentColor;
}

.prose strong {
    font-weight: 600;
    color: var(--c-ink);
}

.prose > :is(ul, ol):not(.not-prose),
.prose li > :is(ul, ol) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 28px;
}

.prose li > :is(ul, ol) {
    margin-top: 10px;
}

.prose > :is(ul, ol):not(.not-prose) > li,
.prose li > :is(ul, ol) > li {
    position: relative;
}

.prose > ul:not(.not-prose) > li::before,
.prose li > ul > li::before {
    content: "";
    position: absolute;
    left: -20px;
    top: .7em;
    width: 7px;
    height: 7px;
    border-radius: var(--radius-pill);
    background: var(--c-primary);
}

.prose > ol:not(.not-prose),
.prose li > ol {
    counter-reset: prose-list;
}

.prose > ol:not(.not-prose) > li,
.prose li > ol > li {
    counter-increment: prose-list;
}

.prose > ol:not(.not-prose) > li::before,
.prose li > ol > li::before {
    content: counter(prose-list) ".";
    position: absolute;
    left: -30px;
    width: 22px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .88em;
    text-align: right;
    color: var(--c-primary);
}

.prose > blockquote {
    margin-block: 36px 16px;
    padding: 28px 32px;
    border-left: 4px solid var(--c-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--c-tint);
}

.prose > blockquote p {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(18px, .3vw + 16px, 21px);
    line-height: 1.5;
    color: var(--c-ink);
}

.prose > blockquote footer {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--c-ink-3);
}

.prose > figure {
    margin-block: 36px 16px;
}

.prose > figure img {
    width: 100%;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    background: var(--c-tint);
}

.prose figcaption {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--c-ink-3);
}

.prose__table {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
}

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

.prose__table caption {
    padding: 14px 18px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-tint);
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    color: var(--c-ink);
}

.prose__table th,
.prose__table td {
    padding: 12px 18px;
    border-top: 1px solid var(--c-border);
    text-align: left;
    vertical-align: top;
}

.prose__table thead th {
    border-top: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-ink-3);
}

.prose__table tbody th {
    font-weight: 600;
    color: var(--c-ink);
}

.prose__table td {
    color: var(--c-ink-2);
}

.prose > .spec-list {
    margin-top: 16px;
}

/* Table of contents (_toc): expanded on desktop, behind a toggle below 992 px */

.toc {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc__title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-ink-2);
}

.toc__toggle {
    display: none;
}

.toc__list {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--c-border);
}

.toc__sub {
    display: flex;
    flex-direction: column;
}

.toc__link {
    display: block;
    margin-left: -2px;
    padding: 7px 0 7px 16px;
    border-left: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--c-ink-2);
    transition: color .2s, border-color .2s;
}

.toc__link--sub {
    padding-left: 30px;
    font-size: 13px;
    font-weight: 400;
}

.toc__link:hover {
    color: var(--c-primary);
}

.toc__link[aria-current="location"] {
    border-left-color: var(--c-primary);
    font-weight: 600;
    color: var(--c-primary);
}

@media (min-width: 992px) {
    .toc__list[hidden] {
        display: flex !important;
    }
}

@media (max-width: 991px) {
    .toc {
        gap: 0;
        border-radius: var(--radius-md);
        border: 1px solid var(--c-border);
        background: var(--c-white);
    }

    .toc__title {
        display: none;
    }

    .toc__toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 52px;
        padding: 12px 18px;
        border: 0;
        background: none;
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 15px;
        text-align: left;
        color: var(--c-ink);
    }

    .toc__toggle > .icon:first-child {
        color: var(--c-primary);
    }

    .toc__chevron {
        margin-left: auto;
        color: var(--c-ink-3);
        transition: transform .25s;
    }

    .toc__toggle[aria-expanded="true"] .toc__chevron {
        transform: rotate(180deg);
    }

    .toc__list {
        margin: 0 18px 16px;
    }

    .toc__link {
        padding-block: 9px;
    }
}

/* Share links (_share) */

.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.share__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-ink-3);
}

.share__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--c-border);
    background: var(--c-white);
    font-size: 13px;
    font-weight: 600;
    color: var(--c-ink);
    transition: border-color .2s, color .2s, background .2s;
}

.share__btn:hover {
    border-color: var(--c-border-hover);
    color: var(--c-primary);
}

.share__btn--copy {
    padding: 0 16px 0 14px;
}

.share__btn--copy.is-copied {
    border-color: var(--c-success-bg);
    background: var(--c-success-bg);
    color: var(--c-success);
}

/* Sidebar blocks (_newsletter-box, _most-read) */

.side-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-box__row {
    display: flex;
    gap: 6px;
}

.newsletter-box__row .input {
    flex-grow: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
}

.newsletter-box__row .btn {
    flex-shrink: 0;
}

.newsletter-box__types {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.most-read {
    display: flex;
    flex-direction: column;
}

.most-read__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--c-ink);
}

.most-read__link:hover {
    color: var(--c-primary);
}

.most-read__num {
    flex-shrink: 0;
    min-width: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    color: var(--c-border-hover);
}

.dna-banner--stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
}

.dna-banner--stacked .dna-banner__text {
    align-items: flex-start;
    font-size: 16px;
    line-height: 1.35;
}

/* Detail layout (layouts/post): hero, text column, sticky table of contents, recommendations */

.post-hero {
    padding-block: 40px 56px;
}

.post-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.post-hero__head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 920px;
}

.post-hero__lead {
    max-width: 820px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    font-size: 14px;
    color: var(--c-ink-2);
}

.post-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.post-meta__item .icon {
    color: var(--c-primary);
}

.post-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.post-byline__photo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.post-byline__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    line-height: 1.35;
    color: var(--c-ink-2);
}

.post-byline__text strong {
    font-weight: 600;
    color: var(--c-ink);
}

.post-byline__role {
    font-size: 13px;
    color: var(--c-ink-3);
}

.post-main {
    padding-top: 56px;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 800px) 340px;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
        "main aside"
        "main more";
    justify-content: space-between;
    column-gap: 64px;
    row-gap: 40px;
}

.post-aside {
    grid-area: aside;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

.post-aside__sticky {
    position: sticky;
    top: calc(var(--header-h) + 28px);
}

.post-article {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.post-more {
    grid-area: more;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

.post-cover__media {
    height: 420px;
    padding: 16px;
    border-radius: var(--radius-lg);
}

.post-cover__media .deco {
    right: 40px;
    top: 48px;
    width: 420px;
    height: 120px;
}

.post-cover__caption {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--c-ink-3);
}

.post-foot {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 28px;
    border-top: 1px solid var(--c-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.post-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.author-box {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px;
    background: var(--c-tint);
}

.author-box__photo {
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    object-fit: contain;
}

.author-box__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.author-box__label {
    margin-bottom: 4px;
    font-family: var(--font-body);
}

.author-box__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.3;
    color: var(--c-ink);
}

.author-box__role {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--c-ink-3);
}

/* Detail layout with real data: no table of contents, cover image, company, previous / next, eBook form, banner,
   recommended applications */

.post-layout--no-aside {
    grid-template-rows: auto;
    grid-template-areas: "main more";
}

.post-layout--no-aside > .post-more {
    align-self: start;
}

.post-hero__actions {
    padding-top: 4px;
}

.post-cover__link {
    display: block;
}

.post-cover__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    background: var(--c-tint);
}

.post-company__logo {
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    background: var(--c-white);
}

.post-company__initial {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    border-radius: var(--radius);
    background: var(--g-plum-rose);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 36px;
    color: var(--c-white);
}

.author-box__name a:hover {
    color: var(--c-primary);
}

.post-company__link {
    align-self: flex-start;
    margin-top: 8px;
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.post-nav__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    transition: border-color .2s;
}

.post-nav__link--next {
    grid-column: 2;
    align-items: flex-end;
    text-align: right;
}

.post-nav__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-ink-3);
}

.post-nav__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
    color: var(--c-ink);
    transition: color .2s;
}

@media (hover: hover) and (pointer: fine) {
    .post-nav__link:hover {
        border-color: var(--c-border-hover);
    }

    .post-nav__link:hover .post-nav__title {
        color: var(--c-primary);
    }
}

.post-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--c-pink-200);
    background: var(--c-pink-50);
}

.post-notice__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--c-ink-2);
}

.post-notice__title {
    font-weight: 600;
    color: var(--c-ink);
}

.post-ebook {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    background: var(--c-tint);
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.post-ebook__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.post-ebook__intro {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.post-ebook__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.post-products {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--c-tint);
}

.post-products__title {
    color: var(--c-ink);
}

.post-ad {
    float: right;
    width: 300px;
    margin: 6px 0 20px 32px;
}

.prose > .post-ad + * {
    margin-top: 0;
}

.post-ad:has(> ins:empty) {
    display: none;
}

.post-ad img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Rich text written in the admin (.prose--rich, cleaned by PostPageService): smaller headings, links inside inline
   tags, images, frames and videos that fit the column, tables without a header row */

.prose--rich {
    overflow-wrap: break-word;
}

.prose--rich::after {
    content: "";
    display: block;
    clear: both;
}

.prose--rich > :is(h4, h5) {
    margin-top: 28px;
    font-size: 17px;
    line-height: 1.35;
    color: var(--c-ink);
}

.prose--rich > h5 {
    font-size: 16px;
}

.prose--rich > :is(h4, h5) + * {
    margin-top: 10px;
}

.prose--rich a:not(.btn) {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--c-pink-200);
    transition: text-decoration-color .2s, color .2s;
}

.prose--rich a:not(.btn):hover {
    text-decoration-color: currentColor;
}

.prose--rich img,
.prose--rich video {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.prose--rich iframe {
    display: block;
    max-width: 100%;
    border: 0;
    border-radius: var(--radius-md);
}

.prose--rich iframe[src*="youtube"],
.prose--rich iframe[src*="vimeo"] {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.prose--rich blockquote > :not(:first-child) {
    margin-top: 12px;
}

.prose--rich .prose__table tr:first-child > * {
    border-top: 0;
}

.prose--rich .prose__table :is(th, td) + :is(th, td) {
    border-left: 1px solid var(--c-border);
}

.prose--rich .prose__table thead th {
    border-bottom: 2px solid var(--c-primary);
    background: var(--c-track);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-ink);
}

.prose--rich .prose__table tbody tr:nth-child(odd) > * {
    background: var(--c-tint);
}

.prose--rich .prose__table tbody tr > * {
    transition: background-color .2s;
}

.prose--rich .prose__table tbody tr:hover > * {
    background: var(--c-violet-50);
}

.prose--rich .prose__table :is(th, td) > :is(p, ul, ol):not(:first-child) {
    margin-top: 8px;
}

@media (max-width: 575px) {
    .prose--rich .prose__table table {
        font-size: 14px;
    }

    .prose--rich .prose__table :is(th, td) {
        padding: 10px 12px;
    }

    .prose--rich .prose__table thead th {
        font-size: 14px;
    }
}

/* Legal layout (layouts/legal): table of contents on the left, text column on the right */

.legal-hero {
    padding-block: 40px 48px;
}

.legal-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.legal-hero__head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 880px;
}

.legal-hero__updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--c-ink-2);
}

.legal-hero__updated .icon {
    color: var(--c-primary);
}

.legal-docs {
    --cluster-gap: 8px;
}

.legal-main {
    padding-top: 56px;
}

.legal-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 800px);
    gap: 80px;
}

.legal-aside {
    min-width: 0;
}

.legal-aside__sticky {
    position: sticky;
    top: calc(var(--header-h) + 28px);
}

.legal-article {
    display: flex;
    flex-direction: column;
    gap: 48px;
    min-width: 0;
}

.legal-contact {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px;
    background: var(--c-tint);
}

.legal-contact__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-contact__title {
    font-size: 17px;
    line-height: 1.3;
}

/* Responsive */

@media (max-width: 1199px) {
    .post-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        column-gap: 48px;
    }

    .post-cover__media {
        height: 340px;
    }

    .legal-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 48px;
    }
}

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

    .post-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "aside"
            "main"
            "more";
        row-gap: 32px;
    }

    .post-aside__sticky,
    .legal-aside__sticky {
        position: static;
    }

    .post-more {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 32px 40px;
        padding-top: 40px;
        border-top: 1px solid var(--c-border);
    }

    .post-more > .dna-banner {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .post-more > .dna-banner .dna-banner__text {
        align-items: center;
    }

    .post-layout--no-aside {
        grid-template-areas:
            "main"
            "more";
    }

    .legal-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .prose {
        font-size: 16px;
        line-height: 1.7;
    }

    .prose > h2 {
        margin-top: 40px;
    }

    .prose > h3 {
        margin-top: 28px;
        font-size: 18px;
    }

    .prose > blockquote {
        padding: 22px 20px;
    }

    .prose > figure img {
        padding: 12px;
    }

    .prose__table th,
    .prose__table td,
    .prose__table caption {
        padding-inline: 14px;
    }

    .post-hero,
    .legal-hero {
        padding-block: 28px 40px;
    }

    .post-hero__head {
        gap: 14px;
    }

    .post-main,
    .legal-main {
        padding-top: 32px;
    }

    .post-article {
        gap: 32px;
    }

    .post-cover__media {
        height: 220px;
        border-radius: var(--radius);
    }

    .post-cover__media .deco {
        right: -60px;
        top: 24px;
        width: 300px;
        height: 90px;
    }

    .post-more {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 32px;
    }

    .post-more > .dna-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .author-box {
        flex-direction: column;
        gap: 16px;
        padding: 22px 20px;
    }

    .author-box__photo {
        width: 80px;
        height: 80px;
    }

    .legal-contact {
        flex-direction: column;
        padding: 22px 20px;
    }

    .post-company__initial {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .post-ebook {
        padding: 24px 20px;
    }

    .post-products {
        padding: 20px 16px;
    }

    .post-ad {
        float: none;
        display: flex;
        justify-content: center;
        width: auto;
        margin: 0 0 20px;
    }
}

@media (max-width: 575px) {
    .newsletter-box__row .btn {
        white-space: nowrap;
    }

    .post-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-nav__link--next {
        grid-column: auto;
        align-items: flex-start;
        text-align: left;
    }

    .post-ebook__head {
        flex-direction: column;
    }

    .post-ebook__actions .btn {
        width: 100%;
    }
}
