.common-footer-public-site{
    margin-top: auto !important;
    background-color: #01573C;
    padding: 18px 24px;
}

.common-footer-public-site .footer-bar{
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.common-footer-public-site .footer-brand{
    display: flex;
    align-items: center;
    gap: 12px;
}

.common-footer-public-site .footer-brand-logo{
    width: 104px;
    height: 36px;
    object-fit: contain;
}

.common-footer-public-site .footer-brand-caption{
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.common-footer-public-site .footer-text{
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    text-align: right;
}

@media (max-width: 768px) {
    .common-footer-public-site .footer-bar{
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .common-footer-public-site .footer-brand{
        flex-direction: column;
        gap: 8px;
    }

    .common-footer-public-site .footer-brand-caption{
        padding-left: 0;
        border-left: none;
    }

    .common-footer-public-site .footer-text{
        text-align: center;
    }
}

#public-footer-container { /* Adjust this selector to target your footer */
    margin-top: auto !important; /* Pushes the footer to the bottom */
    width: 100%; /* Ensures the footer extends full width */
}
.col-md-public-site-1{
    flex:0 0 auto;
    width:11.1111111111%
}

.col-md-public-site-2{
    flex:0 0 auto;
    width:20%
}
.col-md-public-site-3{
    flex:0 0 auto;
    width:77.7777777778%;
}
.col-md-public-site-4{
    flex:0 0 auto;
    width: 33%;
}
.col-md-public-site-5{
    flex:0 0 auto;
    width: 50%;
}

.col-md-public-site-6{
    flex:0 0 auto;
    width:15%
}
.col-md-public-site-7{
    flex:0 0 auto;
    width:85%
}
.bg-tab-green {
    background-color:#01573C!important;
}
.bg-border-deep {
    background-color: #f0fcf4;
}
.border-deep{
    border: solid 1px rgba(185, 204, 199, 1)
}
.content-div-public-site {
    display: none;
    padding-left: 3rem;
}
.border-light-green{
    border: 1px solid #1EE196;
}
.fs-18-24-bold {
    font-size: 18px;
    font-weight: bold;
    line-height: 20px;
}
.fs-16-24-400 {
    font-size: 18px;
    font-weight: 400;
    line-height: 25px;
}
.fs-16-20-600 {
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
}
.fs-15-400-grey {
    font-size: 15px;
    font-weight: 400;
    color: #504b4b;
}
.fs-16-400-grey {
     font-size: 14px;
     font-weight: 400;
     color: #504b4b;
 }
.fs-22-30-bold-white {
    font-size: 22px;
    font-weight: bold;
    line-height: 30px;
    color: white;
}
.fs-18-300-white {
    font-size: 18px;
    font-weight: 300;
    color: white;
}
.d-common-font {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 24px !important;
    text-align: center !important;
}
.d-btn {
    background-color: #01573C !important;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 2px!important;
}

.d-btn:hover {
    background-color: #133D30 !important;
    border: 1px solid #133D30;
    color: #fff !important;
}

.anti-d-plus-btn {
    background-color: #FFFFFF !important;
    color: #01573C;
    border: 1px solid #01573C;
    border-radius: 2px!important;
}

.anti-d-plus-btn:hover {
    background-color: #01573C !important;
    border: 1px solid #01573C;
    color:  white !important;
}


.border-right{
    border-right: 1px solid black;
}
.nav-item2 + .nav-item2 {
    border-left: solid 1px rgb(199, 203, 207);
    height: 37px;
    margin: 0;
}

.navbar-light .navbar-nav .nav-link{
    color: white !important;
    font-weight: 600;
}

.nav-item2.active .nav-link {
    color: #01573C !important; /* This will enforce the text color change */
}

.nav-item2.active {
    background-color: #ECFDF8;
}

/* Owned here, not borrowed from dashboard.css: home doesn't load that sheet, so its nav and mobile
   drawer lost the strip border and full-cell links every other public page had. */
.public-nav-strip {
    border-radius: 5px;
    border: 1px solid rgba(177, 189, 186, 1);
}

.public-nav-strip .full-width-link,
.nav-offcanvas .full-width-link {
    display: flex; /* Make the link fill the nav-item */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
    height: 100%; /* Make the link take full height of its parent */
    width: 100%; /* Make the link take full width of its parent */
}


body {
    height: auto !important;
    min-height: 100vh !important;
}

.content-wrapper, .main-content, .lighter-green-background{
    background-color: #ffffff !important;
    height: auto !important;
    flex: 1 0 auto !important;
}


/**/
.carousel-item {
    height: 100%; /* Full height of the carousel */
    position: relative;
}

.carousel-item img {
    width: 100%; /* Full width of the carousel */
    height: auto; /* Responsive height */
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
    object-fit: cover; /* Ensures no cropping */
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0; /* Align to the left edge */
    transform: none; /* Remove centering transform */
    width: 100%; /* Full width */
    padding: 5px 20px; /* Reduced padding height, maintain horizontal padding */
    display: flex; /* Flexbox for layout */
    justify-content: space-between; /* Space between text block and button */
    align-items: center; /* Vertically center content */
    background-color: rgba(1, 87, 60, 1); /* Adjust transparency and color */
    color: white;
}

.carousel-caption p, .carousel-caption a {
    margin: 0; /* Remove any default margin */
}

.carousel-item::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 87, 60, 1) 0%, rgba(2, 189, 130, 0) 30%);
    /*background: rgba(0, 0, 0, 0.7); !* Dark overlay to enhance text visibility *!*/
}



.carousel-indicators {
    position: absolute;
    top: 82%;
    z-index: 15; /* Ensures they are visible on top of the image */
    text-align: center;
    list-style: none;
}

.carousel-indicators [data-bs-target] {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 10px; /* change width */
    height: 10px; /* change height */
    padding: 0;
    margin-right: 3px;
    margin-left: 3px;
    text-indent: -999px;
    cursor: pointer;
    color: rgba(255, 255, 255, 1);
    background-clip: padding-box;
    border: 1px rgba(30, 225, 150, 1) solid;
    border-radius: 50%; /* Fully rounded for dots */
    opacity: 0.5; /* Slightly transparent when inactive */
    transition: opacity .6s ease;
}
.carousel-indicators [data-bs-target].active {
    width: 30px; /* Wider to appear as a dash */
    height: 10px;
    border-radius:15px; /* Less rounded for a dash-like appearance */
    background-color: rgba(30, 225, 150, 1); /* Keeps the white color */
    opacity: 1; /* Fully opaque to stand out */
}

.carousel-capsule-div {
    background-color: rgba(19, 61, 48, 1);
    color: rgba(233, 251, 25, 1); /* White text, change as needed */
    padding: 5px 10px; /* Vertical and horizontal padding */
    border-radius: 50px; /* Fully rounded ends */
    display: inline-block; /* Only as wide as necessary */
    text-align: center; /* Center text inside the div */
}
.capsule-div {
    background-color: #d8ece4;
    color: rgba(1, 87, 60, 1); /* White text, change as needed */
    padding: 5px 10px; /* Vertical and horizontal padding */
    border-radius: 50px; /* Fully rounded ends */
    display: inline-block; /* Only as wide as necessary */
    text-align: center; /* Center text inside the div */
}

.bg-light-green{
    background-color: #d8ece4;;
}
.bg-other-information{
 background-color: rgba(236, 249, 246, 1)
}
.general-tab-row-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid rgba(185, 204, 199, 1);
    border-radius: 10px;
    color: rgba(33, 37, 41, 1);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    transition: border-color 0.3s ease, color 0.3s ease;
    overflow-wrap: break-word;
    height: 80px;
}
.general-tab-row-item span {
    flex: 1; /* Allow the span to take available space */
    white-space: normal; /* Ensure text can wrap */
    word-wrap: break-word; /* Ensure long words break to the next line */
    text-align: left;
}
.general-tab-row-item i {
    margin-left: 10px; /* Space between text and icon */
}

.full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
}

.general-tab-row-item:hover, .general-tab-row-item.active {
    border-color: rgba(1, 87, 60, 1);
    color: rgba(1, 87, 60, 1);
}



.public-site-tab-text {
    color: rgba(33, 37, 41, 1); /* Default text color */
    font-weight: 600;
}

/*upper tab css*/
.container-tab {
    /* Removes whitespace nodes between inline-block elements */
    white-space: nowrap;
}
.tabs-wrapper {
    /*width: fit-content; !* Fits to the content size *!*/
    margin: 0 auto; /* Centers the wrapper horizontally */
}

