/*
 * AESV Components — FAQ, Pros/Cons, Plain Links, Editor Note, Tables
 * Version 1.3.0
 */

/* --- FAQ Accordion --- */
.aesv-faq details {
    border: 1px solid #dfe8e2 !important;
    border-radius: 12px !important;
    margin: 10px 0 !important;
    background: #fff !important;
    overflow: hidden !important;
}
.aesv-faq summary {
    cursor: pointer !important;
    font-weight: 700 !important;
    padding: 14px 64px 14px 16px !important;
    background: #f4f8f6 !important;
    color: #12352a !important;
    position: relative !important;
    list-style: none !important;
    transition: background 0.15s, box-shadow 0.15s !important;
}
.aesv-faq summary::-webkit-details-marker { display: none !important; }
.aesv-faq summary::marker { display: none !important; content: "" !important; }
.aesv-faq summary::after {
    content: "+" !important;
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    background: #173d2d !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transition: background 0.15s !important;
}
.aesv-faq details[open] summary::after {
    content: "\2212" !important;
    background: #173d2d !important;
}
.aesv-faq summary:hover {
    background: #e8f4ec !important;
    box-shadow: inset 0 0 0 1px rgba(47,125,79,0.25) !important;
}
.aesv-faq details .aesv-answer,
.entry-content .aesv-faq details .aesv-answer {
    padding: 14px 16px 16px !important;
}
.aesv-faq .aesv-answer p {
    margin: 0 !important;
    line-height: 1.65 !important;
    color: #243b35 !important;
}

/* --- Pros/Cons Boxes --- */
.aesv-pros-cons.aesv-pros-cons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin: 18px 0 24px !important;
}
.aesv-pros-cons .aesv-pros,
.aesv-pros-cons .aesv-cons {
    background: #fff !important;
    border: 1px solid #dfe8e2 !important;
    border-radius: 12px !important;
    padding: 16px !important;
}

/*
 * H4 badge styles — must beat theme specificity (0,4,2)
 * via body.single-post .entry-content h4 !important
 */
body.single-post .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-pros h4,
body.single-post .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-cons h4,
body.page-template-default .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-pros h4,
body.page-template-default .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-cons h4,
body.blog .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-pros h4,
body.blog .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-cons h4 {
    margin: 0 0 12px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    border: 0 !important;
    font-family: inherit !important;
}
body.single-post .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-pros h4,
body.page-template-default .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-pros h4,
body.blog .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-pros h4 {
    color: #fff !important;
    background: #1a7a3a !important;
}
body.single-post .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-cons h4,
body.page-template-default .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-cons h4,
body.blog .entry-content .aesv-pros-cons.aesv-pros-cons .aesv-cons h4 {
    color: #fff !important;
    background: #b45309 !important;
}
.aesv-pros-cons ul, .aesv-pros-cons .aesv-visible-list {
    list-style: outside disc !important;
    padding-left: 1.25rem !important;
    margin: 0 !important;
}
.aesv-pros-cons li {
    display: list-item !important;
    margin: 7px 0 !important;
    line-height: 1.45 !important;
}

/* --- Responsive Tables --- */
.aesv-rwd-wrap,
.aesv-rwd-table-wrap,
figure.wp-block-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 18px 0 !important;
    max-width: 100% !important;
}
.aesv-comparison-table,
.aesv-projects-table,
.aesv-rwd-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.95rem !important;
}
.aesv-comparison-table th,
.aesv-projects-table th,
.aesv-rwd-table th {
    background: #173d2d !important;
    color: #fff !important;
    padding: 10px 14px !important;
    text-align: left !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}
.aesv-comparison-table td,
.aesv-projects-table td,
.aesv-rwd-table td {
    padding: 9px 14px !important;
    border-bottom: 1px solid #e5e7eb !important;
}
.aesv-comparison-table tr:nth-child(even),
.aesv-projects-table tr:nth-child(even),
.aesv-rwd-table tr:nth-child(even) {
    background: #f9fafb !important;
}

