.hjes-stage,
.hjes-stage *,
.hjes-stage *::before,
.hjes-stage *::after {
    box-sizing: border-box;
}

.hjes-stage {
    --hjes-max-width: 2400px;
    --hjes-stage-padding: 0px;
    --hjes-section-radius: 0px;
    --hjes-section-pad-top: 68px;
    --hjes-section-pad-bottom: 68px;
    --hjes-content-pad-desktop: 15px;
    --hjes-content-pad-tablet: 15px;
    --hjes-content-pad-mobile: 15px;
    --hjes-header-gap: 36px;
    --hjes-card-radius: 20px;
    --hjes-card-height: 430px;
    --hjes-mobile-card-height: 410px;
    --hjes-gap: 14px;
    --hjes-mobile-peek: 16%;
    --hjes-ratio-one: 100fr;
    --hjes-ratio-two: 100fr;
    --hjes-ratio-three: 140fr;
    --hjes-ratio-four: 100fr;
    --hjes-outer: #fff;
    --hjes-surface: #fff;
    --hjes-ink: #192006;
    --hjes-heading-size: 54px;
    --hjes-heading-size-mobile: 32px;
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--hjes-stage-padding);
    overflow: visible;
    background: var(--hjes-outer);
    color: var(--hjes-ink);
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.hjes-stage.hjes-font-inherit { font-family: inherit; }
.hjes-stage.hjes-font-inter-tight { font-family: "Inter Tight", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.hjes-stage.hjes-font-poppins { font-family: Poppins, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/*
 * True viewport breakout.
 * The CSS path works immediately; frontend.js then measures the exact viewport
 * offset to survive boxed page builders, transformed wrappers and theme gutters.
 */
.hjes-stage.is-full-bleed {
    position: relative;
    left: 50%;
    width: 100vw;
    width: 100dvw;
    max-width: none !important;
    margin-right: -50vw !important;
    margin-left: -50vw !important;
}

@supports (width: 100dvw) {
    .hjes-stage.is-full-bleed {
        margin-right: -50dvw !important;
        margin-left: -50dvw !important;
    }
}

.hjes-stage.is-full-bleed.hjes-js-breakout {
    left: var(--hjes-breakout-left, 0px) !important;
    width: var(--hjes-viewport-width, 100vw) !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Only theme ancestors that physically clip the shortcode receive this class. */
.hjes-breakout-host {
    overflow: visible !important;
    overflow-x: visible !important;
    clip-path: none !important;
    contain: none !important;
}

/* This is intentionally independent of the theme/page background. */
.hjes-stage.is-seamless-white,
.hjes-stage.is-seamless-white .hjes-shell {
    background: #fff !important;
}

.hjes-stage.is-seamless-white::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    background: #fff;
    box-shadow: 0 0 0 100vmax #fff;
    clip-path: inset(0 -100vmax);
    pointer-events: none;
}

.hjes-shell {
    width: min(100%, var(--hjes-max-width));
    max-width: var(--hjes-max-width);
    margin: 0 auto;
    padding: var(--hjes-section-pad-top) 0 var(--hjes-section-pad-bottom);
    overflow: hidden;
    background: var(--hjes-surface);
    border: 0;
    border-radius: var(--hjes-section-radius);
    box-shadow: none;
}

/* The canvas can be viewport-wide while the actual content remains deliberate and centered. */
.hjes-stage.is-full-bleed .hjes-shell,
.hjes-stage.is-seamless-white .hjes-shell {
    width: min(100%, var(--hjes-max-width));
    max-width: var(--hjes-max-width);
    border-radius: 0;
}

/* This opt-in mode is intentionally separate from the full-width white canvas. */
.hjes-stage.has-full-bleed-cards .hjes-shell {
    width: 100%;
    max-width: none;
}

.hjes-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(24px, 4vw, 64px);
    margin: 0 0 var(--hjes-header-gap);
    padding-right: var(--hjes-content-pad-desktop);
    padding-left: var(--hjes-content-pad-desktop);
}

.hjes-heading {
    max-width: min(900px, calc(100% - 176px));
    margin: 0 !important;
    padding: 0 !important;
    color: var(--hjes-ink) !important;
    font-family: inherit !important;
    font-size: clamp(34px, 3.55vw, var(--hjes-heading-size)) !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: .98 !important;
    letter-spacing: -.052em !important;
    text-transform: none !important;
    text-wrap: balance;
}

.hjes-cta {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 15px 11px 17px !important;
    border: 1px solid rgba(25, 32, 6, .18) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--hjes-ink) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: -.018em !important;
    text-decoration: none !important;
    text-transform: none !important;
    transition: border-color 160ms ease, transform 160ms ease;
}