.custom-tabs-container input[type="radio"] {
    display: none; /* Hide radio inputs */
}
.custom-tabs-container label {
    display: inline-block;
    font-size: 16px;
    height: 45px;
    line-height: 15px;
    padding: 15px 10px 5px; /* Adjust top padding to lower the text start */
    width: 19%; /* Adjust based on the number of tabs */
    text-align: center;
    color: rgba(33, 37, 41, 1); /* Default text color */
    font-weight: 600;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-right: 10px;
    box-sizing: border-box;
}
.custom-tabs-container label:hover, .custom-tabs-container input[type="radio"]:checked + label {
    background: #d8ece4; /* Background on hover and when selected */
}

.custom-tabs-container label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px; /* Slightly offset to be visible below the tab */
    width: 100%; /* Full width of the label */
    height: 2px;
    background-color: #b2f4d9; /* Light grey color for the underline */
    opacity: 0.5; /* Make it less pronounced when not selected */
    transition: background-color 0.3s ease;
}

.custom-tabs-container input[type="radio"]:checked + label::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* Full width of the label */
    border-bottom: 1px solid #01573C;
    background-color: #01573C;
    height: 2px; /* Maintain bold bottom border when selected */
    bottom: -2px; /* Maintain position just below the tab */
}

.custom-tabs-container input[type="radio"]:checked + label::before {
    content: "";
    position: absolute;
    left: calc(70% + 50px); /* Adjust this to control where the triangle points */
    bottom: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(1, 87, 60, 1); /* Triangle color and flip */
}
.custom-tabs-container label:last-child {
    margin-right: 0; /* No margin for the last label to prevent extra space */
}

.custom-tabs-container .content-container {
    position: relative;
    min-height: 120px;
    /* Adjust based on content size */
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 70px;/* Space for the triangle */
}

.custom-tabs-container .content {
    position: absolute;
    padding: 10px;
    width: 100%;
    top: 0;
    opacity: 0;
    transition: opacity 0.25s ease, top 0.25s ease;
    pointer-events: none;
}

.custom-tabs-container #tab1:checked ~ .content-container #c1,
.custom-tabs-container #tab2:checked ~ .content-container #c2,
.custom-tabs-container #tab3:checked ~ .content-container #c3,
.custom-tabs-container #tab4:checked ~ .content-container #c4,
.custom-tabs-container #tab5:checked ~ .content-container #c5 {
    opacity: 1; /* Show the content when tab is selected */
    pointer-events: auto;
}


/*New tab*/
.custom-tab-container {
    justify-content: space-around;
    padding: 10px 0;
}

.custom-tab-link {
    padding: 10px 20px;
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    transition: background-color 0.3s;
    font-weight: 600;
    font-size: 16px;
}

.custom-tab-link.active {
    color: rgba(1, 87, 60, 1);
    border-bottom: 2px solid rgba(1, 87, 60, 1);
}

.custom-tab-content .custom-content {
    display: none;
    border-top: none;
}

.custom-tab-content .custom-content.active {
    display: block;
}

.tutorial-card {
    border: 2px solid rgba(219, 235, 229, 1);
    border-radius: 10px;
}
.tutorial-card .card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    object-fit: cover;
    height: 250px;
    filter: brightness(60%);
}
.video-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    position: absolute;
    width: 50px; /* Adjust the size as needed */
    height: 50px; /* Adjust the size as needed */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Ensure the icon does not interfere with the click */
}
.bg-lighter-green-capsule-div{
    background-color: rgba(209, 255, 241, 1);
}

.tutorial-card-capsule-div {
    color: rgba(1, 87, 60, 1); /* White text, change as needed */
    padding: 5px 20px !important; /* Vertical and horizontal padding */
    display: inline-block; /* Only as wide as necessary */
    text-align: center; /* Center text inside the div */
    font-size: 14px;
    border-radius: 5px;
}
.tutorial-card .card-text {
    color: rgba(1, 87, 60, 1);
    font-size: 18px;
    font-weight: 500;
}

/*Download Tab*/

.search-box-download-tab .btn {
    background-color: rgba(1, 87, 60, 1);
    color: white;
}
.search-box-download-tab input[type="text"] {
    border-right: none;
}
.search-box-download-tab .btn:hover {
    background-color: white !important;
    border: 1px solid rgba(1, 87, 60, 1);
    color: rgba(1, 87, 60, 1);
}
#downloadTable {
    border: 1px solid rgba(185, 204, 199, 1);
    border-collapse: collapse;
    width: 100%; /* Ensures the table stretches to the container if not already set */

}
#downloadTable th, #downloadTable td {
    border-right: 1px solid rgba(185, 204, 199, 1);
}

#downloadTable th:first-child, #downloadTable td:first-child {
    border-left: 1px solid rgba(185, 204, 199, 1);
}

#downloadTable th:last-child, #downloadTable td:last-child {
    border-right: none;
}

.table-header-public-site {
    background-color: rgba(219, 235, 229, 1);
    color: rgba(33, 37, 41, 1);
    font-weight: 600;
}

.table-row-public-site:nth-child(even) {
    background-color: rgba(236, 249, 246, 1);
}

.table-row-public-site:nth-child(odd) {
    background-color: #FFFFFF;
}

.table-row-public-site .details-column:not(:last-child) {
    border-bottom: 2px solid #000;
}

.table-row-public-site:last-child .details-column {
    border-bottom: none;
}
.sub-row {
    display: flex;              /* Establishes a flex container */
    justify-content: space-between; /* Positions children at either end */
    align-items: center;        /* Aligns items vertically in the center */
}

.sub-row:not(:last-child) {
    border-bottom: 1px solid rgba(222, 226, 230, 1);
    padding-bottom: 0.5em;
    margin-bottom: 0.5em;
}
.header-content {
    display: flex;
    justify-content: space-between; /* Aligns children (text and icon) to either end */
    align-items: center;
    width: 100%; /* Ensures the div takes full width of the th */
}
.header-content i {
    margin-left: auto; /* Pushes the icon to the far right */
    padding-top: 1px; /* Align vertically if needed */
    color: rgb(133, 147, 143);
}

/*feetab css*/
#feeTable{
    width: 100%; /* Adjust the table width as needed */
    border-collapse: collapse; /* Ensures borders are merged */
    border-left: 1px solid #ccc;
    border-top: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}
#feeTable td {
    padding: 10px; /* Adds padding for text within cells */
    border: none;
}

#feeTable tr:nth-child(odd) {
    background-color: #FFFFFF; /* White background for odd rows */
}

#feeTable tr:nth-child(even) {
    background-color: rgba(245, 245, 245, 1); /* Grey background for even rows */
}
.stampTable {
    width: 100%;
    border-color: #ccc !important;
}
.stampTable,
.stampTable th,
.stampTable td{
    border-color: #ccc !important;
}
.table-row-stamp-table:nth-child(even) {
    background-color: rgba(245, 245, 245, 1);
}

.table-row-stamp-table:nth-child(odd) {
    background-color: #FFFFFF;
}
.bg-capsule-div-grey{
    background-color: rgba(245, 245, 245, 1);
}

.signup-btn {
    cursor: pointer;
}

.signup-btn:disabled {
    background-color: #adb5bd;
    opacity: 0.65;
    cursor: not-allowed;
}

/* --- Top header outline button ---
   public pages load only common.css + public-site.css (see baseCssHead),
   so .btn-outline-dark-green from style.css is not available here. */
.btn-outline-green {
    color: #01573C;
    background-color: #ffffff;
    border: 1px solid #01573C;
    border-radius: 2px !important;
}

.btn-outline-green:hover {
    color: #01573C;
    background-color: #ECFDF8;
    border-color: #01573C;
}

/* --- Top header branding ---
   Size logos by height only so each keeps its native aspect ratio
   (govt.png is 46x46, smart_rjsc_logo.png is 108x42). */
.public-header-seal {
    height: 50px;
    width: auto;
}

.public-header-logo {
    height: 50px;
    width: auto;
}

/* --- Top header actions — center vertically in full column height ---
   The column stretches to match the brand row height, but its inner
   flex child only wraps the button content. This ensures true centering. */
.public-header-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* Prevent horizontal overflow. `clip` does not make body a scroll container, so
   position: sticky still pins to the viewport; `hidden` is the fallback where clip is unsupported. */
html, body {
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100vw;
}