/* Mobile stacked cards */
@media (max-width: 768px) {
    .aesv-pros-cons,
    .aesv-pros-cons.aesv-pros-cons { grid-template-columns: 1fr !important; }

    .aesv-comparison-table,
    .aesv-projects-table,
    .aesv-rwd-table,
    .aesv-mobile-card-table {
        display: block !important;
        width: 100% !important;
    }
    .aesv-comparison-table thead,
    .aesv-projects-table thead,
    .aesv-rwd-table thead,
    .aesv-mobile-card-table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
    }
    .aesv-comparison-table tbody,
    .aesv-projects-table tbody,
    .aesv-rwd-table tbody,
    .aesv-mobile-card-table tbody {
        display: block !important;
    }
    .aesv-comparison-table tr,
    .aesv-projects-table tr,
    .aesv-rwd-table tr,
    .aesv-mobile-card-table tr {
        display: block !important;
        margin-bottom: 14px !important;
        border: 1px solid #dfe8e2 !important;
        border-radius: 10px !important;
        padding: 12px !important;
        background: #fff !important;
    }
    .aesv-comparison-table td,
    .aesv-projects-table td,
    .aesv-rwd-table td,
    .aesv-mobile-card-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: baseline !important;
        padding: 6px 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        text-align: right !important;
    }
    .aesv-comparison-table td::before,
    .aesv-projects-table td::before,
    .aesv-rwd-table td::before,
    .aesv-mobile-card-table td::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        text-align: left !important;
        margin-right: 12px !important;
        flex-shrink: 0 !important;
        color: #173d2d !important;
    }

    /* Reduce callout/card padding on mobile for wider text area */
    body.single-post .entry-content .aesv-callout,
    body.single-post .entry-content .aesv-card,
    body.single-post .entry-content .aesv-affiliate-disclosure,
    body.single-post .entry-content .callout-green,
    body.single-post .entry-content .aesv-helpful-tip,
    body.page.page-template-default .entry-content .aesv-callout,
    body.page.page-template-default .entry-content .aesv-card,
    body.page.page-template-default .entry-content .aesv-affiliate-disclosure,
    body.page.page-template-default .entry-content .callout-green,
    body.page.page-template-default .entry-content .aesv-helpful-tip {
        padding: 12px 14px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Reduce FAQ padding on mobile */
    .aesv-faq details {
        padding: 10px 12px !important;
    }
    .aesv-faq summary {
        padding: 10px 48px 10px 12px !important;
    }
    .aesv-faq details .aesv-answer,
    .entry-content .aesv-faq details .aesv-answer {
        padding: 10px 12px 12px !important;
    }

    /* Reduce inline style callout padding on mobile */
    .aesv-callout[style*="padding"] {
        padding: 12px 14px !important;
    }
    .aesv-card[style*="padding"] {
        padding: 12px 14px !important;
    }

    /* Widen container and cards on mobile */
    .x-container.width {
        width: 98% !important;
    }
    .entry-content .aesv-card,
    .entry-content .aesv-callout,
    .entry-content .aesv-affiliate-disclosure {
        padding: 14px 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 12px !important;
    }
    .entry-content {
        font-size: 17px !important;
        line-height: 1.7 !important;
    }
    .entry-content h2 {
        font-size: 1.5rem !important;
    }
    .entry-content h3 {
        font-size: 1.25rem !important;
    }
}

/* --- Energy Guide H1 inside container --- */
/* Move the header landmark H1 to appear inside the article card */
header.x-header-landmark {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}
header.x-header-landmark h1.h-landmark {
    background: #fff !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 24px 24px 16px !important;
    margin: 0 !important;
}
header.x-header-landmark + .x-container main article,
header.x-header-landmark + .x-container .x-main article {
    border-radius: 0 0 12px 12px !important;
    margin-top: 0 !important;
}

