/* ======================
   WAB BLOG — BLOCK STYLES
   These styles are portable and apply anywhere these blocks are used.
   ====================== */


/* ── Summary Box ──
   Figma: 25px title, 18px/25px body, separator line above, content 640px */
.wp-block-group.is-style-wab-summary {
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 2em 0;
    max-width: var(--wab-content-width);
    border-top: 1px solid var(--wab-gray-200);
    border-bottom: 1px solid var(--wab-gray-200);
    padding: 24px 0;
}

.wp-block-group.is-style-wab-summary > h3:first-child,
.wp-block-group.is-style-wab-summary > .wp-block-heading:first-child {
    font-size: 25px;
    font-weight: 400;
    line-height: 40px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--wab-h3-color);
    margin: 0 0 20px;
}

.wp-block-group.is-style-wab-summary p {
    font-size: 18px;
    line-height: 25px;
    margin-bottom: 20px;
    color: var(--wab-p-color);
    padding: 0;
    border: none;
}

.wp-block-group.is-style-wab-summary p:last-child {
    margin-bottom: 0;
}

.wp-block-group.is-style-wab-summary p strong {
    color: var(--wab-p-color);
    font-weight: 700;
}


/* ── Fact Callout ──
   Figma: rounded 16px, bg primary 80% opacity, icon+FACT label,
   text 20px/30px, 16px gap, icon gradient circle */
.wp-block-group.is-style-wab-fact {
    position: relative;
    background: color-mix(in srgb, var(--wab-primary) 8%, transparent);
    border: none;
    border-radius: var(--wab-radius);
    padding: 22px 24px 22px 72px;
    margin: 2em 0;
}

/* Figma: gradient icon circle on the left */
.wp-block-group.is-style-wab-fact::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 20px;
    width: 36px;
    height: 36px;
    border-radius: var(--wab-radius-md);
    background: linear-gradient(117deg, var(--wab-primary), var(--wab-accent));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Figma: "FACT" label = 12px, letter-spacing 1.65px, primary color 80% */
.wp-block-group.is-style-wab-fact > p:first-child::before,
.wp-block-group.is-style-wab-fact > .wp-block-heading:first-child::before {
    content: 'FACT';
    display: block;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1.65px;
    color: color-mix(in srgb, var(--wab-primary) 80%, transparent);
    margin-bottom: 10px;
    line-height: 16.5px;
}

.wp-block-group.is-style-wab-fact p {
    font-size: 20px;
    line-height: 30px;
    color: var(--wab-p-color);
    margin: 0;
}


/* ── Feature List (checkmarks) ──
   Figma: bullet icons are SVG circles with opacity 0.5, 32px left indent */
.wp-block-list.is-style-wab-features {
    list-style: none;
    padding-left: 32px;
    margin: 1.5em 0;
}

.wp-block-list.is-style-wab-features li {
    position: relative;
    padding-left: 0;
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 30px;
    color: var(--wab-p-color);
}

.wp-block-list.is-style-wab-features li::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 9px;
    width: 13px;
    height: 13px;
    opacity: 0.5;
    background: var(--wab-primary);
    border-radius: 50%;
}


/* ── Numbered Steps ──
   Figma: 31x31px circles, bg #f3faff (very light primary), 18px text */
.wp-block-list.is-style-wab-steps {
    list-style: none;
    padding-left: 0;
    margin: 2em 0;
    counter-reset: wab-step;
}

.wp-block-list.is-style-wab-steps li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 10px;
    min-height: 31px;
    font-size: 18px;
    line-height: 30px;
    color: var(--wab-p-color);
    counter-increment: wab-step;
}

.wp-block-list.is-style-wab-steps li::before {
    content: counter(wab-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 31px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--wab-primary) 8%, var(--wab-bg));
    color: var(--wab-p-color);
    font-size: 18px;
    font-weight: 400;
    border-radius: 50%;
    flex-shrink: 0;
}

.wp-block-list.is-style-wab-steps li:last-child {
    margin-bottom: 0;
}


/* ── Callouts ── */
.wp-block-group.is-style-wab-callout-info {
    background: color-mix(in srgb, var(--wab-primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--wab-primary) 25%, transparent);
    border-radius: var(--wab-radius);
    padding: 20px 24px;
    margin: 1.5em 0;
}

.wp-block-group.is-style-wab-callout-warning {
    background: color-mix(in srgb, var(--wab-accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--wab-accent) 25%, transparent);
    border-radius: var(--wab-radius);
    padding: 20px 24px;
    margin: 1.5em 0;
}

