:root {
    --res-navy: #103356;
    --res-navy-dark: #081b31;
    --res-gold: #d4af37;
    --res-gold-dark: #a77d19;
    --res-red: #b91c1c;
    --res-ink: #132a45;
    --res-muted: #617083;
    --res-line: #dce2e8;
}

/* The only keyboard focus indicator these pages have - css/styles.css does not
   define one, so this must not be dropped with the rest of the .res-public rules. */
:is(a, button, input, select):focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.65);
    outline-offset: 3px;
}

/* Public library hero: use the same crystalline navy-and-gold language as the
   main site while keeping this page calm and editorial. */
.res-library-hero {
    isolation: isolate;
    border-bottom: 1px solid rgba(16, 51, 86, 0.1);
    background:
        radial-gradient(ellipse at top left, rgba(6, 182, 212, 0.1) 0%, transparent 48%),
        radial-gradient(ellipse at bottom right, rgba(212, 175, 55, 0.07) 0%, transparent 42%),
        linear-gradient(135deg, #f0f9ff 0%, #ffffff 38%, #eaf7f8 72%, #ffffff 100%);
}

.res-library-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(16, 51, 86, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 51, 86, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 95%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 95%);
    pointer-events: none;
}

.res-library-hero::after {
    content: "";
    position: absolute;
    inset: auto 10% 0;
    height: 1px;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
    pointer-events: none;
}

.res-library-eyebrow.pill {
    margin-bottom: 24px;
    padding: 9px 17px;
    border-color: rgba(16, 51, 86, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: var(--res-navy);
    box-shadow: 0 6px 18px rgba(16, 51, 86, 0.06);
    letter-spacing: 0.01em;
}

.res-library-eyebrow.pill::before {
    background: var(--res-gold);
    animation: none;
}

.res-library-title {
    color: var(--res-navy);
    letter-spacing: -0.035em;
}

.res-library-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin: 22px auto 0;
    border-radius: 999px;
    background: var(--res-gold);
}

.res-library-title-text {
    color: inherit;
    -webkit-text-fill-color: currentColor;
}

.res-library-lede {
    color: #475569;
    font-weight: 450;
}

.res-empty-library,
.res-card {
    border: 1px solid var(--res-line) !important;
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: 0 12px 32px rgba(16, 51, 86, 0.075) !important;
}

.res-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.res-card:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 125, 25, 0.48) !important;
    box-shadow: 0 16px 36px rgba(16, 51, 86, 0.11) !important;
}

.res-card h3,
.res-card h3 a {
    color: var(--res-navy) !important;
}

.res-card h3 a:hover {
    color: #1a4a7a !important;
}

.res-library-main {
    max-width: 1220px !important;
    padding-top: 42px !important;
    padding-bottom: 72px !important;
}

.res-library-controls {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    align-items: center;
    gap: 16px 20px;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--res-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 51, 86, 0.065);
}

.res-search-box {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    border: 1px solid #cfd7df;
    border-radius: 10px;
    background: #f8fafc;
    color: #728095;
}

.res-search-box:focus-within {
    border-color: var(--res-gold-dark);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.res-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--res-ink);
    font: inherit;
    font-size: 0.9rem;
}

.res-search-box input::placeholder {
    color: #8592a3;
}

.res-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.res-filter-buttons .filter-btn {
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #d6dde5;
    border-radius: 9px;
    background: #f7f9fb;
    color: #4d5c70;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.res-filter-buttons .filter-btn:hover {
    border-color: #ba9540;
    background: #fffaf0;
    color: var(--res-navy);
}

.res-filter-buttons .filter-btn.active {
    border-color: var(--res-navy);
    background: var(--res-navy);
    color: #fff;
}

.res-category-select {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 10px;
    color: #59687b;
    font-size: 0.76rem;
    font-weight: 750;
}

.res-category-select select {
    min-width: 180px;
    min-height: 42px;
    padding: 0 34px 0 12px;
    border: 1px solid #d2d9e1;
    border-radius: 9px;
    background: #fff;
    color: var(--res-ink);
    font: inherit;
}

.res-results-count {
    justify-self: end;
    color: #69778a;
    font-size: 0.76rem;
    font-weight: 700;
}

.res-no-results {
    margin-top: 18px;
    padding: 64px 24px;
    border: 1px dashed #cbd3dc;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--res-muted);
    text-align: center;
}

.res-no-results > i {
    margin-bottom: 14px;
    color: var(--res-gold-dark);
    font-size: 1.8rem;
}

.res-no-results h3 {
    margin: 0 0 5px;
    color: var(--res-ink);
    font-size: 1.1rem;
}

.res-no-results p {
    margin: 0 0 18px;
    font-size: 0.86rem;
}

.res-no-results button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--res-navy);
    border-radius: 9px;
    background: var(--res-navy);
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 750;
    cursor: pointer;
}

/* Single resource */
.res-single-main {
    max-width: 980px !important;
    padding-bottom: 70px !important;
}

.res-breadcrumbs,
.res-breadcrumbs a {
    color: #6f7d90 !important;
}

.res-breadcrumbs a:hover {
    color: var(--res-navy) !important;
}

.res-single-intro h1 {
    color: var(--res-ink) !important;
    letter-spacing: -0.03em;
}

.res-single-intro > p {
    color: #596a7e !important;
}