/* --- AESV Energy Guide page-title / hero treatment ---
 * Energy guide pages keep the semantic H1 inside the article and hide the
 * duplicate X theme title header on those pages only.
 */
body.page-id-1235 header.x-header-landmark,
body.page-id-1250 header.x-header-landmark,
body.single-post.postid-132 header.x-header-landmark,
body.page-id-1418 header.x-header-landmark,
body.page-id-1420 header.x-header-landmark,
body.page-id-1422 header.x-header-landmark {
    display: none !important;
}

body.page-id-1235 .entry-content .aesv-hero-title,
body.page-id-1250 .entry-content .aesv-hero-title,
body.single-post.postid-132 .entry-content .aesv-hero-title,
body.page-id-1418 .entry-content .aesv-hero-title,
body.page-id-1420 .entry-content .aesv-hero-title,
body.page-id-1422 .entry-content .aesv-hero-title,
body.page-id-1235 .entry-content .aesv-foundation-guide .aesv-hero-block h1,
body.page-id-1250 .entry-content .aesv-foundation-guide .aesv-hero-block h1,
body.single-post.postid-132 .entry-content .aesv-foundation-guide .aesv-hero-block h1,
body.page-id-1418 .entry-content .aesv-foundation-guide .aesv-hero-block h1,
body.page-id-1420 .entry-content .aesv-foundation-guide .aesv-hero-block h1,
body.page-id-1422 .entry-content .aesv-foundation-guide .aesv-hero-block h1 {
    font-family: "Source Sans 3", Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
    color: #102033 !important;
    font-size: clamp(34px, 4.5vw, 52px) !important;
    line-height: 1.08 !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 14px !important;
}

/* --- Mobile Menu Fix --- */
.aesv-plain-link {
    background: transparent !important;
    color: #1a73e8 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inline !important;
    text-decoration: underline !important;
    font-weight: inherit !important;
}

/* --- Editor Note Box --- */
.aesv-editor-note {
    background: #f0f7ff !important;
    border-left: 4px solid #0066cc !important;
    padding: 16px 20px !important;
    margin-bottom: 32px !important;
    border-radius: 4px !important;
}

/* --- Button Fix --- */
.entry-content .wp-block-button {
    display: inline-block !important;
    height: auto !important;
    padding-bottom: 20px !important;
    overflow: visible !important;
}
.entry-content .wp-block-buttons {
    overflow: visible !important;
    align-items: flex-start !important;
}

/* --- AESV foundation energy guide mobile width/readability pass ---
 * Applies to the redesigned source-guide pages such as Solar, Wind,
 * Geothermal, Biomass and companion energy pages using .aesv-foundation-guide.
 * Goal: reduce outer inset/box margin on phones and give body copy more room.
 */
@media (max-width: 768px) {
    body .entry-content .aesv-foundation-guide,
    body.single-post .entry-content .aesv-foundation-guide,
    body.page .entry-content .aesv-foundation-guide {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin-left: calc(50% - 50vw + 10px) !important;
        margin-right: calc(50% - 50vw + 10px) !important;
        font-size: 17px !important;
        line-height: 1.72 !important;
    }

    body .entry-content .aesv-foundation-guide .aesv-card,
    body.single-post .entry-content .aesv-foundation-guide .aesv-card,
    body.page .entry-content .aesv-foundation-guide .aesv-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 16px 18px !important;
        border-radius: 16px !important;
    }

    body .entry-content .aesv-foundation-guide .aesv-card p,
    body .entry-content .aesv-foundation-guide .aesv-card li,
    body .entry-content .aesv-foundation-guide .aesv-card td,
    body .entry-content .aesv-foundation-guide .aesv-card th,
    body.single-post .entry-content .aesv-foundation-guide .aesv-card p,
    body.single-post .entry-content .aesv-foundation-guide .aesv-card li,
    body.single-post .entry-content .aesv-foundation-guide .aesv-card td,
    body.single-post .entry-content .aesv-foundation-guide .aesv-card th,
    body.page .entry-content .aesv-foundation-guide .aesv-card p,
    body.page .entry-content .aesv-foundation-guide .aesv-card li,
    body.page .entry-content .aesv-foundation-guide .aesv-card td,
    body.page .entry-content .aesv-foundation-guide .aesv-card th {
        font-size: 16px !important;
        line-height: 1.72 !important;
    }

    body .entry-content .aesv-foundation-guide .aesv-card h2,
    body.single-post .entry-content .aesv-foundation-guide .aesv-card h2,
    body.page .entry-content .aesv-foundation-guide .aesv-card h2 {
        font-size: 1.72rem !important;
        line-height: 1.18 !important;
    }
}

