/**
 * Blog Editorial — Editorial Sophistication with Material Warmth
 *
 * Inspiration: Wallpaper, Architectural Digest, Kinfolk, Domino.
 * Replaces the generic "wide image + overlay card" cliche with an
 * asymmetric magazine-style hero, refined typography rhythm, and
 * subtle warm-paper texture. Loaded only on blog post pages.
 *
 * Overrides existing .bp-* styles in style.css.
 *
 * Design-system note: this file defines its own palette via --be-*
 * tokens (cream/ink/amber). Strict color-token rule disabled because
 * the palette is intentionally local to the editorial blog surface.
 */
/* stylelint-disable scale-unlimited/declaration-strict-value */

/* ============ BODY-LEVEL BACKGROUND (matches editorial cream) ============ */
body:has(.bp-editorial) {
    background: #faf8f3;
}

/* Header on editorial blog: solid white sticky header (NOT transparent overlay
   like on the homepage hero) so logo stays visible on cream body. */
body:has(.bp-editorial) .header {
    position: sticky;
    top: 0;
    background: #ffffff;
    box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 8px 24px rgb(26 22 18 / 0.05);
    z-index: 100;
}

/* Mobile header overrides — disable the homepage's "transparent overlay"
   pattern + force logo back to dark color. */
@media (max-width: 768px) {
    body:has(.bp-editorial) .header {
        position: sticky;
        background: #ffffff;
    }

    /* Mobile: text-only logo (icon hidden, like rest of site) */
    body:has(.bp-editorial) .logo-icon-img {
        display: none;
    }

    body:has(.bp-editorial) .logo-text .logo-title {
        color: var(--primary, #1a1612);
    }

    body:has(.bp-editorial) .logo-text span {
        color: var(--gray-700, #44403c);
    }

    body:has(.bp-editorial) .nav-toggle {
        color: var(--primary, #1a1612);
    }
}

/* ============ TOP CTA WRAPPER (re-add after redesign) ============ */
.be-cta-top-wrap {
    max-width: 1240px;
    margin: 40px auto 0;
    padding: 0 32px;
}

.be-cta-top-wrap .bp-cta-top {
    margin: 0;
}

@media (max-width: 880px) {
    .be-cta-top-wrap {
        margin-top: 24px;
        padding: 0 20px;
    }
}

/* ============ ROOT TOKENS ============ */
.bp-editorial {
    --be-cream: #faf8f3;
    --be-cream-2: #f4f1ea;
    --be-ink: #1a1612;
    --be-ink-2: #44403c;
    --be-stone: #78716c;
    --be-stone-2: #a8a29e;
    --be-line: #e7e5e4;
    --be-amber: #b45309;
    --be-amber-2: #d97706;
    --be-amber-soft: rgb(180 83 9 / 0.08);
    --be-paper: #ffffff;
    --be-font-display: 'Playfair Display', Georgia, serif;
    --be-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --be-rhythm: 1.75;
    --be-measure: 65ch;

    background: var(--be-cream);
    color: var(--be-ink);
    font-family: var(--be-font-body);
}

/* ============ PAPER TEXTURE BACKGROUND ============ */
.bp-editorial::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
    background-size: 200px;
    opacity: 0.025;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

.bp-editorial > * {
    position: relative;
    z-index: 1;
}

/* ============ ASYMMETRIC HERO ============ */
.be-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 80px 32px 0;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
    align-items: center;
}

.be-hero__meta {
    padding-right: 16px;
}

.be-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--be-stone);
    font-weight: 500;
    margin-bottom: 2.5rem;
}

.be-hero__breadcrumb a {
    color: var(--be-stone);
    text-decoration: none;
    transition: color 0.15s;
}

.be-hero__breadcrumb a:hover {
    color: var(--be-amber);
}

.be-hero__breadcrumb-sep {
    color: var(--be-stone-2);
}

.be-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--be-amber);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.be-hero__eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--be-amber);
}

/* Option C: dynamic eyebrow when keyword matches — italic + slightly larger */
.be-hero__eyebrow--dynamic {
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0.04em;
    color: var(--be-stone);
    font-weight: 500;
}

.be-hero__eyebrow--dynamic .be-hero__eyebrow-prefix {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--be-amber);
}

.be-hero__eyebrow--dynamic em {
    font-family: var(--be-font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--be-ink);
    font-weight: 600;
}

.be-hero__eyebrow--dynamic .be-hero__eyebrow-suffix {
    font-family: var(--be-font-display);
    font-size: 1.15rem;
    color: var(--be-amber);
    font-weight: 600;
    margin-left: -0.2rem;
}

