:root {
    --cpusa-red: #c14a36;
    --cpusa-white: #ffffff;
    --cpusa-gray: #414858;
    --cpusa-blue: #2c7fa7;
    --cpusa-red-600: #a84130;
    --cpusa-red-700: #8b3628;
    --cpusa-blue-700: #236684;
    --cpusa-blue-800: #1b5068;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --color-bg: var(--cpusa-white);
    --color-text: #111111;
    --color-brand: var(--cpusa-red);
    --color-brand-contrast: var(--cpusa-white);
    --color-link: var(--cpusa-blue-700);
    --color-link-hover: var(--cpusa-blue-800);
    --color-muted: var(--cpusa-gray);
    --focus-ring: var(--cpusa-blue);
    --primary-100: #fdf3f0;
    --primary-200: #f7dfd9;
    --primary-300: #edc2b8;
    --primary-500: var(--cpusa-red);
    --primary-600: var(--cpusa-red-600);
    --primary-700: var(--cpusa-red-700);
    --neutral-900: #1f1f1f;
    --neutral-700: #2f3440;
    --neutral-500: #5c5c5c;
    --neutral-200: #e7e7e7;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.65;
    background: var(--color-bg);
    color: var(--color-text);
}
a {
    color: var(--color-link);
    text-decoration: none;
    text-underline-offset: 0.18em;
}
a:hover,
a:focus {
    color: var(--color-link-hover);
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
audio {
    max-width: 100%;
}

/* Header / Navbar */
.navbar {
    padding: 0.35rem 0;
    background: var(--color-brand) !important;
}
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.2;
    margin-right: 0.5rem;
    max-width: min(100%, 32rem);
}
.brand-mark {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: contain;
    border-radius: 4px;
    background: var(--cpusa-white);
    padding: 0.12rem;
}
.navbar-brand-text {
    display: inline-block;
    overflow-wrap: anywhere;
}
.navbar-brand-text-short {
    display: none;
}
.navbar-nav .nav-link {
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.navbar-nav .dropdown-menu {
    border-radius: 8px;
    border: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    padding: 0.35rem 0;
}
.navbar-nav .dropdown-item,
.navbar-nav .dropdown-item.disabled {
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
}
.navbar-nav .nav-link.active,
.navbar-nav .dropdown-item.active {
    font-weight: 700;
}
.navbar-nav .dropdown-item.active,
.navbar-nav .dropdown-item:active {
    background: var(--primary-500);
    color: var(--cpusa-white);
}
.navbar .nav-link.disabled,
.dropdown-item.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
@media (max-width: 991px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 0.5rem;
    }
    .navbar-nav .dropdown-menu {
        box-shadow: none;
        padding: 0;
    }
    .navbar-nav .dropdown-item,
    .navbar-nav .dropdown-item.disabled {
        padding: 0.75rem 1rem;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 320px;
    background: center top / contain no-repeat;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem auto 1rem;
}
.home-hero {
    background-image: url("../images/district.png");
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.hero-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
@media (max-width: 992px) {
    .hero-section {
        background-size: contain;
        min-height: 260px;
    }
    .hero-caption {
        font-size: 1.05rem;
    }
    .navbar-brand {
        max-width: calc(100% - 60px);
        font-size: 1.15rem;
    }
}
@media (max-width: 600px) {
    .hero-section {
        min-height: 190px;
        margin-bottom: 0.5rem;
    }
    .hero-caption {
        font-size: 0.95rem;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }
    .navbar-brand {
        font-size: 0.9rem;
        max-width: calc(100% - 56px);
    }
}

/* Welcome Section */
.welcome-section {
    padding: 2rem 1.25rem;
    text-align: center;
    background: var(--primary-200);
    color: var(--neutral-700);
    border-radius: 12px;
    margin: 0 auto 2rem;
}
.welcome-section h2 {
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 1rem;
}
.welcome-section p {
    max-width: 800px;
    margin: auto;
}
body.home-page .home-container {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}
body.home-page .hero-section {
    min-height: clamp(210px, 34vh, 300px);
    margin: 0;
}
body.home-page .welcome-section {
    padding: 1.1rem 1rem;
    margin: 0;
}
body.home-page .welcome-section p {
    margin-bottom: 0.6rem;
}
body.home-page .site-cta {
    margin-top: 1rem;
    padding: 1.1rem 1rem;
}
body.home-page .site-cta p {
    margin-bottom: 0.7rem;
}

/* Study Landing */
.study-landing {
    background-color: #fff;
    padding: 2.25rem;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    font-size: 1.05rem;
}
.study-landing-section {
    background: var(--primary-100);
    border-left: 5px solid var(--primary-500);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.study-landing-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.study-image {
    border-radius: 10px;
    margin: 2rem auto;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.15);
}
.study-image-caption {
    font-size: 0.95rem;
    text-align: center;
    color: var(--neutral-500);
    margin-bottom: 2rem;
}
.btn-study {
    background-color: var(--primary-500);
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    border: none;
}
.btn-study:hover,
.btn-study:focus {
    background-color: var(--primary-600);
    color: #fff;
}

/* Study & Resource Cards */
.study-wrapper,
.resource-wrapper {
    background-color: #fff;
    padding: 2.25rem;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    font-size: 1.05rem;
}
.study-title {
    text-align: center;
    color: var(--primary-700);
    margin-bottom: 2rem;
    font-weight: 800;
}
.study-callout {
    background: var(--primary-100);
    border-left: 5px solid var(--primary-500);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}
.study-card,
.resource-card {
    background: var(--primary-100);
    border-left: 5px solid var(--primary-500);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: grid;
    gap: 0.75rem;
}
.resource-filters {
    background: var(--primary-100);
    border: 1px solid var(--primary-300);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.resource-result-count {
    font-weight: 600;
    color: var(--neutral-700);
    margin: 0.25rem 0 1rem;
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.study-card-title,
.resource-card h4 {
    color: var(--primary-700);
    font-size: 1.15rem;
    margin: 0;
}
.study-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.resource-badge {
    background: #fff;
    border: 1px solid var(--primary-300);
    color: var(--primary-600);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
}
.study-card-notes,
.resource-card ul {
    margin: 0.25rem 0 0;
    padding-left: 1.2rem;
}
.study-card-notes li,
.resource-card ul li {
    margin-bottom: 0.35rem;
}
.study-audio,
.resource-audio {
    width: 100%;
}
.study-media-info {
    font-size: 0.9rem;
    color: var(--neutral-500);
    margin: -0.25rem 0 0.75rem;
}
.study-media-toggle {
    background: transparent;
    border: 1px solid var(--primary-300);
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--primary-600);
    text-align: left;
    width: 100%;
}
.study-media-toggle[aria-expanded="true"] {
    background: var(--primary-200);
}
.study-wrapper,
.resource-wrapper,
.study-landing,
.about-container,
.cpusa-section,
.club-detail {
    overflow-wrap: anywhere;
}
.club-detail a[href^="mailto:"] {
    overflow-wrap: anywhere;
}

/* Breadcrumbs */
.study-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.75rem;
}
.study-breadcrumb .breadcrumb-item a {
    color: var(--primary-600);
}

/* CTA Footer */
.site-cta {
    background: var(--primary-200);
    border-top: 2px solid var(--primary-300);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}
.site-cta h2 {
    color: var(--primary-700);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
}
.library-advanced-filters summary {
    width: fit-content;
    min-height: 2.75rem;
    padding: 0.55rem 0;
    color: var(--color-link);
    cursor: pointer;
    font-weight: 700;
}
.advanced-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 0.75rem;
}
@media (min-width: 768px) {
    .library-advanced-filters > summary {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}
.site-cta .btn {
    background: var(--primary-500);
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    border: none;
}
.site-cta .btn:hover {
    background: var(--primary-600);
}
.site-cta .btn-secondary-cta {
    margin-top: 0.55rem;
    background: transparent;
    color: var(--primary-600);
    border: 1px solid var(--primary-600);
}
.site-cta .btn-secondary-cta:hover,
.site-cta .btn-secondary-cta:focus {
    background: var(--primary-100);
    color: var(--primary-700);
}
.mobile-only-cta {
    display: none;
}

/* Home landing page */
.home-page #main-content {
    width: 100%;
    max-width: none;
    padding: 0;
    margin-top: 0 !important;
}
.home-banner {
    width: 100%;
    color: var(--cpusa-white);
    background: #050505;
}
.home-banner picture {
    display: flex;
    justify-content: center;
    width: 100%;
}
.home-banner img {
    display: block;
    width: 100%;
    max-width: 1115px;
    height: auto;
    margin: 0 auto;
}
.home-banner p {
    margin: 0;
    padding: 0.65rem clamp(1rem, 5vw, 4rem) 0.75rem;
    text-align: center;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 700;
}
.home-container {
    display: grid;
    gap: 3.75rem;
    width: 100%;
    max-width: 1320px;
    padding: 2rem 0.75rem;
    margin: 0 auto;
}
.home-intro {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}
.link-arrow::before {
    content: "\2192";
}
.callout-card,
.library-provenance {
    padding: 1.5rem;
    border: 1px solid var(--primary-300);
    border-left: 5px solid var(--primary-500);
    border-radius: 12px;
    background: var(--primary-100);
}
.contact-callout {
    max-width: 48rem;
}
.library-provenance {
    margin-top: 2rem;
}
.library-provenance p:last-child {
    margin-bottom: 0;
}
.home-intro-copy h1 {
    max-width: 18ch;
    margin-right: auto;
    margin-left: auto;
    color: var(--neutral-900);
    font-size: clamp(2.25rem, 5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 800;
    margin-bottom: 1.25rem;
}
.home-eyebrow {
    margin-bottom: 0.65rem;
    color: var(--primary-600);
    font-size: 0.82rem;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}
.home-lead {
    max-width: 42rem;
    margin-right: auto;
    margin-left: auto;
    color: var(--neutral-700);
    font-size: 1.18rem;
}
.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.home-intro .home-actions {
    justify-content: center;
}
.btn-home-primary,
.btn-home-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem 1.35rem;
    border-radius: 999px;
    font-weight: 700;
}
.btn-home-primary {
    color: var(--cpusa-white);
    background: var(--primary-500);
    border: 2px solid var(--primary-500);
}
.btn-home-primary:hover,
.btn-home-primary:focus {
    color: var(--cpusa-white);
    background: var(--primary-600);
    border-color: var(--primary-600);
}
.btn-home-secondary {
    color: var(--primary-700);
    background: var(--cpusa-white);
    border: 2px solid var(--primary-500);
}
.btn-home-secondary:hover,
.btn-home-secondary:focus {
    color: var(--primary-700);
    background: var(--primary-100);
}
.home-section {
    scroll-margin-top: 5rem;
}
.home-section-heading {
    max-width: 49rem;
    margin: 0 auto 2rem;
    text-align: center;
}
.home-section-heading h2,
.home-study-copy h2,
.home-next-step h2 {
    color: var(--primary-700);
    font-size: clamp(1.75rem, 3.8vw, 2.75rem);
    line-height: 1.18;
    font-weight: 800;
}
.home-priority-grid,
.home-club-grid,
.home-resource-grid {
    display: grid;
    gap: 1rem;
}
.home-priority-grid {
    grid-template-columns: repeat(3, 1fr);
}
.home-priority-grid article,
.home-club-card,
.home-resource-card {
    padding: 1.5rem;
    background: var(--primary-100);
    border: 1px solid var(--primary-200);
    border-radius: 14px;
}
.home-priority-grid article > span {
    color: var(--primary-700);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 800;
}
.home-priority-grid h3,
.home-club-card h3,
.home-resource-card h3 {
    margin: 0.5rem 0 0.65rem;
    color: var(--neutral-900);
    font-size: 1.2rem;
    font-weight: 750;
}
.home-club-grid {
    grid-template-columns: repeat(2, 1fr);
}
.home-club-card {
    display: flex;
    flex-direction: column;
}
.home-club-card a {
    margin-top: auto;
    font-weight: 700;
    text-decoration: underline;
}
.home-club-city,
.home-resource-author {
    margin: 0;
    color: var(--primary-600);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.home-section-action {
    margin-top: 1.5rem;
    text-align: center;
}
.home-study,
.home-next-step {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2rem;
    background: var(--primary-200);
    border-radius: 18px;
}
.home-study-image img,
.home-next-step img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
}
.home-study-list {
    display: grid;
    gap: 0.7rem;
    padding: 0;
    margin: 1.25rem 0 1.5rem;
    list-style: none;
}
.home-study-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.home-study-list span {
    display: grid;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: var(--cpusa-white);
    background: var(--primary-500);
    border-radius: 50%;
    font-weight: 800;
}
.home-study-list a {
    color: var(--neutral-900);
    font-weight: 700;
    text-decoration: underline;
}
.home-resource-grid {
    grid-template-columns: repeat(3, 1fr);
}
.home-resource-card {
    border-left: 5px solid var(--primary-500);
}
.home-next-step {
    background: var(--neutral-700);
    color: var(--cpusa-white);
}
.home-next-step h2,
.home-next-step .home-eyebrow {
    color: var(--cpusa-white);
}
.home-next-step .btn-home-secondary {
    color: var(--cpusa-white);
    background: transparent;
    border-color: var(--cpusa-white);
}
.home-next-step .btn-home-secondary:hover,
.home-next-step .btn-home-secondary:focus {
    color: var(--neutral-900);
    background: var(--cpusa-white);
}
@media (max-width: 991px) {
    .home-container { gap: 3.5rem; }
    .home-intro { min-height: auto; }
    .home-intro,
    .home-study,
    .home-next-step { grid-template-columns: 1fr; }
    .home-priority-grid,
    .home-resource-grid { grid-template-columns: 1fr; }
    .home-study-image { order: 2; }
}
@media (max-width: 600px) {
    .home-banner img { max-height: 220px; }
    .home-container { gap: 3rem; padding-top: 2rem; }
    .home-intro-copy h1 { font-size: clamp(2rem, 12vw, 3rem); }
    .home-club-grid { grid-template-columns: 1fr; }
    .home-study,
    .home-next-step { padding: 1.25rem; gap: 1.5rem; }
    .home-actions .btn { width: 100%; }
    .advanced-filter-grid { grid-template-columns: 1fr; }
}
.footer-separator {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0.25rem;
}
footer {
    background: var(--cpusa-gray);
    color: var(--cpusa-white);
    text-align: center;
    padding: 1.25rem;
    font-size: 0.9rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 0.35rem;
}
.footer-logo {
    width: 1.4rem;
    height: 1.4rem;
    object-fit: contain;
    border-radius: 3px;
    background: var(--cpusa-white);
    padding: 0.08rem;
}
footer a {
    color: var(--cpusa-white);
    display: inline-block;
    min-height: 2.75rem;
    padding: 0.5rem 0.25rem;
}

/* Utility */
.btn-resource,
.btn-study {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.btn-danger {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
}
.btn-danger:hover,
.btn-danger:focus {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}
.btn-outline-danger {
    color: var(--primary-500);
    border-color: var(--primary-500);
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: var(--cpusa-white);
    background-color: var(--primary-500);
    border-color: var(--primary-500);
}
.supporting-copy {
    color: var(--neutral-500);
    font-size: 0.95rem;
}
.about-logo {
    max-width: 120px;
}
.about-wrapper {
    max-width: 75%;
}
.about-divider {
    border: 0;
    height: 3px;
    background: linear-gradient(to right, var(--cpusa-red), var(--cpusa-blue));
}
.about-container a {
    color: var(--color-link);
    font-weight: 700;
    text-decoration: underline;
}
.about-container a:hover,
.about-container a:focus {
    color: var(--color-link-hover);
}
.about-container {
    font-size: 1.2rem;
    line-height: 1.8;
    background-color: var(--primary-100);
}
.cpusa-section {
    background-color: var(--primary-100);
    padding: 2.5rem 1.5rem;
    border-radius: 10px;
    font-size: 1.15rem;
    line-height: 1.8;
}
.cpusa-section h1 {
    text-align: center;
    color: var(--primary-700);
    margin-bottom: 2rem;
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    font-weight: 700;
}
.cpusa-section p {
    margin-bottom: 1.5rem;
}
.cpusa-image {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}
.caption {
    font-size: 0.9rem;
    text-align: center;
    color: var(--neutral-700);
    margin-bottom: 2rem;
}
.clubs-map-canvas {
    height: 520px;
}
.club-detail-logo {
    max-width: 220px;
}
.invalid-feedback {
    font-size: 0.95rem;
}
.required-note {
    font-size: 0.95rem;
    color: var(--neutral-700);
}
.required-indicator {
    color: var(--primary-500);
    font-weight: 700;
}
.form-error-summary {
    border-left: 4px solid var(--primary-500);
}

/* Responsive Card Adjustments */
@media (max-width: 768px) {
    .study-wrapper,
    .resource-wrapper,
    .study-landing {
        padding: 1.5rem;
    }
    .study-card,
    .resource-card {
        padding: 1.25rem;
    }
    .study-card-title,
    .resource-card h4 {
        font-size: 1.05rem;
    }
    .resource-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .study-card,
    .resource-card {
        gap: 0.55rem;
    }
    .study-card-tags {
        gap: 0.35rem;
    }
    .study-card-notes,
    .resource-card ul {
        padding-left: 1rem;
    }
    .site-cta {
        margin-top: 2rem;
    }
    .about-wrapper {
        max-width: 100%;
    }
    .clubs-map-canvas {
        height: 420px;
    }
    body.home-page .home-container {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    body.home-page .hero-section {
        min-height: 190px;
    }
    body.home-page .welcome-section {
        margin-top: 0.5rem;
    }
    .mobile-only-cta {
        display: inline-flex;
    }
}
@media (max-width: 480px) {
    .hero-caption {
        line-height: 1.5;
        padding: 0.35rem 0.45rem;
    }
}

/* Mobile scanability: switch mission goals paragraph to list on small screens */
.mission-goals-list-mobile {
    display: none;
}
@media (max-width: 600px) {
    .mission-goals-text {
        display: none;
    }
    .mission-goals-list-mobile {
        display: block;
        margin: 0.25rem auto 0;
        padding-left: 1.1rem;
        max-width: 22rem;
        text-align: left;
    }
    .mission-goals-list-mobile li {
        margin-bottom: 0.3rem;
    }
}
@media (max-width: 400px) {
    body {
        font-size: 17px;
    }
    #main-content > .container,
    #main-content > section.container {
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
    #main-content .my-5 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    #main-content .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    #main-content h1:not(.visually-hidden) {
        font-size: clamp(1.35rem, 7.2vw, 1.8rem);
        line-height: 1.25;
    }
    #main-content h2,
    #main-content .h2,
    #main-content .h3,
    #main-content .h4,
    #main-content .h5 {
        line-height: 1.3;
    }
    .lead {
        font-size: 1rem;
        line-height: 1.55;
    }
    .navbar-brand {
        max-width: calc(100% - 52px);
    }
    .navbar-brand-text-full {
        display: none;
    }
    .navbar-brand-text-short {
        display: inline-block;
    }
    .navbar-nav .nav-link,
    .navbar-nav .dropdown-item,
    .navbar-nav .dropdown-item.disabled {
        font-size: 0.9rem;
    }
    .study-wrapper,
    .resource-wrapper,
    .study-landing,
    .about-container,
    .cpusa-section {
        padding: 1.15rem;
    }
    .study-card,
    .resource-card,
    .study-landing-section {
        padding: 1rem;
    }
    .clubs-landing .card-body,
    .club-detail .p-4 {
        padding: 1rem !important;
    }
    .resource-filters {
        padding: 0.85rem;
    }
    .study-breadcrumb .breadcrumb {
        font-size: 0.9rem;
    }
    .btn-link {
        text-align: left;
        white-space: normal;
    }
    .site-cta .btn {
        display: flex;
        width: 100%;
        max-width: 18rem;
        margin: 0.35rem auto 0;
    }
    .site-cta .btn-secondary-cta {
        margin-top: 0.35rem;
    }
    .form-control,
    .form-select,
    .btn {
        font-size: 1rem;
    }
    #main-content h1,
    #main-content h2,
    #main-content h3,
    #main-content h4,
    #main-content p,
    #main-content li,
    #main-content a {
        overflow-wrap: anywhere;
    }
    .clubs-map-canvas {
        height: 340px;
    }
}

