/**
 * Webbotica — Single resource article
 * Editorial layout built to match the existing Webbotica design system.
 */
:root {
    --wb-article-primary: var(--color-primary, #496af9);
    --wb-article-primary-dark: #3452d6;
    --wb-article-heading: var(--color-heading, #111827);
    --wb-article-copy: var(--color-paragraph, #6b7280);
    --wb-article-border: var(--color-border, #e5e7eb);
    --wb-article-soft: #f7f8fb;
    --wb-article-container: var(--container-width, 1240px);
    --wb-article-gutter: var(--container-padding, 24px);
}

.wb-article-page,
.wb-article-page * { box-sizing: border-box; }

.wb-article-page {
    background: #fff;
    color: var(--wb-article-heading);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wb-article-page a { color: inherit; }

.wb-article__container {
    width: min(calc(100% - (var(--wb-article-gutter) * 2)), var(--wb-article-container));
    margin-inline: auto;
}

.wb-article__eyebrow {
    margin: 0 0 14px;
    color: var(--wb-article-primary);
    font-size: .72rem;
    font-weight: 760;
    letter-spacing: .14em;
    line-height: 1.25;
    text-decoration: none;
}

/* Article hero */
.wb-article-hero {
    padding: clamp(64px, 6.2vw, 88px) 0 36px;
    background: #fff;
}

.wb-article-hero__inner {
    max-width: 1080px;
}

.wb-article-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: #8a929e;
    font-size: .73rem;
    font-weight: 650;
    line-height: 1.4;
}

.wb-article-breadcrumbs a {
    text-decoration: none;
    transition: color 160ms ease;
}

.wb-article-breadcrumbs a:first-child { color: #68717e; }
.wb-article-breadcrumbs a:hover { color: var(--wb-article-primary); }
.wb-article-breadcrumbs > span { color: #c2c7cf; }
.wb-article-breadcrumbs .wb-article-breadcrumbs__current {
    color: var(--wb-article-primary);
    font-weight: 720;
}

.wb-article-hero h1 {
    max-width: 980px;
    margin: 0;
    font-size: clamp(3rem, 4.65vw, 4rem);
    /* font-weight: 720; */
    letter-spacing: -.028em;
    line-height: 1.015;
    text-wrap: balance;
}

.wb-article-hero__lead {
    max-width: 790px;
    margin: 24px 0 0;
    color: var(--wb-article-copy);
    font-size: clamp(1.02rem, 1.35vw, 1.15rem);
    line-height: 1.72;
}

/* Professional byline / publication details — deliberately not a row of bullet-separated text. */
.wb-article-hero__details {
    max-width: 920px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 36px;
    margin-top: 34px;
    padding: 20px 0;
    border-top: 1px solid var(--wb-article-border);
    border-bottom: 1px solid var(--wb-article-border);
}

.wb-article-author {
    min-width: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.wb-article-author__label,
.wb-article-meta-item > span {
    color: #9299a4;
    font-size: .62rem;
    font-weight: 680;
    letter-spacing: .035em;
    line-height: 1.35;
}

.wb-article-author strong,
.wb-article-meta-item strong,
.wb-article-meta-item time {
    color: #3b4350;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.45;
}

.wb-article-meta-list {
    display: flex;
    align-items: stretch;
    margin-left: auto;
}

.wb-article-meta-item {
    min-width: 145px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding-left: 28px;
    border-left: 1px solid var(--wb-article-border);
}

.wb-article-meta-item + .wb-article-meta-item { margin-left: 28px; }

/* Featured image */
.wb-article-featured {
    max-width: 1120px;
    margin-top: 10px;
    margin-bottom: clamp(68px, 7vw, 96px);
}

.wb-article-featured__image {
    width: 100%;
    max-height: 650px;
    display: block;
    object-fit: cover;
    border: 1px solid var(--wb-article-border);
    border-radius: 18px;
}

/* Reading layout */
.wb-article-layout {
    display: grid;
    grid-template-columns: minmax(170px, 205px) minmax(0, 760px);
    justify-content: center;
    align-items: start;
    gap: clamp(46px, 6vw, 78px);
    padding-bottom: clamp(88px, 9vw, 132px);
}

.wb-article-toc {
    position: sticky;
    top: calc(var(--site-header-height, 72px) + 34px);
    padding-top: 3px;
}

.wb-article-toc[hidden] { display: none !important; }

.wb-article-toc > p {
    margin: 0 0 15px;
    color: #9299a4;
    font-size: .61rem;
    font-weight: 760;
    letter-spacing: .13em;
}

.wb-article-toc ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wb-article-toc a {
    display: block;
    padding-left: 12px;
    border-left: 1px solid var(--wb-article-border);
    color: #777f8b;
    font-size: .72rem;
    line-height: 1.5;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease;
}

.wb-article-toc a:hover {
    border-color: var(--wb-article-primary);
    color: var(--wb-article-heading);
}

.wb-article-main { min-width: 0; }

.wb-article-content {
    color: #343b46;
    font-size: 1.02rem;
    line-height: 1.86;
}

.wb-article-content > *:first-child { margin-top: 0 !important; }
.wb-article-content > *:last-child { margin-bottom: 0 !important; }
.wb-article-content p { margin: 0 0 1.45em; }

.wb-article-content h2,
.wb-article-content h3,
.wb-article-content h4 {
    scroll-margin-top: calc(var(--site-header-height, 72px) + 34px);
    color: var(--wb-article-heading);
}

.wb-article-content h2 {
    margin: 2.25em 0 .72em;
    font-size: clamp(1.8rem, 2.7vw, 2.6rem);
    font-weight: 720;
    letter-spacing: -.045em;
    line-height: 1.12;
}

.wb-article-content h3 {
    margin: 1.95em 0 .65em;
    font-size: clamp(1.3rem, 2vw, 1.72rem);
    font-weight: 710;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.wb-article-content h4 { margin: 1.8em 0 .55em; font-size: 1.08rem; }

.wb-article-content a {
    color: var(--wb-article-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.wb-article-content strong { color: #202733; }
.wb-article-content ul,
.wb-article-content ol { margin: 0 0 1.6em; padding-left: 1.35em; }
.wb-article-content li { margin: .48em 0; padding-left: .15em; }
.wb-article-content li::marker { color: var(--wb-article-primary); font-weight: 700; }

.wb-article-content blockquote {
    margin: 2.15em 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--wb-article-primary);
    color: #444c58;
    font-size: 1.14rem;
    font-weight: 540;
    line-height: 1.65;
}

.wb-article-content blockquote p:last-child { margin-bottom: 0; }
.wb-article-content figure { margin: 2.4em 0; }
/* =========================================================
   ARTICLE MEDIA
   ========================================================= */

.wb-article-content figure,
.wb-article-content .wp-block-image {
    width: 100%;
    max-width: 100%;

    margin-left: 0;
    margin-right: 0;
}

.wb-article-content figure img,
.wb-article-content .wp-block-image img,
.wb-article-content img {
    width: 100%;
    max-width: 100%;
    height: auto;

    display: block;

    object-fit: contain;
}
.wb-article-content figcaption { margin-top: 9px; color: #8a929e; font-size: .72rem; line-height: 1.55; }
.wb-article-content .wp-block-table { overflow-x: auto; margin: 2.2em 0; }
.wb-article-content table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.wb-article-content th,
.wb-article-content td { padding: 13px 14px; border: 1px solid var(--wb-article-border); text-align: left; vertical-align: top; }
.wb-article-content th { background: var(--wb-article-soft); color: var(--wb-article-heading); font-weight: 700; }
.wb-article-content code { padding: 2px 5px; border-radius: 5px; background: #f1f3f7; font-size: .88em; }
.wb-article-content pre { overflow-x: auto; margin: 2em 0; padding: 20px; border: 1px solid var(--wb-article-border); border-radius: 12px; background: #f7f8fb; font-size: .82rem; line-height: 1.65; }
.wb-article-content pre code { padding: 0; background: transparent; }
.wb-article-content .wp-block-separator { margin: 3em 0; border: 0; border-top: 1px solid var(--wb-article-border); }

/* Inline CTA at the end of an article */
.wb-article-end {
    margin-top: 68px;
    padding: 34px;
    border: 1px solid var(--wb-article-border);
    border-radius: 18px;
    background: #fff;
}

.wb-article-end h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    font-weight: 720;
    letter-spacing: -.045em;
    line-height: 1.1;
}

.wb-article-end > p:not(.wb-article__eyebrow) {
    margin: 15px 0 0;
    color: var(--wb-article-copy);
    line-height: 1.72;
}

.wb-article__button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    padding: 0 22px;
    border-radius: 12px;
    background: var(--wb-article-primary);
    color: #fff !important;
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease;
}

.wb-article__button:hover {
    transform: translateY(-2px);
    background: var(--wb-article-primary-dark);
}

/* Related resources */
.wb-article-related {
    padding: clamp(74px, 7vw, 106px) 0;
    border-top: 1px solid var(--wb-article-border);
}

.wb-article-related__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.wb-article-related__heading h2 {
    margin: 0;
    font-size: clamp(2.1rem, 3.8vw, 3.6rem);
    font-weight: 720;
    letter-spacing: -.052em;
    line-height: 1.07;
}

.wb-article-related__heading > a {
    margin-bottom: 6px;
    color: #626b78;
    font-size: .76rem;
    font-weight: 680;
    text-decoration: none;
}

.wb-article-related__heading > a:hover { color: var(--wb-article-primary); }

/* Related-post cards are self-contained on article pages. */
.wb-resource-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.wb-resource-card { min-width: 0; overflow: hidden; border: 1px solid var(--wb-article-border); border-radius: 16px; background: #fff; transition: transform 180ms ease, box-shadow 180ms ease; }
.wb-resource-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(17,24,39,.06); }
.wb-resource-card__media { height: 200px; display: block; overflow: hidden; background: var(--wb-article-soft); }
.wb-resource-card__image { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 350ms ease; }
.wb-resource-card:hover .wb-resource-card__image { transform: scale(1.025); }
.wb-resource-card__placeholder { width:100%; height:100%; display:grid; place-items:center; background:#f7f8fb; }
.wb-resource-card__placeholder span { width:72px; height:72px; border:1px solid rgba(73,106,249,.22); border-radius:19px; transform:rotate(12deg); }
.wb-resource-card__body { padding: 22px; }
.wb-resource-card__meta { display: flex; flex-wrap: wrap; gap: 8px 13px; color: #89919d; font-size: .68rem; font-weight: 620; }
.wb-resource-card__category { color: var(--wb-article-primary); }
.wb-resource-card__title { margin: 13px 0 0; font-size: 1.28rem; font-weight: 710; letter-spacing: -.034em; line-height: 1.22; }
.wb-resource-card__title a { color: inherit; text-decoration: none; }
.wb-resource-card__excerpt { margin: 13px 0 0; color: var(--wb-article-copy); font-size: .81rem; line-height: 1.66; }
.wb-resource-card__link { width: fit-content; display:inline-flex; gap:7px; margin-top:18px; padding-bottom:3px; border-bottom:1px solid var(--wb-article-heading); color:var(--wb-article-heading); font-size:.73rem; font-weight:720; text-decoration:none; }
.wb-resource-card__link:hover { border-color: var(--wb-article-primary); color: var(--wb-article-primary); }

.wb-article-page a:focus-visible { outline: 3px solid rgba(73,106,249,.24); outline-offset: 3px; }
/* =========================================================
   PAGE GUIDE
   ========================================================= */

.wb-article-toc__toggle {
    display: none;
}

.wb-article-toc__desktop-label {
    margin: 0 0 15px;
    color: #9299a4;
    font-size: .61rem;
    font-weight: 760;
    letter-spacing: .13em;
}

.wb-article-toc a.is-active {
    border-color: var(--wb-article-primary);
    color: var(--wb-article-heading);
    font-weight: 680;
}
@media (max-width: 1000px) {

    .wb-article-layout {
        grid-template-columns: minmax(0, 760px);
        gap: 34px;
    }

    /*
     * Compact Page Guide
     */

    .wb-article-toc {
        position: sticky;
        z-index: 30;
        top: var(--site-header-height, 72px);

        width: 100%;
        padding: 0;

        border: 0;
        border-top: 1px solid var(--wb-article-border);
        border-bottom: 1px solid var(--wb-article-border);
        border-radius: 0;

        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(14px);
    }

    .wb-article-toc__toggle {
        width: 100%;
        min-height: 58px;

        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;

        padding: 0 4px;

        border: 0;
        background: transparent;

        color: inherit;
        font: inherit;
        text-align: left;

        cursor: pointer;
    }

    .wb-article-toc__toggle-label {
        color: #9299a4;

        font-size: .67rem;
        font-weight: 760;
        letter-spacing: .09em;

        white-space: nowrap;
    }

    .wb-article-toc__current {
        min-width: 0;

        overflow: hidden;

        color: var(--wb-article-heading);

        font-size: .88rem;
        font-weight: 620;

        text-align: right;

        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wb-article-toc__chevron {
        width: 8px;
        height: 8px;

        border-right: 1.5px solid #69717d;
        border-bottom: 1.5px solid #69717d;

        transform: translateY(-2px) rotate(45deg);

        transition: transform 180ms ease;
    }

    .wb-article-toc.is-open
    .wb-article-toc__chevron {
        transform: translateY(2px) rotate(225deg);
    }

    /*
     * Dropdown
     */

    .wb-article-toc__panel {
        display: none;

        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;

        max-height: min(60vh, 460px);
        overflow-y: auto;

        padding: 8px 0 12px;

        border-bottom: 1px solid var(--wb-article-border);

        background: rgba(255, 255, 255, .99);

        box-shadow:
            0 20px 34px rgba(17, 24, 39, .08);
    }

    .wb-article-toc.is-open
    .wb-article-toc__panel {
        display: block;
    }

    .wb-article-toc__desktop-label {
        display: none;
    }

    .wb-article-toc ol {
        display: block;

        margin: 0;
        padding: 0;
    }

    .wb-article-toc li {
        margin: 0;
        padding: 0;

        list-style: none;
    }

    .wb-article-toc li + li {
        border-top: 1px solid #eef0f3;
    }

    .wb-article-toc a {
        display: block;

        padding: 13px 14px;

        border-left: 0;

        color: #616a77;

        font-size: .84rem;
        line-height: 1.45;

        text-decoration: none;
    }

    .wb-article-toc a.is-active {
        color: var(--wb-article-primary);
        font-weight: 700;
    }

    .wb-resource-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    :root { --wb-article-gutter: 18px; }

    .wb-article-hero { padding: 48px 0 28px; }
    .wb-article-breadcrumbs { margin-bottom: 25px; font-size: .7rem; }
    .wb-article-hero h1 { font-size: clamp(2.45rem, 11.2vw, 3.25rem); line-height: 1.015; }
    .wb-article-hero__lead { margin-top: 20px; font-size: .97rem; }

    .wb-article-hero__details {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 28px;
        padding: 0;
    }

    .wb-article-author {
        min-width: 0;
        padding: 16px 0;
    }

    .wb-article-meta-list {
        width: 100%;
        margin: 0;
        border-top: 1px solid var(--wb-article-border);
    }

    .wb-article-meta-item {
        width: 50%;
        min-width: 0;
        padding: 15px 0;
        border-left: 0;
    }

    .wb-article-meta-item + .wb-article-meta-item {
        margin-left: 0;
        padding-left: 18px;
        border-left: 1px solid var(--wb-article-border);
    }
.wb-article-content figure,
.wb-article-content .wp-block-image,
.wb-article-content .alignwide,
.wb-article-content .alignfull {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}

.wb-article-content img,
.wb-article-content figure img,
.wb-article-content .wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    object-fit: contain !important;

    border-radius: 10px;
}
    .wb-article-featured { margin-top: 4px; margin-bottom: 58px; }
  
    .wb-article-featured {
        margin-top: 4px;
        margin-bottom: 48px;
    }

    .wb-article-featured__image {
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        display: block;

        object-fit: contain !important;
        object-position: center;

        border-radius: 14px;
    }
    .wb-article-layout { gap: 34px; padding-bottom: 76px; }
    .wb-article-toc { padding: 18px; }
    .wb-article-toc ol { grid-template-columns: 1fr; }
    .wb-article-content { font-size: .98rem; line-height: 1.82; }
    .wb-article-content h2 { margin-top: 2em; }
    .wb-article-end { margin-top: 54px; padding: 27px 21px; }
    .wb-article-related { padding: 66px 0; }
    .wb-article-related__heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .wb-resource-grid { grid-template-columns: 1fr; gap: 14px; }
    .wb-resource-card__media { height: 205px; }
}