/* Option C: lead-sub (standfirst) under H1 when keyword matches */
.be-hero__lead-sub {
    font-family: var(--be-font-body);
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--be-ink-2);
    margin: 0 0 1.5rem;
    max-width: 38em;
    border-left: 2px solid var(--be-amber);
    padding-left: 1rem;
    font-weight: 400;
}

@media (max-width: 768px) {
    .be-hero__eyebrow--dynamic em,
    .be-hero__eyebrow--dynamic .be-hero__eyebrow-suffix {
        font-size: 1rem;
    }

    .be-hero__lead-sub {
        font-size: 1rem;
        padding-left: 0.75rem;
        margin-bottom: 1.25rem;
    }
}

.be-hero__title {
    font-family: var(--be-font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--be-ink);
    margin: 0 0 2rem;
}

.be-hero__title em {
    font-style: italic;
    color: var(--be-amber);
}

.be-hero__byline {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--be-stone);
    border-top: 1px solid var(--be-line);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.be-hero__byline-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.04em;
}

.be-hero__byline-item--strong {
    color: var(--be-ink);
    font-weight: 600;
}

.be-hero__image {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgb(26 22 18 / 0.18);
}

.be-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.be-hero__image:hover img {
    transform: scale(1.03);
}

.be-hero__image-frame {
    position: absolute;
    inset: 12px;
    border: 1px solid rgb(255 255 255 / 0.4);
    pointer-events: none;
}

@media (max-width: 880px) {
    .be-hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 20px 0;
    }

    .be-hero__image {
        aspect-ratio: 3 / 2;
        order: -1;
    }
}

/* ============ KEYWORD ECHO (LP PATTERN) ============ */
.be-kw-echo {
    max-width: 1240px;
    margin: 56px auto 0;
    padding: 0 32px;
}

.be-kw-echo__inner {
    background: var(--be-amber-soft);
    border-left: 3px solid var(--be-amber);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.be-kw-echo__label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--be-amber);
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.be-kw-echo__text {
    font-family: var(--be-font-display);
    font-size: 1.15rem;
    color: var(--be-ink);
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

@media (max-width: 880px) {
    .be-kw-echo {
        margin-top: 32px;
        padding: 0 20px;
    }
}

/* ============ ARTICLE BODY ============ */
.be-article {
    max-width: 1240px;
    margin: 56px auto 0;
    padding: 0 32px 80px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 80px;
    align-items: start;
}

.be-content {
    max-width: var(--be-measure);
    font-size: 1.075rem;
    line-height: var(--be-rhythm);
    color: var(--be-ink-2);
}

/* Drop-cap on the very first paragraph */
.be-content > p:first-of-type::first-letter {
    font-family: var(--be-font-display);
    font-size: 4.75em;
    font-weight: 700;
    float: left;
    line-height: 0.85;
    margin: 0.1em 0.12em -0.05em 0;
    color: var(--be-amber);
}

.be-content > p:first-of-type::first-line {
    font-variant: small-caps;
    letter-spacing: 0.04em;
    color: var(--be-ink);
}

.be-content p {
    margin: 0 0 1.5rem;
}

.be-content h2 {
    font-family: var(--be-font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--be-ink);
    margin: 3.5rem 0 1.25rem;
    position: relative;
}

.be-content h2::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--be-amber);
    margin-bottom: 1rem;
}

.be-content h3 {
    font-family: var(--be-font-display);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--be-ink);
    margin: 2.5rem 0 1rem;
}

.be-content h4 {
    font-family: var(--be-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--be-ink);
    margin: 2rem 0 0.5rem;
    letter-spacing: 0.005em;
}

.be-content a {
    color: var(--be-amber);
    text-decoration: underline;
    text-decoration-color: var(--be-amber-soft);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.be-content a:hover {
    text-decoration-color: var(--be-amber);
}

.be-content strong {
    color: var(--be-ink);
    font-weight: 700;
}

.be-content em {
    font-style: italic;
    color: var(--be-ink);
}

.be-content ul,
.be-content ol {
    margin: 0 0 1.5rem;
    padding-left: 1.6rem;
}

.be-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.be-content ul li::marker {
    color: var(--be-amber);
}

.be-content ol li::marker {
    color: var(--be-amber);
    font-weight: 600;
}

/* ============ PULL QUOTE (blockquote treatment) ============ */
.be-content blockquote {
    margin: 3rem -1rem;
    padding: 0 0 0 2rem;
    border-left: 3px solid var(--be-amber);
    font-family: var(--be-font-display);
    font-size: 1.45rem;
    line-height: 1.45;
    font-style: italic;
    color: var(--be-ink);
    position: relative;
}

.be-content blockquote::before {
    content: '\201C';
    position: absolute;
    left: -0.4rem;
    top: -1.5rem;
    font-size: 5rem;
    color: var(--be-amber);
    opacity: 0.25;
    font-family: var(--be-font-display);
    line-height: 1;
    pointer-events: none;
}

.be-content blockquote p {
    margin: 0 0 0.5rem;
}

.be-content blockquote cite {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--be-stone);
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
}