/* --- Top header (logo/title/actions) --- */
@media (max-width: 991px) {
    .public-top-header .col-md-1 {
        display: none;
    }
    .public-top-header .row.col-md-10 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
    }
    .public-header-brand,
    .public-header-actions {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .public-header-actions {
        margin-top: 10px;
    }
    .public-header-actions .justify-content-end {
        justify-content: flex-start !important;
    }
}

@media (max-width: 575px) {
    .public-header-brand .d-flex.gap-3 {
        flex-wrap: wrap;
    }
    .public-header-brand img {
        height: 36px !important;
        width: auto !important;
    }
    .public-header-brand .fs-16-24-500 {
        font-size: clamp(12px, 3.5vw, 14px);
        line-height: 1.3;
    }
    .public-header-actions .w-120px,
    .public-header-actions .w-170px {
        width: auto !important;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* --- Tablet (max-width: 991px) --- */
@media (max-width: 991px) {
    /* Column classes - full width on tablet */
    .col-md-public-site-1,
    .col-md-public-site-2,
    .col-md-public-site-3,
    .col-md-public-site-4,
    .col-md-public-site-5,
    .col-md-public-site-6,
    .col-md-public-site-7 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Responsive typography - fluid scaling */
    .fs-18-24-bold {
        font-size: clamp(16px, 2.5vw, 18px);
    }
    .fs-16-24-400 {
        font-size: clamp(15px, 2.2vw, 18px);
    }
    .fs-16-20-600 {
        font-size: clamp(14px, 2vw, 16px);
    }
    .fs-22-30-bold-white {
        font-size: clamp(18px, 3vw, 22px);
    }
    .fs-18-300-white {
        font-size: clamp(16px, 2.5vw, 18px);
    }
    .d-common-font {
        font-size: clamp(13px, 2vw, 14px) !important;
    }
}

/* --- Mobile Accordion (Tabs → Accordion) --- */
.mobile-accordion-input {
    display: none;
}

/* Other Information section - stack on mobile */
@media (max-width: 767px) {
    .bg-other-information .d-flex {
        flex-direction: column;
    }
    .bg-other-information .col-md-3,
    .bg-other-information .col-md-9 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .bg-other-information .col-md-3 {
        margin-bottom: 15px;
    }
}
.mobile-accordion-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.mobile-accordion-label:hover {
    background-color: #e9ecef;
}
.mobile-accordion-label i.fa-chevron-down {
    transition: transform 0.3s ease;
}
.mobile-accordion-input:checked + .mobile-accordion-label {
    background-color: #ECFDF8;
    border-color: rgba(1, 87, 60, 1);
    border-radius: 5px 5px 0 0;
    margin-bottom: 0;
}
.mobile-accordion-input:checked + .mobile-accordion-label i.fa-chevron-down {
    transform: rotate(180deg);
}
.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 0 15px;
    background-color: #ffffff;
}
.mobile-accordion-input:checked + .mobile-accordion-label + .mobile-accordion-content {
    max-height: 500px;
    padding: 15px;
}

/* --- Hamburger Menu & Offcanvas Drawer --- */
@media (max-width: 991px) {
    .nav-mobile-bar {
        background-color: #01573C;
    }
}
.hamburger-btn {
    border: none;
    padding: 8px 12px;
    margin-right: 10px;
}
.hamburger-btn .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Offcanvas drawer styling */
.nav-offcanvas {
    width: 280px;
    background-color: #ffffff;
}
.nav-offcanvas-header {
    background-color: #01573C;
    color: #ffffff;
    padding: 1rem 1.25rem;
}
.nav-offcanvas-logo {
    height: 40px;
    width: auto;
}
.nav-offcanvas-body {
    padding: 0;
}
.nav-offcanvas-item {
    border-bottom: 1px solid rgba(185, 204, 199, 0.5);
}
.nav-offcanvas .nav-offcanvas-item .nav-link {
    color: #212529 !important;
    font-weight: 500;
    padding: 12px 20px;
    transition: background-color 0.2s ease;
}
.nav-offcanvas .nav-offcanvas-item .nav-link:hover,
.nav-offcanvas .nav-offcanvas-item.active .nav-link {
    background-color: #ECFDF8;
    color: #01573C !important;
}

/* --- Mobile (max-width: 767px) --- */
@media (max-width: 767px) {
    /* Ensure full-width stacking on mobile */
    .col-md-public-site-1,
    .col-md-public-site-2,
    .col-md-public-site-3,
    .col-md-public-site-4,
    .col-md-public-site-5,
    .col-md-public-site-6,
    .col-md-public-site-7 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Responsive typography - mobile sizes */
    .fs-18-24-bold {
        font-size: clamp(14px, 4vw, 16px);
    }
    .fs-16-24-400 {
        font-size: clamp(13px, 3.5vw, 15px);
    }
    .fs-16-20-600 {
        font-size: clamp(13px, 3.5vw, 15px);
    }
    .fs-22-30-bold-white {
        font-size: clamp(16px, 5vw, 20px);
    }
    .fs-18-300-white {
        font-size: clamp(14px, 4vw, 16px);
    }
    .d-common-font {
        font-size: clamp(12px, 3vw, 14px) !important;
    }

    /* Carousel responsive */
    .carousel-item img {
        height: auto !important;
        min-height: 200px;
    }
    .carousel-caption {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .carousel-caption .btn {
        font-size: 14px;
        padding: 5px 15px;
    }
    .carousel-indicators {
        top: 85%;
    }
    .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
    }
    .carousel-indicators [data-bs-target].active {
        width: 24px;
        height: 8px;
    }

    /* Tabs responsive */
    .custom-tabs-container label {
        width: 100% !important;
        margin-bottom: 5px;
    }
    .container-tab {
        white-space: normal;
    }

    /* Downloads table responsive */
    .download-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px 15px 12px;
    }
    .download-header .col-md-4 {
        width: 100%;
    }
    .download-header .search-box-download-tab {
        width: 100%;
    }
    .download-header .search-box-download-tab input[type="text"] {
        min-width: 0;
    }
    .table-responsive {
        border: none;
    }

    /* Tutorial cards responsive */
    .custom-tab-content .d-flex {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    .custom-tab-content .tutorial-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 !important;
    }
    .custom-tab-content .tutorial-card .card-img-top {
        height: 180px;
    }
    .custom-tab-link {
        font-size: clamp(12px, 3vw, 14px);
        padding: 6px 12px;
    }

    /* Tutorials tab (Tutorials nav section) responsive */
    .tutorial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .tutorial-header .col-md-8,
    .tutorial-header .col-md-4 {
        width: 100%;
    }
    .tutorial-tag-list {
        flex-wrap: wrap;
        gap: 8px;
    }
    .tutorial-tag-list .tutorial-card-capsule-div {
        font-size: clamp(12px, 3vw, 14px);
        white-space: nowrap;
    }
    .tutorial-list .d-flex {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    .tutorial-list .tutorial-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 !important;
    }
    .tutorial-list .tutorial-card .card-img-top {
        height: 180px;
    }

    /* Global mobile padding reduction */
    .px-5 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* About-us entity badges */
    .about-badges .bg-capsule-div-grey {
        flex: 0 0 auto;
    }
}

/* --- Public application status lookup --- */
.app-status-row {
    padding-top: 8px;
}

.app-status-label {
    color: #5b6670;
}

/* Registration numbers and long entity names have no natural break points */
.app-status-value,
.global-error {
    overflow-wrap: anywhere;
}

.app-status-note {
    font-size: clamp(12px, 3vw, 13px);
    line-height: 1.5;
}

@media (max-width: 575px) {
    .app-status-label {
        font-weight: 600;
    }

    .app-status-value {
        padding-bottom: 4px;
    }

    /* Stacked label/value pairs need separation that the two-column layout gets from its gutter */
    .app-status-row + .app-status-row {
        border-top: 1px solid #eef1f3;
        margin-top: 4px;
    }
}

/* Public page hero background - root-relative asset URL (Replaced inline style="background-image: url(../images/public-site-background.svg)") */
.public-page-hero-bg { background-image: url(/images/public-site-background.svg); }

/* Home-page illustration band for public pages: the tiling hexagon lattice
   under the same vertical white-to-mint wash the home hero band uses, so the
   floating white cards read against a patterned, not bare, background.
   Painted as plain stacked backgrounds, not positioned layers: a z-index on
   the band's children would trap the nav's offcanvas drawer beneath
   Bootstrap's body-level backdrop on mobile. */