/* Accessibility helpers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-brand);
    color: var(--color-brand-contrast);
    padding: 0.5rem 1rem;
    z-index: 1000;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid transparent;
    box-shadow: 0 0 0 2px var(--cpusa-white), 0 0 0 4px var(--focus-ring);
}
.brand-banner {
    background: var(--color-brand);
    color: var(--color-brand-contrast);
    border-radius: 12px;
}
@media (max-width: 600px) {
    .brand-mark {
        width: 1.7rem;
        height: 1.7rem;
    }
    .navbar-brand-text {
        font-size: 0.86rem;
    }
}

/* Organization Section Styling */
.org-nav-wrapper .nav-pills .nav-link {
    color: var(--cpusa-gray);
    font-weight: 600;
    border: 1px solid #dee2e6;
    background-color: var(--cpusa-white);
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease-in-out;
}
.org-nav-wrapper .nav-pills .nav-link:hover {
    color: var(--cpusa-red);
    background-color: var(--primary-100);
    border-color: var(--primary-200);
    text-decoration: none;
}
.org-nav-wrapper .nav-pills .nav-link.active {
    color: var(--cpusa-white);
    background-color: var(--cpusa-red);
    border-color: var(--cpusa-red);
}
.org-focus-list {
    list-style: none;
    padding-left: 0;
}
.org-focus-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}
.org-focus-list li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: var(--cpusa-red);
}
.org-highlight-card {
    background-color: var(--primary-100);
    border-left: 5px solid var(--cpusa-red);
}
.ycl-theme-card {
    background: linear-gradient(135deg, var(--cpusa-blue) 0%, var(--cpusa-blue-800) 100%) !important;
    color: var(--cpusa-white);
    border-left: none;
}
.ycl-theme-card a {
    color: #fff;
    text-decoration: underline;
}
.ycl-theme-card a:hover {
    color: var(--primary-200);
}
.org-club-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #dee2e6;
}
.org-club-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}
.hover-brand:hover {
    color: var(--cpusa-red) !important;
    text-decoration: none;
}