.wp-block-group.is-style-wab-callout-tip {
    background: color-mix(in srgb, var(--wab-success) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--wab-success) 25%, transparent);
    border-radius: var(--wab-radius);
    padding: 20px 24px;
    margin: 1.5em 0;
}

/* ── Pull Quote ── */
.wp-block-quote.is-style-wab-pull {
    border: none;
    padding: 0;
    text-align: center;
    font-size: 36px;
    line-height: 49.5px;
    font-weight: 400;
    color: var(--wab-primary);
    max-width: var(--wab-wide-width);
    margin: 2em auto;
}


/* ======================
   COMPARISON TABLE
   Figma: 640px wide, rows 159px tall, header bg #f3faff,
   border #d7d9dc, category 18px, values 18px/22px,
   column titles 15px, vertical divider at 320px
   ====================== */
/* ======================
   COMPARISON CARD (single column)
   ====================== */
.wab-comparison-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid var(--wab-gray-200);
    background: var(--wab-bg, #fff);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wab-comparison-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.wab-comparison-card__header {
    padding: 12px 16px;
    text-align: center;
    border-radius: 10px;
    margin: 5px;
}

.wab-comparison-card__heading {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
}

.wab-comparison-card__body {
    padding: 0 16px;
}

.wab-comparison-card__item {
    padding: 12px 0;
    border-bottom: 1px solid var(--wab-gray-200);
}

.wab-comparison-card__item:last-child {
    border-bottom: none;
}

.wab-comparison-card__item-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    color: var(--wab-p-color);
    margin-bottom: 2px;
}

.wab-comparison-card__item-text {
    font-size: 14px;
    line-height: 20px;
    color: var(--wab-gray-500);
}

@media (max-width: 600px) {
    .wab-comparison-card__body { padding: 0 12px; }
    .wab-comparison-card__header { padding: 10px 12px; }
}


/* ======================
   QUOTE BANNER
   Figma: no bg, centered, thin gradient lines above/below,
   36px primary text, 11px spaced cite
/* ======================
   PULL QUOTE BLOCK (Don Norman style)
   Figma: rounded 16px, gradient bg, top 3px primary bar,
   big " mark 120px, italic 22px/35px, author with avatar
   ====================== */
/* This style applies when Quote Banner block is used in gradient mode.
   For now the block renders the same structure. */


/* ======================
   AUTHOR BIO
   Figma: bg #f3f7fb, rounded 16px, avatar 80px rounded 16px,
   "WRITTEN BY" 11px letter-spacing 1.65px color #b7bec8,
   name 18px/28px, role 14px/22.8px color #b8bec8
   ====================== */
.wab-author-bio {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: color-mix(in srgb, var(--wab-primary) 5%, var(--wab-gray-50));
    border-radius: var(--wab-radius);
    margin: 3em 0;
    max-width: var(--wab-content-width);
}

.wab-author-bio__avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--wab-author-avatar-radius, 16px);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--wab-gray-200);
    box-shadow: 0 1px 2px -1px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.1);
}



.wab-author-bio__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
}