.public-page-band {
    /* Lighter wash than the home band: these bands are only a viewport tall,
       so the home band's near-opaque white ends would hide most of the lattice. */
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--ebrs-color-surface) 55%, transparent) 0%,
            color-mix(in srgb, var(--ebrs-color-accent-subtle) 35%, transparent) 40%,
            color-mix(in srgb, var(--ebrs-color-accent-subtle) 35%, transparent) 70%,
            color-mix(in srgb, var(--ebrs-color-surface) 55%, transparent) 100%),
        url(/images/public-site-background.svg) center top / 200px 201px repeat;
}

/* Form pages stretch the band between nav and footer so a short card sits
   in the middle of the viewport instead of hugging the nav. */
body:has(> .public-page-band) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:has(> .public-page-band) > .public-page-band {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.public-form-stage {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ebrs-space-lg);
    padding: clamp(24px, 6vh, 64px) var(--ebrs-space-md);
    /* Stage is a <main>; the app shell paints every main with the canvas colour */
    background: transparent;
}

/* Standard public form card: header (title + one-line purpose), divider,
   fields, then the action row. Results render as a second card below. */
.public-form-card {
    width: 100%;
    max-width: 560px;
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(21, 25, 24, .04), 0 12px 32px -12px rgba(21, 25, 24, .14);
    font-family: var(--ebrs-font-sans);
    color: var(--ebrs-color-fg);
}

.public-form-card--wide {
    max-width: 680px;
}

.public-form-card__header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid var(--ebrs-color-border);
}

.public-form-card__title {
    margin: 0;
    font-size: var(--ebrs-font-size-xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: 1.3;
    color: var(--ebrs-color-fg-strong);
    text-wrap: balance;
}

.public-form-card__subtitle {
    margin: 6px 0 0;
    font-size: var(--ebrs-font-size-md);
    line-height: 1.5;
    color: var(--ebrs-color-fg-muted);
}

.public-form-card__link {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    font-size: var(--ebrs-font-size-md);
    font-weight: var(--ebrs-font-weight-medium);
    color: var(--ebrs-color-accent);
    text-decoration: none;
}

.public-form-card__link:hover {
    color: var(--ebrs-color-accent-hover);
    text-decoration: underline;
}

.public-form-card__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 32px 28px;
}

.public-form-card__actions {
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid var(--ebrs-color-border);
}

.public-form-card .form-label {
    margin-bottom: 6px;
    font-size: var(--ebrs-font-size-md);
    font-weight: var(--ebrs-font-weight-medium);
    line-height: 1.4;
    color: var(--ebrs-color-fg);
}

.public-form-card .form-label .required {
    color: var(--ebrs-color-danger);
}

.public-form-card .form-control,
.public-form-card .form-select {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--ebrs-color-fg-strong);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: 8px;
    box-shadow: var(--ebrs-shadow-xs);
    transition: border-color .15s ease-out, box-shadow .15s ease-out;
}

.public-form-card .form-select {
    padding-right: 40px;
}

.public-form-card textarea.form-control {
    min-height: 128px;
}

.public-form-card .form-control::placeholder {
    color: var(--ebrs-color-fg-subtle);
}

.public-form-card .form-control:focus,
.public-form-card .form-select:focus {
    border-color: var(--ebrs-color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ebrs-color-accent) 18%, transparent);
    outline: none;
}

.public-form-card .form-hint {
    margin: 6px 0 0;
    font-size: var(--ebrs-font-size-sm);
    line-height: 1.45;
    color: var(--ebrs-color-fg-muted);
}

.public-form-submit {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-on-accent);
    background: var(--ebrs-color-accent);
    border: 1px solid var(--ebrs-color-accent);
    border-radius: 8px;
    transition: background-color .15s ease-out, border-color .15s ease-out;
}

.public-form-submit:hover,
.public-form-submit:focus-visible {
    color: var(--ebrs-color-fg-on-accent);
    background: var(--ebrs-color-accent-hover);
    border-color: var(--ebrs-color-accent-hover);
}

.public-form-submit:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ebrs-color-accent) 25%, transparent);
}

/* btn-outline-green forces a 2px radius with !important */
.public-form-secondary {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: var(--ebrs-font-weight-semibold);
    border-radius: 8px !important;
}

@media (max-width: 575.98px) {
    .public-form-card__header {
        padding: 22px 20px 16px;
    }

    .public-form-card__body {
        padding: 20px 20px 24px;
    }
}

/* --- Shared main column for public content pages ---
   Column width and gutter come from home-v2.css so every page lines up with
   the home page; everything visual is on EBRS tokens. */
.public-page-main {
    width: 100%;
    max-width: var(--home-container);
    margin: 0 auto;
    padding: var(--home-section-y) var(--home-gutter) var(--ebrs-space-3xl);
    /* The app shell paints every main with the canvas colour */
    background: transparent;
    font-family: var(--ebrs-font-sans);
    color: var(--ebrs-color-fg);
}

/* --- Shared page header (h1 + intro) for public content pages --- */
.public-page-header {
    margin-bottom: var(--ebrs-space-lg);
}

.public-page-header__title {
    margin: 0 0 var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-3xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

/* The band behind is a tinted lattice, not white, so body copy stays on fg rather than fg-muted */
.public-page-header__intro {
    max-width: 720px;
    margin: 0;
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

/* --- Contacts page: find your office --- */

.contacts-district-form {
    margin-bottom: var(--ebrs-space-lg);
    padding: var(--ebrs-space-md);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-lg);
}

.contacts-district-form__label {
    display: block;
    margin-bottom: var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-strong);
}

.contacts-district-form__row {
    display: flex;
    gap: var(--ebrs-space-xs);
}

/* 16px also stops iOS zooming the page on focus */
.contacts-district-form__select {
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--ebrs-control-height-lg);
    border-color: var(--ebrs-color-border-strong);
    color: var(--ebrs-color-fg-strong);
    font-size: var(--ebrs-font-size-lg);
}

.contacts-district-form__select:focus {
    border-color: var(--ebrs-color-accent);
    box-shadow: var(--ebrs-focus-ring);
}

.contacts-district-form__submit {
    flex: 0 0 auto;
    min-height: var(--ebrs-control-height-lg);
    padding: 0 var(--ebrs-space-md);
    border: 0;
    border-radius: var(--ebrs-radius-sm);
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    transition: background var(--ebrs-transition-fast);
}

.contacts-district-form__submit:hover {
    background: var(--ebrs-color-accent-hover);
}

.contacts-result__message {
    display: flex;
    align-items: flex-start;
    gap: var(--ebrs-space-sm);
    margin: 0 0 var(--ebrs-space-lg);
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    border: 1px solid var(--ebrs-color-border-strong);
    border-left: 4px solid var(--ebrs-color-accent);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-surface);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

.contacts-result__message i {
    padding-top: var(--ebrs-space-2xs);
    color: var(--ebrs-color-accent);
}

.contacts-result__message--missing {
    border-left-color: var(--ebrs-color-warning);
}

.contacts-result__message--missing i {
    color: var(--ebrs-color-fg-muted);
}

.contacts-offices__title {
    margin: 0 0 var(--ebrs-space-2xs);
    font-size: var(--ebrs-font-size-xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

/* The band behind is a tinted lattice, not white, so body copy stays on fg rather than fg-muted */
.contacts-offices__intro {
    margin: 0 0 var(--ebrs-space-md);
    font-size: var(--ebrs-font-size-md);
    line-height: var(--ebrs-line-base);
}

.contacts-office-list {
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-lg);
}

.contacts-office-list li + li {
    border-top: 1px solid var(--ebrs-color-border);
}

.contacts-office-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--ebrs-space-sm);
    min-height: var(--ebrs-space-3xl);
    padding: var(--ebrs-space-sm) var(--ebrs-space-md) var(--ebrs-space-sm) var(--ebrs-space-lg);
    color: var(--ebrs-color-fg-strong);
    text-decoration: none;
    transition: background var(--ebrs-transition-fast);
}

.contacts-office-link:hover {
    background: var(--ebrs-color-surface-sunken);
    color: var(--ebrs-color-fg-strong);
}

/* Inset so the ring isn't clipped by the list's rounded overflow */
.contacts-office-link:focus-visible {
    outline-offset: -4px;
}

.contacts-office-link__text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.contacts-office-link__name {
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
}

.contacts-office-link__area {
    margin-top: var(--ebrs-space-2xs);
    font-size: var(--ebrs-font-size-md);
}

.contacts-office-link__meta {
    margin-top: var(--ebrs-space-3xs);
    font-size: var(--ebrs-font-size-md);
    color: var(--ebrs-color-fg-muted);
}