.hjes-cta svg {
    width: 17px;
    height: 17px;
    margin-left: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease;
}

.hjes-cta:hover,
.hjes-cta:focus-visible {
    border-color: rgba(25, 32, 6, .4) !important;
    color: var(--hjes-ink) !important;
    transform: translateY(-1px);
}

.hjes-cta:hover svg { transform: translateX(2px); }
.hjes-cta:focus-visible { outline: 3px solid rgba(147, 174, 67, .22); outline-offset: 3px; }

.hjes-rail {
    display: grid;
    grid-template-columns: minmax(0, var(--hjes-ratio-one)) minmax(0, var(--hjes-ratio-two)) minmax(0, var(--hjes-ratio-three)) minmax(0, var(--hjes-ratio-four));
    gap: var(--hjes-gap);
    width: 100%;
    margin: 0;
    padding-right: var(--hjes-content-pad-desktop);
    padding-left: var(--hjes-content-pad-desktop);
}

.hjes-stage.has-full-bleed-cards .hjes-rail {
    padding-right: 0;
    padding-left: 0;
}

.hjes-card {
    --hjes-card-bg: #dce8b7;
    --hjes-card-bg-image: none;
    --hjes-card-bg-size: cover;
    --hjes-card-bg-position: center;
    --hjes-card-overlay: 0;
    --hjes-card-fg-width: 88%;
    position: relative;
    min-width: 0;
    height: var(--hjes-card-height);
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(17, 22, 8, .075);
    border-radius: var(--hjes-card-radius);
    background: var(--hjes-card-bg);
    box-shadow: none;
    isolation: isolate;
    transform: translateZ(0);
}

.hjes-card::after {
    content: none;
}

.hjes-card-background {
    position: absolute;
    inset: -1px;
    z-index: 0;
    background-color: var(--hjes-card-bg);
    background-image: var(--hjes-card-bg-image);
    background-repeat: no-repeat;
    background-position: var(--hjes-card-bg-position);
    background-size: var(--hjes-card-bg-size);
}

.hjes-card.mode-color-foreground .hjes-card-background,
.hjes-card.mode-color-only .hjes-card-background {
    background-image: none;
}

.hjes-card.mode-color-foreground .hjes-card-background::before,
.hjes-card.mode-color-only .hjes-card-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 36%);
    pointer-events: none;
}

.hjes-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(7, 9, 3, calc(var(--hjes-card-overlay) * .34)) 0%, rgba(7, 9, 3, calc(var(--hjes-card-overlay) * .08)) 42%, rgba(7, 9, 3, var(--hjes-card-overlay)) 100%);
    pointer-events: none;
}

.hjes-uploaded-visual {
    position: absolute;
    z-index: 3;
    display: flex;
    width: var(--hjes-card-fg-width);
    height: 100%;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.hjes-uploaded-visual img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    object-position: center;
}

.hjes-uploaded-visual.is-contain img { object-fit: contain; }
.hjes-uploaded-visual.is-cover { inset: 0 !important; width: 100%; height: 100%; }
.hjes-uploaded-visual.is-cover img { object-fit: cover; }

.hjes-uploaded-visual.position-center { inset: 0; margin: auto; }
.hjes-uploaded-visual.position-top-left { top: 0; left: 0; }
.hjes-uploaded-visual.position-top-center { top: 0; left: 50%; transform: translateX(-50%); }
.hjes-uploaded-visual.position-top-right { top: 0; right: 0; }
.hjes-uploaded-visual.position-center-left { top: 50%; left: 0; transform: translateY(-50%); }
.hjes-uploaded-visual.position-center-right { top: 50%; right: 0; transform: translateY(-50%); }
.hjes-uploaded-visual.position-bottom-left { bottom: 0; left: 0; }
.hjes-uploaded-visual.position-bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); }
.hjes-uploaded-visual.position-bottom-right { right: 0; bottom: 0; }

.hjes-card-copy {
    position: relative;
    z-index: 7;
    width: 100%;
    height: 100%;
    padding: clamp(22px, 1.55vw, 30px);
    color: #182006;
}