.wab-author-bio__initial {
    font-size: 28px;
    font-weight: 400;
    color: var(--wab-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Figma: 11px, letter-spacing 1.65px, color #b7bec8 */
.wab-author-bio__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.65px;
    color: var(--wab-gray-400);
    font-weight: 400;
    margin-bottom: 4px;
    line-height: 16.5px;
}

/* Figma: 18px/28px */
.wab-author-bio__name {
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: var(--wab-p-color);
}

/* Figma: 14px/22.8px, color #b8bec8 */
.wab-author-bio__role {
    font-size: 14px;
    line-height: 22.8px;
    color: var(--wab-gray-400);
    margin-top: 2px;
}


/* ======================
   MARGIN NOTE
   Floats in the page margin on wide screens.
   Falls inline on narrow screens.
   
   Math: content is centered at max-width 640px.
   On a 1440px screen: (1440-640)/2 = 400px margin each side.
   Note width 280px + 24px gap = 304px — fits in 400px margin.
   
   Breakpoint: content-width + (note-width + gap) * 2 = min screen
   640 + (280+24)*2 = 1248px → below this, note goes inline.
   ====================== */
.wab-margin-note {
    position: relative;
    margin: 1.5em 0;
}

/* On wide screens: pull out of content flow into margin */
@media (min-width: 1248px) {
    .wab-margin-note {
        position: absolute;
        width: var(--wab-mn-width, 280px);
        margin: 0;
    }

    .wab-margin-note--right {
        left: calc(100% + 24px);
    }

    .wab-margin-note--left {
        right: calc(100% + 24px);
        left: auto;
    }

    .wab-margin-note--sticky .wab-margin-note__inner {
        position: sticky;
        top: 120px;
    }

    /* Fix overlap: if margin note is next to wide/full blocks, fall back to inline */
    .wab-margin-note:has(+ .alignwide),
    .wab-margin-note:has(+ .alignfull),
    .wab-article__content > .alignwide + .wab-margin-note,
    .wab-article__content > .alignfull + .wab-margin-note {
        position: relative;
        max-width: 100%;
        width: 100%;
        left: auto;
        right: auto;
        margin: 1.5em 0;
    }

    /* Disable sticky when forced inline */
    .wab-margin-note:has(+ .alignwide) .wab-margin-note__inner,
    .wab-margin-note:has(+ .alignfull) .wab-margin-note__inner,
    .wab-article__content > .alignwide + .wab-margin-note .wab-margin-note__inner,
    .wab-article__content > .alignfull + .wab-margin-note .wab-margin-note__inner {
        position: static;
    }
}

/* On narrow screens: inline block */
@media (max-width: 1247px) {
    .wab-margin-note {
        max-width: 100%;
        width: 100%;
    }
}

.wab-margin-note__inner {
    background: color-mix(in srgb, var(--wab-gray-700) 7%, transparent);
    border-radius: var(--wab-radius-md, 14px);
    padding: 24px;
}

/* Typography inside margin note — slightly smaller */
.wab-margin-note__inner h1,
.wab-margin-note__inner h2,
.wab-margin-note__inner h3,
.wab-margin-note__inner h4 {
    font-size: 20px;
    font-weight: 400;
    line-height: 30px;
    color: var(--wab-p-color);
    margin: 0 0 8px;
}

.wab-margin-note__inner p {
    font-size: 15px;
    line-height: 22px;
    color: var(--wab-p-color);
    margin: 0 0 12px;
}

.wab-margin-note__inner p:last-child {
    margin-bottom: 0;
}

.wab-margin-note__inner img {
    width: 100%;
    border-radius: var(--wab-radius-sm, 6px);
    margin-bottom: 12px;
}

/* Button inside margin note */
.wab-margin-note__inner .wp-block-button__link {
    background: var(--wab-accent);
    color: var(--wab-gray-900);
    border-radius: var(--wab-radius-sm, 6px);
    font-size: 15px;
    padding: 6px 16px;
}


/* ======================
   CTA BANNER
   Figma: bg primary 20% opacity, rounded 25px,
   title 32px, text 18px/30px, button bg white rounded 9px,
   image 288px wide on right
   ====================== */
.wab-cta-banner {
    margin: 3em 0;
    border-radius: var(--wab-cta-radius, 25px);
    overflow: hidden;
}

.wab-cta-banner__inner {
    padding: var(--wab-cta-padding, 48px);
    max-width: var(--wab-wide-width);
    margin: 0 auto;
}

/* Style variants */
.wab-cta-banner--primary-tint { background: color-mix(in srgb, var(--wab-primary) 20%, transparent); }
.wab-cta-banner--dark { background: var(--wab-gray-900); color: var(--wab-gray-100); }
.wab-cta-banner--dark .wab-cta-banner__inner { color: var(--wab-gray-100); }
.wab-cta-banner--light { background: var(--wab-gray-50); }
.wab-cta-banner--accent-tint { background: color-mix(in srgb, var(--wab-accent) 20%, transparent); }
.wab-cta-banner--transparent { background: transparent; }

.wab-cta-banner.alignfull {
    border-radius: 0 !important;
}
.wab-cta-banner.alignwide {
    border-radius: 8px;
}

/* ======================
   QUOTE CARD
   ====================== */
.wab-quote-card {
    margin: 3em 0;
    border-radius: var(--wab-quote-radius, 0px);
    overflow: hidden;
    border: 2px solid transparent;
}

.wab-quote-card__inner {
    padding: var(--wab-quote-padding, 48px);
    max-width: var(--wab-wide-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wab-quote-card__icon {
    width: 48px;
    height: 48px;
    color: var(--wab-primary);
}

.wab-quote-card__text {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-style: italic;
    font-weight: 400;
    font-size: 22px;
    line-height: 35px;
    color: inherit;
}

.wab-quote-card__text::before,
.wab-quote-card__text::after {
    display: none !important;
}

.wab-quote-card__author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.wab-article .wab-quote-card__avatar,
.wab-quote-card__avatar {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    border-radius: 60px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

.wab-quote-card__name {
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.2;
}

.wab-quote-card__role {
    font-size: 0.85em;
    color: color-mix(in srgb, currentColor 70%, transparent);
    margin-top: 0;
}

/* Style variants */
.wab-quote-card--primary-tint {
    background: color-mix(in srgb, var(--wab-primary) 10%, transparent);
    border-color: var(--wab-primary);
}
.wab-quote-card--dark {
    background: var(--wab-gray-900);
    border-color: var(--wab-gray-700);
    color: var(--wab-gray-100);
}
.wab-quote-card--dark .wab-quote-card__icon {
    color: var(--wab-gray-400);
}
.wab-quote-card--light {
    background: var(--wab-gray-50);
    border-color: var(--wab-gray-200);
}
.wab-quote-card--accent-tint {
    background: color-mix(in srgb, var(--wab-accent) 10%, transparent);
    border-color: var(--wab-accent);
}
.wab-quote-card--transparent {
    background: transparent;
    border-color: var(--wab-gray-200);
}

.wab-quote-card.alignfull {
    border-radius: 0 !important;
    border-left: none;
    border-right: none;
}
.wab-quote-card.alignwide {
    border-radius: 8px;
}


/* ======================
   RELATED ARTICLES
   Figma: sidebar card style = bg gray 7%, rounded 14px,
   title 20px/30px, text 15px/22px, thumbnail rounded,
   button bg accent rounded 6px
   ====================== */
.wab-related {
    margin: 3em 0;
}

.wab-related__title {
    font-size: 20px;
    font-weight: 400;
    line-height: 30px;
    color: var(--wab-p-color);
    margin: 0 0 24px;
}

/* With thumbnails */
.wab-related--thumbs .wab-related__grid {
    display: grid;
    grid-template-columns: repeat(var(--wab-related-cols, 3), 1fr);
    gap: 16px;
}

.wab-related--thumbs .wab-related__card {
    display: block;
    text-decoration: none;
    border-radius: var(--wab-radius);
    overflow: hidden;
    background: var(--wab-gray-50);
    transition: box-shadow var(--wab-transition), transform var(--wab-transition);
}

.wab-related--thumbs .wab-related__card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.wab-related__card-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--wab-gray-100);
}

.wab-related__card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--wab-transition);
}