.contacts-office-link__chevron {
    color: var(--ebrs-color-fg-muted);
    font-size: var(--ebrs-font-size-sm);
}

.contacts-office-link--selected,
.contacts-office-link--selected:hover {
    background: var(--ebrs-color-accent-subtle);
    color: var(--ebrs-color-accent-emphasis);
}

.contacts-office-link--selected::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--ebrs-color-accent);
}

/* fg-muted is AA on white only, not on the tinted selection */
.contacts-office-link--selected .contacts-office-link__meta,
.contacts-office-link--selected .contacts-office-link__chevron {
    color: var(--ebrs-color-fg);
}

.contacts-back {
    display: inline-flex;
    align-items: center;
    gap: var(--ebrs-space-xs);
    min-height: var(--ebrs-control-height-lg);
    margin-bottom: var(--ebrs-space-xs);
    color: var(--ebrs-color-accent-emphasis);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    text-decoration: none;
}

.contacts-back:hover {
    color: var(--ebrs-color-accent-hover);
    text-decoration: underline;
}

.contacts-detail {
    padding: var(--ebrs-space-lg);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-top: 3px solid var(--ebrs-color-accent);
    border-radius: var(--ebrs-radius-lg);
}

.contacts-detail__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ebrs-space-md);
    padding-bottom: var(--ebrs-space-md);
    border-bottom: 1px solid var(--ebrs-color-border);
}

.contacts-detail__title {
    margin: 0;
    font-size: var(--ebrs-font-size-2xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

.contacts-directions {
    display: inline-flex;
    align-items: center;
    gap: var(--ebrs-space-xs);
    min-height: var(--ebrs-control-height-lg);
    padding: 0 var(--ebrs-space-md);
    border-radius: var(--ebrs-radius-sm);
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    text-decoration: none;
    transition: background var(--ebrs-transition-fast);
}

.contacts-directions:hover {
    background: var(--ebrs-color-accent-hover);
    color: var(--ebrs-color-fg-on-accent);
}

/* auto-fit rather than breakpoints: the panel's width depends on the list beside it, not the viewport */
.contacts-detail__contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--ebrs-space-md) var(--ebrs-space-lg);
    margin: 0;
    padding: var(--ebrs-space-lg) 0;
    font-style: normal;
}

.contacts-contact {
    display: flex;
    align-items: flex-start;
    gap: var(--ebrs-space-sm);
    min-width: 0;
}

.contacts-contact--wide {
    grid-column: 1 / -1;
}

.contacts-contact__icon {
    display: flex;
    flex: 0 0 var(--ebrs-control-height-lg);
    align-items: center;
    justify-content: center;
    height: var(--ebrs-control-height-lg);
    border-radius: 50%;
    background: var(--ebrs-color-accent-subtle);
    color: var(--ebrs-color-accent);
    font-size: var(--ebrs-font-size-lg);
}

.contacts-contact__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contacts-contact__label {
    font-size: var(--ebrs-font-size-sm);
    font-weight: var(--ebrs-font-weight-semibold);
    letter-spacing: var(--ebrs-tracking-wide);
    text-transform: uppercase;
    color: var(--ebrs-color-fg-muted);
}

.contacts-contact__value {
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    overflow-wrap: anywhere;
}

.contacts-link {
    align-self: flex-start;
    color: var(--ebrs-color-accent);
    font-weight: var(--ebrs-font-weight-medium);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--ebrs-color-accent) 40%, transparent);
    text-underline-offset: 3px;
}

/* A phone number or email split over two lines reads as two values */
.contacts-contact__value.contacts-link {
    white-space: nowrap;
}

.contacts-link:hover {
    color: var(--ebrs-color-accent-hover);
    text-decoration-color: currentColor;
}

.contacts-coverage {
    padding-top: var(--ebrs-space-lg);
    border-top: 1px solid var(--ebrs-color-border);
}

.contacts-coverage__title {
    margin: 0 0 var(--ebrs-space-sm);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-strong);
}

/* Columns read top to bottom, so the official order survives the wrap */
.contacts-districts {
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: var(--ebrs-space-lg);
    list-style: none;
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

.contacts-district {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ebrs-space-xs);
    padding: var(--ebrs-space-xs) var(--ebrs-space-xs);
    border-bottom: 1px solid var(--ebrs-color-border);
    break-inside: avoid;
}

.contacts-district--match {
    background: var(--ebrs-color-accent-subtle);
    color: var(--ebrs-color-accent-emphasis);
    font-weight: var(--ebrs-font-weight-semibold);
}

.contacts-district__mark {
    color: var(--ebrs-color-accent);
}

/* Rendered on every row so the script only toggles a class; hidden from assistive tech too unless matched */
.contacts-district:not(.contacts-district--match) .contacts-district__mark {
    display: none;
}

.contacts-coverage__summary {
    margin: var(--ebrs-space-md) 0 0;
    font-size: var(--ebrs-font-size-md);
    line-height: var(--ebrs-line-base);
    color: var(--ebrs-color-fg-muted);
}

/* Phone: a drill-down. The server marks the finder --list or --detail and only one panel shows. */
@media (max-width: 767.98px) {
    .contacts-finder--list .contacts-details,
    .contacts-finder--detail .contacts-offices {
        display: none;
    }

    .contacts-detail {
        padding: var(--ebrs-space-md);
    }
}

/* Tablet and up: list and detail side by side, so a selection is always shown */
@media (min-width: 768px) {
    .contacts-finder {
        display: grid;
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
        gap: var(--ebrs-space-lg);
        align-items: start;
    }

    .contacts-back {
        display: none;
    }
}

@media (min-width: 1200px) {
    .contacts-finder {
        grid-template-columns: 340px minmax(0, 1fr);
        gap: var(--ebrs-space-xl);
    }

    .contacts-detail {
        padding: var(--ebrs-space-xl);
    }

    .contacts-districts {
        columns: 3;
    }
}

/* --- About page --- */
.about-section {
    margin-bottom: var(--ebrs-space-lg);
    padding: var(--ebrs-space-lg);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-lg);
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section__title {
    margin: 0 0 var(--ebrs-space-md);
    font-size: var(--ebrs-font-size-2xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

.about-section__text {
    max-width: 720px;
    margin: 0 0 var(--ebrs-space-sm);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

.about-section__text:last-child {
    margin-bottom: 0;
}

.about-entities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--ebrs-space-sm);
    margin: 0 0 var(--ebrs-space-lg);
    padding: 0;
    list-style: none;
}

.about-entity {
    display: flex;
    align-items: center;
    gap: var(--ebrs-space-xs);
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    background: var(--ebrs-color-accent-subtle);
    border: 1px solid var(--ebrs-color-border);
    border-radius: var(--ebrs-radius-md);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-medium);
    color: var(--ebrs-color-fg-strong);
}

.about-entity__icon {
    flex: 0 0 auto;
    color: var(--ebrs-color-accent);
}

.about-acts {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--ebrs-space-sm);
    margin: var(--ebrs-space-sm) 0 0;
    padding: 0;
    list-style: none;
}

.about-act {
    display: flex;
    flex-direction: column;
    gap: var(--ebrs-space-2xs);
    padding: var(--ebrs-space-md);
    border: 1px solid var(--ebrs-color-border);
    border-top: 3px solid var(--ebrs-color-accent);
    border-radius: var(--ebrs-radius-md);
}

.about-act__scope {
    font-size: var(--ebrs-font-size-md);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-accent-emphasis);
}

.about-act__name {
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    color: var(--ebrs-color-fg-strong);
}

@media (max-width: 767.98px) {
    .about-section {
        padding: var(--ebrs-space-md);
    }
}

@media (min-width: 768px) {
    .about-acts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .about-section {
        padding: var(--ebrs-space-xl);
    }
}

/* --- Shared section index for long content pages ---
   Wrapping anchor chips above the body; a sticky column beside it from 992px. Plain links, so it works without JS. */
.public-section-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ebrs-space-lg);
}

.public-section-index {
    padding: var(--ebrs-space-md);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-lg);
}

.public-section-index__title {
    margin: 0 0 var(--ebrs-space-sm);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-strong);
}

.public-section-index__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ebrs-space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-section-index__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--ebrs-control-height-lg);
    padding: 0 var(--ebrs-space-md);
    background: var(--ebrs-color-accent-subtle);
    border: 1px solid var(--ebrs-color-border);
    border-radius: var(--ebrs-radius-pill);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-medium);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-accent-emphasis);
    text-decoration: none;
    transition: background-color var(--ebrs-transition-fast), color var(--ebrs-transition-fast);
}

