/*
Theme Name: Divi Child
Template: Divi
Version: 1.0
*/

/* ============================================================
   P2: Prev/next post navigation — the nav-previous/nav-next links
   are flex children with no justify-content set, so at the
   narrower 740px article width they sit flush against each other
   with no gap. Push them to opposite ends and wrap on small screens.
   ============================================================ */
.et_pb_post_nav, [class*="et_pb_post_nav_"] {
    display: flex !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 16px;
}
.et_pb_post_nav .nav-previous,
.et_pb_post_nav .nav-next,
[class*="et_pb_post_nav_"] .nav-previous,
[class*="et_pb_post_nav_"] .nav-next {
    max-width: 48%;
}
/* Lighthouse: prev/next link text uses the site's gold accent colour on
   a white background (2.63:1, needs 4.5:1) — same navy-text swap used
   elsewhere on the site for gold-on-light-background text. */
.et_pb_post_nav .nav-previous a,
.et_pb_post_nav .nav-next a,
[class*="et_pb_post_nav_"] .nav-previous a,
[class*="et_pb_post_nav_"] .nav-next a,
.et_pb_post_nav .nav-previous a .nav-label,
.et_pb_post_nav .nav-next a .nav-label,
[class*="et_pb_post_nav_"] .nav-previous a .nav-label,
[class*="et_pb_post_nav_"] .nav-next a .nav-label,
.et_pb_post_nav .nav-previous a span,
.et_pb_post_nav .nav-next a span,
[class*="et_pb_post_nav_"] .nav-previous a span,
[class*="et_pb_post_nav_"] .nav-next a span,
#et-boc [class*="et_pb_post_nav_"] .nav-previous a span,
#et-boc [class*="et_pb_post_nav_"] .nav-next a span {
    color: #1e232b !important;
}

/* ============================================================
   Global colour variable fallback — on templates with no Divi
   content of their own (search results, 404), Divi never emits
   the page-specific inline CSS that defines --gcid-primary-color,
   so it falls back to Divi's own default blue. Define it at root
   so every page (Divi-built or not) gets the brand gold.

   Several older articles were also never migrated off Divi's
   stock default colour palette, so their own per-page :root block
   still declares --gcid-primary-color/--gcid-link-color as Divi's
   default blue (#2ea3f2) — which is also the literal generic `a`
   link colour on those posts and fails contrast (2.74:1 against
   white; needs 4.5:1). !important forces the brand colours to win
   regardless of cascade order against that per-page block.
   ============================================================ */
:root {
    --gcid-primary-color: #c49a16 !important;
    --gcid-link-color: #1a5276 !important;
}
/* Scoped to the post body only — NOT header/footer, which have their
   own (already-accessible) link colours for the dark background. A
   bare `a` selector here would also repaint footer links navy-on-navy. */
.et-l--post a {
    color: #1a5276;
}

/* ============================================================
   P6: Disable Divi entrance animations site-wide. Divi sets
   opacity:0 on any .et-waypoint element and relies on JS to fade
   it in once scrolled into view (or on page load for above-fold
   content). On slow script loads this causes a blank-content
   flash, most noticeable on hero/title text visible immediately.
   ============================================================ */
.et-waypoint:not(.et_pb_counters) {
    opacity: 1 !important;
    transform: none !important;
}

/* ============================================================
   Footer — brand-consistent colours
   Overrides Divi's blue primary colour on TB footer elements.
   ============================================================ */

/* Articles / Resources pill buttons → gold background, navy text.
   White text on this gold measured 2.63:1 contrast in Lighthouse (needs
   4.5:1); navy on gold is the same treatment already used successfully
   elsewhere on the site (e.g. the search button). */
.et_pb_button_0_tb_footer.et_pb_button,
.et_pb_button_1_tb_footer.et_pb_button {
    background-color: #c49a16 !important;
    color: #1e232b !important;
    border-color: #c49a16 !important;
}
.et_pb_button_0_tb_footer.et_pb_button:hover,
.et_pb_button_1_tb_footer.et_pb_button:hover {
    background-color: #a87e0e !important;
    border-color: #a87e0e !important;
    color: #1e232b !important;
}

/* Social icons — replace brand colours with restrained navy/white */
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_0_tb_footer a.icon,
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_1_tb_footer a.icon,
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_2_tb_footer a.icon,
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_3_tb_footer a.icon {
    background-color: rgba(255,255,255,0.12) !important;
}
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_0_tb_footer a.icon:hover,
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_1_tb_footer a.icon:hover,
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_2_tb_footer a.icon:hover,
.et_pb_section_0_tb_footer .et_pb_social_media_follow_network_3_tb_footer a.icon:hover {
    background-color: #c49a16 !important;
}