.hjes-card.theme-light .hjes-card-copy { color: #fff; }

.hjes-card-copy h3,
.hjes-card-copy p {
    font-family: inherit !important;
    font-style: normal !important;
    text-transform: none !important;
}

.hjes-card-copy h3 {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: clamp(24px, 1.8vw, 33px) !important;
    font-weight: 500 !important;
    line-height: .99 !important;
    letter-spacing: -.048em !important;
    text-wrap: balance;
}

.hjes-card-copy p {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: clamp(13px, .95vw, 16px) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: -.018em !important;
}

.hjes-copy-product,
.hjes-copy-analytics {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
}

.hjes-copy-product h3,
.hjes-copy-analytics h3 { max-width: 95%; }

.hjes-product-panel,
.hjes-analytics-panel {
    width: 100%;
    margin: 0;
    padding: clamp(17px, 1.35vw, 22px);
    border: 1px solid rgba(20, 27, 5, .07);
    border-radius: max(13px, calc(var(--hjes-card-radius) - 6px));
    background: rgba(255, 255, 255, .97);
    color: #182006;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 10px 24px rgba(18, 23, 8, .035);
}

.hjes-panel-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.hjes-panel-topline span {
    color: rgba(24, 32, 6, .64);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.012em;
}

.hjes-panel-topline i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9eb34f;
    box-shadow: 0 0 0 4px rgba(158, 179, 79, .13);
}

.hjes-option-row {
    display: flex;
    gap: 6px;
    margin: 0 0 18px;
    overflow: hidden;
}

.hjes-option-row span {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(24, 32, 6, .075);
    border-radius: 999px;
    background: #f5f6f2;
    color: rgba(24, 32, 6, .62);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
}

.hjes-option-row span.is-active {
    border-color: #293604;
    background: #293604;
    color: #fff;
}