/* Links Page Redesign Styles */
.links-hero {
    background-color: #faf8f5;
    border-radius: 16px;
    padding: 3rem 2rem;
    border-left: 6px solid var(--cpusa-red);
    margin-bottom: 3rem;
}
.links-hub-badge {
    display: inline-block;
    background-color: var(--primary-200);
    color: var(--cpusa-red-700);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}
.links-section-header {
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}
.links-section-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--cpusa-red) 0%, #ffcc00 100%);
    border-radius: 2px;
}
.resource-card-modern {
    background-color: var(--cpusa-white);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out, border-color 0.25s ease-in-out;
    height: 100%;
}
.resource-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(193, 74, 54, 0.08);
    border-color: var(--primary-300);
}
.card-clickable {
    cursor: pointer;
}
.resource-card-link {
    color: inherit;
    text-decoration: none;
}
.resource-card-link:hover,
.resource-card-link:focus {
    color: inherit;
    text-decoration: none;
}
.resource-card-link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
.resource-card-action {
    align-self: flex-start;
    color: var(--primary-600);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.resource-request {
    background: var(--primary-100);
}

/* Public library */
.library-detail {
    max-width: 1050px;
}
.library-detail-header {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
    padding: 2rem;
    background: var(--primary-100);
    border-radius: 18px;
}
.library-detail-header h1 {
    color: var(--primary-700);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.12;
    font-weight: 800;
}
.library-cover,
.library-cover-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(31, 31, 31, 0.16);
}
.library-cover {
    object-fit: contain;
    background: #fff;
}
.library-cover-placeholder {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--primary-500), var(--primary-700));
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.library-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin: 1.5rem 0 0;
}
.library-metadata div { min-width: 7rem; }
.library-metadata dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--neutral-500); }
.library-metadata dd { margin: 0; font-weight: 700; }
.library-formats { margin-top: 3rem; }
.library-formats > h2 { color: var(--primary-700); font-weight: 800; }
.library-format-list { display: grid; gap: 1rem; }
.library-format-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--primary-300);
    border-left: 5px solid var(--primary-500);
    border-radius: 10px;
}
.library-format-card h3 { margin: 0.45rem 0 0.25rem; font-size: 1.15rem; }
.library-format-card p { margin: 0; color: var(--neutral-500); }
.library-listening-help {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--primary-200);
    border-radius: 12px;
}
.audiobook-app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.audiobook-app-grid article {
    padding: 1.5rem;
    border: 1px solid var(--primary-300);
    border-radius: 12px;
    background: var(--primary-100);
}
.audiobook-app-grid h2 { color: var(--primary-600); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.audiobook-app-grid h3 { font-size: 1.2rem; }
.audiobook-app-grid a { font-weight: 700; text-decoration: underline; }
@media (max-width: 768px) {
    .library-detail-header { grid-template-columns: 1fr; padding: 1.25rem; }
    .library-cover,
    .library-cover-placeholder { max-width: 300px; margin: 0 auto; }
    .library-format-card { align-items: stretch; flex-direction: column; }
    .audiobook-app-grid { grid-template-columns: 1fr; }
}
.featured-card {
    background-color: #fdfaf6;
    border-left: 4px solid var(--cpusa-red);
}
.featured-card-ycl {
    border-left: 4px solid var(--cpusa-blue);
    background-color: #f6fafd;
}
.card-icon-container {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--primary-100);
    color: var(--cpusa-red);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}
.card-icon-container-blue {
    background-color: #eaf5fa;
    color: var(--cpusa-blue);
}
.card-badge-accent {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.bg-badge-official {
    background-color: var(--primary-200);
    color: var(--cpusa-red-700);
}
.bg-badge-youth {
    background-color: #d1ecf1;
    color: #0c5460;
}
.bg-badge-district {
    background-color: #e2e3e5;
    color: #383d41;
}
.bg-badge-news {
    background-color: #fff3cd;
    color: #856404;
}
.bg-badge-video {
    background-color: #f8d7da;
    color: #721c24;
}