/* Replace RSS icon with envelope (email) icon in Divi footer */
.et-social-icon.et-social-rss a:before {
    content: "\e076" !important;
    font-family: 'ETmodules' !important;
}

/* ============================================================
   P1: Accessibility — screen reader utility
   ============================================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: #fff;
    clip: auto !important;
    clip-path: none;
    color: #1e232b;
    display: block;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 6px;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 7px;
    width: auto;
    z-index: 100000;
}

/* ============================================================
   P1: Accessibility — keyboard focus indicators
   ============================================================ */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.mobile_menu_bar:focus-visible {
    outline: 3px solid #c49a16 !important;
    outline-offset: 3px !important;
    border-radius: 2px;
}

/* ============================================================
   P1: Active nav — Theme Builder menu module (TB header)
   Divi's inline CSS already targets ul li.current-menu-item > a;
   our JS additionally sets colour inline, but this catches
   cases where the JS hasn't fired yet.
   ============================================================ */
.et_pb_menu_0_tb_header.et_pb_menu ul li.current-menu-item > a,
.et_pb_menu_0_tb_header.et_pb_menu ul li.current-menu-ancestor > a,
.et_pb_menu_0_tb_header.et_pb_menu ul li.current_page_item > a,
.et_pb_menu_0_tb_header.et_pb_menu ul li.current_page_ancestor > a {
    color: #c49a16 !important;
    font-weight: 700 !important;
}

/* Mobile menu active — dark gold on white background (9.5:1 contrast) */
.et_mobile_menu li.current-menu-item > a,
.et_mobile_menu li.current_page_item > a,
.et_mobile_menu li.current-menu-ancestor > a {
    color: #7a5c00 !important;
    font-weight: 700 !important;
}

/* ============================================================
   P1: Theme Builder header — fixed position, full width.
   body padding-top compensates so content starts below it.
   Desktop: 98px measured. Mobile: ~52px (6px+6px padding + logo).
   ============================================================ */
.et_pb_section_0_tb_header.et_pb_section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
}

body {
    padding-top: 98px !important;
}

@media (max-width: 980px) {
    body {
        padding-top: 90px !important;
    }
}

/* 404 page has its own self-contained branded header (not the fixed
   Theme Builder header), so the global offset reserved for the fixed
   header leaves a blank white gap above it. */
body.error404 {
    padding-top: 0 !important;
}

/* Bring the desktop navigation closer to the logo while preserving
   the existing full-width header and all tablet/mobile proportions. */