/* --- AESV Energy Guides legacy mobile width pass ---
 * Hydroelectric/Tidal and related Energy Guides pages use older markup where
 * .entry-wrap padding creates the narrow mobile column. Narrow only these known
 * energy-guide wrappers so unrelated posts keep their existing spacing.
 */
@media (max-width: 979px) {
    body.page-id-1235 .entry-wrap,
    body.page-id-1250 .entry-wrap,
    body.single-post.postid-132 .entry-wrap,
    body.page-id-1418 .entry-wrap,
    body.page-id-1420 .entry-wrap,
    body.page-id-1422 .entry-wrap {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body.page-id-1235 .entry-content,
    body.page-id-1250 .entry-content,
    body.single-post.postid-132 .entry-content,
    body.page-id-1418 .entry-content,
    body.page-id-1420 .entry-content,
    body.page-id-1422 .entry-content {
        font-size: 17px !important;
        line-height: 1.72 !important;
    }

    body.page-id-1418 .entry-content p,
    body.page-id-1418 .entry-content li,
    body.page-id-1422 .entry-content p,
    body.page-id-1422 .entry-content li {
        font-size: 16.5px !important;
        line-height: 1.72 !important;
    }
}

/* --- AESV mobile table normalization ---
 * Undo the broken hybrid stacked-table rules on phones. Keep tables as real
 * tables inside a horizontal scroll wrapper so Energy Guides and comparison
 * posts behave consistently.
 */
@media (max-width: 768px) {
    .entry-content .aesv-rwd-wrap,
    .entry-content .aesv-table-scroll,
    .entry-content .wp-block-table,
    .entry-content figure.wp-block-table {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .entry-content .aesv-rwd-table,
    .entry-content .aesv-comparison-table,
    .entry-content .aesv-projects-table,
    .entry-content .aesv-mobile-card-table,
    .entry-content .wp-block-table table {
        display: table !important;
        width: 760px !important;
        min-width: 760px !important;
        max-width: none !important;
        table-layout: auto !important;
        border-collapse: collapse !important;
        overflow: visible !important;
        font-size: 15px !important;
    }

    .entry-content .aesv-rwd-table thead,
    .entry-content .aesv-comparison-table thead,
    .entry-content .aesv-projects-table thead,
    .entry-content .aesv-mobile-card-table thead,
    .entry-content .wp-block-table table thead {
        display: table-header-group !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
    }

    .entry-content .aesv-rwd-table tbody,
    .entry-content .aesv-comparison-table tbody,
    .entry-content .aesv-projects-table tbody,
    .entry-content .aesv-mobile-card-table tbody,
    .entry-content .wp-block-table table tbody {
        display: table-row-group !important;
    }

    .entry-content .aesv-rwd-table tr,
    .entry-content .aesv-comparison-table tr,
    .entry-content .aesv-projects-table tr,
    .entry-content .aesv-mobile-card-table tr,
    .entry-content .wp-block-table table tr {
        display: table-row !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: inherit !important;
    }

    .entry-content .aesv-rwd-table th,
    .entry-content .aesv-rwd-table td,
    .entry-content .aesv-comparison-table th,
    .entry-content .aesv-comparison-table td,
    .entry-content .aesv-projects-table th,
    .entry-content .aesv-projects-table td,
    .entry-content .aesv-mobile-card-table th,
    .entry-content .aesv-mobile-card-table td,
    .entry-content .wp-block-table table th,
    .entry-content .wp-block-table table td {
        display: table-cell !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 11px 14px !important;
        text-align: left !important;
        vertical-align: top !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .entry-content .aesv-rwd-table td::before,
    .entry-content .aesv-comparison-table td::before,
    .entry-content .aesv-projects-table td::before,
    .entry-content .aesv-mobile-card-table td::before {
        content: none !important;
        display: none !important;
    }
}

/* --- AESV mobile table card restoration ---
 * Cards are the preferred mobile UX: users see every field without needing
 * to discover horizontal scrolling. This late rule intentionally overrides
 * prior horizontal-scroll experiments and old hybrid table rules.
 */
@media (max-width: 760px) {
    .entry-content .aesv-rwd-wrap,
    .entry-content .aesv-table-scroll,
    .entry-content figure.wp-block-table,
    .entry-content .wp-block-table {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        margin: 18px 0 !important;
        border: 0 !important;
    }

    .entry-content .aesv-rwd-wrap > table,
    .entry-content .aesv-table-scroll > table,
    .entry-content figure.wp-block-table table,
    .entry-content .wp-block-table table,
    .entry-content table.aesv-rwd-table,
    .entry-content table.aesv-comparison-table,
    .entry-content table.aesv-projects-table,
    .entry-content table.aesv-mobile-card-table,
    .entry-content table.aesv-wide-table,
    .entry-content table.aesv-generator-comparison {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border: 0 !important;
        background: transparent !important;
        overflow: visible !important;
        font-size: 16px !important;
    }

    .entry-content .aesv-rwd-wrap > table thead,
    .entry-content .aesv-table-scroll > table thead,
    .entry-content figure.wp-block-table table thead,
    .entry-content .wp-block-table table thead,
    .entry-content table.aesv-rwd-table thead,
    .entry-content table.aesv-comparison-table thead,
    .entry-content table.aesv-projects-table thead,
    .entry-content table.aesv-mobile-card-table thead,
    .entry-content table.aesv-wide-table thead,
    .entry-content table.aesv-generator-comparison thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
    }

    .entry-content .aesv-rwd-wrap > table tbody,
    .entry-content .aesv-table-scroll > table tbody,
    .entry-content figure.wp-block-table table tbody,
    .entry-content .wp-block-table table tbody,
    .entry-content table.aesv-rwd-table tbody,
    .entry-content table.aesv-comparison-table tbody,
    .entry-content table.aesv-projects-table tbody,
    .entry-content table.aesv-mobile-card-table tbody,
    .entry-content table.aesv-wide-table tbody,
    .entry-content table.aesv-generator-comparison tbody {
        display: block !important;
        width: 100% !important;
    }

    .entry-content .aesv-rwd-wrap > table tr,
    .entry-content .aesv-table-scroll > table tr,
    .entry-content figure.wp-block-table table tr,
    .entry-content .wp-block-table table tr,
    .entry-content table.aesv-rwd-table tr,
    .entry-content table.aesv-comparison-table tr,
    .entry-content table.aesv-projects-table tr,
    .entry-content table.aesv-mobile-card-table tr,
    .entry-content table.aesv-wide-table tr,
    .entry-content table.aesv-generator-comparison tr {
        display: block !important;
        width: 100% !important;
        margin: 0 0 14px !important;
        padding: 14px 16px !important;
        border: 1px solid #dbe5de !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
    }

    .entry-content .aesv-rwd-wrap > table th,
    .entry-content .aesv-rwd-wrap > table td,
    .entry-content .aesv-table-scroll > table th,
    .entry-content .aesv-table-scroll > table td,
    .entry-content figure.wp-block-table table th,
    .entry-content figure.wp-block-table table td,
    .entry-content .wp-block-table table th,
    .entry-content .wp-block-table table td,
    .entry-content table.aesv-rwd-table th,
    .entry-content table.aesv-rwd-table td,
    .entry-content table.aesv-comparison-table th,
    .entry-content table.aesv-comparison-table td,
    .entry-content table.aesv-projects-table th,
    .entry-content table.aesv-projects-table td,
    .entry-content table.aesv-mobile-card-table th,
    .entry-content table.aesv-mobile-card-table td,
    .entry-content table.aesv-wide-table th,
    .entry-content table.aesv-wide-table td,
    .entry-content table.aesv-generator-comparison th,
    .entry-content table.aesv-generator-comparison td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 9px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid #eef2f0 !important;
        background: transparent !important;
        color: #20342f !important;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        font-size: 16px !important;
        line-height: 1.55 !important;
    }

    .entry-content .aesv-rwd-wrap > table td:last-child,
    .entry-content .aesv-table-scroll > table td:last-child,
    .entry-content figure.wp-block-table table td:last-child,
    .entry-content .wp-block-table table td:last-child,
    .entry-content table.aesv-rwd-table td:last-child,
    .entry-content table.aesv-comparison-table td:last-child,
    .entry-content table.aesv-projects-table td:last-child,
    .entry-content table.aesv-mobile-card-table td:last-child,
    .entry-content table.aesv-wide-table td:last-child,
    .entry-content table.aesv-generator-comparison td:last-child {
        border-bottom: 0 !important;
    }

    .entry-content .aesv-rwd-wrap > table td::before,
    .entry-content .aesv-table-scroll > table td::before,
    .entry-content figure.wp-block-table table td::before,
    .entry-content .wp-block-table table td::before,
    .entry-content table.aesv-rwd-table td::before,
    .entry-content table.aesv-comparison-table td::before,
    .entry-content table.aesv-projects-table td::before,
    .entry-content table.aesv-mobile-card-table td::before,
    .entry-content table.aesv-wide-table td::before,
    .entry-content table.aesv-generator-comparison td::before {
        content: attr(data-label) !important;
        display: block !important;
        margin: 0 0 3px !important;
        color: #0f5132 !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
        font-weight: 800 !important;
        letter-spacing: .06em !important;
        text-transform: uppercase !important;
    }

    .entry-content table td:not([data-label])::before,
    .entry-content table td[data-label=""]::before {
        display: none !important;
        content: none !important;
    }
}

/* --- AESV DIY / Troubleshooting Hub Pages ---
 * Styles for /diy-off-grid/ and /troubleshooting/ hub pages.
 * Kept in plugin CSS because WordPress strips <style> from page content for non-admin editors.
 */
body.page-id-1502722 .entry-header,
body.page-id-1502723 .entry-header {
    margin-bottom: 18px !important;
}
body.page-id-1502722 .entry-content .aesv-hub,
body.page-id-1502723 .entry-content .aesv-hub {
    max-width: 1120px !important;
    margin: 0 auto !important;
    padding: 8px 20px 56px !important;
    color: #172b25 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}
body.page-id-1502722 .entry-content .aesv-hub a,
body.page-id-1502723 .entry-content .aesv-hub a {
    text-decoration: none !important;
}
body.page-id-1502722 .entry-content .aesv-hub-hero,
body.page-id-1502723 .entry-content .aesv-hub-hero {
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg,#ecfdf3 0%,#f8fafc 64%,#e6f7ef 100%) !important;
    border: 1px solid #d8eadf !important;
    border-radius: 28px !important;
    padding: 34px 32px !important;
    margin: 8px 0 30px !important;
    box-shadow: 0 18px 50px rgba(15,81,50,.08) !important;
}
body.page-id-1502722 .entry-content .aesv-hub-hero:after,
body.page-id-1502723 .entry-content .aesv-hub-hero:after {
    content: "";
    position: absolute;
    right: -60px;
    top: -70px;
    width: 230px;
    height: 230px;
    background: radial-gradient(circle,rgba(18,183,106,.22),rgba(18,183,106,0) 70%);
    pointer-events: none;
}
body.page-id-1502722 .entry-content .aesv-hub-eyebrow,
body.page-id-1502723 .entry-content .aesv-hub-eyebrow {
    display: inline-flex !important;
    background: #d1fadf !important;
    color: #0f5132 !important;
    border-radius: 999px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
}
body.page-id-1502722 .entry-content .aesv-hub-title,
body.page-id-1502723 .entry-content .aesv-hub-title {
    font-size: clamp(30px,4.5vw,50px) !important;
    line-height: 1.05 !important;
    margin: 15px 0 12px !important;
    color: #10241f !important;
    font-weight: 850 !important;
    max-width: 820px !important;
}
body.page-id-1502722 .entry-content .aesv-hub-lede,
body.page-id-1502723 .entry-content .aesv-hub-lede {
    font-size: 18px !important;
    line-height: 1.66 !important;
    max-width: 820px !important;
    margin: 0 !important;
    color: #34443f !important;
}
body.page-id-1502722 .entry-content .aesv-hub-toc,
body.page-id-1502723 .entry-content .aesv-hub-toc {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 22px 0 0 !important;
}
body.page-id-1502722 .entry-content .aesv-hub-toc a,
body.page-id-1502723 .entry-content .aesv-hub-toc a {
    display: inline-flex !important;
    padding: 9px 13px !important;
    border-radius: 999px !important;
    background: #fff !important;
    border: 1px solid #cfe4d6 !important;
    color: #0f5132 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}
body.page-id-1502722 .entry-content .aesv-hub-section,
body.page-id-1502723 .entry-content .aesv-hub-section {
    margin: 36px 0 !important;
}
body.page-id-1502722 .entry-content .aesv-hub-section h2,
body.page-id-1502723 .entry-content .aesv-hub-section h2 {
    font-size: clamp(25px,4vw,36px) !important;
    line-height: 1.12 !important;
    margin: 0 0 8px !important;
    color: #10241f !important;
    border-left: 7px solid #12b76a !important;
    padding-left: 14px !important;
}
body.page-id-1502722 .entry-content .aesv-hub-section-intro,
body.page-id-1502723 .entry-content .aesv-hub-section-intro {
    font-size: 16.5px !important;
    line-height: 1.65 !important;
    max-width: 820px !important;
    margin: 0 0 18px !important;
    color: #40514b !important;
}
body.page-id-1502722 .entry-content .aesv-hub-grid,
body.page-id-1502723 .entry-content .aesv-hub-grid {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 20px !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card,
body.page-id-1502723 .entry-content .aesv-hub-card {
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid #dbe5de !important;
    border-radius: 22px !important;
    box-shadow: 0 10px 30px rgba(15,23,42,.07) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
    transition: transform .16s ease, box-shadow .16s ease !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card:hover,
body.page-id-1502723 .entry-content .aesv-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(15,23,42,.1) !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card-media,
body.page-id-1502723 .entry-content .aesv-hub-card-media {
    display: block !important;
    position: relative !important;
    aspect-ratio: 16/9 !important;
    background: #eef8f1 !important;
    overflow: hidden !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card-media img,
body.page-id-1502723 .entry-content .aesv-hub-card-media img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    margin: 0 !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card-body,
body.page-id-1502723 .entry-content .aesv-hub-card-body {
    padding: 18px 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}
body.page-id-1502722 .entry-content .aesv-hub-tag,
body.page-id-1502723 .entry-content .aesv-hub-tag {
    align-self: flex-start !important;
    background: #eef8f1 !important;
    color: #0f5132 !important;
    border: 1px solid #d3eadb !important;
    border-radius: 999px !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    letter-spacing: .05em !important;
    text-transform: uppercase !important;
    margin-bottom: 10px !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card h3,
body.page-id-1502723 .entry-content .aesv-hub-card h3 {
    font-size: 20px !important;
    line-height: 1.25 !important;
    margin: 0 0 10px !important;
    color: #10241f !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card h3 a,
body.page-id-1502723 .entry-content .aesv-hub-card h3 a {
    color: #10241f !important;
    text-decoration: none !important;
}
body.page-id-1502722 .entry-content .aesv-hub-card p,
body.page-id-1502723 .entry-content .aesv-hub-card p {
    font-size: 15.7px !important;
    line-height: 1.58 !important;
    color: #40514b !important;
    margin: 0 0 18px !important;
}
body.page-id-1502722 .entry-content .aesv-hub-link,
body.page-id-1502723 .entry-content .aesv-hub-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: auto !important;
    background: #0f5132 !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 10px 13px !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    text-decoration: none !important;
}
body.page-id-1502722 .entry-content .aesv-hub-note,
body.page-id-1502723 .entry-content .aesv-hub-note {
    background: #f8fafc !important;
    border-left: 5px solid #12b76a !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    font-size: 16.5px !important;
    line-height: 1.65 !important;
}
body.page-id-1502722 .entry-content .aesv-hub-note a,
body.page-id-1502723 .entry-content .aesv-hub-note a {
    font-weight: 850 !important;
    color: #0f5132 !important;
    text-decoration: underline !important;
}
@media(max-width:860px){
    body.page-id-1502722 .entry-content .aesv-hub,
    body.page-id-1502723 .entry-content .aesv-hub{padding:0 10px 42px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-hero,
    body.page-id-1502723 .entry-content .aesv-hub-hero{padding:24px 20px !important;border-radius:22px !important;margin-top:0 !important;}
    body.page-id-1502722 .entry-content .aesv-hub-title,
    body.page-id-1502723 .entry-content .aesv-hub-title{font-size:32px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-lede,
    body.page-id-1502723 .entry-content .aesv-hub-lede{font-size:16.5px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-toc,
    body.page-id-1502723 .entry-content .aesv-hub-toc{gap:8px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-toc a,
    body.page-id-1502723 .entry-content .aesv-hub-toc a{font-size:13px !important;padding:8px 10px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-grid,
    body.page-id-1502723 .entry-content .aesv-hub-grid{grid-template-columns:1fr !important;gap:18px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-card h3,
    body.page-id-1502723 .entry-content .aesv-hub-card h3{font-size:20px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-card-body,
    body.page-id-1502723 .entry-content .aesv-hub-card-body{padding:17px !important;}
    body.page-id-1502722 .entry-content .aesv-hub-section,
    body.page-id-1502723 .entry-content .aesv-hub-section{margin:32px 0 !important;}
    body.page-id-1502722 .entry-content .aesv-hub-section h2,
    body.page-id-1502723 .entry-content .aesv-hub-section h2{font-size:28px !important;}
}

/* Hub CTA contrast hardening: X theme link colors must not override white CTA text. */
body.page-id-1502722 .entry-content a.aesv-hub-link,
body.page-id-1502722 .entry-content a.aesv-hub-link:visited,
body.page-id-1502722 .entry-content a.aesv-hub-link:hover,
body.page-id-1502722 .entry-content a.aesv-hub-link:focus,
body.page-id-1502723 .entry-content a.aesv-hub-link,
body.page-id-1502723 .entry-content a.aesv-hub-link:visited,
body.page-id-1502723 .entry-content a.aesv-hub-link:hover,
body.page-id-1502723 .entry-content a.aesv-hub-link:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

