/*
 * Brain Growth Services
 * Public Site Design
 *
 * New public-facing styles live here rather than in the legacy
 * Start Bootstrap stylesheet.
 */

:root {
    --bgs-ink: #211f1c;
    --bgs-paper: #f5f0e6;
    --bgs-paper-light: #fbf9f4;
    --bgs-stone: #8b8174;
    --bgs-gold: #e6aa17;
    --bgs-orange: #df6b22;
    --bgs-red: #a62d24;
    --bgs-border: #d9d0c2;
}

body {
    color: var(--bgs-ink);
    background-color: var(--bgs-paper-light);
}

/* Public navigation */
.navbar {
    background: var(--bgs-paper-light) !important;
    border-bottom: 1px solid var(--bgs-border);
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: var(--bgs-ink) !important;
}
/* ---------- Hero ---------- */

.bgs-hero {
    background: var(--bgs-paper-light);
    overflow: hidden;
}

.bgs-hero-content {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(480px, 1.15fr);
    min-height: calc(100vh - 72px);
}

.bgs-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(3rem, 7vw, 8rem);
    padding-right: clamp(2rem, 5vw, 5rem);
}

.bgs-eyebrow {
    margin: 0 0 1.25rem;
    color: var(--bgs-red);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.bgs-hero h1 {
    max-width: 650px;
    margin: 0;
    color: var(--bgs-ink);
    font-size: clamp(3rem, 5.5vw, 6rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.bgs-hero-lead {
    max-width: 600px;
    margin: 2rem 0 0;
    color: #5f5951;
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.75;
}

.bgs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.25rem;
}

.bgs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.8rem 1.35rem;
    border: 1px solid var(--bgs-ink);
    border-radius: 2px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease,
                transform 160ms ease;
}

.bgs-button:hover {
    transform: translateY(-2px);
}

.bgs-button-primary {
    background: var(--bgs-ink);
    color: var(--bgs-paper-light);
}

.bgs-button-primary:hover {
    background: #000;
    color: #fff;
}

.bgs-button-secondary {
    background: transparent;
    color: var(--bgs-ink);
}

.bgs-button-secondary:hover {
    background: var(--bgs-paper);
    color: var(--bgs-ink);
}

.bgs-founder-line {
    margin: 2.5rem 0 0;
    color: var(--bgs-stone);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.bgs-hero-art {
    min-height: 600px;
}

.bgs-hero-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 900px) {
    .bgs-hero-content {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .bgs-hero-copy {
        padding: 5rem 1.5rem 4rem;
    }

    .bgs-hero h1 {
        max-width: 700px;
    }

    .bgs-hero-art {
        min-height: 0;
    }

    .bgs-hero-art img {
        height: auto;
        object-fit: contain;
    }
}

/* ---------- Approach ---------- */

.bgs-approach {
    background: var(--bgs-paper);
    padding: clamp(5rem, 9vw, 9rem) 0;
}

.bgs-section-shell {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
}

.bgs-section-intro {
    max-width: 780px;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.bgs-section-intro h2 {
    margin: 0;
    color: var(--bgs-ink);
    font-size: clamp(2.4rem, 4.5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.bgs-section-intro > p:last-child {
    max-width: 680px;
    margin: 1.75rem 0 0;
    color: #625c54;
    font-size: 1.08rem;
    line-height: 1.8;
}

.bgs-process-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, .65fr) minmax(0, 1fr);
    align-items: stretch;
    background: var(--bgs-paper-light);
    border: 1px solid var(--bgs-border);
}
.bgs-process-card {
    position: relative;
    min-width: 0;
    padding: clamp(1.75rem, 3.3vw, 3rem);
}
.bgs-process-card:focus-visible { outline: 3px solid var(--bgs-red); outline-offset: -4px; }
.bgs-process-brain { position: relative; min-height: 330px; align-self: center; pointer-events: none; }
.bgs-process-brain::before, .bgs-process-brain::after {
    content: "";
    position: absolute;
    inset: 0;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: opacity .4s ease;
}
.bgs-process-brain::before {
    -webkit-mask-image: url('../images/BGS-brain-silhouette-mask.svg');
    mask-image: url('../images/BGS-brain-silhouette-mask.svg');
    background: #978a79;
    opacity: .18;
}
.bgs-process-brain::after {
    -webkit-mask-image: url('../images/BGS-brain-circuits-mask.svg');
    mask-image: url('../images/BGS-brain-circuits-mask.svg');
    background: #978a79;
    opacity: .36;
}
.bgs-process-grid:has(.bgs-process-static:is(:hover, :focus)) .bgs-process-brain::before {
    background: linear-gradient(90deg, #d69700 0%, #d69700 49.5%, transparent 50%);
    opacity: .9;
}
.bgs-process-grid:has(.bgs-process-dynamic:is(:hover, :focus)) .bgs-process-brain::before {
    background: linear-gradient(90deg, transparent 50%, #a62d24 50.5%, #a62d24 100%);
    opacity: .9;
}
.bgs-process-grid:has(.bgs-process-static:is(:hover, :focus)) .bgs-process-brain::after {
    background: linear-gradient(90deg, #fff 0%, #fff 49%, #a87500 50%, transparent 88%);
    opacity: 1;
    animation: bgs-circuit-flow 3s ease-in-out infinite alternate;
}
.bgs-process-grid:has(.bgs-process-dynamic:is(:hover, :focus)) .bgs-process-brain::after {
    background: linear-gradient(90deg, transparent 12%, #90221b 50%, #fff 51%, #fff 100%);
    opacity: 1;
    animation: bgs-circuit-flow 3s ease-in-out infinite alternate;
}
@keyframes bgs-circuit-flow { from { opacity: .65; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .bgs-process-brain::before, .bgs-process-brain::after { animation: none !important; transition: none; }
}

.bgs-process-label {
    margin: 0 0 0.75rem;
    color: var(--bgs-red);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.bgs-process-card h3 {
    margin: 0 0 1.5rem;
    color: var(--bgs-ink);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.bgs-process-card > p:not(.bgs-process-label) {
    max-width: 500px;
    color: #514c45;
    font-size: 1rem;
    line-height: 1.75;
}

.bgs-process-example {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bgs-border);
}

.bgs-process-note {
    margin: 1rem 0 0;
    color: #625c54;
    font-size: .9rem;
    line-height: 1.6;
}

.bgs-approach-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 3rem;
    margin-top: 3rem;
}

.bgs-approach-footer p {
    max-width: 700px;
    margin: 0;
    color: #514c45;
    font-size: 1.05rem;
    line-height: 1.75;
}

.bgs-text-link {
    flex: 0 0 auto;
    color: var(--bgs-ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--bgs-ink);
    padding-bottom: 0.2rem;
}

.bgs-text-link span {
    margin-left: 0.35rem;
    transition: margin-left 160ms ease;
}

.bgs-text-link:hover {
    color: var(--bgs-red);
    border-color: var(--bgs-red);
}

.bgs-text-link:hover span {
    margin-left: 0.6rem;
}

@media (max-width: 760px) {
    .bgs-section-shell {
        width: min(100% - 2rem, 1180px);
    }

    .bgs-process-grid {
        grid-template-columns: 1fr;
    }

    .bgs-process-brain {
        grid-row: 1;
        width: min(70%, 240px);
        min-height: 240px;
        margin: 1.5rem auto 0;
    }

    .bgs-process-card + .bgs-process-card {
        border-top: 1px solid var(--bgs-border);
    }

    .bgs-approach-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* ---------- Services ---------- */

.bgs-services {
    padding: clamp(5rem, 9vw, 9rem) 0;
    background: var(--bgs-ink);
    color: var(--bgs-paper-light);
}

.bgs-services-heading {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(3rem, 8vw, 8rem);
    align-items: end;
    margin-bottom: clamp(4rem, 7vw, 6rem);
}

.bgs-services .bgs-eyebrow {
    color: var(--bgs-gold);
}

.bgs-services-heading h2 {
    max-width: 700px;
    margin: 0;
    color: var(--bgs-paper-light);
    font-size: clamp(2.5rem, 4.5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.bgs-services-heading > p {
    max-width: 520px;
    margin: 0;
    color: #c9c2b7;
    font-size: 1.05rem;
    line-height: 1.8;
}

.bgs-service-steps {
    border-top: 1px solid #514d47;
}

.bgs-service-step {
    display: grid;
    grid-template-columns: 70px 0.7fr 1.3fr 0.9fr;
    gap: 2rem;
    align-items: center;
    padding: 2.25rem 0;
    border-bottom: 1px solid #514d47;
}

.bgs-step-number {
    margin: 0;
    color: var(--bgs-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.bgs-service-step h3 {
    margin: 0;
    color: var(--bgs-paper-light);
    font-size: clamp(1.6rem, 2.5vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.bgs-service-step > p:not(.bgs-step-number) {
    max-width: 500px;
    margin: 0;
    color: #bbb4aa;
    line-height: 1.7;
}

.bgs-service-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    text-align: right;
}

.bgs-service-detail span {
    color: #aaa297;
    font-size: 0.8rem;
}

.bgs-service-detail strong {
    color: var(--bgs-paper-light);
    font-size: 1rem;
    font-weight: 600;
}

.bgs-services-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
}

.bgs-services-cta p {
    max-width: 520px;
    margin: 0;
    color: #c9c2b7;
    font-size: 1.05rem;
    line-height: 1.7;
}

.bgs-services .bgs-button-primary {
    background: var(--bgs-gold);
    border-color: var(--bgs-gold);
    color: var(--bgs-ink);
}

.bgs-services .bgs-button-primary:hover {
    background: var(--bgs-paper-light);
    border-color: var(--bgs-paper-light);
    color: var(--bgs-ink);
}

@media (max-width: 900px) {
    .bgs-services-heading {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bgs-service-step {
        grid-template-columns: 50px 1fr;
        gap: 1rem 1.5rem;
    }

    .bgs-service-step > p:not(.bgs-step-number) {
        grid-column: 2;
    }

    .bgs-service-detail {
        grid-column: 2;
        align-items: flex-start;
        text-align: left;
        padding-top: 0.5rem;
    }
}

@media (max-width: 600px) {
    .bgs-service-step {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .bgs-service-step > p:not(.bgs-step-number),
    .bgs-service-detail {
        grid-column: 1;
    }

    .bgs-services-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Testimonials ---------- */

/* ---------- Instructional programs ---------- */
.bgs-programs {
    padding: clamp(5rem, 9vw, 9rem) 0;
    background: var(--bgs-paper);
    color: var(--bgs-ink);
}
.bgs-programs-heading { max-width: 780px; margin-bottom: clamp(3rem, 6vw, 5rem); }
.bgs-programs-heading h2 {
    margin: 0;
    color: var(--bgs-ink);
    font-size: clamp(2.4rem, 4.5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -.04em;
    line-height: 1.05;
}
.bgs-programs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--bgs-border);
    background: var(--bgs-border);
}
.bgs-program-card { padding: clamp(1.5rem, 4vw, 3.5rem); background: var(--bgs-paper-light); }
.bgs-program-card h3 {
    margin: 0 0 .75rem;
    color: var(--bgs-red);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
}
.bgs-program-card h4 { margin: 1.5rem 0 .5rem; color: var(--bgs-ink); font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; line-height: 1.3; }
.bgs-program-card p { margin: 0; color: #514c45; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.5; }
.bgs-program-card .bgs-program-meaning { color: var(--bgs-stone); font-size: .95rem; }
@media (max-width: 480px) {
    .bgs-programs-grid { grid-template-columns: 1fr; }
}

.bgs-testimonials {
    padding: clamp(5rem, 9vw, 9rem) 0;
    background: var(--bgs-paper-light);
}

.bgs-testimonial-heading {
    max-width: 750px;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.bgs-testimonial-heading h2 {
    margin: 0;
    color: var(--bgs-ink);
    font-size: clamp(2.5rem, 4.5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.bgs-testimonial-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--bgs-border);
    border: 1px solid var(--bgs-border);
}

/* Fill the final row when there is an odd number of testimonials. */
.bgs-testimonial-grid > .bgs-testimonial:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.bgs-testimonial[hidden], .bgs-testimonial-controls[hidden] { display: none; }

.bgs-testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.bgs-testimonial-controls button {
    border: 1px solid var(--bgs-ink);
    padding: .6rem 1rem;
    background: transparent;
    color: var(--bgs-ink);
    cursor: pointer;
}

.bgs-testimonial-controls button:hover { background: var(--bgs-ink); color: var(--bgs-paper-light); }
.bgs-testimonial-controls button:focus-visible { outline: 3px solid var(--bgs-red); outline-offset: 3px; }
.bgs-testimonial-count { color: #514c45; font-size: .9rem; }

.bgs-testimonial {
    position: relative;
    margin: 0;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    background: var(--bgs-paper);
}

.bgs-quote-mark {
    display: block;
    height: 3.5rem;
    color: var(--bgs-red);
    font-family: Georgia, serif;
    font-size: 5rem;
    line-height: 1;
}

.bgs-testimonial > p {
    margin: 1.5rem 0 2.5rem;
    color: var(--bgs-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.6;
}

.bgs-testimonial footer {
    color: var(--bgs-ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.bgs-testimonial footer span {
    display: block;
    margin-top: 0.2rem;
    color: var(--bgs-stone);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bgs-testimonial-empty {
    max-width: 760px;
    padding: clamp(2.5rem, 5vw, 4rem);
    border: 1px solid var(--bgs-border);
    background: var(--bgs-paper);
}

.bgs-testimonial-empty p {
    margin: 0;
    color: #514c45;
    font-size: 1.15rem;
    line-height: 1.8;
}

@media (max-width: 760px) {
    .bgs-testimonial-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Contact ---------- */

.bgs-contact {
    padding: clamp(5rem, 9vw, 9rem) 0;
    background: var(--bgs-paper);
}

.bgs-contact-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(4rem, 9vw, 9rem);
    align-items: start;
}

.bgs-contact-copy {
    position: sticky;
    top: 7rem;
}

.bgs-contact-copy h2 {
    max-width: 560px;
    margin: 0;
    color: var(--bgs-ink);
    font-size: clamp(2.7rem, 4.8vw, 4.8rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.bgs-contact-lead {
    max-width: 560px;
    margin: 2rem 0 0;
    color: #5b554d;
    font-size: 1.08rem;
    line-height: 1.8;
}

.bgs-contact-note {
    max-width: 520px;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bgs-border);
}

.bgs-contact-note-label {
    margin: 0 0 0.75rem;
    color: var(--bgs-red);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.bgs-contact-note p:last-child {
    margin: 0;
    color: #6a635a;
    line-height: 1.7;
}

.bgs-contact-form-wrap {
    padding: clamp(2rem, 4vw, 4rem);
    background: var(--bgs-paper-light);
    border: 1px solid var(--bgs-border);
}

.bgs-form-field {
    margin-bottom: 1.5rem;
}

.bgs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.bgs-form-field label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--bgs-ink);
    font-size: 0.82rem;
    font-weight: 600;
}

.bgs-form-field input,
.bgs-form-field select,
.bgs-form-field textarea {
    width: 100%;
    padding: 0.9rem 0;
    color: var(--bgs-ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid #aaa094;
    border-radius: 0;
    font: inherit;
    outline: none;
}

.bgs-form-field select {
    cursor: pointer;
}

.bgs-form-field textarea {
    resize: vertical;
    min-height: 130px;
}

.bgs-form-field input:focus,
.bgs-form-field select:focus,
.bgs-form-field textarea:focus {
    border-bottom-color: var(--bgs-red);
}

.bgs-form-submit {
    margin-top: 0.75rem;
    cursor: pointer;
}

@media (max-width: 850px) {
    .bgs-contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .bgs-contact-copy {
        position: static;
    }
}

@media (max-width: 560px) {
    .bgs-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .bgs-contact-form-wrap {
        padding: 1.5rem;
    }
}

/* ---------- Navigation ---------- */

.bgs-navbar {
    position: relative;
    z-index: 1000;
    padding: 0;
    background: var(--bgs-paper-light) !important;
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-nav-shell {
    width: min(1400px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 0.9rem 0;
}

.bgs-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 2rem;
}

.bgs-brand-mark {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
}

.bgs-brand-name {
    color: var(--bgs-ink);
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.bgs-navbar .nav-link {
    margin-left: 0.35rem;
    padding: 0.65rem 0.8rem !important;
    color: #5e5850 !important;
    font-size: 0.88rem;
    font-weight: 500;
}

.bgs-navbar .nav-link:hover {
    color: var(--bgs-red) !important;
}

.bgs-navbar .bgs-nav-contact {
    margin-left: 0.8rem;
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    color: var(--bgs-paper-light) !important;
    background: var(--bgs-ink);
    border: 1px solid var(--bgs-ink);
}

.bgs-navbar .bgs-nav-contact:hover {
    color: var(--bgs-ink) !important;
    background: transparent;
}

.bgs-account-nav {
    margin-left: 0.5rem;
}

.bgs-navbar .dropdown-menu {
    padding: 0.5rem;
    background: var(--bgs-paper-light);
    border: 1px solid var(--bgs-border);
    border-radius: 2px;
    box-shadow: 0 12px 30px rgba(33, 31, 28, 0.1);
}

.bgs-navbar .dropdown-item {
    padding: 0.65rem 0.8rem;
    color: var(--bgs-ink);
    font-size: 0.88rem;
}

.bgs-navbar .dropdown-item:hover {
    background: var(--bgs-paper);
    color: var(--bgs-red);
}

.bgs-navbar .navbar-toggler {
    padding: 0.4rem;
    border: 0;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .bgs-nav-shell {
        width: min(100% - 2rem, 1400px);
    }

    .bgs-navbar .navbar-collapse {
        padding: 1rem 0 0.5rem;
        border-top: 1px solid var(--bgs-border);
        margin-top: 0.75rem;
    }

    .bgs-navbar .nav-link {
        margin-left: 0;
        padding: 0.75rem 0 !important;
    }

    .bgs-navbar .bgs-nav-contact {
        display: inline-block;
        margin: 0.5rem 0;
        padding: 0.7rem 1rem !important;
    }

    .bgs-account-nav {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .bgs-brand-name {
        font-size: 0.82rem;
    }

    .bgs-brand-mark {
        width: 34px;
        height: 34px;
    }
}

/* ---------- Footer ---------- */

.bgs-footer {
    padding: clamp(4rem, 7vw, 6rem) 0 2rem;
    color: #c9c2b7;
    background: #181715;
    border-top: 1px solid #36332f;
}

.bgs-footer-shell {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: clamp(3rem, 8vw, 8rem);
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
}

.bgs-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--bgs-paper-light);
    font-weight: 600;
    text-decoration: none;
}

.bgs-footer-logo:hover {
    color: var(--bgs-gold);
}

.bgs-footer-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
}

.bgs-footer-brand > p {
    max-width: 440px;
    margin: 0.85rem 0 0;
    color: #928b81;
    line-height: 1.7;
}

.bgs-footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}

.bgs-footer-label {
    margin: 0 0 0.5rem;
    color: var(--bgs-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.bgs-footer-nav a {
    color: #c9c2b7;
    font-size: 0.9rem;
    text-decoration: none;
}

.bgs-footer-nav a:hover {
    color: var(--bgs-paper-light);
}

.bgs-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    width: min(1180px, calc(100% - 3rem));
    margin: 4rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #36332f;
}

.bgs-footer-bottom p {
    margin: 0;
    color: #777168;
    font-size: 0.75rem;
}

@media (max-width: 700px) {
    .bgs-footer-shell {
        grid-template-columns: 1fr 1fr;
    }

    .bgs-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .bgs-footer-shell {
        grid-template-columns: 1fr;
    }

    .bgs-footer-brand {
        grid-column: auto;
    }

    .bgs-footer-bottom {
        flex-direction: column;
        gap: 0.4rem;
        margin-top: 3rem;
    }
}

/* ---------- Hero refinement ---------- */

@media (min-width: 901px) {
    .bgs-hero-content {
        width: min(1500px, calc(100% - 4rem));
        margin: 0 auto;
        gap: clamp(2rem, 4vw, 4.5rem);
        padding: clamp(2rem, 3vw, 3rem) 0;
    }

    .bgs-hero-copy {
        padding-left: clamp(1rem, 3vw, 3rem);
        padding-right: 0;
    }

    .bgs-hero-art {
        min-height: 560px;
        overflow: hidden;
    }
}

.bgs-footer-bottom a {
    color: #928b81;
    text-decoration: none;
}

.bgs-footer-bottom a:hover {
    color: var(--bgs-gold);
}

/* Footer logo contrast */
.bgs-footer-logo img {
    background: var(--bgs-paper-light);
    border-radius: 50%;
    padding: 4px;
}

/* =========================================================
   Resources
   ========================================================= */

.bgs-resources-hero {
    background: #eee7da;
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-resources-hero-inner {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(3.5rem, 6vw, 5rem) 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.bgs-resources-hero h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.bgs-resources-intro {
    max-width: 700px;
    margin: 2rem 0 0;
    color: var(--bgs-stone);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.7;
}

.bgs-resources-hero-mark {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
}

.bgs-resources {
    background: var(--bgs-paper-light);
}

.bgs-resources-layout {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(2.5rem, 4vw, 4rem) 0 clamp(4rem, 7vw, 7rem);
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(260px, 0.8fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
}

.bgs-section-heading {
    margin-bottom: 2rem;
}

.bgs-section-heading h2,
.bgs-resource-tool h2,
.bgs-resource-note h2 {
    margin: 0;
    color: var(--bgs-ink);
}

.bgs-section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.bgs-featured-article {
    padding-bottom: clamp(3rem, 5vw, 5rem);
    margin-bottom: clamp(3rem, 5vw, 5rem);
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-featured-image,
.bgs-article-image {
    display: block;
    overflow: hidden;
    background: var(--bgs-paper);
}

.bgs-featured-image {
    margin-bottom: 2rem;
}

.bgs-featured-image img,
.bgs-article-image img {
    display: block;
    width: 100%;
    object-fit: cover;
    transition: transform 250ms ease;
}

.bgs-featured-image img {
    max-height: 430px;
}

.bgs-article-image img {
    aspect-ratio: 16 / 10;
}

.bgs-featured-image:hover img,
.bgs-article-image:hover img {
    transform: scale(1.015);
}

.bgs-article-date {
    margin: 0 0 0.75rem;
    color: var(--bgs-stone);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bgs-featured-content h3,
.bgs-article-content h3 {
    margin: 0;
}

.bgs-featured-content h3 {
    max-width: 760px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.08;
}

.bgs-article-content h3 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.15;
}

.bgs-featured-content h3 a,
.bgs-article-content h3 a {
    color: var(--bgs-ink);
    text-decoration: none;
}

.bgs-featured-content h3 a:hover,
.bgs-article-content h3 a:hover {
    color: var(--bgs-red);
}

.bgs-article-excerpt {
    margin: 1rem 0 1.25rem;
    color: #625c54;
    line-height: 1.7;
}

.bgs-featured-content .bgs-article-excerpt {
    max-width: 720px;
    font-size: 1.05rem;
}

.bgs-article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 2rem;
}

.bgs-article-content {
    padding-top: 1.25rem;
}

.bgs-tag-list,
.bgs-topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bgs-tag-list {
    margin-bottom: 1.25rem;
}

.bgs-tag-list a,
.bgs-topic-list a {
    display: inline-block;
    color: var(--bgs-stone);
    border: 1px solid var(--bgs-border);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.76rem;
    line-height: 1;
    text-decoration: none;
}

.bgs-tag-list a:hover,
.bgs-topic-list a:hover {
    color: var(--bgs-ink);
    border-color: var(--bgs-gold);
    background: var(--bgs-paper);
}

.bgs-text-link {
    color: var(--bgs-ink);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--bgs-gold);
}

.bgs-text-link:hover {
    color: var(--bgs-red);
}

.bgs-resources-sidebar {
    position: sticky;
    top: 105px;
}

.bgs-resource-tool,
.bgs-resource-note {
    padding: 0 0 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-resource-tool h2,
.bgs-resource-note h2 {
    margin-bottom: 1.25rem;
    font-size: 1.6rem;
}

.bgs-resource-note p:not(.bgs-eyebrow) {
    color: #625c54;
    line-height: 1.7;
}

#blogSearchForm .input-group {
    display: flex;
    width: 100%;
}

#blogSearchForm input[type="text"] {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--bgs-border);
    border-right: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bgs-ink);
    padding: 0.8rem 0.9rem;
    box-shadow: none;
}

#blogSearchForm input[type="text"]:focus {
    border-color: var(--bgs-stone);
    outline: none;
    box-shadow: none;
}

#blogSearchForm button {
    border: 1px solid var(--bgs-ink);
    border-radius: 0;
    background: var(--bgs-ink);
    color: var(--bgs-paper-light);
    padding: 0.8rem 1rem;
    font-weight: 700;
}

#blogSearchForm button:hover {
    background: var(--bgs-red);
    border-color: var(--bgs-red);
}

#blog-search-results {
    margin-top: 1rem;
}

.bgs-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bgs-border);
    color: var(--bgs-stone);
    font-size: 0.9rem;
}

.bgs-pagination a {
    color: var(--bgs-ink);
    font-weight: 700;
    text-decoration: none;
}

.bgs-pagination a:last-child {
    text-align: right;
}

.bgs-pagination a:hover {
    color: var(--bgs-red);
}

.bgs-resources-empty {
    padding: 3rem 0;
    border-top: 1px solid var(--bgs-border);
    border-bottom: 1px solid var(--bgs-border);
}

@media (max-width: 900px) {
    .bgs-resources-layout {
        grid-template-columns: 1fr;
    }

    .bgs-resources-sidebar {
        position: static;
        padding-top: 1rem;
    }
}

@media (max-width: 620px) {
    .bgs-resources-hero-inner,
    .bgs-resources-layout {
        width: min(100% - 2rem, 1180px);
    }

    .bgs-resources-hero-inner {
        padding: 4rem 0;
    }

    .bgs-article-grid {
        grid-template-columns: 1fr;
    }

    .bgs-pagination {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .bgs-pagination a:last-child {
        text-align: center;
    }
}

/* =========================================================
   Resource Article
   ========================================================= */

.bgs-post {
    background: var(--bgs-paper-light);
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.bgs-post-header {
    background: var(--bgs-paper);
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-post-header-inner {
    width: min(820px, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.bgs-post-header .bgs-eyebrow {
    margin-bottom: 1.5rem;
}

.bgs-post-header .bgs-eyebrow a {
    color: inherit;
    text-decoration: none;
}

.bgs-post-header .bgs-eyebrow a:hover {
    color: var(--bgs-ink);
}

.bgs-post-header h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.bgs-post-header .bgs-article-date {
    margin-top: 1.5rem;
}

.bgs-post-tags {
    margin-top: 1rem;
    margin-bottom: 0;
}

.bgs-post-image-wrap {
    width: min(1050px, calc(100% - 3rem));
    margin: clamp(3rem, 6vw, 5rem) auto;
}

.bgs-post-image {
    display: block;
    width: 100%;
    height: auto;
}

.bgs-post-body {
    width: min(760px, calc(100% - 3rem));
    margin: clamp(3rem, 6vw, 5rem) auto 0;
    color: var(--bgs-ink);
    font-size: clamp(1.05rem, 1.4vw, 1.18rem);
    line-height: 1.85;
}

.bgs-post-body p {
    margin: 0 0 1.5em;
}

.bgs-post-body h2,
.bgs-post-body h3 {
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.15;
}

.bgs-post-body img {
    max-width: 100%;
    height: auto;
}

.bgs-post-body a {
    color: var(--bgs-red);
    text-decoration-color: var(--bgs-gold);
    text-underline-offset: 0.15em;
}

.bgs-post-footer {
    width: min(760px, calc(100% - 3rem));
    margin: clamp(3rem, 6vw, 5rem) auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bgs-border);
}

@media (max-width: 620px) {
    .bgs-post-header-inner,
    .bgs-post-image-wrap,
    .bgs-post-body,
    .bgs-post-footer {
        width: min(100% - 2rem, 1050px);
    }

    .bgs-post-header-inner {
        padding: 3.5rem 0 3rem;
    }
}

/* Preserve complete resource artwork in article previews */
.bgs-featured-image,
.bgs-article-image {
    background: var(--bgs-paper);
}

.bgs-featured-image img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

.bgs-article-image {
    aspect-ratio: 16 / 10;
}

.bgs-article-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
}

/* Resources search results */
.bgs-search-results {
    margin-top: 1.25rem;
    border-top: 1px solid var(--bgs-border);
}

.bgs-search-result {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-search-result-date {
    margin: 0 0 0.4rem;
    color: var(--bgs-stone);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bgs-search-result h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    line-height: 1.2;
}

.bgs-search-result h3 a {
    color: var(--bgs-ink);
    text-decoration: none;
}

.bgs-search-result h3 a:hover {
    color: var(--bgs-red);
}

.bgs-search-result-excerpt {
    margin: 0 0 0.75rem;
    color: #625c54;
    font-size: 0.85rem;
    line-height: 1.55;
}

.bgs-search-result-link {
    color: var(--bgs-ink);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--bgs-gold);
}

.bgs-search-result-link:hover {
    color: var(--bgs-red);
}

.bgs-search-empty {
    margin: 1rem 0 0;
    padding: 1rem 0;
    border-top: 1px solid var(--bgs-border);
    border-bottom: 1px solid var(--bgs-border);
    color: var(--bgs-stone);
    font-size: 0.85rem;
}

/* =========================================================
   Resource Topic Page
   ========================================================= */

.bgs-topic-page {
    background: var(--bgs-paper-light);
    padding-top: 0;
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.bgs-topic-header {
    background: var(--bgs-paper);
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-topic-header-inner {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.bgs-topic-header .bgs-eyebrow {
    margin-bottom: 1.25rem;
}

.bgs-topic-header .bgs-eyebrow a {
    color: inherit;
    text-decoration: none;
}

.bgs-topic-header .bgs-eyebrow a:hover {
    color: var(--bgs-ink);
}

.bgs-topic-header h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.bgs-topic-intro {
    max-width: 600px;
    margin: 1.5rem 0 0;
    color: var(--bgs-stone);
    font-size: 1.05rem;
    line-height: 1.6;
}

.bgs-topic-content {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding-top: clamp(3rem, 6vw, 5rem);
}

.bgs-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 5vw, 4.5rem);
}

.bgs-topic-card {
    min-width: 0;
}

.bgs-topic-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: var(--bgs-paper);
}

.bgs-topic-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bgs-topic-card-content .bgs-article-date {
    margin-bottom: 0.6rem;
}

.bgs-topic-card h2 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.bgs-topic-card h2 a {
    color: var(--bgs-ink);
    text-decoration: none;
}

.bgs-topic-card h2 a:hover {
    color: var(--bgs-red);
}

.bgs-topic-card-excerpt {
    margin: 0 0 1rem;
    color: #625c54;
    line-height: 1.65;
}

.bgs-topic-card .bgs-tag-list {
    margin-bottom: 1.25rem;
}

.bgs-topic-empty {
    max-width: 620px;
    padding: 3rem 0;
}

.bgs-topic-empty h2 {
    margin-bottom: 0.75rem;
}

.bgs-topic-empty p {
    color: var(--bgs-stone);
}

.bgs-topic-back {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--bgs-border);
}

@media (max-width: 760px) {
    .bgs-topic-header-inner,
    .bgs-topic-content {
        width: min(100% - 2rem, 1180px);
    }

    .bgs-topic-header-inner {
        padding: 3.5rem 0 3rem;
    }

    .bgs-topic-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .bgs-resources-hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .bgs-resources-hero-mark {
        width: min(260px, 70vw);
    }
}


/* === BGS AUTH === */

.bgs-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 620px;
    padding: clamp(4rem, 8vw, 7rem) 1.5rem;
    background: var(--bgs-paper);
}

.bgs-auth-shell {
    width: min(100%, 520px);
}

.bgs-auth-card {
    padding: clamp(2rem, 5vw, 3.25rem);
    background: #fff;
    border: 1px solid var(--bgs-border);
    box-shadow: 0 18px 50px rgba(28, 25, 22, 0.07);
}

.bgs-auth-heading {
    margin-bottom: 2rem;
}

.bgs-auth-heading .bgs-eyebrow {
    display: block;
    margin-bottom: 0.75rem;
}

.bgs-auth-heading h1 {
    margin: 0 0 0.75rem;
    color: var(--bgs-ink);
    font-size: clamp(2.2rem, 6vw, 3.15rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.bgs-auth-heading p {
    margin: 0;
    color: var(--bgs-stone);
    line-height: 1.6;
}

.bgs-auth-form {
    display: grid;
    gap: 1.25rem;
}

.bgs-form-field {
    display: grid;
    gap: 0.45rem;
}

.bgs-form-field label {
    color: var(--bgs-ink);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bgs-form-field .form-control {
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    color: var(--bgs-ink);
    background: #fff;
    border: 1px solid var(--bgs-border);
    border-radius: 0;
    box-shadow: none;
}

.bgs-form-field .form-control:focus {
    border-color: var(--bgs-ink);
    box-shadow: 0 0 0 3px rgba(28, 25, 22, 0.08);
}

.bgs-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.bgs-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--bgs-stone);
    cursor: pointer;
}

.bgs-check .form-check-input {
    margin: 0;
}

.bgs-auth a {
    color: var(--bgs-ink);
    font-weight: 700;
    text-decoration-color: var(--bgs-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.bgs-auth a:hover {
    color: var(--bgs-red);
}

.bgs-auth-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    color: #fff;
    font-weight: 700;
    background: var(--bgs-ink);
    border: 1px solid var(--bgs-ink);
    transition: transform 160ms ease, background 160ms ease;
}

.bgs-auth-submit:hover {
    background: #302c27;
    transform: translateY(-1px);
}

/* Keep security actions consistent across all two-step settings states. */
.bgs-two-step-settings .btn-outline-secondary {
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 1rem;
    color: var(--bgs-ink);
    font-weight: 700;
    background: transparent;
    border: 1px solid var(--bgs-ink);
    border-radius: 0;
}

.bgs-two-step-settings .btn-outline-secondary:hover {
    color: #fff;
    background: var(--bgs-ink);
}

.bgs-two-step-settings .bgs-two-step-browser {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bgs-border);
}

.bgs-auth-secondary {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    color: var(--bgs-stone);
    font-size: 0.9rem;
    border-top: 1px solid var(--bgs-border);
}

@media (max-width: 560px) {
    .bgs-auth {
        min-height: auto;
        padding: 2.5rem 1rem 3.5rem;
    }

    .bgs-auth-card {
        padding: 1.75rem 1.25rem;
    }

    .bgs-auth-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .bgs-auth-secondary {
        flex-wrap: wrap;
    }
}


/* === BGS AUTH EXTENSIONS === */

.bgs-auth-shell:has(.bgs-auth-card-wide) {
    width: min(100%, 680px);
}

.bgs-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.bgs-form-error {
    color: var(--bgs-red);
    font-size: 0.82rem;
    font-weight: 600;
}

@media (max-width: 620px) {
    .bgs-auth-grid {
        grid-template-columns: 1fr;
    }
}

/* === BGS ERROR PAGES === */

.bgs-error {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bgs-border);
    box-shadow: 0 18px 50px rgba(28, 25, 22, 0.08);
}

.bgs-error-status {
    padding: 1.5rem 2rem;
    color: var(--bgs-ink);
    font-size: clamp(4.5rem, 14vw, 7rem);
    font-weight: 750;
    letter-spacing: -0.06em;
    line-height: 1;
    text-align: center;
}

.bgs-error-content {
    padding: 2.5rem 2.75rem 2.75rem;
    text-align: center;
}

.bgs-error-content .bgs-eyebrow {
    margin-bottom: 0.85rem;
}

.bgs-error-content h1 {
    margin: 0;
    color: var(--bgs-ink);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 650;
    letter-spacing: -0.035em;
}

.bgs-error-content p {
    max-width: 440px;
    margin: 1rem auto 0;
    color: var(--bgs-stone);
    line-height: 1.7;
}

.bgs-error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    margin-top: 2rem;
}

.bgs-error-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.35rem;
    color: #fff !important;
    font-weight: 700;
    background: var(--bgs-ink);
    border: 1px solid var(--bgs-ink);
    text-decoration: none !important;
    transition: transform 160ms ease, background 160ms ease;
}

.bgs-error-primary:hover {
    background: #302c27;
    transform: translateY(-1px);
}

.bgs-error-secondary {
    color: var(--bgs-ink) !important;
    font-weight: 700;
    text-decoration-color: var(--bgs-yellow) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px;
}

/* HTTP status colors: familiar web conventions, translated into BGS tones. */

.bgs-error-warning .bgs-error-status {
    background: #f8e5cf;
}

.bgs-error-info .bgs-error-status {
    background: #dce9f0;
}

.bgs-error-gold .bgs-error-status {
    background: #f7e9bd;
}

.bgs-error-neutral .bgs-error-status {
    background: #ece8e1;
}

.bgs-error-danger .bgs-error-status {
    background: #f1d7d3;
}

@media (max-width: 560px) {
    .bgs-error-status {
        padding: 1.25rem;
    }

    .bgs-error-content {
        padding: 2rem 1.25rem 2.25rem;
    }

    .bgs-error-actions {
        flex-direction: column;
    }

    .bgs-error-primary {
        width: 100%;
    }
}

/* === BGS CHANGELOG === */

.bgs-changelog {
    padding-bottom: 5rem;
    color: var(--bgs-ink);
}

.bgs-changelog-hero {
    padding: 4.5rem 0 3.5rem;
    background:
        linear-gradient(
            135deg,
            rgba(230, 170, 23, 0.12),
            rgba(223, 107, 34, 0.06)
        );
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-changelog-hero h1 {
    margin: 0.45rem 0 0;
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.bgs-changelog-hero p {
    max-width: 650px;
    margin: 1.25rem 0 0;
    color: var(--bgs-stone);
    font-size: 1.1rem;
    line-height: 1.7;
}


/* Release index */

.bgs-changelog-index {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 1.4rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bgs-border);
}

.bgs-changelog-index span {
    color: var(--bgs-stone);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bgs-changelog-index a {
    color: var(--bgs-ink);
    font-weight: 700;
    text-decoration-color: var(--bgs-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}


/* Individual releases */

.bgs-release {
    max-width: 860px;
    padding: 3.25rem 0;
    margin: 0 auto;
    scroll-margin-top: 6rem;
}

.bgs-release + .bgs-release {
    border-top: 1px solid var(--bgs-border);
}

.bgs-release-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.bgs-release-label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--bgs-orange);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.bgs-release-header h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.bgs-release-header time {
    flex: 0 0 auto;
    padding-bottom: 0.25rem;
    color: var(--bgs-stone);
    font-size: 0.92rem;
    white-space: nowrap;
}

.bgs-release-intro {
    max-width: 760px;
    margin: 0;
    color: #514a42;
    font-size: 1.08rem;
    line-height: 1.8;
}


/* Release-note hierarchy */

.bgs-release-section {
    margin-top: 2.5rem;
}

.bgs-release-section > h3 {
    padding-bottom: 0.65rem;
    margin: 0 0 1.4rem;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    border-bottom: 2px solid var(--bgs-ink);
}

.bgs-release-item {
    position: relative;
    padding-left: 1.25rem;
    margin-top: 1.5rem;
    border-left: 3px solid #eee7dc;
}

.bgs-release-item:first-of-type {
    margin-top: 0;
}

.bgs-release-item h4 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 750;
    letter-spacing: -0.015em;
}

.bgs-release-item p {
    max-width: 720px;
    margin: 0.55rem 0 0;
    color: var(--bgs-stone);
    line-height: 1.75;
}


/* Give the current release a subtle BGS accent */

.bgs-release-current .bgs-release-label {
    color: var(--bgs-red);
}

.bgs-release-current .bgs-release-section > h3 {
    border-bottom-color: var(--bgs-yellow);
}


/* Mobile */

@media (max-width: 700px) {
    .bgs-changelog {
        padding-bottom: 3rem;
    }

    .bgs-changelog-hero {
        padding: 3.25rem 0 2.75rem;
    }

    .bgs-changelog-index {
        gap: 0.65rem 1rem;
    }

    .bgs-release {
        padding: 2.75rem 0;
    }

    .bgs-release-header {
        display: block;
    }

    .bgs-release-header time {
        display: block;
        margin-top: 0.8rem;
        padding: 0;
    }

    .bgs-release-section {
        margin-top: 2.25rem;
    }

    .bgs-release-item {
        padding-left: 1rem;
    }
}

.bgs-changelog .bgs-release-section {
    padding-top: 0;
    padding-bottom: 0;
}


/* BGS Parent Dashboard v2 */

.bgs-parent-dashboard {
    max-width: 1160px;
    color: #252b30;
}

.bgs-parent-eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    color: var(--bgs-red, #dc3520);
}

.bgs-parent-welcome {
    margin-bottom: 2.5rem;
}

.bgs-parent-welcome h1 {
    margin: 0 0 0.5rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.bgs-parent-welcome > p:last-child {
    color: #66717a;
    margin-bottom: 0;
}

.bgs-parent-primary {
    margin-bottom: 2rem;
}

.bgs-parent-section-heading {
    margin-bottom: 1.25rem;
}

.bgs-parent-section-heading h2 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.bgs-parent-student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
}

.bgs-parent-student,
.bgs-parent-panel {
    border: 1px solid #dce1e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(30, 40, 50, 0.045);
}

.bgs-parent-student {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    border-top: 3px solid #dc3520;
}

.bgs-parent-student-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bgs-parent-student-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 11px;
    background: #f4f5f6;
    font-size: 1.35rem;
    color: #414950;
}

.bgs-parent-student h3 {
    margin: 0 0 0.3rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.bgs-parent-student-content p {
    margin: 0;
    color: #69737c;
    font-size: 0.9rem;
}

.bgs-parent-student-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.25rem;
}

.bgs-parent-secondary-link {
    color: #555e66;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bgs-parent-empty {
    padding: 2.5rem;
    border: 1px dashed #cdd3d8;
    border-radius: 12px;
    text-align: center;
}

.bgs-parent-empty > i {
    font-size: 1.8rem;
    color: #87919a;
}

.bgs-parent-empty h3 {
    margin: 0.8rem 0 0.4rem;
    font-size: 1.15rem;
}

.bgs-parent-empty p {
    margin: 0;
    color: #69737c;
}

.bgs-parent-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.bgs-parent-panel {
    padding: 1.5rem;
}

.bgs-parent-panel-heading {
    margin-bottom: 1.5rem;
}

.bgs-parent-panel-heading h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.bgs-parent-panel-heading p {
    margin: 0;
    color: #69737c;
    font-size: 0.9rem;
}

.bgs-parent-account-details p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    margin: 0;
    border-bottom: 1px solid #edf0f2;
    font-size: 0.9rem;
}

.bgs-parent-account-details strong {
    font-weight: 650;
}

.bgs-parent-account-details span {
    text-align: right;
    overflow-wrap: anywhere;
}

.bgs-parent-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.bgs-parent-contact .form-control,
.bgs-parent-contact .form-select {
    border-color: #d6dce1;
}

@media (max-width: 767px) {
    .bgs-parent-secondary-grid {
        grid-template-columns: 1fr;
    }

    .bgs-parent-student,
    .bgs-parent-panel {
        padding: 1.2rem;
    }

    .bgs-parent-welcome {
        margin-bottom: 2rem;
    }
}


/* BGS Student Profile v2 */

.bgs-student-profile-v2 {
    max-width: 1160px;
    color: #252b30;
}

.bgs-student-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.bgs-student-profile-header h1 {
    margin: 0 0 0.4rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.bgs-student-profile-header > div > p:last-child {
    margin: 0;
    color: #69737c;
}

.bgs-student-profile-panel {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dce1e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(30, 40, 50, 0.045);
}

.bgs-student-profile-panel h2 {
    margin: 0 0 1.25rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.bgs-student-profile-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.bgs-student-profile-details > div {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.bgs-student-profile-details span {
    color: #69737c;
    font-size: 0.85rem;
}

.bgs-student-profile-details strong {
    font-weight: 650;
    overflow-wrap: anywhere;
}

.bgs-student-profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bgs-student-profile-section-header h2 {
    margin-bottom: 0.3rem;
}

.bgs-student-profile-section-header p {
    margin: 0;
    color: #69737c;
    font-size: 0.9rem;
}

.bgs-student-evaluations {
    scroll-margin-top: 6rem;
}

@media (max-width: 767px) {
    .bgs-student-profile-details {
        grid-template-columns: 1fr;
    }

    .bgs-student-profile-panel {
        padding: 1.2rem;
    }
}


/* BGS Parent Contact Form v2 */

.bgs-parent-contact .bgs-contact-field {
    margin-bottom: 1.25rem;
}

.bgs-parent-contact .bgs-contact-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 650;
    color: #333b42;
}

.bgs-parent-contact .bgs-contact-input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d6dce1;
    border-radius: 8px;
    background-color: #fff;
    font-size: 0.95rem;
    color: #252b30;
}

.bgs-parent-contact .bgs-contact-input:focus {
    border-color: #737d85;
    box-shadow: 0 0 0 3px rgba(90, 100, 110, 0.12);
}

.bgs-parent-contact .bgs-contact-message {
    min-height: 155px;
    resize: vertical;
}

.bgs-parent-contact .bgs-contact-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 1.5rem;
}


/* BGS Testimonial Page v2 — scoped separately from homepage quotations. */
.bgs-testimonial-page {
    max-width: 1160px;
    color: #252b30;
}
.bgs-testimonial-page .bgs-testimonial-header { margin-bottom: 2rem; }
.bgs-testimonial-page .bgs-testimonial-header h1 {
    margin: 0 0 .5rem;
    font-weight: 750;
    letter-spacing: -.035em;
}
.bgs-testimonial-page .bgs-testimonial-header > p:last-child { margin: 0; color: #69737c; }
.bgs-testimonial-page .bgs-testimonial-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 1.25rem;
    align-items: start;
}
.bgs-testimonial-page .bgs-testimonial-panel {
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid #dce1e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(30, 40, 50, .045);
}
.bgs-testimonial-page .bgs-testimonial-panel h2 { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 700; }
.bgs-testimonial-page .bgs-testimonial-student { margin-bottom: 1.5rem; color: #69737c; font-size: .9rem; }
.bgs-testimonial-page .bgs-testimonial-student strong { color: #252b30; }
.bgs-testimonial-page .bgs-contact-label { display: block; margin-bottom: .45rem; font-size: .9rem; font-weight: 650; color: #333b42; }
.bgs-testimonial-page .bgs-testimonial-textarea {
    width: 100%;
    min-height: 165px;
    padding: .75rem .9rem;
    border: 1px solid #d6dce1;
    border-radius: 8px;
    background: #fff;
    color: #252b30;
    font-size: .95rem;
    resize: vertical;
}
.bgs-testimonial-page .bgs-testimonial-textarea:focus { border-color: #737d85; box-shadow: 0 0 0 3px rgba(90, 100, 110, .12); }
.bgs-testimonial-page .bgs-testimonial-counter { margin: .5rem 0 0; color: #69737c; font-size: .85rem; text-align: right; }
.bgs-testimonial-page .bgs-testimonial-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.bgs-testimonial-page .bgs-testimonial-actions form { margin: 0; }
.bgs-testimonial-page .bgs-testimonial-guidance > p { margin-bottom: 1.5rem; color: #69737c; font-size: .9rem; }
.bgs-testimonial-page .bgs-testimonial-prompt { padding: .9rem 0; border-bottom: 1px solid #edf0f2; }
.bgs-testimonial-page .bgs-testimonial-prompt strong { display: block; margin-bottom: .3rem; font-size: .95rem; }
.bgs-testimonial-page .bgs-testimonial-prompt p { margin: 0; color: #69737c; font-size: .9rem; line-height: 1.5; }
.bgs-testimonial-page .bgs-testimonial-privacy { display: flex; gap: .75rem; margin-top: 1.5rem; padding: 1rem; background: #f6f7f8; border-radius: 8px; }
.bgs-testimonial-page .bgs-testimonial-privacy i { color: #59656e; font-size: 1.15rem; }
.bgs-testimonial-page .bgs-testimonial-privacy p { margin: 0; color: #59656e; font-size: .85rem; line-height: 1.5; }
.bgs-testimonial-page .bgs-testimonial-content { margin: 0 0 1rem; padding-left: 1.25rem; border-left: 3px solid #dc3520; font-size: 1.1rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.bgs-testimonial-page .bgs-testimonial-date { color: #69737c; font-size: .85rem; }
@media (max-width: 767px) {
    .bgs-testimonial-page .bgs-testimonial-layout { grid-template-columns: 1fr; }
    .bgs-testimonial-page .bgs-testimonial-panel { padding: 1.2rem; }
}


/* Parent testimonial delete confirmation */
.bgs-delete-dialog {
    width: min(100% - 2rem, 460px);
    padding: 1.5rem;
    border: 1px solid #dce1e5;
    border-radius: 12px;
    background: #fff;
    color: #252b30;
    box-shadow: 0 12px 36px rgba(30, 40, 50, .18);
}
.bgs-delete-dialog::backdrop { background: rgba(25, 30, 35, .45); }
.bgs-delete-dialog h2 { margin: 0 0 .75rem; font-size: 1.25rem; font-weight: 700; }
.bgs-delete-dialog p { margin: 0; color: #59656e; line-height: 1.6; }
.bgs-delete-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem; }
.bgs-delete-dialog-actions form { margin: 0; }


/* BGS Edit Profile v2 */
.bgs-profile-edit { max-width: 1160px; color: #252b30; }
.bgs-profile-edit-header { margin-bottom: 2rem; }
.bgs-profile-edit-header h1 { margin: 0 0 .5rem; font-weight: 750; letter-spacing: -.035em; }
.bgs-profile-edit-header > p:last-child { margin: 0; color: #69737c; }
.bgs-profile-edit-panel { max-width: 760px; padding: 1.5rem; border: 1px solid #dce1e5; border-radius: 12px; background: #fff; box-shadow: 0 1px 5px rgba(30, 40, 50, .045); }
.bgs-profile-edit-panel h2 { margin: 0 0 1.5rem; font-size: 1.25rem; font-weight: 700; }
.bgs-profile-edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.bgs-profile-edit-label { display: block; margin-bottom: .45rem; font-size: .9rem; font-weight: 650; color: #333b42; }
.bgs-profile-edit-input { width: 100%; padding: .75rem .9rem; border: 1px solid #d6dce1; border-radius: 8px; background: #fff; color: #252b30; font-size: .95rem; }
.bgs-profile-edit-input:focus { border-color: #737d85; box-shadow: 0 0 0 3px rgba(90, 100, 110, .12); }
.bgs-profile-edit-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 767px) {
    .bgs-profile-edit-panel { padding: 1.2rem; }
    .bgs-profile-edit-fields { grid-template-columns: 1fr; }
}

/* Change Password v2 */
.bgs-password-fields { display: grid; gap: 1.25rem; }


/* BGS message confirmation */
.bgs-message-success { max-width: 1160px; margin-bottom: 3rem; color: #252b30; }
.bgs-message-success-panel { max-width: 820px; margin: 2rem auto; padding: clamp(2rem, 5vw, 3.5rem); border: 1px solid #dce1e5; border-radius: 12px; background: #fff; box-shadow: 0 1px 5px rgba(30, 40, 50, .045); }
.bgs-message-success-icon { margin-bottom: 1rem; color: #20744b; font-size: 2rem; line-height: 1; }
.bgs-message-success-panel h1 { margin: 0 0 .75rem; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 750; letter-spacing: -.035em; }
.bgs-message-success-panel > p:not(.bgs-parent-eyebrow) { color: #69737c; line-height: 1.6; }
.bgs-message-success-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 767px) { .bgs-message-success-panel { margin: 1rem auto; padding: 1.75rem; } }