.public-section-index__link:hover {
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
}

.public-section-index__link:focus-visible {
    outline: none;
    box-shadow: var(--ebrs-focus-ring);
}

@media (min-width: 992px) {
    .public-section-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        align-items: start;
    }

    .public-section-index {
        position: sticky;
        top: var(--ebrs-space-md);
    }

    .public-section-index__list {
        flex-direction: column;
        gap: var(--ebrs-space-2xs);
    }

    .public-section-index__link {
        display: flex;
        padding: var(--ebrs-space-xs) var(--ebrs-space-sm);
        background: transparent;
        border-color: transparent;
        border-radius: var(--ebrs-radius-md);
        color: var(--ebrs-color-fg);
    }
}

/* --- Shared catalogue table (publicTable fragment) --- */
.public-table-wrap {
    margin: 0 0 var(--ebrs-space-md);
    overflow-x: auto;
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-md);
}

.public-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    color: var(--ebrs-color-fg);
}

.public-table th {
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    background: var(--ebrs-color-accent-subtle);
    border-bottom: 1px solid var(--ebrs-color-border-strong);
    font-weight: var(--ebrs-font-weight-semibold);
    text-align: left;
    vertical-align: bottom;
    color: var(--ebrs-color-fg-strong);
}

.public-table td {
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    border-top: 1px solid var(--ebrs-color-border);
    vertical-align: top;
}

.public-table tbody tr:nth-child(even) {
    background: var(--ebrs-color-surface-sunken);
}

/* Phone: each row becomes a card of label/value pairs, labelled from data-label, so nothing scrolls sideways */
@media (max-width: 767.98px) {
    .public-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .public-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .public-table,
    .public-table tbody,
    .public-table tr,
    .public-table td {
        display: block;
    }

    .public-table tr,
    .public-table tbody tr:nth-child(even) {
        margin-bottom: var(--ebrs-space-sm);
        background: var(--ebrs-color-surface);
        border: 1px solid var(--ebrs-color-border-strong);
        border-radius: var(--ebrs-radius-md);
    }

    .public-table td {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        gap: var(--ebrs-space-sm);
    }

    .public-table td:first-child {
        border-top: 0;
    }

    .public-table td::before {
        content: attr(data-label);
        font-weight: var(--ebrs-font-weight-semibold);
        color: var(--ebrs-color-fg-strong);
    }
}

/* --- Fees page --- */
.fees-section {
    margin-bottom: var(--ebrs-space-lg);
    padding: var(--ebrs-space-lg);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-lg);
    scroll-margin-top: var(--ebrs-space-md);
}

.fees-section:last-child {
    margin-bottom: 0;
}

.fees-section__title {
    margin: 0 0 var(--ebrs-space-md);
    font-size: var(--ebrs-font-size-2xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

.fees-section__subtitle {
    margin: var(--ebrs-space-lg) 0 var(--ebrs-space-sm);
    font-size: var(--ebrs-font-size-xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

.fees-section__title + .fees-section__subtitle {
    margin-top: 0;
}

.fees-section__note,
.fees-list {
    margin: 0 0 var(--ebrs-space-md);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

.fees-section__link {
    color: var(--ebrs-color-accent-emphasis);
    text-decoration: underline;
}

.fees-section__link:focus-visible {
    outline: none;
    border-radius: var(--ebrs-radius-xs);
    box-shadow: var(--ebrs-focus-ring);
}

.fees-list {
    padding-left: var(--ebrs-space-lg);
}

.fees-list__item + .fees-list__item {
    margin-top: var(--ebrs-space-xs);
}

.fees-list--nested {
    margin: var(--ebrs-space-xs) 0 0;
}

.fees-list__item .public-table-wrap {
    margin: var(--ebrs-space-sm) 0 0;
}

@media (max-width: 767.98px) {
    .fees-section {
        padding: var(--ebrs-space-md);
    }
}

/* --- FAQ page --- */
.faq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ebrs-space-sm);
    margin-bottom: var(--ebrs-space-lg);
}

.faq-action {
    display: inline-flex;
    align-items: center;
    min-height: var(--ebrs-control-height-lg);
    padding: 0 var(--ebrs-space-md);
    border: 1px solid var(--ebrs-color-accent);
    border-radius: var(--ebrs-radius-sm);
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    text-decoration: none;
    transition: background var(--ebrs-transition-fast);
}

.faq-action:hover {
    background: var(--ebrs-color-accent-hover);
    color: var(--ebrs-color-fg-on-accent);
}

.faq-action--secondary,
.faq-action--secondary:hover {
    background: var(--ebrs-color-surface);
    color: var(--ebrs-color-accent-emphasis);
}

.faq-action--secondary:hover {
    background: var(--ebrs-color-accent-subtle);
}

.faq-action:focus-visible,
.faq-item__link:focus-visible,
.faq-contact__email:focus-visible {
    outline: none;
    box-shadow: var(--ebrs-focus-ring);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--ebrs-space-sm);
    margin-bottom: var(--ebrs-space-lg);
}

.faq-item {
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-lg);
    scroll-margin-top: var(--ebrs-space-md);
}

.faq-item[open] {
    border-color: var(--ebrs-color-accent);
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ebrs-space-md);
    padding: var(--ebrs-space-md) var(--ebrs-space-lg);
    border-radius: var(--ebrs-radius-lg);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
    cursor: pointer;
    list-style: none;
}

/* The custom chevron replaces the browser's disclosure triangle */
.faq-item__question::-webkit-details-marker {
    display: none;
}

/* Inset so the ring isn't clipped by the item's rounded border */
.faq-item__question:focus-visible {
    outline: none;
    box-shadow: inset var(--ebrs-focus-ring);
}

.faq-item__chevron {
    flex: 0 0 auto;
    color: var(--ebrs-color-accent);
    transition: transform var(--ebrs-transition-fast);
}

.faq-item[open] .faq-item__chevron {
    transform: rotate(180deg);
}

.faq-item__answer {
    padding: 0 var(--ebrs-space-lg) var(--ebrs-space-lg);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

.faq-item__text,
.faq-item__list {
    max-width: 720px;
    margin: 0 0 var(--ebrs-space-sm);
}

.faq-item__answer > :last-child {
    margin-bottom: 0;
}

.faq-item__list {
    padding-left: var(--ebrs-space-lg);
}

.faq-item__list li + li {
    margin-top: var(--ebrs-space-2xs);
}

.faq-item__list-title {
    margin: var(--ebrs-space-md) 0 var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-md);
    font-weight: var(--ebrs-font-weight-semibold);
    letter-spacing: var(--ebrs-tracking-wide);
    color: var(--ebrs-color-fg-strong);
}

.faq-item__link {
    color: var(--ebrs-color-accent-emphasis);
    font-weight: var(--ebrs-font-weight-medium);
    text-decoration: underline;
}

.faq-item__link:hover {
    color: var(--ebrs-color-accent-hover);
}

.faq-contact {
    padding: var(--ebrs-space-lg);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border-strong);
    border-top: 3px solid var(--ebrs-color-accent);
    border-radius: var(--ebrs-radius-lg);
}

.faq-contact__title {
    margin: 0 0 var(--ebrs-space-sm);
    font-size: var(--ebrs-font-size-2xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

.faq-contact__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ebrs-space-sm) var(--ebrs-space-lg);
    font-size: var(--ebrs-font-size-lg);
}

/* An email split over two lines reads as two values */
.faq-contact__email {
    display: inline-flex;
    align-items: center;
    gap: var(--ebrs-space-xs);
    color: var(--ebrs-color-accent-emphasis);
    font-weight: var(--ebrs-font-weight-medium);
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .faq-item__question {
        padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    }

    .faq-item__answer {
        padding: 0 var(--ebrs-space-md) var(--ebrs-space-md);
    }

    .faq-contact {
        padding: var(--ebrs-space-md);
    }
}

/* --- Auth pages: one centred white card on the band --- */
.auth-stage {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ebrs-space-2xl) var(--ebrs-space-md);
    /* The app shell paints every main with the canvas colour */
    background: transparent;
    font-family: var(--ebrs-font-sans);
    color: var(--ebrs-color-fg);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: var(--ebrs-space-xl);
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border);
    border-radius: var(--ebrs-radius-lg);
    box-shadow: var(--ebrs-shadow-lg);
}

.auth-card--wide {
    max-width: 720px;
}

.auth-card__header {
    margin-bottom: var(--ebrs-space-lg);
}