.wab-related--thumbs .wab-related__card:hover .wab-related__card-thumb img {
    transform: scale(1.04);
}

.wab-related__card-thumb--empty {
    background: var(--wab-gray-200);
}

.wab-related__card-body {
    padding: 16px 24px 20px;
}

.wab-related__card-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wab-primary);
    margin-bottom: 6px;
}

/* Figma: 20px/30px */
.wab-related__card-title {
    font-size: 20px;
    font-weight: 400;
    line-height: 30px;
    color: var(--wab-p-color);
    margin: 0;
}

/* Compact / no thumbnails */
.wab-related--compact .wab-related__grid {
    display: block;
}

.wab-related__row {
    display: block;
    text-decoration: none;
    padding: 20px 0;
    border-bottom: 1px solid var(--wab-gray-200);
    transition: background var(--wab-transition);
}

.wab-related__row:first-child {
    border-top: 1px solid var(--wab-gray-200);
}

.wab-related__row:hover {
    background: var(--wab-gray-50);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: var(--wab-radius-sm);
}

.wab-related__row-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wab-primary);
    margin-bottom: 4px;
}

.wab-related__row-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--wab-p-color);
    margin: 0;
}

.wab-related__row-excerpt {
    font-size: 15px;
    line-height: 22px;
    color: var(--wab-gray-500);
    margin: 6px 0 0;
}

@media (max-width: 768px) {
    .wab-related--thumbs .wab-related__grid {
        grid-template-columns: 1fr;
    }
}



/* ======================
   COMPARISON MATRIX WRAPPER
   Subgrid layout for 1-6 columns.
   ====================== */
.wab-comparison-columns {
    margin: 2em auto;
}

.wab-comparison-matrix--grid {
    display: grid;
    grid-template-columns: repeat(var(--wab-cols, 3), 1fr);
    grid-template-rows: auto repeat(var(--wab-rows, 3), auto);
    gap: 24px;
    align-items: start;
}