.res-consent-copy {
    margin: -5px 3px 0;
    color: #94a5bb;
    font-size: 0.68rem;
    line-height: 1.5;
    text-align: left;
}

.res-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.res-author-card {
    border-color: var(--res-line) !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(16, 51, 86, 0.07);
}

.res-author-card .text-white {
    color: var(--res-ink) !important;
}

.res-author-card .text-slate-400 {
    color: #68778a !important;
}

.res-author-card #share-btn,
.res-author-card #linkedin-share-btn {
    min-height: 44px;
    border-color: #d6dde5 !important;
    background: #f7f9fb !important;
    color: var(--res-ink) !important;
    text-decoration: none;
}

.res-author-card #share-btn:hover,
.res-author-card #linkedin-share-btn:hover {
    border-color: #bc9847 !important;
    background: #fffaf0 !important;
}

.res-course-pathway {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 20px 22px;
    border: 1px solid #d9c68f;
    border-radius: 15px;
    background: linear-gradient(135deg, #fffdf6 0%, #f6ecd0 100%);
    box-shadow: 0 12px 30px rgba(81, 63, 24, 0.08);
}

.res-course-pathway.hidden {
    display: none;
}

.res-course-pathway-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--res-navy);
    color: #e0bd62;
    font-size: 1.1rem;
}

.res-course-pathway span {
    display: block;
    margin-bottom: 3px;
    color: #98731e;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.res-course-pathway h2 {
    margin: 0;
    color: var(--res-ink);
    font-size: 1rem;
    line-height: 1.35;
}

.res-course-pathway p {
    margin: 4px 0 0;
    color: #69758a;
    font-size: 0.74rem;
}

.res-course-pathway > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 17px;
    border-radius: 9px;
    background: var(--res-red);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.18s ease, background 0.18s ease;
}

.res-course-pathway > a:hover {
    transform: translateY(-1px);
    background: #921d1d;
}

.res-featured-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff4cf;
    color: #8b6716;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.res-site-footer {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: var(--res-navy-dark) !important;
    color: #afbdce;
}

.res-site-footer a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    color: #c8d2df;
}

.res-site-footer a:hover {
    color: #fff !important;
}

@media (max-width: 850px) {
    .res-library-controls {
        grid-template-columns: 1fr;
    }

    .res-category-select,
    .res-results-count {
        justify-self: stretch;
    }

    .res-category-select select {
        flex: 1;
        min-width: 0;
    }

    .res-results-count {
        text-align: left;
    }
}

@media (max-width: 640px) {

    .res-library-hero {
        padding-top: 7.5rem !important;
        padding-bottom: 3.75rem !important;
    }

    .res-library-eyebrow.pill {
        margin-bottom: 18px;
        font-size: 0.75rem;
    }

    .res-library-title {
        line-height: 1.16 !important;
        letter-spacing: -0.025em;
    }

    .res-library-title::after {
        width: 56px;
        height: 3px;
        margin-top: 18px;
    }

    .res-library-lede {
        font-size: 1rem;
        line-height: 1.7;
    }

    .res-library-main {
        padding-top: 24px !important;
        padding-bottom: 50px !important;
    }

    .res-library-controls {
        padding: 14px;
        border-radius: 13px;
    }

    .res-filter-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .res-filter-buttons .filter-btn {
        width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .res-single-main {
        padding-bottom: 50px !important;
    }

    .res-course-pathway {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 18px;
    }

    .res-course-pathway > a {
        grid-column: 1 / -1;
        width: 100%;
    }

    .res-author-card > div:last-child {
        width: 100%;
        flex-wrap: wrap;
    }

    .res-author-card #share-btn,
    .res-author-card #linkedin-share-btn {
        flex: 1 1 150px;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Directional arrows: the markup marks them with .res-flip-rtl so they point
   the way the reader is going. */
[dir="rtl"] .res-flip-rtl {
    transform: scaleX(-1);
}

.res-card-media-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(16, 51, 86, 0.96), rgba(16, 51, 86, 0.78)),
        repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, 0.05) 18px 19px);
}

.res-card-media-placeholder[hidden] {
    display: none;
}

.res-card-media-placeholder i {
    color: #f3d774 !important;
    font-size: 2rem;
}

.res-attachment-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.res-attachment-section-primary {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.res-attachment-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.res-attachment-heading > div > span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.res-attachment-heading h2 {
    color: #103356;
    font-size: 1.15rem;
    font-weight: 800;
    margin: 2px 0 0;
}

.res-attachment-heading > span {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    border: 1px solid #d8dee8;
    border-radius: 50%;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.res-attachment-list {
    display: grid;
    gap: 8px;
}

.res-attachment-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #103356;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.res-attachment-row:hover {
    border-color: rgba(212, 175, 55, 0.65);
    background: #fffdf6;
}

.res-attachment-row > i:first-child {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 7px;
    background: #eef3f8;
    color: #103356;
}

.res-attachment-row > span {
    min-width: 0;
}

.res-attachment-row strong,
.res-attachment-row small {
    display: block;
}

.res-attachment-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.res-attachment-row small {
    color: #64748b;
    font-size: 0.73rem;
    margin-top: 2px;
}

.res-attachment-row > i:last-child {
    color: #b8960c;
    text-align: center;
}