.auth-card__eyebrow {
    display: inline-block;
    margin: 0 0 var(--ebrs-space-sm);
    padding: var(--ebrs-space-3xs) var(--ebrs-space-xs);
    border-radius: var(--ebrs-radius-pill);
    background: var(--ebrs-color-accent-subtle);
    color: var(--ebrs-color-accent-emphasis);
    font-size: var(--ebrs-font-size-xs);
    font-weight: var(--ebrs-font-weight-semibold);
    letter-spacing: var(--ebrs-tracking-wide);
    text-transform: uppercase;
}

.auth-card__title {
    margin: 0 0 var(--ebrs-space-2xs);
    font-size: var(--ebrs-font-size-2xl);
    font-weight: var(--ebrs-font-weight-semibold);
    line-height: var(--ebrs-line-tight);
    color: var(--ebrs-color-fg-strong);
}

.auth-card__subtitle {
    margin: 0;
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    color: var(--ebrs-color-fg-muted);
}

.auth-card__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ebrs-space-2xs);
    margin: var(--ebrs-space-lg) 0 0;
    padding-top: var(--ebrs-space-lg);
    border-top: 1px solid var(--ebrs-color-border);
    font-size: var(--ebrs-font-size-lg);
}

.auth-alert {
    margin: 0 0 var(--ebrs-space-md);
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    border: 1px solid var(--ebrs-color-danger);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-danger-subtle);
    color: var(--ebrs-color-danger);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--ebrs-space-md);
}

.auth-field__label {
    display: block;
    margin-bottom: var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-medium);
    color: var(--ebrs-color-fg-strong);
}

/* 16px also stops iOS zooming the page on focus */
.auth-field__input {
    display: block;
    width: 100%;
    min-height: var(--ebrs-control-height-lg);
    padding: 0 var(--ebrs-space-sm);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-surface);
    color: var(--ebrs-color-fg-strong);
    font-size: var(--ebrs-font-size-lg);
    transition: border-color var(--ebrs-transition-fast), box-shadow var(--ebrs-transition-fast);
}

.auth-field__input::placeholder {
    color: var(--ebrs-color-fg-subtle);
}

.auth-field__input:focus {
    outline: none;
    border-color: var(--ebrs-color-accent);
    box-shadow: var(--ebrs-focus-ring);
}

/* jQuery validation tags the invalid control with .error */
.auth-field__input.error {
    border-color: var(--ebrs-color-danger);
}

.auth-field__password {
    position: relative;
}

/* Room for the show/hide button inside the field */
.auth-field__password .auth-field__input {
    padding-right: var(--ebrs-space-2xl);
}

/* Two classes to beat the shared .toggle-password positioning in style.css */
.auth-field__password .auth-field__toggle {
    right: var(--ebrs-space-2xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ebrs-control-height-lg);
    height: var(--ebrs-control-height-md);
    padding: 0;
    border: 0;
    border-radius: var(--ebrs-radius-sm);
    background: transparent;
    color: var(--ebrs-color-fg-muted);
    font-size: var(--ebrs-font-size-lg);
}

.auth-field__password .auth-field__toggle:focus-visible {
    outline: none;
    box-shadow: var(--ebrs-focus-ring);
}

.auth-form__forgot {
    align-self: flex-end;
}

.auth-form__submit {
    width: 100%;
    min-height: var(--ebrs-control-height-lg);
    padding: 0 var(--ebrs-space-md);
    border: 0;
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    transition: background var(--ebrs-transition-fast);
}

.auth-form__submit:hover {
    background: var(--ebrs-color-accent-hover);
}

.auth-form__submit:focus-visible {
    outline: none;
    box-shadow: var(--ebrs-focus-ring);
}

.auth-link {
    color: var(--ebrs-color-accent-emphasis);
    font-weight: var(--ebrs-font-weight-medium);
    text-decoration: none;
}

.auth-link:hover {
    color: var(--ebrs-color-accent-emphasis);
    text-decoration: underline;
}

.auth-link:focus-visible {
    outline: none;
    border-radius: var(--ebrs-radius-xs);
    box-shadow: var(--ebrs-focus-ring);
}

.auth-link--button {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

/* Help panel beside a public form card: users coming from the previous RJSC system must use their emailed
   invitation link. Card on the left, panel on the right; stacked with the panel first on narrow screens. */
.auth-stage--with-aside {
    align-items: stretch;
    gap: var(--ebrs-space-xl);
    width: 100%;
    max-width: 1240px;
    align-self: center;
}

.auth-stage--with-aside > .auth-card {
    flex: 1 1 720px;
    width: auto;
    min-width: 0;
    max-width: 800px;
}

.public-banner {
    flex: 0 0 440px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ebrs-color-border);
    border-top: 4px solid var(--ebrs-color-accent);
    border-radius: var(--ebrs-radius-lg);
    background: var(--ebrs-color-surface);
    box-shadow: var(--ebrs-shadow-lg);
    color: var(--ebrs-color-fg);
    line-height: var(--ebrs-line-base);
}

.public-banner__inner {
    display: flex;
    flex-direction: column;
    gap: var(--ebrs-space-sm);
    padding: var(--ebrs-space-lg);
}

.public-banner__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ebrs-color-accent-subtle);
    color: var(--ebrs-color-accent-emphasis);
    font-size: 1rem;
}

.public-banner__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* English first, Bangla below, set apart by a rule */
.public-banner__lang--next {
    margin-top: var(--ebrs-space-md);
    padding-top: var(--ebrs-space-md);
    border-top: 1px solid var(--ebrs-color-border);
}

.public-banner__title {
    margin: 0 0 var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-bold);
    color: var(--ebrs-color-accent-emphasis);
}

.public-banner__text {
    margin: 0;
    font-size: var(--ebrs-font-size-md);
}

/* The old email is the part people must not miss, so this box alone carries the warning colour */
.public-banner__key {
    margin-top: var(--ebrs-space-sm);
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    border-left: 4px solid var(--ebrs-color-warning);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-warning-subtle);
}

.public-banner__key-email {
    margin: var(--ebrs-space-xs) 0;
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-bold);
    color: var(--ebrs-color-fg);
}

.public-banner__hint {
    margin: var(--ebrs-space-sm) 0 0;
    font-size: var(--ebrs-font-size-sm);
    color: var(--ebrs-color-fg-muted);
}

/* Side by side: the panel is exactly as tall as the signup card. Its content is taken out of flow so it can
   never make the row taller than the card, and scrolls inside the panel if the card is shorter than the text. */
@media (min-width: 992px) {
    .public-banner {
        min-height: 320px;
    }

    .public-banner__inner {
        position: absolute;
        inset: 0;
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .auth-stage--with-aside {
        flex-direction: column;
        align-items: center;
    }

    .auth-stage--with-aside > .auth-card,
    .public-banner {
        flex: 0 0 auto;
        width: 100%;
        max-width: 720px;
    }

    .public-banner {
        order: -1;
    }
}

.auth-alert--success {
    border-color: var(--ebrs-color-success);
    background: var(--ebrs-color-success-subtle);
    color: var(--ebrs-color-accent-emphasis);
}

/* signup-widget.js needs the .general-error hook; style.css's look for it is overridden here */
.auth-alert.general-error {
    margin: 0;
    border-color: var(--ebrs-color-danger);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-danger-subtle);
    color: var(--ebrs-color-danger);
    font-weight: var(--ebrs-font-weight-regular);
    text-align: left;
}

/* auto-fit: a field hidden by the nationality switch leaves its partner full width */
.auth-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--ebrs-space-md);
}

.auth-field__label .red {
    margin-left: var(--ebrs-space-3xs);
    color: var(--ebrs-color-danger);
}

.auth-field__hint {
    font-size: var(--ebrs-font-size-md);
    font-weight: var(--ebrs-font-weight-regular);
    color: var(--ebrs-color-fg-muted);
}

/* jQuery validation inserts div.error after the control; the server renders .auth-field__error */
.auth-field div.error,
.auth-field__error {
    display: block;
    margin-top: var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-md);
    color: var(--ebrs-color-danger);
}

.auth-field__input--file {
    padding: var(--ebrs-space-2xs);
}

.auth-field__input--code {
    font-family: var(--ebrs-font-mono);
    font-size: var(--ebrs-font-size-xl);
    letter-spacing: var(--ebrs-space-xs);
    text-align: center;
}

/* Nationality switch: two options, the widget moves .active between them */
.auth-mode {
    display: flex;
    width: 100%;
    padding: var(--ebrs-space-2xs);
    border: 1px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-surface-sunken);
}