.wab-matrix-col {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span calc(var(--wab-rows) + 1);
    
    background: var(--wab-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid var(--wab-gray-200);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wab-matrix-col:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

@supports not (grid-template-rows: subgrid) {
    .wab-matrix-col {
        grid-template-rows: auto;
        grid-row: auto;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .wab-comparison-matrix--grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
    .wab-comparison-matrix--grid .wab-matrix-col {
        grid-template-rows: auto;
        grid-row: auto;
        display: flex;
        flex-direction: column;
    }
}

.wab-matrix-col__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.wab-matrix-col__heading {
    font-weight: 700;
}

.wab-matrix-col__item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.wab-matrix-col__item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--wab-body-pad-x, 16px);
    right: var(--wab-body-pad-x, 16px);
    height: 1px;
    background: var(--wab-gray-200);
}
.wab-matrix-col__item:last-child::after {
    display: none;
}

.wab-matrix-col__item-inner {
    width: 100%;
}

.wab-matrix-col__item-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--wab-p-color);
}

.wab-matrix-col__item-title p {
    margin: 0;
}

.wab-matrix-col__item-text {
    line-height: 1.5;
    color: var(--wab-gray-500);
}

.wab-matrix-col__item-text p {
    margin: 0;
}

.wab-comparison-matrix--carousel {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 24px;
    padding-bottom: 24px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.wab-comparison-matrix--carousel .wab-matrix-col {
    flex: 0 0 320px;
    scroll-snap-align: center;
    grid-template-rows: auto;
    grid-row: auto;
    display: flex;
    flex-direction: column;
}

.wab-comparison-matrix--carousel::-webkit-scrollbar { height: 6px; }
.wab-comparison-matrix--carousel::-webkit-scrollbar-thumb { background: var(--wab-gray-300); border-radius: 6px; }
.wab-comparison-matrix--carousel::-webkit-scrollbar-track { background: var(--wab-gray-100); border-radius: 6px; }

/* ======================
   COMPARISON CARD (single column)
   ====================== */
.wab-comparison-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid var(--wab-gray-200);
    background: var(--wab-bg, #fff);
}

.wab-comparison-card__header {
    padding: 12px 16px;
    text-align: center;
    border-radius: 10px;
    margin: 5px;
}

.wab-comparison-card__heading {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
}

.wab-comparison-card__body {
    padding: 0 16px;
}

.wab-comparison-card__item {
    padding: 12px 0;
    border-bottom: 1px solid var(--wab-gray-200);
}

.wab-comparison-card__item:last-child {
    border-bottom: none;
}

.wab-comparison-card__item-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    color: var(--wab-p-color);
    margin-bottom: 2px;
}

.wab-comparison-card__item-text {
    font-size: 14px;
    line-height: 20px;
    color: var(--wab-gray-500);
}


/* ======================
   TABS BLOCK
   ====================== */
.wab-tabs {
    margin: 2em 0;
}

/* Base Nav */
.wab-tabs__nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    position: relative;
    margin-bottom: 24px;
    /* Allow safe spacing at ends when scrolling */
    scroll-snap-type: x mandatory;
}
.wab-tabs__nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Nav Alignments */
.wab-tabs__nav--center {
    justify-content: center;
}
/* Center alignment needs to degrade to start on small screens if it overflows */
@media (max-width: 768px) {
    .wab-tabs__nav--center {
        justify-content: flex-start;
    }
}

.wab-tabs__nav--full {
    flex-wrap: nowrap;
}
.wab-tabs__nav--full .wab-tabs__btn {
    flex: 1 1 0;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}
@media (max-width: 768px) {
    .wab-tabs__nav--full .wab-tabs__btn {
        flex: 0 0 auto;
        padding-left: 16px;
        padding-right: 16px;
    }
}

.wab-tabs__btn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* ── Style: Underline ── */
.wab-tabs--underline .wab-tabs__nav {
    border-bottom: 2px solid var(--wab-gray-200);
    gap: 24px;
}
.wab-tabs--underline .wab-tabs__btn {
    padding: 0 0 12px 0;
    margin-bottom: -2px; /* overlap border */
    font-size: 16px;
    font-weight: 500;
    color: var(--wab-tab-color, var(--wab-gray-500));
    border-bottom: 2px solid transparent;
}
.wab-tabs--underline .wab-tabs__btn:hover {
    color: var(--wab-tab-active-color, var(--wab-gray-800));
    border-bottom-color: var(--wab-gray-300);
}
.wab-tabs--underline .wab-tabs__btn.is-active {
    color: var(--wab-tab-active-color, var(--wab-primary));
    border-bottom-color: var(--wab-tab-active-bg, var(--wab-primary)); /* use active-bg for the border line if set */
}