.hjes-product-summary,
.hjes-analytics-number {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.hjes-product-summary > div:first-child,
.hjes-analytics-number { min-width: 0; }

.hjes-product-summary strong,
.hjes-analytics-number strong {
    display: block;
    color: #182006;
    font-size: clamp(29px, 2.35vw, 40px);
    font-weight: 500;
    line-height: .92;
    letter-spacing: -.052em;
}

.hjes-product-summary span,
.hjes-analytics-number span {
    display: block;
    margin-top: 6px;
    color: rgba(24, 32, 6, .48);
    font-size: 9px;
    line-height: 1.15;
}

.hjes-status-mark {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 3px;
}

.hjes-status-mark i,
.hjes-status-mark span {
    display: block;
    width: 5px;
    height: 5px;
    margin: 0;
    border-radius: 50%;
    background: #293604;
}

.hjes-status-mark span { background: #b5c482; }

.hjes-product-line,
.hjes-analytics-meter {
    display: grid;
    height: 7px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e8dd;
}

.hjes-product-line { grid-template-columns: 48fr 32fr 20fr; }
.hjes-analytics-meter { grid-template-columns: 40fr 35fr 25fr; margin-top: 0; }

.hjes-product-line span:nth-child(1),
.hjes-analytics-meter span:nth-child(1) { background: #293604; }
.hjes-product-line span:nth-child(2),
.hjes-analytics-meter span:nth-child(2) { background: #99aa6c; }
.hjes-product-line span:nth-child(3),
.hjes-analytics-meter span:nth-child(3) { background: #d9ddcf; }

.hjes-analytics-number {
    align-items: baseline;
    margin-bottom: 17px;
}

.hjes-analytics-number span {
    max-width: 74px;
    margin: 0;
    text-align: right;
}

.hjes-analytics-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 12px;
}

.hjes-analytics-legend span {
    display: flex;
    align-items: center;
    min-width: 0;
    color: rgba(24, 32, 6, .5);
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
}

.hjes-analytics-legend i {
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: #293604;
}

.hjes-analytics-legend span:nth-child(2) i { background: #99aa6c; }
.hjes-analytics-legend span:nth-child(3) i { background: #d9ddcf; }

.hjes-copy-editorial,
.hjes-copy-minimal {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}

.hjes-copy-editorial h3 {
    max-width: 94%;
    font-size: clamp(34px, 2.6vw, 48px) !important;
    line-height: .98 !important;
}

.hjes-copy-editorial p {
    max-width: 460px;
    font-size: clamp(15px, 1.08vw, 19px) !important;
    line-height: 1.16 !important;
}

.hjes-copy-minimal h3 { max-width: 92%; }
.hjes-copy-minimal p { max-width: 86%; }

@media (max-width: 1240px) {
    .hjes-shell {
        padding-top: max(48px, calc(var(--hjes-section-pad-top) * .82));
        padding-bottom: max(48px, calc(var(--hjes-section-pad-bottom) * .82));
    }

    .hjes-header,
    .hjes-rail {
        padding-right: var(--hjes-content-pad-tablet);
        padding-left: var(--hjes-content-pad-tablet);
    }

    .hjes-stage.has-full-bleed-cards .hjes-rail {
        padding-right: 0;
        padding-left: 0;
    }

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

    .hjes-card {
        height: clamp(380px, 42vw, 450px);
    }

    .hjes-card-copy h3 {
        font-size: clamp(28px, 3vw, 39px) !important;
    }

    .hjes-copy-editorial h3 {
        font-size: clamp(35px, 4vw, 48px) !important;
    }

    .hjes-copy-editorial p {
        font-size: clamp(16px, 1.65vw, 20px) !important;
    }
}

@media (max-width: 900px) {
    .hjes-header {
        align-items: flex-end;
        gap: 20px;
    }

    .hjes-heading {
        max-width: min(720px, calc(100% - 136px));
        font-size: clamp(36px, 5.6vw, var(--hjes-heading-size)) !important;
    }

    .hjes-card-copy { padding: 24px; }
}

@media (max-width: 760px) {
    .hjes-stage {
        max-width: none;
        padding: 0;
        overflow: visible;
        background: #fff;
    }

    .hjes-stage.is-full-bleed:not(.hjes-js-breakout) {
        left: 50%;
        width: 100vw;
        width: 100dvw;
        margin-right: -50vw !important;
        margin-left: -50vw !important;
    }

    @supports (width: 100dvw) {
        .hjes-stage.is-full-bleed:not(.hjes-js-breakout) {
            margin-right: -50dvw !important;
            margin-left: -50dvw !important;
        }
    }

    .hjes-shell {
        width: 100%;
        max-width: none;
        padding-top: 34px;
        padding-bottom: 34px;
        overflow: visible;
        border-radius: 0;
        background: #fff;
    }

    .hjes-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 14px;
        margin: 0 0 24px;
        padding-right: max(var(--hjes-content-pad-mobile), env(safe-area-inset-right));
        padding-left: max(var(--hjes-content-pad-mobile), env(safe-area-inset-left));
    }

    .hjes-heading {
        max-width: none;
        font-size: clamp(28px, 8.1vw, var(--hjes-heading-size-mobile)) !important;
        line-height: 1 !important;
        letter-spacing: -.044em !important;
        text-wrap: pretty;
    }

    .hjes-cta {
        min-width: 42px;
        min-height: 42px;
        padding: 10px 11px !important;
        font-size: 10px !important;
    }

    .hjes-cta span { display: none; }
    .hjes-cta svg { width: 17px; height: 17px; margin: 0; }

    .hjes-rail {
        display: flex;
        gap: max(10px, var(--hjes-gap));
        width: 100%;
        margin: 0;
        padding: 0 max(var(--hjes-content-pad-mobile), env(safe-area-inset-right)) 4px max(var(--hjes-content-pad-mobile), env(safe-area-inset-left));
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scroll-padding-inline: max(var(--hjes-content-pad-mobile), env(safe-area-inset-left));
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hjes-stage.has-full-bleed-cards .hjes-rail {
        padding-right: max(0px, env(safe-area-inset-right));
        padding-left: max(0px, env(safe-area-inset-left));
        scroll-padding-inline: max(0px, env(safe-area-inset-left));
    }

    .hjes-rail::-webkit-scrollbar { display: none; }

    .hjes-card {
        flex: 0 0 calc(100% - var(--hjes-mobile-peek));
        width: auto;
        min-height: 356px;
        height: min(var(--hjes-mobile-card-height), 116vw);
        max-height: 480px;
        border-radius: min(var(--hjes-card-radius), 20px);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .hjes-card-copy { padding: clamp(20px, 5.8vw, 26px); }

    .hjes-card-copy h3 {
        font-size: clamp(27px, 8.2vw, 38px) !important;
        line-height: .99 !important;
    }

    .hjes-copy-editorial h3 {
        font-size: clamp(32px, 9.6vw, 43px) !important;
    }

    .hjes-card-copy p {
        font-size: 15px !important;
        line-height: 1.22 !important;
    }

    .hjes-copy-editorial p {
        font-size: clamp(16px, 4.5vw, 20px) !important;
    }

    .hjes-product-panel,
    .hjes-analytics-panel {
        padding: clamp(16px, 4.6vw, 20px);
        border-radius: 14px;
    }

    .hjes-product-summary strong,
    .hjes-analytics-number strong {
        font-size: clamp(34px, 10.5vw, 47px);
    }
}

@media (max-width: 430px) {
    .hjes-shell {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .hjes-card {
        flex-basis: 86%;
        min-height: 354px;
        max-height: 444px;
    }

    .hjes-option-row span {
        padding: 6px 8px;
        font-size: 8px;
    }
}

@media (max-width: 360px) {
    .hjes-heading { font-size: 27px !important; }

    .hjes-card {
        flex-basis: 88%;
        min-height: 346px;
    }

    .hjes-card-copy { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .hjes-stage *,
    .hjes-stage *::before,
    .hjes-stage *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