.auth-mode .auth-mode__option {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ebrs-control-height-md);
    border-radius: var(--ebrs-radius-sm);
    color: var(--ebrs-color-fg);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-medium);
    cursor: pointer;
    transition: background var(--ebrs-transition-fast);
}

/* Three classes to beat style.css's .btn-group .active underline */
.auth-mode .auth-mode__option.active {
    border-bottom: 0;
    background: var(--ebrs-color-surface);
    box-shadow: var(--ebrs-shadow-sm);
    color: var(--ebrs-color-accent-emphasis);
    font-weight: var(--ebrs-font-weight-semibold);
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: var(--ebrs-space-xs);
}

.auth-check__input {
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: var(--ebrs-space-3xs);
    accent-color: var(--ebrs-color-accent);
    cursor: pointer;
}

.auth-check__input:focus-visible {
    outline: none;
    box-shadow: var(--ebrs-focus-ring);
}

.auth-check__label {
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    cursor: pointer;
}

.auth-form__captcha {
    display: flex;
    justify-content: center;
}

.auth-form__submit:disabled,
.auth-form__submit:disabled:hover {
    background: var(--ebrs-color-border-strong);
    color: var(--ebrs-color-fg-muted);
    opacity: 1;
    cursor: not-allowed;
}

.auth-card__contact {
    color: var(--ebrs-color-fg-strong);
    font-weight: var(--ebrs-font-weight-semibold);
    white-space: nowrap;
}

/* A full address on its own line: kept whole when it fits, broken only when one line can't hold it */
.auth-card__contact--line {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Status card (account activation): illustration, message, restart note */
.auth-status {
    text-align: center;
}

.auth-status__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto var(--ebrs-space-lg);
}

.auth-status__message {
    margin-top: var(--ebrs-space-sm);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    color: var(--ebrs-color-fg);
}

.auth-status__note {
    display: flex;
    gap: var(--ebrs-space-xs);
    margin: var(--ebrs-space-lg) 0 0;
    padding-top: var(--ebrs-space-lg);
    border-top: 1px solid var(--ebrs-color-border);
    font-size: var(--ebrs-font-size-lg);
    line-height: var(--ebrs-line-base);
    text-align: left;
}

.auth-status__note .fa-info-circle {
    margin-top: var(--ebrs-space-2xs);
    color: var(--ebrs-color-fg-muted);
}

/* Password rules checklist: the set-password widgets swap .invalid/.valid on each item as the user types */
.auth-rules {
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    border: 1px solid var(--ebrs-color-border);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-surface-sunken);
}

.auth-rules__title {
    margin: 0 0 var(--ebrs-space-xs);
    font-size: var(--ebrs-font-size-lg);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-strong);
}

.auth-rules__list {
    display: grid;
    gap: var(--ebrs-space-2xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Two classes (plus the state class) to beat style.css's global .valid/.invalid colours and markers */
.auth-rules .auth-rules__item {
    display: flex;
    align-items: flex-start;
    gap: var(--ebrs-space-xs);
    color: var(--ebrs-color-fg);
    font-size: var(--ebrs-font-size-md);
    font-weight: var(--ebrs-font-weight-regular);
    line-height: var(--ebrs-line-base);
    opacity: 1;
}

.auth-rules .auth-rules__item::before {
    content: "";
    position: static;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-top: var(--ebrs-space-3xs);
    border: 2px solid var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-pill);
    background: transparent;
    font-size: var(--ebrs-font-size-2xs);
    line-height: 1;
    opacity: 1;
}

.auth-rules .auth-rules__item.valid {
    color: var(--ebrs-color-accent-emphasis);
    font-weight: var(--ebrs-font-weight-medium);
}

.auth-rules .auth-rules__item.valid::before {
    content: "\2713";
    border-color: var(--ebrs-color-accent);
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
}

@media (max-width: 767.98px) {
    .auth-stage {
        align-items: flex-start;
        padding: var(--ebrs-space-lg) var(--ebrs-space-md);
    }

    .auth-card {
        padding: var(--ebrs-space-lg);
    }

    .public-banner__inner {
        padding: var(--ebrs-space-md);
    }

    /* The 300px Turnstile widget needs the narrower side padding at 375px */
    .auth-card--wide {
        padding: var(--ebrs-space-lg) var(--ebrs-space-md);
    }
}

.public-form-card--document {
    max-width: 960px;
}

.verification-document-viewer {
    height: 75vh;
    min-height: 420px;
}

.verification-document-viewer:fullscreen {
    height: 100vh;
    border-radius: 0;
}

.verification-document-pages {
    padding: 16px 0;
    user-select: none;
}

.verification-document-pages canvas {
    display: block;
    max-width: none;
    height: auto;
    margin: 0 auto 16px;
    background: #fff;
    box-shadow: var(--ebrs-shadow-md);
}

.upload-verification-toggle {
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
}

.upload-verification-outcome {
    padding: 12px 16px;
    border-left: 4px solid var(--ebrs-color-border);
    border-radius: 4px;
}

.upload-verification-outcome--ok {
    border-left-color: var(--ebrs-color-success);
    background: var(--ebrs-color-success-subtle);
}

.upload-verification-outcome--warn {
    border-left-color: var(--ebrs-color-warning);
    background: var(--ebrs-color-warning-subtle);
}

.upload-verification-outcome--bad {
    border-left-color: var(--ebrs-color-danger);
    background: var(--ebrs-color-danger-subtle);
}

.upload-verification-check {
    display: flex;
    align-items: baseline;
    padding: 4px 0;
}

.upload-verification-check--ok i {
    color: var(--ebrs-color-success);
}

.upload-verification-check--warn i {
    color: var(--ebrs-color-warning);
}

.upload-verification-check--bad i {
    color: var(--ebrs-color-danger);
}

.upload-verification-check--info i {
    color: var(--ebrs-color-info);
}

/* Signature panel of a checked upload, laid out like a PDF reader's certificate viewer; the verifier uses these too. */
.upload-signature {
    margin-top: var(--ebrs-space-lg);
    padding-top: var(--ebrs-space-md);
    border-top: 1px solid var(--ebrs-color-border);
}

.upload-signature__fields {
    margin: 0;
}

.upload-signature__row {
    display: grid;
    grid-template-columns: minmax(8rem, 35%) 1fr;
    gap: var(--ebrs-space-sm);
    padding: var(--ebrs-space-xs) 0;
}

.upload-signature__row dt {
    font-weight: var(--ebrs-font-weight-medium);
    color: var(--ebrs-color-fg-muted);
}

.upload-signature__row dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.upload-signature__more {
    margin-top: var(--ebrs-space-sm);
    border: 1px solid var(--ebrs-color-border);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-surface-sunken);
}

.upload-signature__more > summary {
    cursor: pointer;
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-accent-emphasis);
}

.upload-signature__more > :not(summary) {
    margin: 0 var(--ebrs-space-md) var(--ebrs-space-md);
}

.upload-signature__more .upload-signature__more {
    background: var(--ebrs-color-surface);
}

.upload-signature__section-title {
    font-size: var(--ebrs-font-size-sm);
    font-weight: var(--ebrs-font-weight-bold);
    text-transform: uppercase;
    color: var(--ebrs-color-fg-muted);
    margin: var(--ebrs-space-md) 0 var(--ebrs-space-xs);
}

/* A line between a certificate's sections: issued to, issued by, validity, details, fingerprints. */
.upload-signature__section-title:not(:first-child) {
    border-top: 1px solid var(--ebrs-color-border);
    padding-top: var(--ebrs-space-md);
}

.upload-signature__path {
    list-style: none;
    padding-left: 0;
}

/* Each certificate sits under the one that issued it. */
.upload-signature__path > li + li {
    margin-left: var(--ebrs-space-md);
    padding-left: var(--ebrs-space-sm);
    border-left: 2px solid var(--ebrs-color-border-strong);
}

.upload-signature__path > li:nth-child(3) {
    margin-left: calc(2 * var(--ebrs-space-md));
}

.upload-signature__path > li:nth-child(n + 4) {
    margin-left: calc(3 * var(--ebrs-space-md));
}

.upload-signature__name {
    display: block;
    color: var(--ebrs-color-fg-strong);
}

.upload-signature__role {
    display: block;
    font-size: var(--ebrs-font-size-xs);
    font-weight: var(--ebrs-font-weight-medium);
    color: var(--ebrs-color-fg-muted);
}

@media (max-width: 575.98px) {
    .upload-signature__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