/* ============ TABLES ============ */
.be-content .table-wrap {
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--be-line);
    border-radius: 8px;
    background: var(--be-paper);
    -webkit-overflow-scrolling: touch;

    /* subtle scroll cue on mobile */
    background-image:
        linear-gradient(to right, var(--be-paper), var(--be-paper)),
        linear-gradient(to right, var(--be-paper), var(--be-paper)),
        linear-gradient(to right, rgb(0 0 0 / 0.06), rgb(0 0 0 / 0)),
        linear-gradient(to left, rgb(0 0 0 / 0.06), rgb(0 0 0 / 0));
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 20px 100%, 20px 100%, 8px 100%, 8px 100%;
    background-attachment: local, local, scroll, scroll;
}

.be-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.be-content table th,
.be-content table td {
    padding: 0.85rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--be-line);
}

.be-content table th {
    background: var(--be-cream-2);
    font-weight: 600;
    color: var(--be-ink);
    letter-spacing: 0.03em;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.be-content table tr:last-child td {
    border-bottom: none;
}

/* ============ IMAGES ============ */
.be-content img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
    box-shadow: 0 12px 40px rgb(26 22 18 / 0.1);
}

.be-content figure {
    margin: 2.5rem 0;
}

.be-content figure img {
    margin: 0;
}

.be-content figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--be-stone);
    font-style: italic;
    text-align: center;
}

/* ============ HORIZONTAL RULE ============ */
.be-content hr {
    border: none;
    height: 0;
    margin: 3rem auto;
    width: 60%;
    text-align: center;
}

.be-content hr::after {
    content: '· · ·';
    display: block;
    color: var(--be-amber);
    letter-spacing: 0.5em;
    font-size: 1.4rem;
    line-height: 0.5;
}

/* ============ SIDEBAR (desktop) ============ */
.be-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    font-size: 0.92rem;
}

.be-sidebar__section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--be-line);
}

.be-sidebar__section:last-child {
    border-bottom: none;
}

.be-sidebar__label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--be-stone);
    font-weight: 600;
    margin: 0 0 0.85rem;
}

.be-sidebar__progress {
    height: 3px;
    background: var(--be-line);
    border-radius: 2px;
    overflow: hidden;
}

.be-sidebar__progress-bar {
    height: 100%;
    background: var(--be-amber);
    width: 0;
    transition: width 0.1s linear;
}

.be-sidebar__related {
    list-style: none;
    padding: 0;
    margin: 0;
}

.be-sidebar__related li {
    margin-bottom: 1rem;
}

.be-sidebar__related a {
    color: var(--be-ink);
    text-decoration: none;
    font-family: var(--be-font-display);
    font-size: 1.05rem;
    line-height: 1.35;
    display: block;
    transition: color 0.15s;
}

.be-sidebar__related a:hover {
    color: var(--be-amber);
}

