﻿.prose ul li::before {
    content: none !important;
}

.govuk-width-container {
    max-width: 100% !important;
    /*display: flex !important;*/
}

.nav-main {
    /*max-width: 1050px !important;*/

}

#main-content {
    padding-top: 0rem !important;
}

.image-container-center {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}


/* ==========================================================================
   GOV.UK "Back to Top" Link
   ========================================================================== */
.back-to-top {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: "GDS Transport", arial, sans-serif;
    font-size: 20px;
    line-height: 1.25;
}

    .back-to-top:hover {
        text-decoration: underline;
    }

.back-to-top__icon {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ==========================================================================
   Print & Viewport Rules
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   GOV.UK Utility Link Container (Screen Layout Styles)
   ========================================================================== */
.print-container {
    display: block;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
    width: fit-content;
    /*max-width: 170px;*/
    /* Official GOV.UK border colour (#b1b4b6) */
    border: 2px solid #b1b4b6;
}

.print-link {
    font-family: "GDS Transport", arial, sans-serif;
    font-size: 20px;
    line-height: 1.25;
    color: #1d70b8; /* GOV.UK Link Blue */
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

    .print-link:hover {
        color: #003078; /* GOV.UK Hover Blue */
        text-decoration: underline;
    }

.print-link__icon {
    display: inline-block;
    margin-right: 8px; /* Safe spacing matching GOV.UK grid units */
    vertical-align: middle;
    margin-top: -2px;
    /* "currentColor" forces the SVG to copy the active link colour automatically */
    fill: currentColor;
}


/* ==========================================================================
   THE FIX: Critical Print Media Overrides
   ========================================================================== */

@media print {
    img {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    /* 1. Strip screen-only branding and navigation to save user ink */
    .print-container,
    .print-link {
        display: none !important;
        visibility: hidden !important;
        border: none !important;
    }

    #umbrella-header,
    #umbrella-footer,
    aside > div > div > div > :not(#contents-menu),
    .print-link,
    .back-to-top,
    nav:not(aside nav),
    #gdpr-cookie-banner {
        display: none !important;
    }

    /* 2. Standardise body settings for A4 paper */
    body {
        color: #000000;
        background: #ffffff;
        font-size: 15pt;
        line-height: 1.5;
        padding: 0;
    }

    /* 3. Ensure headings don't awkwardly separate at the page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
        break-after: avoid;
    }
}

.govuk-main-layout-row {
    flex-direction: row;
    /* CRITICAL FIX 1: Stops the sidebar column from stretching to the full 
       height of the content column, preserving its trackable moving path. */
    align-items: flex-start;
}

.sticky-sidebar {
    margin-bottom: 30px !important;
}

@media (min-width: 650px) {
    .sticky-sidebar {
        z-index: 10;
        /* Locks the element inside its grid path during scroll tracking */
        position: -webkit-sticky !important;
        position: sticky !important;
        /* Sets the safe spacing buffer from the top of the viewport */
        top: 20px;
        /* Safe viewport cap: prevents long lists from cutting off at the bottom */
        max-height: calc(100vh - 50px) !important;
        overflow-y: auto !important;
    }
}

/* ==========================================================================
   GOV.UK Official Typography & List Scale Overrides (.prose)
   ========================================================================== */

/* 1. DECREASE HEADING LINE SPACING (Strict GOV.UK Vertical Spacing) */
.prose h1 {
    font-size: 36px !important;
    font-size: 2.25rem !important;
    line-height: 1.1 !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important; /* Tightens the space underneath */
}

.prose h2 {
    font-size: 24px !important;
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
    margin-top: 35px !important;
    margin-bottom: 15px !important; /* Standard GOV.UK heading-m bottom space */
}

.prose h3 {
    font-size: 20px !important;
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
    margin-top: 25px !important;
    margin-bottom: 10px !important; /* Standard GOV.UK heading-s bottom space */
}

.prose h4 {
    font-size: 16px !important;
    font-size: 1rem !important;
    line-height: 1.25 !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
}



/* ==========================================================================
   GOV.UK Clean Typography, Layout & List Reset
   ========================================================================== */

/* 1. DECREASE HEADING LINE SPACING (Strict GOV.UK Vertical Rhythm) */
.prose h1 {
    font-size: 36px !important;
    font-size: 2.25rem !important;
    line-height: 1.1 !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
}

.prose h2 {
    font-size: 28px !important;
    /*font-size: 1.5rem !important;*/
    line-height: 1.25 !important;
    margin-top: 35px !important;
    margin-bottom: 15px !important;
}

.prose h3 {
    font-size: 24px !important;
    /*font-size: 1.25rem !important;*/
    line-height: 1.25 !important;
    margin-top: 25px !important;
    margin-bottom: 10px !important;
}

.prose h4 {
    font-size: 20px !important;
    /*font-size: 1rem !important;*/
    line-height: 1.25 !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
}

/* 2. PARAGRAPH BOUNDARIES */
.prose p {
    font-size: 20px !important;
    /*font-size: 1.25rem !important;*/
    line-height: 1.3157 !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

/* 3. CLEAN UP LIST ENGINE & ELIMINATE DUPLICATE NUMBERS ('1. 1.') */
.prose ul > li::before,
.prose ol > li::before {
    content: none !important;
    display: none !important;
}

/* Force Bullets and Numbers to be solid Black for Accessibility contrast */
.prose :where(ul, ol, li)::marker,
.prose ::marker {
    color: #0b0c0c !important;
    font-weight: 700 !important;
}

/* Individual List Item Metrics */
.prose li {
    font-size: 20px !important;
    font-size: 1.25rem !important;
    line-height: 1.3157 !important;
    margin-top: 0 !important;
    margin-bottom: 5px !important;
    padding-left: 0 !important; /* Removes Tailwind inner cell shifts */
}

/* 4. FORCE UNORDERED LISTS TO STAY NATIVE BULLETS */
.prose ul {
    list-style-type: disc !important;
    margin-top: 5px !important;
    margin-bottom: 15px !important;
    padding-left: 25px !important;
}

/* 5. FORCE ORDERED LISTS TO STAY NATIVE NUMBERS */
.prose ol {
    list-style-type: decimal !important;
    margin-top: 5px !important;
    margin-bottom: 15px !important;
    padding-left: 25px !important;
}

/* 6. HYPERTEXT NODES (Official GOV.UK Blue token palette) */
.prose a,
.prose a strong {
    color: #1d70b8 !important;
    /*font-weight: 700 !important*/
    /*text-decoration: none !important;*/
    text-decoration-color: #1a65a6;
    text-decoration-thickness: 1px;
}

    .prose a:hover,
    .prose a:hover strong {
        color: #003078 !important;
        text-decoration: underline !important;
        text-decoration-color: #0f385c;
        text-decoration-thickness: 3px;
    }

/* 7. MASTER PROSE CONTAINER CONTROLS */
.prose {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: visible !important;
}

    /* ==========================================================================
   GOV.UK Responsive Layout Data Tables
   ========================================================================== */
    .prose table {
        display: table !important;
        width: 100% !important;
        max-width: none !important;
        border-collapse: collapse !important;
        margin-top: 24px !important;
        margin-bottom: 24px !important;
    }

/* Isolate Scrolling Viewports at the exact layout grid boundaries */
@supports (display: grid) {
    .prose {
        display: grid;
        max-width: 100%;
    }

        .prose > table {
            display: block !important; /* Spawns local table scroll wrapper bar */
            overflow-x: auto !important;
        }
}

.prose th,
.prose td {
    padding: 8px 12px !important;
    vertical-align: top !important;
    border-bottom: 1px solid #b1b4b6 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    min-width: 160px !important;
}

.prose th {
    border-bottom: 2px solid #0b0c0c !important;
    font-weight: 700 !important;
    text-align: left !important;
    color: #0b0c0c !important;
}

/* ==========================================================================
   GOV.UK Clean Fluid Responsive Video Embeds
   ========================================================================== */
.prose iframe[src*="youtube.com"],
.prose iframe[src*="youtu.be"] {
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    border: none !important;
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   GOV.UK Clean Sub/Sup Nested Typography Scales
   ========================================================================== */
.prose p sub,
.prose p sup,
.prose p a sub,
.prose p a sup,
.prose p a sub u,
.prose p a sup u,
.prose p a sub u span,
.prose p a sup u span {
    font-size: 14px !important;
    line-height: 0 !important;
    position: relative !important;
    vertical-align: baseline !important;
    display: inline-block !important;
}

.prose sup,
.prose a sup {
    top: -0.5em !important;
}

.prose sub,
.prose a sub {
    bottom: -0.25em !important;
}

.prose a sup,
.prose a sub {
    text-decoration: none !important; /* Strips lines from colliding with footnote digits */
}

/* ==========================================================================
   GOV.UK Umbraco Figure Caption Style Formatting
   ========================================================================== */

/* 1. Target the text scale, font metrics, and alignment of the caption wrapper */
.prose figcaption,
.prose figure figcaption {
    font-size: 20px !important;
    font-size: 1.25rem !important; /* Matches identical GOV.UK body size */
    line-height: 1.3157 !important;
    font-weight: 700 !important; /* Forces bold appearance */
    color: #0b0c0c !important; /* Forces high-contrast accessible black text */
    font-style: normal !important; /* Strips Tailwind's default italic setting */
    margin-top: 5px !important; /* Breather space between the image and the caption text */
    text-align: left !important; /* Establishes public sector reading baseline alignment */
}

/* 2. Optional: Ensure the outer image container handles margins neatly */
.prose figure {
    margin-top: 24px !important;
    margin-bottom: 8px !important;
}

.prose figure p {
    margin-bottom: 2px !important;
}

.prose img {
    margin-bottom: 1rem !important;
}

.event-btn a:hover {
    /*color: #003078 !important;*/
    text-decoration: underline !important;
    /*text-decoration-color: #0f385c;*/
    text-decoration-thickness: 3px;
}