/* ── Style: Pills (Segmented Control) ── */
.wab-tabs--pills .wab-tabs__nav {
    display: inline-flex;
    background: var(--wab-tab-bg, #f1f5f9);
    padding: 6px;
    border-radius: 12px;
    gap: 4px;
    border-bottom: none;
}
.wab-tabs--pills .wab-tabs__nav--full {
    display: flex;
}
.wab-tabs--pills .wab-tabs__btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--wab-tab-color, #64748b);
    margin: 0;
}
.wab-tabs--pills .wab-tabs__btn:hover {
    color: var(--wab-tab-active-color, #0f172a);
}
.wab-tabs--pills .wab-tabs__btn.is-active {
    background: var(--wab-tab-active-bg, #ffffff);
    color: var(--wab-tab-active-color, #0f172a);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

/* ── Style: Bordered (Folder Card) ── */
.wab-tabs--bordered .wab-tabs__nav {
    border-bottom: 1px solid var(--wab-gray-200);
    gap: 4px;
    margin-bottom: 0; /* Attach to panels */
    background: var(--wab-tab-bg, transparent); /* Usually transparent at root */
}
.wab-tabs--bordered .wab-tabs__btn {
    padding: 12px 24px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--wab-tab-color, var(--wab-gray-500));
    margin-bottom: -1px;
    background: var(--wab-tab-bg, var(--wab-gray-50));
}
.wab-tabs--bordered .wab-tabs__btn:hover {
    background: var(--wab-gray-100);
    color: var(--wab-tab-active-color, var(--wab-gray-800));
}
.wab-tabs--bordered .wab-tabs__btn.is-active {
    background: var(--wab-tab-active-bg, var(--wab-bg, #fff));
    border-color: var(--wab-gray-200);
    border-bottom-color: var(--wab-tab-active-bg, var(--wab-bg, #fff));
    color: var(--wab-tab-active-color, var(--wab-primary));
    font-weight: 600;
}
.wab-tabs--bordered .wab-tabs__panels {
    padding: 24px;
    border: 1px solid var(--wab-gray-200);
    border-top: none;
    border-radius: 0 0 12px 12px;
}

/* Panels */
.wab-tabs__panel {
    display: none;
}
.wab-tabs__panel.is-active {
    display: block;
    animation: wabTabFadeIn 0.3s ease;
}
@keyframes wabTabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======================
   STEP BY STEP
   ====================== */
.wab-steps {
    margin: 2em 0;
}

/* ── Vertical ── */
.wab-steps--vertical .wab-steps__item {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.wab-steps--vertical .wab-steps__marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: var(--wab-steps-num-size);
}

.wab-steps--vertical .wab-steps__number {
    width: var(--wab-steps-num-size);
    height: var(--wab-steps-num-size);
    border-radius: var(--wab-steps-num-radius);
    background: var(--wab-steps-num-bg);
    color: var(--wab-steps-num-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wab-steps-num-font);
    font-weight: 600;
    flex-shrink: 0;
    z-index: 1;
}

.wab-steps--vertical .wab-steps__line {
    width: 2px;
    flex: 1;
    background: var(--wab-steps-line);
    min-height: 12px;
}

.wab-steps--vertical .wab-steps__content {
    padding: 0 0 var(--wab-steps-gap, 28px) 20px;
    padding-top: 4px;
}

.wab-steps--vertical .wab-steps__item--last .wab-steps__content {
    padding-bottom: 0;
}

.wab-steps__title {
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
    margin: 0 0 4px;
    color: var(--wab-p-color);
}

.wab-steps__text {
    font-size: 15px;
    line-height: 22px;
    color: var(--wab-gray-500);
    margin: 0;
}

/* ── Horizontal ── */
.wab-steps--horizontal {
    display: flex;
    align-items: flex-start;
}

.wab-steps--horizontal .wab-steps__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.wab-steps--horizontal .wab-steps__marker {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
}

.wab-steps--horizontal .wab-steps__number {
    width: var(--wab-steps-num-size);
    height: var(--wab-steps-num-size);
    border-radius: var(--wab-steps-num-radius);
    background: var(--wab-steps-num-bg);
    color: var(--wab-steps-num-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wab-steps-num-font);
    font-weight: 600;
    flex-shrink: 0;
    z-index: 1;
}

.wab-steps--horizontal .wab-steps__line {
    height: 2px;
    flex: 1;
    background: var(--wab-steps-line);
}

.wab-steps__line--hidden {
    visibility: hidden;
}

.wab-steps--horizontal .wab-steps__content {
    padding: 0 8px;
    text-align: center;
    width: 100%;
}

.wab-steps--horizontal .wab-steps__title {
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
    color: var(--wab-p-color);
    margin: 0 0 4px;
}

.wab-steps--horizontal .wab-steps__text {
    font-size: 15px;
    line-height: 22px;
    color: var(--wab-gray-500);
    margin: 0;
}

@media (max-width: 768px) {
    .wab-steps--horizontal {
        flex-direction: column;
        align-items: stretch;
    }
    .wab-steps--horizontal .wab-steps__item {
        flex-direction: row;
        text-align: left;
        gap: 0;
    }
    .wab-steps--horizontal .wab-steps__marker {
        flex-direction: column;
        width: var(--wab-steps-num-size);
        margin-bottom: 0;
    }
    .wab-steps--horizontal .wab-steps__line {
        width: 2px;
        height: auto;
        flex: 1;
    }
    .wab-steps--horizontal .wab-steps__content {
        padding: 8px 0 40px 20px;
    }
}

/* ======================
   RELATED ARTICLES CAROUSEL
   ====================== */
.wab-related--carousel {
    position: relative;
}
.wab-related__scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 24px;
    padding: 8px 0 24px;
    scrollbar-width: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}
.wab-related__scroll::-webkit-scrollbar {
    display: none;
}
.wab-related__scroll:active {
    cursor: grabbing;
    scroll-behavior: auto;
}
.wab-related__scroll .wab-related__card {
    flex: 0 0 340px;
    max-width: 85vw;
    margin-bottom: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wab-related__scroll .wab-related__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.wab-related__scroll .wab-related__row {
    flex: 0 0 380px;
    max-width: 90vw;
}
@media (max-width: 600px) {
    .wab-related__scroll .wab-related__card,
    .wab-related__scroll .wab-related__row {
        flex: 0 0 85vw;
    }
}

/* ======================
   TIMELINE — HORIZONTAL
   ====================== */
.wab-timeline-h {
    position: relative;
    margin: 2em auto;
    overflow: hidden;
}

.wab-timeline-h__scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 24px 24px;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.wab-timeline-h__scroll::-webkit-scrollbar { display: none; }

.wab-timeline-h__item {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0;
}

/* Image area — always present for alignment */
.wab-timeline-h__image-area {
    width: 160px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.wab-timeline-h__image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
.wab-timeline-h__image-area:empty {
    height: 0;
    margin-bottom: 0;
}

/* Dot row with lines */
.wab-timeline-h__dot-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.wab-timeline-h__dot-line {
    flex: 1;
    height: 2px;
    background: var(--wab-tl-line);
    /* Lines must touch the dot — no gap */
    margin: 0;
}

.wab-timeline-h__dot-line--hidden {
    background: transparent;
}

.wab-timeline-h__dot {
    width: var(--wab-tl-dot-size);
    height: var(--wab-tl-dot-size);
    border-radius: 50%;
    border: 2px solid var(--wab-tl-dot);
    background: var(--wab-bg, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wab-tl-dot-font);
    font-weight: 600;
    color: var(--wab-gray-500);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}

.wab-timeline-h__date {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wab-tl-date);
    margin-bottom: 2px;
}

.wab-timeline-h__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    color: var(--wab-p-color);
    margin: 0 0 2px !important;
}

.wab-timeline-h__text {
    font-size: 14px;
    line-height: 20px;
    color: var(--wab-gray-500);
    margin: 0;
}

/* Fade edges */
.wab-timeline-h__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}
.wab-timeline-h__fade--left {
    left: 0;
    background: linear-gradient(to right, var(--wab-bg, #fff), transparent);
}
.wab-timeline-h__fade--right {
    right: 0;
    background: linear-gradient(to left, var(--wab-bg, #fff), transparent);
}

/* Hint */
.wab-timeline-h__hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wab-gray-400);
    padding: 16px 0 8px;
}
.wab-timeline-h__hint.is-hidden { display: none; }


/* ======================
   TIMELINE — VERTICAL
   ====================== */
.wab-timeline-v {
    margin: 2em 0;
    position: relative;
}

.wab-timeline-v__item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 0;
    position: relative;
}

/* Line between items — on each item except last, from bottom of dot to top of next dot */
.wab-timeline-v__item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(var(--wab-tl-dot-size, 48px) / 2 - 1px);
    top: var(--wab-tl-dot-size, 48px);
    bottom: 0;
    width: 2px;
    background: var(--wab-tl-line, var(--wab-gray-200));
    z-index: 0;
}

.wab-timeline-v__marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: var(--wab-tl-dot-size, 48px);
}

/* Hide the old line divs */
.wab-timeline-v__line {
    display: none;
}

.wab-timeline-v__dot {
    width: var(--wab-tl-dot-size, 48px);
    height: var(--wab-tl-dot-size, 48px);
    border-radius: 50%;
    border: 2px solid var(--wab-tl-dot, var(--wab-gray-300));
    background: var(--wab-bg, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wab-tl-dot-font, 16px);
    font-weight: 600;
    color: var(--wab-gray-500);
    flex-shrink: 0;
    z-index: 1;
}

.wab-timeline-v__body {
    padding: 0 0 20px 0;
    flex: 1;
    min-width: 0;
}

.wab-timeline-v__item:last-child .wab-timeline-v__body {
    padding-bottom: 0;
}

.wab-timeline-v__date {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wab-tl-date, var(--wab-primary));
    margin: 0 0 5px 0 !important;
    line-height: 1.2;
}

.wab-timeline-v__title {
    font-size: 17px;
    font-weight: 600;
    line-height: 24px;
    color: var(--wab-p-color);
    margin: 0 0 5px !important;
}

.wab-timeline-v__text {
    font-size: 14px;
    line-height: 20px;
    color: var(--wab-gray-500);
    margin: 0 !important;
}

.wab-timeline-v__img {
    display: block;
    width: auto;
    max-width: 160px;
    height: auto;
    border-radius: 12px;
    margin: 8px 0 0 0 !important;
}


/* ======================
   TABS
   ====================== */
.wab-tabs {
    margin: 2em 0;
}

.wab-tabs__nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.wab-tabs__nav::-webkit-scrollbar { display: none; }

.wab-tabs__btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    color: var(--wab-gray-500);
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.wab-tabs__btn.is-active {
    color: var(--wab-p-color);
    font-weight: 600;
}

/* Underline style */
.wab-tabs--underline .wab-tabs__nav {
    border-bottom: 2px solid var(--wab-gray-200);
}
.wab-tabs--underline .wab-tabs__btn {
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
}
.wab-tabs--underline .wab-tabs__btn.is-active {
    border-bottom-color: var(--wab-primary);
    color: var(--wab-primary);
}

/* Pills style */
.wab-tabs--pills .wab-tabs__nav { gap: 8px; }
.wab-tabs--pills .wab-tabs__btn {
    border-radius: 8px;
    padding: 8px 16px;
}
.wab-tabs--pills .wab-tabs__btn.is-active {
    background: color-mix(in srgb, var(--wab-primary) 12%, transparent);
    color: var(--wab-primary);
}

/* Bordered style */
.wab-tabs--bordered .wab-tabs__nav {
    border: 1px solid var(--wab-gray-200);
    border-radius: 10px 10px 0 0;
    background: var(--wab-gray-50);
}
.wab-tabs--bordered .wab-tabs__btn.is-active {
    background: var(--wab-bg, #fff);
}

.wab-tabs__panel {
    display: none;
    padding: 24px 0;
}
.wab-tabs__panel.is-active {
    display: block;
}


/* ======================
   ACCORDION
   ====================== */
.wab-accordion {
    margin: 2em 0;
}

.wab-accordion__item {
    border-bottom: 1px solid var(--wab-gray-200);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.wab-accordion__item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.wab-accordion--bordered .wab-accordion__item:first-child {
    border-top: 1px solid var(--wab-gray-200);
}

.wab-accordion--separated .wab-accordion__item {
    border: 1px solid var(--wab-gray-200);
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--wab-bg, #fff);
}
.wab-accordion--separated .wab-accordion__item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-1px);
    border-color: var(--wab-gray-300);
}

.wab-accordion--minimal .wab-accordion__item {
    border: none;
    border-bottom: 1px solid var(--wab-gray-100);
    transition: background 0.25s ease;
}
.wab-accordion--minimal .wab-accordion__item:hover {
    background: var(--wab-gray-50);
    box-shadow: none;
}

.wab-accordion__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    gap: 12px;
}

.wab-accordion--separated .wab-accordion__header {
    padding: 16px;
}

.wab-accordion--icon-left .wab-accordion__header {
    flex-direction: row-reverse;
}

.wab-accordion__title {
    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
    color: var(--wab-p-color);
    flex: 1;
}

.wab-accordion__icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--wab-gray-400);
}

.wab-accordion__item.is-open .wab-accordion__icon {
    transform: rotate(180deg);
}

.wab-accordion__body {
    transition: height 0.3s ease;
    overflow: hidden;
}

.wab-accordion__content {
    padding: 0 0 16px;
    font-size: 16px;
    line-height: 26px;
    color: var(--wab-gray-600);
}

.wab-accordion--separated .wab-accordion__content {
    padding: 0 16px 16px;
}

.wab-accordion__content p {
    margin: 0 0 12px;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}
.wab-accordion__content p:last-child { margin-bottom: 0; }