@media (min-width: 981px) {
    .et_pb_row_0_tb_header .et_pb_column_0_tb_header {
        flex: 0 0 100px !important;
        width: 100px !important;
    }

    .et_pb_row_0_tb_header .et_pb_column_1_tb_header {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .et_pb_menu_0_tb_header .et_pb_menu_inner_container {
        justify-content: flex-start !important;
    }
}

/* ============================================================
   P1: Theme Builder mobile header — fix height and scrollbar
   The TB header row has flex-wrap:wrap at ≤767px causing
   logo + menu to stack (≈170px). Force nowrap + clip overflow.
   ============================================================ */
@media (max-width: 980px) {
    /* Prevent the TB header row from wrapping to two rows */
    .et_pb_row_0_tb_header {
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    /* Divi's phone column classes give both columns 100% flex-basis,
       which the nowrap row above then has to shrink to fit — leaving
       the menu column (and its hamburger) stuck around the row's
       midpoint instead of flush against the right edge. Give the logo
       column just the width it needs and let the menu column take the
       rest, with the toggle right-aligned inside it. */
    .et_pb_row_0_tb_header .et_pb_column_0_tb_header {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    .et_pb_row_0_tb_header .et_pb_column_1_tb_header {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    .et_pb_menu_0_tb_header .et_pb_menu_inner_container {
        justify-content: flex-end !important;
    }

    /* Hide scrollbar artifacts in the header without clipping the dropdown */
    .et_pb_menu_0_tb_header *,
    .et_pb_menu_0_tb_header {
        scrollbar-width: none !important;
    }
    .et_pb_menu_0_tb_header *::-webkit-scrollbar,
    .et_pb_menu_0_tb_header::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
    }

    /* Ensure the dropdown can escape its container */
    .et_pb_menu_0_tb_header .et_mobile_nav_menu,
    .et_pb_menu_0_tb_header .mobile_nav {
        height: auto !important;
        overflow: visible !important;
    }

    /* Force the mobile dropdown to full-viewport width below the fixed header.
       Divi sizes it to the inner container (~194px); override to span full screen. */
    .et_pb_menu_0_tb_header .et_mobile_menu {
        position: fixed !important;
        top: 90px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        z-index: 99998 !important;
        background: #1e232b !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    }

    /* Tighten section padding on mobile to reduce total height */
    .et_pb_section_0_tb_header.et_pb_section {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
}

/* ============================================================
   Homepage — Latest Analysis cards: pin "Read more" to bottom.
   wpautop wraps the <a> in a <p>, so we target the last <p>
   inside the flex-column card div.
   ============================================================ */
.et_pb_text_inner div[style*="flex-direction:column"] > p:last-child {
    margin-top: auto !important;
}

/* ============================================================
   P3: Mobile horizontal overflow fixes
   ============================================================ */

/* CTA links that cause overflow at 390px — force wrap */
@media (max-width: 480px) {
    a[href*="disclosure"],
    .et_pb_text a,
    .et_pb_blurb a,
    .et_pb_button {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Toggle modules overflow at 390px */
@media (max-width: 480px) {
    .et_pb_toggle,
    .et_pb_toggle_title,
    .et_pb_toggle_content {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* Wide tables — add horizontal scroll wrapper */
@media (max-width: 768px) {
    .et_pb_text table,
    .entry-content table,
    article table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    /* Prevent content rows from blowing past viewport — sections/modules excluded
       to avoid clipping fixed/sticky elements and slide-out menus */
    .et_pb_row {
        max-width: 100vw !important;
        overflow-x: hidden;
    }
}

/* ============================================================
   Footer row — remove forced vertical scroll on legal links row.
   Divi sets overflow:hidden auto on .et_flex_row which creates a
   white scrollbar strip when content is taller than clientHeight.
   Allow the row to expand naturally instead.
   ============================================================ */
.et_pb_row_1_tb_footer.et_pb_row.et_flex_row {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* ============================================================
   P2: Article byline spacing — each legacy article's own title
   module carries its own (inconsistent) top margin (some -30px,
   some 0, etc.), which created uneven gaps under the injected
   byline. Normalise the first module after the byline to 0 so
   the gap is always just the byline's own bottom margin.
   ============================================================ */
.accused-byline + .et_pb_section .et_pb_row:first-child .et_pb_module:first-child {
    margin-top: 0 !important;
}
.accused-byline + .et_pb_section {
    padding-top: 0 !important;
}
.accused-byline + .et_pb_section .et_pb_row:first-child {
    margin-top: 0 !important;
}

/* ============================================================
   P2: Article reading width — single posts rendered at ~1080px
   are uncomfortably wide for long-form reading. Cap normal rows
   to a readable column; rows containing tables/charts (which
   benefit from extra width) are left untouched.
   ============================================================ */
body.single .et-l--post .et_pb_row:not(:has(table)) {
    max-width: 740px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================================
   P5: External links — visual indicator for opens-in-new-tab
   ============================================================ */
a[target="_blank"][rel~="noopener"]::after {
    /* No leading space in the content — a literal space character is a
       valid line-break point, so the arrow could wrap onto its own line
       while the link text stays on the line above. Use margin instead,
       which doesn't introduce a break opportunity. */
    content: "\2197";
    margin-left: 0.2em;
    font-size: 0.8em;
    opacity: 0.7;
}

/* ============================================================
   /links/ page — divider #3 still resolves border-top-color to
   the Divi global "primary colour" CSS variable (blue) despite
   an explicit gold value in the module's own JSON attributes.
   Force the brand gold directly.
   ============================================================ */
.et_pb_divider_3:before {
    border-top-color: #c49a16 !important;
}

/* ============================================================
   Tablet landscape (981–1200px) — prevent desktop nav wrapping
   Divi keeps the full nav at this width but 6 items won't fit
   at default 14px/padding. Tighten to keep them on one row.
   ============================================================ */
/* Tablet landscape (981–1100px) — switch to mobile hamburger.
   Six long nav labels can't fit comfortably at this width so we
   hide the desktop nav list and show the mobile toggle instead. */
@media (min-width: 981px) and (max-width: 1100px) {
    .et_pb_menu_0_tb_header .et_pb_menu__list,
    .et_pb_menu_0_tb_header nav > ul {
        display: none !important;
    }
    .et_pb_menu_0_tb_header .mobile_nav,
    .et_pb_menu_0_tb_header .et_mobile_nav_menu {
        display: block !important;
    }
    .et_pb_menu_0_tb_header .et_mobile_menu {
        top: 90px !important;
    }
}

/* ============================================================
   Footer — stack columns on tablet portrait and below (≤860px)
   Default Divi tries a 2+1 column arrangement which leaves
   Articles and Resources unbalanced. Force single-column stack.
   ============================================================ */
@media (max-width: 860px) {
    .et_pb_row_0_tb_footer.et_pb_row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
        padding-bottom: 24px !important;
    }
    .et_pb_row_0_tb_footer .et_pb_column {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    /* Re-centre social icons in stacked footer */
    .et_pb_row_0_tb_footer .et_pb_social_media_follow {
        text-align: center !important;
    }
}

/* ============================================================
   Mobile landscape — header gap fix
   body padding-top: 90px is set for portrait; on landscape the
   header shrinks so reduce the offset to avoid a blank gap.
   ============================================================ */
@media (max-width: 980px) and (orientation: landscape) {
    body {
        padding-top: 65px !important;
    }
    .et_pb_menu_0_tb_header .et_mobile_menu {
        top: 65px !important;
    }
}

/* ============================================================
   Accessibility — Divi renders decorative button/icon glyphs via
   CSS generated content bound to a real DOM attribute
   (`data-icon="$"` etc). Safari/VoiceOver and some other AT expose
   that generated content, so screen reader users hear stray
   characters ("$", "5", "2", "a") after link/button text. These
   glyphs are purely decorative — drop them rather than trying to
   suppress AT announcement, since there is no reliable CSS-only
   way to hide ::before/::after content from assistive tech.
   ============================================================ */
.et_pb_button::after,
.et_pb_button::before {
    content: none !important;
}

/* ============================================================
   Article blockquotes default to Divi's stock blue accent
   (#2ea3f2), which clashes with the site's gold/navy palette.
   ============================================================ */
blockquote {
    border-color: #1e232b !important;
}

/* ============================================================
   Homepage directory grid — the card columns use a fixed inline
   width:33.33% (3-up) / width:50% (2-up) with no responsive
   fallback, so on tablet/phone the cards just shrink in place
   instead of stacking, causing cramped mid-word text wrapping.
   ============================================================ */
@media (max-width: 980px) {
    .accused-grid-col-3 {
        width: 50% !important;
    }
}
@media (max-width: 767px) {
    .accused-grid-col-3,
    .accused-grid-col-2 {
        width: 100% !important;
    }
}

/* ============================================================
   Page title touching the fixed header — affects every plain
   content page built as a Divi 5 "flex" section (Editorial
   Standards, Authorship and Transparency, Legal Notice,
   Methodology, Privacy, FAQ, False Allegations, Open File:
   Moorov). Divi's "block" sections (used on the homepage, The
   Process, etc.) get sensible default top padding; "flex"
   sections default to 0, so the title sits flush against the
   fixed header underline. et_pb_section_0 is always the first
   section on the page, so this only ever touches the page's
   opening section — never mid-page flex layouts (card grids,
   etc.) further down.
   ============================================================ */
body.page .et_pb_section_0.et_flex_section {
    padding-top: 54px !important;
}
@media (max-width: 980px) {
    body.page .et_pb_section_0.et_flex_section {
        padding-top: 40px !important;
    }
}
@media (max-width: 767px) {
    body.page .et_pb_section_0.et_flex_section {
        padding-top: 32px !important;
    }
}

/* ============================================================
   "Policy" pages (About, Editorial Standards, Authorship and
   Transparency, Methodology, Legal Notice) are a single long
   Divi text module — h1, then a flat run of <p>/<h3>/<ul> at
   the page's full 1080px row width. With no typographic
   hierarchy beyond plain text colour, no reading-width limit,
   and no visual separation between sections, they read as a
   dumped text file rather than a published page. This gives
   them the same editorial treatment as the rest of the site:
   a readable column width, a styled title to match the
   homepage's section headers, a distinguished lead paragraph,
   and clear rhythm between sections.
   ============================================================ */
body.page-id-3 .et_pb_row_0,
body.page-id-5213 .et_pb_row_0,
body.page-id-5221 .et_pb_row_0,
body.page-id-5923 .et_pb_row_0,
body.page-id-5228 .et_pb_row_0 {
    max-width: 760px !important;
}

/* About's row carries its own native 27px top padding that the other
   four pages' rows don't have, giving it a noticeably bigger gap above
   the title than its siblings even though the section padding is the
   same 54px on all five. Strip it so all five line up. */
body.page-id-3 .et_pb_row_0 {
    padding-top: 0 !important;
}

body.page-id-3 h1.et_pb_module_header,
body.page-id-5213 h1.et_pb_module_header,
body.page-id-5221 h1.et_pb_module_header,
body.page-id-5923 h1.et_pb_module_header,
body.page-id-5228 h1.et_pb_module_header {
    display: inline-block;
    padding-bottom: 6px;
    margin-bottom: 4px !important;
    border-bottom: 3px solid #c49a16;
}

/* Lead paragraph — the first paragraph directly under the title */
body.page-id-3 .et_pb_text_inner > p:first-child,
body.page-id-5213 .et_pb_text_inner > p:first-child,
body.page-id-5221 .et_pb_text_inner > p:first-child,
body.page-id-5923 .et_pb_text_inner > p:first-child,
body.page-id-5228 .et_pb_text_inner > p:first-child {
    line-height: 1.6 !important;
    color: #4a5568 !important;
    margin-bottom: 20px !important;
}

body.page-id-3 .et_pb_text_inner h3,
body.page-id-5213 .et_pb_text_inner h3,
body.page-id-5221 .et_pb_text_inner h3,
body.page-id-5923 .et_pb_text_inner h3,
body.page-id-5228 .et_pb_text_inner h3 {
    color: #1e232b !important;
    font-weight: 700 !important;
    padding-left: 16px;
    border-left: 4px solid #c49a16;
    margin-top: 30px !important;
    margin-bottom: 8px !important;
}

body.page-id-3 .et_pb_text_inner ul,
body.page-id-5213 .et_pb_text_inner ul,
body.page-id-5221 .et_pb_text_inner ul,
body.page-id-5923 .et_pb_text_inner ul,
body.page-id-5228 .et_pb_text_inner ul {
    padding-left: 4px;
    margin-top: 4px !important;
    margin-bottom: 14px !important;
}
body.page-id-3 .et_pb_text_inner ul li,
body.page-id-5213 .et_pb_text_inner ul li,
body.page-id-5221 .et_pb_text_inner ul li,
body.page-id-5923 .et_pb_text_inner ul li,
body.page-id-5228 .et_pb_text_inner ul li {
    margin-bottom: 4px;
}
body.page-id-3 .et_pb_text_inner ul li::marker,
body.page-id-5213 .et_pb_text_inner ul li::marker,
body.page-id-5221 .et_pb_text_inner ul li::marker,
body.page-id-5923 .et_pb_text_inner ul li::marker,
body.page-id-5228 .et_pb_text_inner ul li::marker {
    color: #c49a16;
}

body.page-id-3 .et_pb_text_inner strong,
body.page-id-5213 .et_pb_text_inner strong,
body.page-id-5221 .et_pb_text_inner strong,
body.page-id-5923 .et_pb_text_inner strong,
body.page-id-5228 .et_pb_text_inner strong {
    color: #1e232b;
}

body.page-id-3 .et_pb_text_inner > p,
body.page-id-5213 .et_pb_text_inner > p,
body.page-id-5221 .et_pb_text_inner > p,
body.page-id-5923 .et_pb_text_inner > p,
body.page-id-5228 .et_pb_text_inner > p {
    line-height: 1.6;
    margin-bottom: 12px !important;
}

/* About's text module defaults to 16px; the other four pages default to
   18px. Normalise all five to About's size for a consistent reading
   experience across the series. */
body.page-id-5213 .et_pb_text_inner > p,
body.page-id-5221 .et_pb_text_inner > p,
body.page-id-5923 .et_pb_text_inner > p,
body.page-id-5228 .et_pb_text_inner > p,
body.page-id-5213 .et_pb_text_inner > ul li,
body.page-id-5221 .et_pb_text_inner > ul li,
body.page-id-5923 .et_pb_text_inner > ul li,
body.page-id-5228 .et_pb_text_inner > ul li {
    font-size: 16px !important;
}

/* ============================================================
   Homepage hero — the row sits 80px below the fixed header but
   only 30px above the next section, a lopsided gap that reads as
   the title floating too low under the nav. Bring the top
   closer to the bottom's proportions.
   ============================================================ */
body.page-id-13 .et_pb_section_0 .et_pb_row_0 {
    padding-top: 48px !important;
}
@media (max-width: 767px) {
    body.page-id-13 .et_pb_section_0 .et_pb_row_0 {
        padding-top: 36px !important;
    }
}

/* Homepage hero "Explore the Directory" button — white text on this gold
   measured 2.63:1 contrast in Lighthouse (needs 4.5:1); switch to navy,
   matching the footer pill buttons fix above. */
body.page-id-13 .et_pb_button_0 {
    color: #1e232b !important;
}

/* ============================================================
   Directory hub + sidebar sub-pages — most of these never had
   their opening section's padding explicitly zeroed in the
   builder (unlike The Process and Understanding the Law, which
   did), so they fall back to Divi's default ~54px section
   padding stacked on top of the row's own 60px padding — pushing
   the title and intro noticeably lower than on their sibling
   pages. Same root cause across the whole "Pages in this
   section" sidebar template family, so listed exhaustively here.
   ============================================================ */
body.page-id-6068 .et_pb_section_0.et_pb_section,
body.page-id-6022 .et_pb_section_0.et_pb_section,
body.page-id-6042 .et_pb_section_0.et_pb_section,
body.page-id-6082 .et_pb_section_0.et_pb_section,
body.page-id-6086 .et_pb_section_0.et_pb_section,
body.page-id-6077 .et_pb_section_0.et_pb_section,
body.page-id-6073 .et_pb_section_0.et_pb_section,
body.page-id-6054 .et_pb_section_0.et_pb_section,
body.page-id-6038 .et_pb_section_0.et_pb_section,
body.page-id-6046 .et_pb_section_0.et_pb_section,
body.page-id-6050 .et_pb_section_0.et_pb_section,
body.page-id-6026 .et_pb_section_0.et_pb_section,
body.page-id-6030 .et_pb_section_0.et_pb_section,
body.page-id-6034 .et_pb_section_0.et_pb_section,
body.page-id-6058 .et_pb_section_0.et_pb_section,
body.page-id-6063 .et_pb_section_0.et_pb_section {
    padding: 0 !important;
}

/* ============================================================
   404 page — Divi does not emit the Theme Builder layout-specific
   CSS on WordPress 404 responses (see functions.php for the static
   module CSS this depends on being enqueued). These selectors are
   scoped to the actual global header/footer modules so the live
   layouts render exactly as they do on ordinary pages, plus the
   [accused_404] shortcode's own message/search/links block.
   ============================================================ */
.et-l--header > .et_builder_inner_content .et_pb_section.et_pb_section_0_tb_header { background-color: #1e232b !important; }
.et_pb_section_0_tb_header.et_pb_section { padding: 10px 30px; }
.et_pb_section_0_tb_header { border-bottom: 3px solid #c49a16; }
.et_pb_row_0_tb_header { width: 100% !important; max-width: 1400px !important; align-items: center; flex-wrap: nowrap; }
.et_pb_image_0_tb_header.et_pb_image { text-align: left; margin-left: 0; margin-right: auto; align-items: flex-start; }
.et_pb_image_0_tb_header { width: 75px; max-width: 75px; }
.et_pb_image_0_tb_header .et_pb_image_wrap { border-radius: 180px; border: 2px solid #c49a16; overflow: hidden; }
.et_pb_menu_0_tb_header.et_pb_menu { background-color: transparent; }
.et_pb_menu_0_tb_header .et_pb_menu_inner_container { --vertical-gap: 0; flex-direction: row; justify-content: flex-end; flex-wrap: nowrap; }
.et_pb_menu_0_tb_header.et_pb_menu ul li a { color: #fff; font-size: 13px; letter-spacing: .02em; transition: color 300ms ease; }
.et_pb_menu_0_tb_header.et_pb_menu ul li > a:hover { color: #c49a16; }
.et_pb_menu_0_tb_header .mobile_nav .mobile_menu_bar:before { color: var(--gcid-primary-color); font-size: 32px; }
.et_pb_menu_0_tb_header { text-align: left; }
.et_pb_menu_0_tb_header.et_pb_menu ul li.current-menu-item > a,
.et_pb_menu_0_tb_header.et_pb_menu ul li.current-menu-ancestor > a,
.et_pb_menu_0_tb_header.et_pb_menu ul:not(.sub-menu) > li.current-menu-ancestor > a { color: #c49a16 !important; }
.et_pb_menu_0_tb_header.et_pb_menu--style-left_aligned.et_pb_text_align_right .et_pb_menu__menu > nav > ul { margin-right: 0; }
.et_pb_menu_0_tb_header nav > ul > li > a:hover { opacity: 1; }
.et_pb_menu_0_tb_header:not(.mobile_menu_active) nav > ul > li { border-right: 1px solid #c49a16; padding-right: 14px !important; margin-right: 14px !important; }
.et_pb_menu_0_tb_header:not(.mobile_menu_active) nav > ul > li:last-child { border-right: 0; padding-right: 0 !important; margin-right: 0 !important; }
.et_pb_menu_0_tb_header .mobile_nav ul { background: #1e232b !important; border-top: 2px solid #c49a16 !important; }
.et_pb_menu_0_tb_header .mobile_nav ul li a { color: #fff !important; border-bottom: 1px solid rgba(196,154,22,.3) !important; padding: 12px 20px !important; display: block !important; }
.et_pb_menu_0_tb_header .mobile_nav ul li a:hover { color: #c49a16 !important; }

.et-l--footer > .et_builder_inner_content .et_pb_section.et_pb_section_0_tb_footer { background-color: #1e232b !important; }
.et_pb_row_0_tb_footer, .et_pb_row_1_tb_footer, .et_pb_row_2_tb_footer, .et_pb_row_3_tb_footer { flex-wrap: nowrap; }
.et_pb_button_0_tb_footer_wrapper .et_pb_button_0_tb_footer,
.et_pb_button_0_tb_footer_wrapper .et_pb_button_0_tb_footer:hover,
.et_pb_button_1_tb_footer_wrapper .et_pb_button_1_tb_footer,
.et_pb_button_1_tb_footer_wrapper .et_pb_button_1_tb_footer:hover { padding-top: 0 !important; padding-bottom: 0 !important; }
.et_pb_button_0_tb_footer_wrapper, ul.et_pb_social_media_follow_0_tb_footer, .et_pb_button_1_tb_footer_wrapper, .et_pb_text_2_tb_footer, .et_pb_text_3_tb_footer { text-align: center; }
.et_pb_button_0_tb_footer_wrapper .et_pb_button_0_tb_footer, .et_pb_button_1_tb_footer_wrapper .et_pb_button_1_tb_footer { margin-left: auto; margin-right: auto; }
body #page-container .et_pb_section .et_pb_button_0_tb_footer,
body #page-container .et_pb_section .et_pb_button_1_tb_footer { background-color: var(--gcid-primary-color); border-radius: 20px; border-color: var(--gcid-primary-color); }
.et_pb_social_media_follow_0_tb_footer.et_pb_module { flex-direction: row; justify-content: center; }
.et_pb_social_media_follow_0_tb_footer:after { content: none; display: none; }
.et_pb_text_0_tb_footer { margin-top: -20px !important; text-align: left; }
.et_pb_social_media_follow_network_0_tb_footer a.icon { background-color: #a82400 !important; }
.et_pb_row_1_tb_footer.et_pb_row { margin-top: -30px !important; }
.et_pb_text_1_tb_footer { margin-bottom: -30px !important; text-align: left; }
/* Lighthouse: the " · " separators between footer links inherit the
   theme's default paragraph grey (#666), which fails WCAG contrast (2.74:1)
   against the dark footer background. The links themselves are styled
   separately and already pass; only the plain-text separators needed
   lightening. */
.et_pb_text_1_tb_footer .et_pb_text_inner p { color: #a8afb8; }
.et_pb_social_media_follow_network_1_tb_footer a.icon { background-color: #000 !important; }
.et_pb_text_2_tb_footer .et_pb_text_inner { color: var(--gcid-hdwen6957l) !important; font-size: var(--gvid-7gk7h8dhvj); }
.et_pb_social_media_follow_network_2_tb_footer a.icon { background-color: #3b5998 !important; }
.et_pb_row_3_tb_footer.et_pb_row { margin-top: -50px !important; }
.et_pb_social_media_follow_network_3_tb_footer a.icon { background-color: #ea2c59 !important; }
/* --gcid-hdwen6957l (the disclaimer text colour, "Surface White" = #ffffff)
   is a Divi global colour variable normally defined in per-page dynamic
   CSS that doesn't generate on 404 responses, so it resolves to nothing
   and falls back to the browser default grey — nearly invisible against
   the dark footer. */
body.error404 .et_pb_text_2_tb_footer .et_pb_text_inner { color: #ffffff !important; }
/* These three modules are full-width (100%) within their column in the
   builder, but that custom per-module width is part of the per-page
   dynamic CSS Divi doesn't generate on 404 responses — without it they
   shrink to fit their content instead, sitting flush against the
   viewport edge and wrapping text that should fit on one line. */
body.error404 .et_pb_text_1_tb_footer,
body.error404 .et_pb_text_2_tb_footer,
body.error404 .et_pb_text_3_tb_footer { width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
/* All four footer rows are set to max-width:1080px (centred) in the
   builder, but that's also part of the missing per-page dynamic CSS, so
   each row shrinks to fit its content instead — narrow enough on the last
   row that "Support Accused.scot" wraps onto two lines. */
body.error404 .et_pb_section_0_tb_footer .et_pb_row {
    width: 100% !important;
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 980px) {
    .et_pb_menu_0_tb_header .et_pb_menu_inner_container { justify-content: space-between; flex-wrap: nowrap; }
    .et_pb_menu_0_tb_header .et_pb_menu__wrap { justify-content: flex-end !important; }
    .et_pb_menu_0_tb_header { text-align: right; }
    .et_pb_row_0_tb_footer { flex-wrap: wrap; }
}
@media (max-width: 767px) {
    .et_pb_row_0_tb_header { align-items: center; flex-wrap: nowrap; }
    .et_pb_menu_0_tb_header .et_pb_menu_inner_container { justify-content: space-between; flex-wrap: nowrap; }
    .et_pb_menu_0_tb_header .et_pb_menu__wrap { justify-content: flex-end !important; }
    .et_pb_menu_0_tb_header { text-align: right; }
    .et_pb_row_0_tb_footer { flex-wrap: wrap; }
}

body.error404 { padding-top: 98px !important; background: #1e232b !important; }
body.error404 #main-content { background: #1e232b !important; }
/* The page content's own section padding is explicitly set to 0, but that
   override needs per-page dynamic CSS that Divi doesn't generate on 404
   responses, so it falls back to Divi core's default 54px section padding. */
body.error404 .et_pb_section_0_tb_body { padding-top: 0 !important; padding-bottom: 0 !important; }
.accused-404 { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px 24px 0; background: #1e232b; border-bottom: 1px solid rgba(196,154,22,.38); font-family: Montserrat, Arial, sans-serif; text-align: center; box-sizing: border-box; }
.accused-404__inner { width: 100%; max-width: 700px; margin: 0 auto; }
.accused-404__eyebrow { margin: 0 0 18px !important; padding: 0 !important; color: #c49a16; font-size: 12px; font-weight: 800; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
.accused-404__code { margin: 0 0 12px !important; padding: 0 !important; color: #fff !important; font-size: clamp(64px,10vw,112px) !important; font-weight: 800 !important; letter-spacing: -.04em; line-height: .95 !important; }
.accused-404__title { margin: 0 0 18px !important; padding: 0 !important; color: #fff !important; font-size: clamp(25px,3.2vw,38px) !important; font-weight: 700 !important; line-height: 1.18 !important; }
.accused-404__copy { max-width: 590px; margin: 0 auto 30px !important; padding: 0 !important; color: rgba(255,255,255,.72) !important; font-family: Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.65; }
.accused-404__search { display: flex; width: 100%; max-width: 590px; margin: 0 auto 24px; border: 2px solid #c49a16; border-radius: 5px; overflow: hidden; background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.accused-404__search input[type=search] { flex: 1; min-width: 0; margin: 0 !important; padding: 14px 16px !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; color: #1e232b !important; font-family: Roboto, Arial, sans-serif; font-size: 16px !important; line-height: 1.4 !important; box-shadow: none !important; -webkit-appearance: none; }
.accused-404__search button { flex: 0 0 auto; margin: 0 !important; padding: 14px 22px !important; border: 0 !important; border-radius: 0 !important; background: #c49a16 !important; color: #1e232b !important; font-family: Montserrat, Arial, sans-serif; font-size: 15px !important; font-weight: 800 !important; line-height: 1.4 !important; cursor: pointer; }
.accused-404__search button:hover, .accused-404__search button:focus-visible { background: #d6ae2e !important; }
.accused-404__actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.accused-404__button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 22px; border: 2px solid #c49a16; border-radius: 4px; color: #fff !important; font-size: 14px; font-weight: 800; line-height: 1.4; text-decoration: none !important; transition: background-color .18s ease, color .18s ease; }
.accused-404__button--primary { background: #c49a16; color: #1e232b !important; }
.accused-404__button:hover, .accused-404__button:focus-visible { background: #d6ae2e; color: #1e232b !important; }
.accused-404__routes { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 23px 0 0; border-top: 1px solid rgba(255,255,255,.13); list-style: none !important; }
.accused-404__routes li { margin: 0 !important; padding: 0 !important; }
.accused-404__routes a { color: rgba(255,255,255,.76) !important; font-family: Roboto, Arial, sans-serif; font-size: 14px; font-weight: 600; text-decoration: none !important; }
.accused-404__routes a:hover, .accused-404__routes a:focus-visible { color: #c49a16 !important; }
@media (max-width: 980px) {
    body.error404 { padding-top: 90px !important; }
    .accused-404 { padding: 18px 28px 0; }
}
@media (max-width: 520px) {
    .accused-404 { padding: 16px 20px 0; }
    .accused-404__copy { font-size: 16px; }
    .accused-404__search { display: grid; grid-template-columns: minmax(0,1fr) auto; }
    .accused-404__search input[type=search] { padding: 13px 12px !important; }
    .accused-404__search button { padding: 13px 15px !important; }
    .accused-404__actions { align-items: stretch; flex-direction: column; }
    .accused-404__button { width: 100%; box-sizing: border-box; }
    .accused-404__routes { align-items: center; flex-direction: column; gap: 12px; }
}

/* Inline links inside body text rely on color alone (e.g. #1a5276 against
   #4a5568 body text) to distinguish them, which fails WCAG 1.4.1 — the
   colors are too close in luminance for color contrast to do the job, and
   Divi's text module strips the browser's default underline. Restoring an
   underline here, scoped to plain in-content links only (not nav, buttons,
   or social icons, which have their own appropriate treatment), fixes this
   without touching every individual link across the site. */
.et_pb_text_inner a,
.et_pb_post_content a {
    text-decoration: underline !important;
}