.be-sidebar__related a + small {
    display: block;
    font-size: 0.78rem;
    color: var(--be-stone);
    margin-top: 0.35rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ============ SIDEBAR FORM (primary conversion) ============ */
.be-sidebar__section--form {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 2rem;
}

.be-sidebar__form-card {
    background: var(--be-ink);
    color: var(--be-cream);
    padding: 1.75rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgb(26 22 18 / 0.18);
    position: relative;
    overflow: hidden;
}

.be-sidebar__form-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at top right, rgb(217 119 6 / 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.be-sidebar__form-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--be-amber-2);
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.be-sidebar__form-title {
    font-family: var(--be-font-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--be-cream);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.be-sidebar__form-sub {
    font-size: 0.85rem;
    color: var(--be-stone-2);
    margin: 0 0 1.25rem;
    line-height: 1.4;
}

.be-sidebar__form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.be-sidebar__form input[type="text"],
.be-sidebar__form input[type="email"],
.be-sidebar__form input[type="tel"] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: rgb(255 255 255 / 0.06);
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--be-cream);
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.be-sidebar__form input::placeholder {
    color: rgb(231 229 228 / 0.5);
}

.be-sidebar__form input:focus {
    outline: none;
    background: rgb(255 255 255 / 0.1);
    border-color: var(--be-amber-2);
}

.be-sidebar__form input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.be-sidebar__form-submit {
    background: var(--be-amber-2);
    color: var(--be-ink);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.05s;
    margin-top: 0.3rem;
}

.be-sidebar__form-submit:hover {
    background: #f59e0b;
}

.be-sidebar__form-submit:active {
    transform: scale(0.98);
}

.be-sidebar__form-submit:disabled {
    background: var(--be-stone-2);
    color: var(--be-ink-2);
    cursor: not-allowed;
}

.be-sidebar__form-error {
    background: rgb(239 68 68 / 0.15);
    color: #fca5a5;
    border: 1px solid rgb(239 68 68 / 0.4);
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.be-sidebar__form-error[hidden] {
    display: none;
}

.be-sidebar__form-success {
    text-align: center;
    padding: 1rem 0;
}

.be-sidebar__form-success[hidden] {
    display: none;
}

.be-sidebar__form-success-icon {
    width: 44px;
    height: 44px;
    background: var(--be-amber-2);
    color: var(--be-ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 auto 0.75rem;
}

.be-sidebar__form-success p {
    color: var(--be-cream);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.be-sidebar__form-trust {
    list-style: none;
    padding: 1rem 0 0;
    margin: 0;
    border-top: 1px solid rgb(255 255 255 / 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.be-sidebar__form-trust li {
    font-size: 0.78rem;
    color: var(--be-stone-2);
    padding-left: 1rem;
    position: relative;
}

.be-sidebar__form-trust li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--be-amber-2);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ============ LEGACY CTA card (kept for fallback) ============ */
.be-sidebar__cta-card {
    background: var(--be-ink);
    color: var(--be-cream);
    padding: 1.5rem;
    border-radius: 8px;
}

.be-sidebar__cta-card h4 {
    font-family: var(--be-font-display);
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
    color: var(--be-cream);
}

.be-sidebar__cta-card p {
    font-size: 0.85rem;
    margin: 0 0 1rem;
    color: var(--be-stone-2);
    line-height: 1.5;
}

.be-sidebar__cta-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--be-amber-2);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.be-sidebar__cta-card a:hover {
    color: var(--be-cream);
}

@media (max-width: 1080px) {
    .be-article {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .be-sidebar {
        position: static;
        max-width: var(--be-measure);
        order: -1; /* sidebar (form) above content on mobile */
    }

    /* Hide reading progress on mobile — feels redundant when form is above */
    .be-sidebar__section:has(.be-sidebar__progress) {
        display: none;
    }

    /* Compact form card on mobile */
    .be-sidebar__form-card {
        padding: 1.5rem 1.25rem;
    }

    .be-sidebar__form-title {
        font-size: 1.4rem;
    }

    .be-sidebar__form-title br {
        display: none;
    }
}

/* ============ TIGHT MOBILE (≤768px) — fix overflow + scale ============ */
@media (max-width: 768px) {
    /* Article gutter: keep content from touching screen edges, but generous
       enough to feel like a magazine. Total side padding 40px keeps a
       comfortable measure on 400px viewports. */
    .be-article {
        padding: 0 20px 56px;
        margin-top: 32px;
        gap: 24px;
    }

    .be-content {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Drop-cap: smaller and less aggressive on mobile (was 4.75em → too tall) */
    .be-content > p:first-of-type::first-letter {
        font-size: 3.25em;
        margin: 0.05em 0.08em -0.05em 0;
    }

    /* H2 — was 2rem, often blew past viewport. Allow wrap + scale down */
    .be-content h2 {
        font-size: 1.5rem;
        line-height: 1.25;
        margin-top: 2.25rem;
        word-wrap: break-word;
    }

    .be-content h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .be-content h4 {
        font-size: 1.05rem;
    }

    /* Pull quote / blockquote: shrink padding so it fits */
    .be-content blockquote {
        padding: 1.25rem 1rem 1.25rem 2.25rem;
        margin: 1.75rem 0;
    }

    .be-content blockquote p {
        font-size: 1.05rem;
        line-height: 1.45;
    }

    /* Tables: scroll horizontally on phones (no min-width forcing) */
    .be-content .table-wrap {
        margin: 1.5rem -8px;  /* slight negative margin to gain a few px */
    }

    .be-content table {
        font-size: 0.85rem;
    }

    .be-content table th,
    .be-content table td {
        padding: 0.6rem 0.5rem;
    }

    /* Hero: tighter padding + smaller breadcrumb */
    .be-hero {
        padding: 32px 20px 0;
    }

    .be-hero__breadcrumb {
        font-size: 0.7rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }

    .be-hero__byline {
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.78rem;
    }

    /* Sidebar form: tighter padding + smaller inputs */
    .be-sidebar {
        max-width: 100%;
    }

    .be-sidebar__form-card {
        padding: 1.25rem 1rem;
        border-radius: 8px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .be-sidebar__form-title {
        font-size: 1.25rem;
        margin-bottom: 0.4rem;
    }

    .be-sidebar__form-sub {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .be-sidebar__form input[type="text"],
    .be-sidebar__form input[type="email"],
    .be-sidebar__form input[type="tel"] {
        padding: 0.7rem 0.85rem;
        font-size: 0.95rem;
    }

    .be-sidebar__form-submit {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }

    .be-sidebar__form-trust {
        font-size: 0.78rem;
    }

    /* Top CTA wrapper — already overridden at 880px, narrow further */
    .be-cta-top-wrap {
        margin-top: 16px;
        padding: 0 20px;
    }

    /* End / Mid / Top CTA: ensure they fit fully inside the article gutter */
    .bp-cta-top,
    .bp-cta-end,
    .bp-cta-mid {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Tighter internal padding for Top CTA on narrow phones (was 1.25rem 1.5rem) */
    .bp-cta-top {
        padding: 1rem 1.1rem;
    }

    .bp-cta-mid,
    .bp-cta-end {
        padding: 1.5rem 1.25rem;
    }

    /* FAQ section */
    .be-faq {
        padding: 0;
    }

    .be-faq__item {
        padding: 1rem 0.5rem;
    }

    /* Disable hero image hover scale on touch */
    .be-hero__image:hover img {
        transform: none;
    }

    /* Prevent any element from forcing horizontal scroll */
    .bp-editorial,
    .be-article,
    .be-content,
    .be-sidebar {
        overflow-x: clip;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Grid/flex children sometimes refuse to shrink below content width.
       Force them to allow shrink so cards never push past the gutter. */
    .be-article > *,
    .be-sidebar > *,
    .be-sidebar__section > * {
        min-width: 0;
    }
}

@media (max-width: 880px) {
    .be-article {
        margin-top: 32px;
        padding: 0 20px 60px;
    }

    .be-content {
        font-size: 1.025rem;
    }

    .be-content h2 {
        font-size: 1.65rem;
        margin-top: 2.5rem;
    }

    .be-content blockquote {
        margin: 2rem 0;
        padding-left: 1.25rem;
        font-size: 1.2rem;
    }

    .be-content > p:first-of-type::first-letter {
        font-size: 3.75em;
    }
}

/* ============ FAQ — REFINED ============ */
.be-faq {
    max-width: var(--be-measure);
    margin: 4rem 0 2rem;
}

.be-faq__title {
    font-family: var(--be-font-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--be-ink);
    margin: 0 0 2rem;
    line-height: 1.2;
}

.be-faq__title::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: var(--be-amber);
    margin-bottom: 1rem;
}

.be-faq__item {
    border-top: 1px solid var(--be-line);
    padding: 1.5rem 0;
}

.be-faq__item:last-child {
    border-bottom: 1px solid var(--be-line);
}

.be-faq__q {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    font-family: var(--be-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--be-ink);
    line-height: 1.4;
    list-style: none;
}

.be-faq__q::-webkit-details-marker {
    display: none;
}

.be-faq__q-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1px solid var(--be-stone-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--be-stone);
    font-size: 0.9rem;
    transition: transform 0.25s, border-color 0.25s, color 0.25s;
}

.be-faq__item[open] .be-faq__q-icon {
    transform: rotate(45deg);
    border-color: var(--be-amber);
    color: var(--be-amber);
}

.be-faq__a {
    margin-top: 1rem;
    color: var(--be-ink-2);
    line-height: 1.7;
    font-size: 1rem;
}

.be-faq__a p {
    margin: 0;
}

/* ============ BACK LINK ============ */
.be-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    color: var(--be-stone);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.15s, gap 0.15s;
}

.be-back:hover {
    color: var(--be-amber);
    gap: 0.75rem;
}

/* ============ HIDE LEGACY bp- HERO (overridden by editorial) ============ */
.bp-editorial .bp-hero,
.bp-editorial .bp-article > .bp-header,
.bp-editorial > .bp-article > .bp-back {
    display: none;
}
