/* Science library. Page-owned rules; shared hero artwork/navigation stay global. */
.page-science .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.page-science .page-hero p { font-size: 1.0625rem; line-height: 1.75; }
.science-evidence-band { position: relative; overflow: hidden; padding: 50px 0 64px; }
.science-evidence-band > section.section-dark { background: transparent; }
.science-evidence-band > section > .container { position: relative; z-index: 1; max-width: 1100px; }
.page-science .science-intro { padding: 0 0 28px; }
.science-intro-title, .science-methodology h2 {
    font: 700 1.5rem/1.4 'Montserrat', sans-serif;
    color: #fff; margin: 0 0 16px; text-transform: none; letter-spacing: 0;
}
.science-intro-lead, .science-intro-howit-body, .science-methodology p {
    max-width: 78ch; color: rgba(255,255,255,.9); font-size: 1.0625rem; line-height: 1.75;
    text-align: left;
}
.science-intro-lead { margin: 0 0 16px; }
.science-intro-howit > summary {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
    cursor: pointer; list-style: none; font-size: 1rem; font-weight: 600;
    color: #fff; text-decoration: underline; text-underline-offset: 5px;
}
.science-intro-howit > summary::-webkit-details-marker { display: none; }
.science-intro-arrow { transition: transform .2s; }
.science-intro-howit[open] .science-intro-arrow { transform: rotate(180deg); }
.science-intro-howit-body { border-left: 1px solid rgba(201,169,97,.6); padding: 0 0 0 20px; margin-top: 16px; }
.science-intro-howit-body p { margin: 0 0 16px; font-size: inherit; }
.science-intro-howit-body ul { padding-left: 20px; }
.science-intro-howit-body li { margin-bottom: 14px; }
.science-intro a, .repo-card-link { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.science-intro a:hover, .repo-card-link:hover { text-decoration-thickness: 2px; }
.page-science .repository-section { padding: 0 0 56px; scroll-margin-top: 100px; }
.repo-controls {
    background: rgba(21,43,48,.94); border: 1px solid rgba(255,255,255,.25);
    padding: 24px; margin-bottom: 24px;
}
.repo-control { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.repo-control label { font: 600 1.0625rem/1.5 'Montserrat', sans-serif; color: #fff; }
.repo-control input, .repo-control select {
    font: 400 1rem/1.5 'Montserrat', sans-serif; color: #fff;
    background: #152b30; border: 1px solid rgba(255,255,255,.5); border-radius: 0;
    padding: 12px; width: 100%; min-height: 48px; box-sizing: border-box; color-scheme: dark;
}
.repo-control input::placeholder { color: rgba(255,255,255,.7); }
.repo-control input:focus-visible, .repo-control select:focus-visible {
    outline: 2px solid #fff; outline-offset: 3px;
}
.repo-search p { margin: 0; color: rgba(255,255,255,.8); font-size: .875rem; line-height: 1.65; text-align: left; }
.repo-filters { margin-top: 20px; }
.repo-filters > summary {
    cursor: pointer; font-size: 1rem; font-weight: 600; color: #fff;
    min-height: 44px; padding: 8px 0;
}
.repo-controls-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.repo-meta-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.repo-count { font-size: .875rem; line-height: 1.6; color: rgba(255,255,255,.85); }
.repo-clear, .repo-empty-clear, .repo-page-btn {
    font: 600 1rem/1.4 'Montserrat', sans-serif; color: #fff;
    border: 1px solid rgba(201,169,97,.65); border-radius: 0; background: #152b30;
    padding: 10px 16px; min-height: 44px; cursor: pointer; width: auto;
}
.repo-clear:hover, .repo-clear:focus-visible, .repo-empty-clear:hover, .repo-empty-clear:focus-visible,
.repo-page-btn:hover:not(:disabled), .repo-page-btn:focus-visible, .repo-page-btn.is-current {
    background: var(--gold-gradient); color: #152b30; border-color: transparent;
}
.page-science :is(button, summary, a):focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.repo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.repo-card-wrap { margin: 0; min-width: 0; }
.repo-card { background: rgba(21,43,48,.94); border: 1px solid rgba(255,255,255,.22); border-radius: 0; }
.repo-card:hover, .repo-card[open] { border-color: rgba(201,169,97,.7); }
.repo-card-summary { list-style: none; cursor: pointer; padding: 24px; display: block; }
.repo-card-summary::-webkit-details-marker { display: none; }
.repo-card-summary::marker { content: ''; }
.repo-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.repo-card-authors { color: rgba(255,255,255,.85); font-size: .875rem; line-height: 1.6; }
.repo-card-toggle { flex-shrink: 0; font-size: .875rem; font-weight: 700; }
.repo-card-toggle, .repo-card-label {
    background: var(--gold-gradient); background-clip: text; -webkit-background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent; text-shadow: none;
}
.repo-card[open] .repo-card-toggle-collapsed, .repo-card:not([open]) .repo-card-toggle-expanded { display: none; }
.repo-card-title { color: #fff; font-size: 1.125rem; font-weight: 600; line-height: 1.55; margin: 0 0 14px; overflow-wrap: anywhere; }
.repo-card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.repo-tag { font-size: .875rem; line-height: 1.5; color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.25); padding: 4px 9px; }
.repo-card-preview { font-size: 1.0625rem; line-height: 1.75; color: rgba(255,255,255,.9); margin: 16px 0 0; text-align: left; }
.repo-card-body { border-top: 1px solid rgba(255,255,255,.2); padding: 20px 24px 24px; color: rgba(255,255,255,.9); font-size: 1.0625rem; line-height: 1.75; overflow-wrap: anywhere; }
.repo-card-body p { margin: 0 0 16px; font-size: inherit; text-align: left; }
.repo-card-body p:last-child { margin-bottom: 0; }
.repo-card-citation-authors { font-weight: 600; }
.repo-card-body .repo-card-ids { font-size: 1rem; }
.repo-card-label { font-weight: 700; }
.repo-empty { padding: 36px 0; max-width: 65ch; }
.repo-empty p { color: #fff; font-size: 1.0625rem; line-height: 1.75; margin-bottom: 20px; }
.repo-pagination { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 32px; }
.repo-page-nums { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.repo-page-num { padding: 10px; min-width: 44px; }
.repo-page-gap { color: #fff; padding: 0 3px; }
.repo-page-btn:disabled { opacity: .4; cursor: default; }
.page-science .science-methodology { padding: 0; }
.science-methodology p { margin: 0 0 16px; }
@media (max-width: 768px) {
    .page-science .science-evidence-band { padding: 42px 0 48px; }
    .science-intro-title, .science-methodology h2 { font-size: 1.375rem; }
    .repo-controls { padding: 18px; }
    .repo-controls-row { grid-template-columns: 1fr; }
    .repo-card-summary { padding: 18px; }
    .repo-card-head { gap: 12px; }
    .repo-card-body { padding: 18px; }
    .repo-page-nums { order: 3; flex-basis: 100%; }
    .page-science .page-hero p { text-align: left; }
}

/* Jed, September 22: the mobile eyebrow belongs near mid-screen.
   Keep the full-height image; let enlarged text grow the hero naturally. */
@media (max-width: 768px) {
    body.page-science .page-hero {
        display: block;
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding: calc(50vh - .7rem) 0 64px;
        padding-top: calc(50svh - .7rem);
        background: linear-gradient(20deg,
            rgba(21,43,48,.96) 0%,
            rgba(21,43,48,.92) 35%,
            rgba(21,43,48,.80) 55%,
            rgba(21,43,48,.30) 78%,
            rgba(21,43,48,.10) 100%);
    }
    body.page-science .page-hero > .container { margin: 0 auto; }
}
