/* Coordinated research covers and the browsable collection. */
.research-showcase, .library-page {
    --lib-text: #e8eef7;
    --lib-muted: #9caec4;
    --lib-line: rgba(174,197,224,.18);
    --lib-blue: #a3ceff;
    --lib-small: .75rem;
    --lib-body: 1rem;
    --lib-gap: 2rem;
    color: var(--lib-text);
}
.research-showcase {
    position: relative;
    isolation: isolate;
    background: #000;
    padding: 6rem 0;
    scroll-margin-top: 6rem;
}
/* Both neighboring sections meet at black. Feather the cosmic layers into
   that shared color instead of placing an opaque blue rectangle between them. */
.research-showcase::before,
.research-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.16) 8%, rgba(0,0,0,.65) 21%, #000 36%, #000 66%, rgba(0,0,0,.65) 81%, rgba(0,0,0,.16) 94%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.16) 8%, rgba(0,0,0,.65) 21%, #000 36%, #000 66%, rgba(0,0,0,.65) 81%, rgba(0,0,0,.16) 94%, transparent 100%);
}
.research-showcase::before {
    background:
        radial-gradient(ellipse at 74% 46%, rgba(24, 79, 112, .22), transparent 58%),
        radial-gradient(ellipse at 22% 59%, rgba(45, 30, 79, .18), transparent 60%),
        linear-gradient(120deg, #03050c, #080e1d 60%, #040710);
}
.research-showcase::after {
    background: url("singularity-hero.png") center 52% / cover no-repeat;
    opacity: .095;
}
/* A single light field spans each seam, without adding blank layout space. */
.section-bridge {
    position: relative;
    z-index: 3;
    height: 0;
    pointer-events: none;
}
.section-bridge::before {
    content: "";
    position: absolute;
    inset: -12rem 0 auto;
    height: 24rem;
    background:
        radial-gradient(ellipse 64% 48% at 35% 50%, rgba(72,139,169,.26), rgba(37,88,119,.12) 48%, transparent 100%),
        radial-gradient(ellipse 48% 42% at 78% 52%, rgba(69,93,145,.10), transparent 100%);
}
.section-bridge--offset::before {
    background:
        radial-gradient(ellipse 70% 48% at 65% 50%, rgba(65,127,163,.22), rgba(39,85,118,.10) 50%, transparent 100%);
}
@media (max-width: 540px) {
    .section-bridge::before { top: -9rem; height: 18rem; }
}
.research-showcase__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 5rem; }
.lib-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: var(--lib-small); font-weight: 600; color: var(--lib-blue); margin: 0 0 1.5rem; }
.research-showcase h2, .library-header h1 {
    color: var(--lib-text); -webkit-text-fill-color: var(--lib-text); background: none;
    text-align: left; text-shadow: none; font-weight: 500; letter-spacing: -.035em;
    font-size: clamp(2rem, 3.6vw, 3.5rem); line-height: 1.15; margin: 0 0 1.5rem;
}
.research-showcase__copy > p:not(.lib-eyebrow) { font-size: 1.0625rem; color: var(--lib-muted); max-width: 31rem; line-height: 1.7; }
.lib-link { display: inline-flex; align-items: center; gap: 3rem; margin-top: 1.5rem; padding: .875rem 0; border-bottom: 1px solid #6387b5; font-size: var(--lib-body); color: var(--lib-text); text-decoration: none; }
.lib-link:hover { color: var(--lib-blue); }
.lib-note { display: block; color: var(--lib-muted); font-size: var(--lib-small); margin-top: 1.5rem; }
.report-cover-link { display: block; width: min(100%, 330px); margin: 0 auto; color: inherit; text-decoration: none; perspective: 1000px; }
.report-cover {
    --cover-accent: #a3ceff;
    --cover-image: url("report-ai-capex.webp");
    --cover-shade: 3,10,23;
    position: relative; overflow: hidden; aspect-ratio: 3 / 4;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 2rem; background: rgb(var(--cover-shade));
    border: 1px solid #596d89; border-radius: 2px;
    box-shadow: 5px 4px 0 #d0d7e1, 7px 5px 0 #31425b, 0 30px 50px #0006;
    transition: transform .3s ease;
}
.report-cover[data-cover="robotics"] { --cover-image: url("report-robotics-labor.webp"); --cover-shade: 18,5,9; --cover-accent: #ef9d9d; border-color: #744454; }
.report-cover[data-cover="blockchain"] { --cover-image: url("report-agent-payments.webp"); --cover-shade: 3,16,13; --cover-accent: #94d4b9; border-color: #3f7668; }
.report-cover[data-cover="convergence"] { --cover-image: url("report-portfolio-singularity.webp"); --cover-shade: 12,7,24; --cover-accent: #c3a7ef; border-color: #776390; }
.report-cover-link:hover .report-cover { transform: rotateY(-6deg) translateY(-4px); }
.report-cover__brand { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 1; font-size: .6875rem; letter-spacing: .13em; line-height: 1.6; color: #edf3fc; }
.report-cover__brand img { width: 3.25rem; height: 3.25rem; object-fit: contain; }
.report-cover__art {
    position: absolute; inset: 0; pointer-events: none;
    background: var(--cover-image) center top / cover no-repeat;
}
.report-cover__art::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(var(--cover-shade),.18), transparent 25%, transparent 42%, rgba(var(--cover-shade),.65) 61%, rgb(var(--cover-shade)) 82%);
}
.report-cover__title { position: relative; z-index: 1; margin-top: auto; padding-top: 6rem; font-size: clamp(1.4rem, 2.3vw, 2rem); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; color: #edf3fc; text-shadow: 0 2px 14px #07111d; }
.report-cover__footer { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .5rem; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid #91a6c244; font-size: .5rem; letter-spacing: .13em; color: #bacce3; }
.report-cover-link__caption { display: flex; justify-content: space-between; font-size: var(--lib-small); color: var(--lib-muted); margin-top: 1.5rem; padding: .25rem; }
.library-page { background: #09111f; }
.library-page #galaxy-canvas { opacity: .08; }
.library-main { padding-top: 9rem; padding-bottom: 2rem; max-width: 1200px; }
.library-header { margin-bottom: 2rem; }
.library-header h1 { margin-bottom: 1rem; }
.library-header > p:last-child { color: var(--lib-muted); max-width: 40rem; line-height: 1.6; font-size: var(--lib-body); }
.library-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.library-filters button { border: 1px solid var(--lib-line); border-radius: 4px; background: transparent; color: var(--lib-muted); padding: .75rem 1rem; font: inherit; font-size: .8125rem; cursor: pointer; min-height: 44px; }
.library-filters button[aria-pressed="true"] { background: #213a55; color: #eaf3ff; border-color: #7396bc; }
.library-browser { padding: 0; border: 1px solid var(--lib-line); background: #0e1929; border-radius: 8px; overflow: hidden; scroll-margin-top: 7rem; }
.library-stage { display: grid; grid-template-columns: minmax(240px,.85fr) minmax(0,1.15fr); gap: 4rem; align-items: center; padding: 3rem 4rem; min-height: 460px; touch-action: pan-y; }
.library-cover { width: min(100%,300px); justify-self: center; }
.library-cover .report-cover__title { font-size: 1.5rem; padding-top: 3rem; }
.library-detail { min-width: 0; }
.library-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: var(--lib-small); color: var(--lib-muted); margin-bottom: 1.5rem; }
.library-meta span:first-child { color: var(--lib-blue); }
.library-detail h2 { text-align: left; background: none; -webkit-text-fill-color: var(--lib-text); color: var(--lib-text); text-shadow: none; font-size: clamp(1.75rem, 2.7vw, 2.5rem); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 1.5rem; }
.library-detail > p { color: var(--lib-muted); font-size: var(--lib-body); line-height: 1.7; }
.library-availability { border-top: 1px solid var(--lib-line); padding-top: 1.5rem; margin-top: 2rem; }
.library-availability .lib-eyebrow { font-size: .625rem; }
.library-availability p { color: var(--lib-muted); font-size: .8125rem; line-height: 1.6; margin: .5rem 0 0; }
.library-controls { display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; border-top: 1px solid var(--lib-line); gap: 1rem; }
#report-count { color: var(--lib-text); font-size: .875rem; font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.library-hint { color: var(--lib-muted); font-size: var(--lib-small); }
.library-arrow-group { display: flex; gap: .5rem; }
.library-arrow-group button { width: 44px; height: 44px; border: 1px solid var(--lib-line); background: transparent; color: #dbe9fa; font-size: 1.25rem; cursor: pointer; border-radius: 3px; }
.library-arrow-group button:hover:not(:disabled) { background: #243b55; }
.library-arrow-group button:disabled { opacity: .3; cursor: default; }
.library-index { margin-top: 3rem; padding: 0; }
.library-index__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.library-index__header h2 { margin: 0; font-size: 1.25rem; color: var(--lib-text); background: none; -webkit-text-fill-color: var(--lib-text); text-shadow: none; }
.library-index__header span { color: var(--lib-muted); font-size: var(--lib-small); }
.library-list-row { display: grid; grid-template-columns: 2.5rem 1fr 10rem; align-items: center; width: 100%; text-align: left; padding: 1.25rem 1rem; border: 0; border-top: 1px solid var(--lib-line); background: transparent; color: var(--lib-muted); font: inherit; font-size: var(--lib-small); gap: 1rem; cursor: pointer; }
.library-list-row strong { font-size: .9375rem; font-weight: 400; color: var(--lib-text); }
.library-list-row[aria-current="true"] { background: #16273b; }
.library-list-row:hover { background: #1c3047; }
.library-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding: 2rem 0; border-top: 1px solid var(--lib-line); font-size: var(--lib-small); color: var(--lib-muted); }
.library-footer a { color: var(--lib-text); text-decoration: none; }
.report-cover-link:focus-visible, .lib-link:focus-visible, .library-page button:focus-visible, .library-browser:focus-visible { outline: 2px solid #b1d6ff; outline-offset: 5px; }
@media (max-width: 800px) {
    .research-showcase__grid { grid-template-columns: 1fr; gap: 3rem; }
    .research-showcase__copy { text-align: center; }
    .research-showcase h2 { text-align: center; }
    .research-showcase__copy > p { margin-inline: auto; }
    .library-stage { grid-template-columns: 1fr; gap: 2.5rem; padding: 2rem; }
    .library-cover { width: 250px; }
    .library-hint { display: none; }
    .library-list-row { grid-template-columns: 1.5rem 1fr; }
    .library-list-row > span:last-child { grid-column: 2; }
}
@media (max-width: 540px) {
    .research-showcase { padding: 4rem 0; }
    .report-cover-link { max-width: 270px; }
    .report-cover { padding: 1.5rem; }
    .report-cover__title { padding-top: 5rem; }
    .library-main { padding-top: 8rem; }
    .library-filters button { padding: .625rem .75rem; font-size: .75rem; }
    .library-stage { padding: 2rem 1.25rem; }
    .library-cover { max-width: 95%; }
    .library-cover .report-cover__title { font-size: 1.375rem; }
    .library-controls { padding: 1rem; }
    .library-footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .report-cover { transition: none; }
    .report-cover-link:hover .report-cover { transform: none; }
}
