/* The bundle library at /bundles/, drawn as the board "Every bundle" (1440 frame) and its phone twin (390).
   Reads the shared tokens, star field, logo and fonts from site.css. The phone rules are the base; from
   900 px up every board length is calc(n * var(--lu)) with --lu: min(1px, 100vw / 1440), no height term, so
   the 1440 frame scales down with the window and stays 1440 wide and centred above it. The cards are drawn at
   the board's 0.97 (285 of 294): their lengths are the board's times 0.97; type sizes are the board's own. */

/* Frame */
.lib {
    position: relative;
    overflow-x: clip;
}

.lib-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: clip;
}

.lib-long {
    display: none;
}

.lib-fx {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.lib-glow {
    position: absolute;
    left: -260px;
    top: -140px;
    width: 900px;
    height: 760px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(124,131,255,0.15) 0%, rgba(124,131,255,0.07) 35%, rgba(124,131,255,0.025) 65%, rgba(124,131,255,0) 100%);
}

.lib-grain {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
}

.lib-grain-noise {
    position: absolute;
    inset: -50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Top bar: the home page's bar (assets/hero.css .au-bar), copied under library names */
.lib-bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.lib-home {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--au-text);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.lib-live {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    height: 40px;
    padding: 0 16px 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 10, 28, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--au-text);
    font-size: 14px;
    white-space: nowrap;
}

/* The pill keeps its resting words on hover, as the board's inline colour does against the theme's `a:hover` white */
@media (hover: hover) {
    .lib-live:hover {
        color: var(--au-text);
    }
}

.lib-live-dot {
    --lib-dot-ring: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--au-lime);
}

.lib-live-kicker {
    font-family: var(--au-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--au-lime);
}

.lib-live-rule {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.14);
}

.lib-live-follow {
    color: var(--au-muted);
}

/* The phone's pill is the short form: the dot and "Live builds" */
.lib-live-rule,
.lib-live-rule ~ span {
    display: none;
}

/* The narrowest phones: the logo link and the live pill are tighter so both fit the 272 px of bar at 320 px */
@media (max-width: 359px) {
    .lib-home {
        gap: 8px;
        font-size: 14px;
    }

    .lib-live {
        gap: 8px;
        padding: 0 10px;
    }

    .lib-live-kicker {
        letter-spacing: 0.06em;
    }
}

/* Intro and counters */
.lib-hero {
    box-sizing: border-box;
    max-width: 342px;
    margin: 0 auto;
    padding-top: 380px;
    text-align: left;
}

/* With the switch on, the narrator's pill sits under Nova's lines, so the intro starts lower: 76 px of bar + 452 px */
html[data-nova-talk-switch="on"] .lib-hero {
    padding-top: 452px;
}

.lib-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    font-family: var(--au-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--au-accent);
}

.lib-label::before {
    content: "";
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.lib-h1 {
    margin: 20px 0 0;
    font-weight: 500;
    font-size: 40px;
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.lib-h1-mask {
    display: block;
    overflow: hidden;
    padding-bottom: .1em;
    margin-bottom: -.1em;
    perspective: 600px;
}

.lib-h1-rise {
    display: block;
    transform-origin: 50% 100%;
}

.lib-h1-line {
    display: inline-block;
    margin: 0;
    padding: 0.04em 8px 0.12em 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 220% 100%;
}

.lib-h1-mask:first-child .lib-h1-line {
    background-image: linear-gradient(90deg, #8E8EA4 0%, #FFFFFF 45%, #D9DAEA 70%, #8E8EA4 100%);
}

.lib-h1-mask:last-child .lib-h1-line {
    background-image: linear-gradient(90deg, var(--au-accent) 0%, #C9CCFF 45%, var(--au-accent) 70%, #E3E4FF 100%);
}

.lib-intro {
    max-width: 560px;
    margin: 18px 0 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--au-muted);
}

.lib-count {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 14px;
    margin-top: 26px;
    font-family: var(--au-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--au-dim);
}

.lib-count > span {
    display: flex;
    align-items: center;
}

.lib-dot {
    flex-shrink: 0;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--au-dim);
}

#lib-yours {
    gap: 8px;
    color: #C9CCFF;
}

#lib-yours::after {
    content: "";
    order: -1;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--au-accent);
    box-shadow: 0 0 8px var(--au-accent);
}

/* Pills */
.lib-pills {
    display: flex;
    gap: 8px;
    margin: 36px -24px 0;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.lib-pills::-webkit-scrollbar {
    display: none;
}

.lib-pill {
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 10, 28, 0.4);
    font-family: var(--au-font);
    font-size: 14px;
    color: #A3A3B8;
    cursor: pointer;
}

.lib-pill[aria-pressed="true"] {
    border-color: rgba(124, 131, 255, 0.6);
    background: rgba(124, 131, 255, 0.14);
    color: #FFFFFF;
}

.lib-pill-n {
    font-family: var(--au-mono);
    font-size: 11px;
    opacity: 0.6;
}

/* Loading, failure and empty lines */
.lib-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.lib-status-line {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--au-muted);
}

.lib-status-line:not(:empty) {
    margin-top: 36px;
}

.lib-retry {
    box-sizing: border-box;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    font-family: var(--au-font);
    font-size: 14px;
    font-weight: 500;
    color: #E6E7F4;
    cursor: pointer;
}

/* Grid: on the phone each card is one 342 by 140 row */
.lib-grid {
    display: grid;
    grid-template-columns: minmax(0, 342px);
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.lib-card {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 140px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: radial-gradient(120% 60% at 50% 0%, rgba(124,131,255,0.18), rgba(10,10,21,0) 62%), linear-gradient(180deg, #0E0E26 0%, #07071A 100%);
    color: var(--au-text);
}

.lib-card:has(.lib-card-yours) {
    border-color: rgba(124, 131, 255, 0.5);
}

/* A marked card keeps its border (the board's inline border-color cancels its hover border) and takes the shadow at every width; only the 900 px rules lift it */
.lib-card.is-marked {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px color-mix(in srgb, var(--au-accent) 16%, transparent);
}

.lib-card-prog,
.lib-card-play,
.lib-card-yours {
    display: none;
}

.lib-card-prog span {
    flex: 1;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.18);
}

.lib-card-prog i {
    display: block;
    width: 0;
    height: 100%;
    background: #FFFFFF;
}

.lib-card.is-marked .lib-card-prog span:first-child i {
    width: 100%;
}

/* The picture box: the phone row's first 128 px, where the words start, from the row's top edge to its bottom;
   from 900 px up it is the whole card. The picture covers it from the top, so a tall one loses only its bottom. */
.lib-card-art {
    position: absolute;
    left: 0;
    top: 0;
    width: 128px;
    height: 100%;
    overflow: hidden;
}

.lib-card-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0;
    pointer-events: none;
}

.lib-card-hook {
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: auto;
    display: flex;
    align-items: center;
    max-width: 112px;
    height: 20px;
    padding: 0 7px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(3, 3, 10, 0.45);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--au-mono);
    font-size: 10px;
    letter-spacing: 0.02em;
    color: rgba(236, 236, 244, 0.82);
}

/* The foot is the row's height (140 px less the border) and grows past it only when its label, title and buttons alone need more (a chip on its own line under the play button). Its stack stands centred in it, as the board's `.rw-m .rw-info` does; the description gives up room first (a flex item of zero basis). */
.lib-card-foot {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 138px;
    margin-left: 128px;
    padding: 12px 12px 12px 4px;
    overflow: hidden;
}

.lib-card-meta {
    font-family: var(--au-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--au-accent);
}

.lib-card-desc {
    margin: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* Never cut: no clamp, no ellipsis, no clip. The foot grows as far as the title's words need. */
.lib-card-title {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Whole lines only: a shrinking flex item (zero basis, so its words never make the card taller) up to its own two lines, and what lies under its last whole line is clipped (the half pixel is because two 16.2 px lines take 32.375 px in 1/64 px line boxes, which `down` alone would cut to one). The clipped words stay in the page for a screen reader. */
.lib-card-desc {
    flex: 1 1 0;
    min-height: 0;
    max-height: max-content;
    -webkit-line-clamp: 2;
    clip-path: inset(0 0 calc(100% - round(down, 100% + 0.5px, 1.35 * 12px)) 0);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.35;
    color: var(--au-muted);
}

.lib-card-act {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.lib-btn {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.lib-watch,
.lib-follow {
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #E6E7F4;
}

.lib-watch {
    display: none;
}

/* The two steps of a locked card on touch (the board's .lb-step, .lb-s1, .lb-s1m, .lb-n, .lb-word): step 1 opens the reel, step 2 says the word to comment. A control hidden by display: none leaves the accessibility tree, so each media list shows exactly one reel control. */
.lib-step {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px 0 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.lib-reel-art,
.lib-reel-row {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #E6E7F4;
}

.lib-reel-art::after,
.lib-reel-row::after {
    content: "";
    position: absolute;
}

.lib-reel-art::after {
    inset: -7px;
}

.lib-reel-row::after {
    inset: -6px;
}

.lib-reel-art {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    background: rgba(10, 10, 28, 0.72);
}

.lib-reel-row {
    display: none;
    flex: 0 0 auto;
}

.lib-step-n {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    font-family: var(--au-mono);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
}

.lib-word {
    font-family: var(--au-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #FFFFFF;
}

.lib-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.lib-open {
    justify-content: space-between;
    background: var(--au-accent);
    color: #0A0A1A;
}

.lib-arr {
    display: inline-block;
}

/* Hover, as the board's .lb-pri:hover, .lb-ghost:hover and .lb-btn:hover .lb-arr draw them. "Open bundle" restates its resting colour over the theme's `a:hover` white; "Watch reel" declares no colour, so that white shows at once, and the transition holds no colour. */
@media (hover: hover) {
    .lib-open:hover {
        color: #0A0A1A;
        filter: brightness(1.08);
    }

    .lib-reel-art:hover,
    .lib-reel-row:hover {
        border-color: rgba(255, 255, 255, 0.34);
        background: rgba(255, 255, 255, 0.08);
        color: #FFFFFF;
    }

    .lib-open:hover .lib-arr {
        transform: translateX(3px);
    }
}

/* The word is read whole at its natural width: one line, and its row wraps to put the chip under the reel button when it does not fit beside it. Only a chip wider than the whole row breaks inside its word and grows in height. */
.lib-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    column-gap: 5px;
    flex: 0 0 auto;
    box-sizing: border-box;
    max-width: 100%;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    height: auto;
    min-height: 32px;
    padding: 8px 10px 8px 6px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 14px;
    border: 1px dashed rgba(124, 131, 255, 0.45);
    background: rgba(124, 131, 255, 0.12);
    color: #DDE0FF;
}

/* Next drop */
.lib-next {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 300px;
    padding: 20px;
    border-radius: 18px;
    border: 1px dashed rgba(124, 131, 255, 0.32);
    background: radial-gradient(ellipse at 100% 0%, rgba(124,131,255,0.12) 0%, rgba(124,131,255,0) 60%);
    overflow: hidden;
}

.lib-next-orbit {
    position: absolute;
    top: 50%;
    right: -150px;
    width: 300px;
    height: 300px;
    margin-top: -150px;
    pointer-events: none;
}

.lib-next-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(124, 131, 255, 0.16) 0%, rgba(124, 131, 255, 0) 100%);
}

.lib-next-ring {
    position: absolute;
    left: 20px;
    top: 122px;
    width: 260px;
    height: 56px;
    border-radius: 50%;
    border: 1px dashed rgba(185, 166, 255, 0.38);
    transform: rotate(-12deg);
}

.lib-next-core {
    position: absolute;
    left: 141px;
    top: 141px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFFFFF 0%, rgba(124, 131, 255, 0.6) 45%, rgba(124, 131, 255, 0) 100%);
}

.lib-next-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lib-next-num {
    font-family: var(--au-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--au-dim);
}

.lib-next-pill {
    display: flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(124, 131, 255, 0.16);
    font-family: var(--au-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #C9CCFF;
}

.lib-next-text {
    position: relative;
    max-width: 360px;
}

.lib-next-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.lib-next-line {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--au-muted);
}

/* The next-drop link's hover keeps its colour and moves its arrow 3 px, as the board's .lb-next a:hover does */
@media (hover: hover) {
    .lib-next-link:hover {
        color: #C9CCFF;
    }

    .lib-next-link:hover .lib-arr {
        transform: translateX(3px);
    }
}

@media (hover: hover) and (min-width: 900px) {
    .lib-next-link:hover .lib-arr {
        transform: translateX(calc(3 * var(--lu)));
    }
}

.lib-next-link {
    position: relative;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 500;
    color: #C9CCFF;
}

/* With the talk switch off the link is a lime pill (the Talk pills' fill, the words #0A0A1A); on, it stays the plain link above. Hover brightens 1.08 and lifts 1 px, no glow. */
html[data-nova-talk-switch="off"] .lib-next-link {
    box-sizing: border-box;
    height: 48px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--au-lime) 82%, #FFFFFF) 0%, var(--au-lime) 100%);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--au-lime) 26%, transparent), var(--au-3d-rest);
    color: #0A0A1A;
}

@media (hover: hover) {
    html[data-nova-talk-switch="off"] .lib-next-link:hover {
        transform: translateY(-1px);
        filter: brightness(1.08);
        color: #0A0A1A;
    }
}

@media (hover: hover) and (min-width: 900px) {
    html[data-nova-talk-switch="off"] .lib-next-link:hover {
        transform: translateY(calc(-1 * var(--lu)));
    }
}

/* "Saw a reel?" */
.lib-cta {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 28px;
    margin-top: 56px;
    padding: 28px 22px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: radial-gradient(ellipse at 85% 0%, rgba(124,131,255,0.16) 0%, rgba(124,131,255,0) 55%), rgba(10,10,24,0.7);
    overflow: hidden;
}

/* Nova's round frame and the words beside it; the pill drops under both on the phone */
.lib-cta-lead {
    display: flex;
    align-items: center;
    gap: 26px;
}

.lib-cta-frame {
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(155, 161, 255, 0.35);
    background: radial-gradient(circle at 50% 40%, rgba(124,131,255,0.35) 0%, #07071A 70%);
    box-shadow: 0 0 40px rgba(124,131,255,0.25);
}

.lib-cta-frame img {
    position: absolute;
    left: -12%;
    top: -4%;
    width: 124%;
    height: 124%;
}

.lib-cta-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 560px;
}

.lib-cta-label {
    font-family: var(--au-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--au-accent);
}

.lib-cta-h {
    margin: 0;
    text-wrap: balance;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.lib-cta-line {
    margin: 0;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--au-muted);
}

.lib-cta-act {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-start;
}

/* Talk to Nova: both pills ship hidden; the [hidden] rule at the end of this sheet wins over their display */
.lib-talk {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 54px;
    padding: 0 24px 0 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--au-lime) 82%, #FFFFFF) 0%, var(--au-lime) 100%);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--au-lime) 26%, transparent), var(--au-3d-rest);
    font-size: 16px;
    font-weight: 500;
    color: #0A0A1A;
}

/* Hover, as the board's .au-talk:hover draws it: 2 px up, 1.06 bright, the words and the shadow as at rest. Its inline colour beats the theme's `a:hover` white; here `.lib-talk:hover` outranks it. */
@media (hover: hover) {
    .lib-talk:hover {
        transform: translateY(-2px);
        filter: brightness(1.06);
        color: #0A0A1A;
    }
}

@media (hover: hover) and (min-width: 900px) {
    .lib-talk:hover {
        transform: translateY(calc(-2 * var(--lu)));
    }
}

/* Pressed: the canvas's pressed shadow, after the hover rules of both pills so it wins at the same weight; the 2 px move is in the motion block near the end of this sheet */
.lib-talk:active,
html[data-nova-talk-switch="off"] .lib-next-link:active {
    box-shadow: var(--au-3d-press);
}

/* The ring and the sheen at rest, as the home's pill draws them: the ring clear, the sheen out of the pill's clip; both take no press */
.lib-talk-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--au-lime) 60%, transparent);
    pointer-events: none;
    opacity: 0;
}

.lib-talk-sheen-clip {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    overflow: hidden;
    pointer-events: none;
}

.lib-talk-sheen {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 34%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    transform: translateX(-120%) skewX(-18deg);
}

.lib-talk-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #23265E 0%, #0B0B24 70%);
    color: var(--au-lime);
    box-shadow: inset 0 0 12px color-mix(in srgb, var(--au-lime) 35%, transparent);
}

.lib-eq {
    display: block;
    width: 2.5px;
    height: 13px;
    border-radius: 2px;
    background: currentColor;
}

/* Nova: the figure and her narrator, placed from the top of the frame; the phone's narrator sits under the figure */
.lib-nova {
    position: absolute;
    left: calc(50% - 124px);
    top: 78px;
    z-index: 1;
    width: 248px;
    height: 248px;
}

/* The frame is the board's 460 px, drawn at the figure's size (the phone's 248 px) and scaled as one piece; it follows the
   narrator so that the narrator's done state reaches the floor glow, and the narrator sits above it */
.lib-nova-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 460px;
    height: 460px;
    transform: scale(calc(248 / 460));
    transform-origin: 0 0;
    pointer-events: none;
}

.lib-nova-glow {
    position: absolute;
    left: -197.1px;
    top: -115px;
    width: 854.3px;
    height: 690px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(124,131,255,0.22) 0%, rgba(124,131,255,0.07) 55%, rgba(124,131,255,0) 100%);
}

.lib-nova-halo {
    position: absolute;
    left: 49.3px;
    top: -16.4px;
    width: 361.4px;
    height: 361.4px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(157, 123, 255, 0.16) 0%, rgba(157, 123, 255, 0) 100%);
}

.lib-nova-floor {
    position: absolute;
    left: 65.7px;
    top: 289.1px;
    width: 328.6px;
    height: 98.6px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(185, 190, 255, 0.22) 0%, rgba(124, 131, 255, 0) 100%);
}

.lib-nova-back,
.lib-nova-front {
    position: absolute;
    left: 0;
    top: 0;
    overflow: visible;
}

.lib-nova-crumbs {
    position: absolute;
    left: 0;
    top: 0;
    width: 1000px;
    height: 1000px;
    transform: scale(0.46);
    transform-origin: 0 0;
    mix-blend-mode: screen;
}

.lib-nova-run {
    stroke-dasharray: 0.07 0.93;
}

.lib-nova-core {
    position: absolute;
    left: 211px;
    top: 344.1px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(200, 204, 255, 0.6) 35%, rgba(124, 131, 255, 0) 72%);
}

.lib-nova-figure {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 55% 62%;
    -webkit-mask-image: radial-gradient(ellipse 52% 56% at 50% 46%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 52% 56% at 50% 46%, #000 70%, transparent 100%);
}

.lib-narrator {
    position: absolute;
    left: 50%;
    top: 252px;
    box-sizing: border-box;
    display: flex;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    width: min(342px, calc(100vw - 48px));
    text-align: center;
    translate: -50% 0;
}

.lib-narrator-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--au-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #9EA3FF;
    white-space: nowrap;
}

.lib-narrator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6FF0B4;
    box-shadow: 0 0 8px #6FF0B4;
}

.lib-narrator-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 10px;
    color: #C9CCFF;
    opacity: 1;
}

.lib-narrator-bar {
    display: block;
    width: 2px;
    height: 10px;
    border-radius: 2px;
    background: currentColor;
}

.lib-narrator-rule {
    width: 18px;
    height: 1px;
    background: rgba(158, 163, 255, 0.4);
}

.lib-narrator-words {
    color: #8C8FB8;
    letter-spacing: 0.16em;
    white-space: nowrap;
}

/* Once the narrator has finished a line the tag's bars, the large glow and the floor glow rest, and the star core rests at 0.6
   (the running pulse sets its own opacity, so 0.6 shows whenever the pulse does not run) */
.lib-narrator.is-done .lib-narrator-bars {
    opacity: 0.25;
}

.lib-narrator.is-done ~ .lib-nova-frame .lib-nova-glow,
.lib-narrator.is-done ~ .lib-nova-frame .lib-nova-floor {
    opacity: 0.65;
}

.lib-narrator.is-done ~ .lib-nova-frame .lib-nova-core {
    opacity: 0.6;
}

.lib-narrator-line {
    box-sizing: border-box;
    width: 100%;
    min-height: 68px;
    margin: 12px 0 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.5;
    color: #ECEDF8;
}

.lib-caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -0.16em;
    border-radius: 1px;
    background: #C9CCFF;
}

/* The narrator's pill, centred under the typed lines: the page unhides it only when the switch is on */
.lib-narrator .lib-talk {
    display: flex;
    margin-top: 18px;
}

/* Bottom line: the shared .au-foot (site.css, unchanged) is laid out as the board's */
.lib-page .lib-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 14px 16px;
    box-sizing: border-box;
    margin-top: auto;
    padding: 28px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.lib-foot-copy {
    flex-basis: 100%;
}

.lib-foot-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 16px;
}

.lib-foot a {
    color: var(--au-dim);
}

.lib-foot a:hover {
    color: var(--au-text);
}

.lib-foot-note {
    display: none;
    white-space: nowrap;
}

/* The parts whose place depends on the talk switch stay out until the one catalog read answers, so nothing drawn before it moves:
   the footer at every width; under 900 px the intro, filters, status and grid as well (the 900 px query undoes that). The block
   is drawn only on an answer of on. */
html:not([data-nova-talk-switch]) .lib-foot {
    display: none;
}

html:not([data-nova-talk-switch]) .lib-hero,
html:not([data-nova-talk-switch]) #lib-pills,
html:not([data-nova-talk-switch]) #lib-status,
html:not([data-nova-talk-switch]) #lib-grid {
    display: none;
}

html:not([data-nova-talk-switch="on"]) .lib-cta {
    display: none;
}

/* Desktop: the 1440 frame, every length the board's times --lu */
@media (min-width: 900px) {
    .lib {
        --lu: min(1px, 100vw / 1440);
    }

    .lib-long {
        display: inline;
    }

    .lib-short {
        display: none;
    }

    .lib-glow {
        left: calc(50% - 80 * var(--lu));
        top: calc(-260 * var(--lu));
        width: calc(1100 * var(--lu));
        height: calc(980 * var(--lu));
    }

    .lib-page {
        padding: 0 calc(120 * var(--lu));
    }

    .lib-bar {
        height: calc(96 * var(--lu));
    }

    .lib-home {
        gap: calc(12 * var(--lu));
        font-size: calc(16 * var(--lu));
    }

    .lib-live {
        gap: calc(12 * var(--lu));
        height: calc(40 * var(--lu));
        padding: 0 calc(16 * var(--lu)) 0 calc(14 * var(--lu));
        font-size: calc(14 * var(--lu));
    }

    .lib-live-dot {
        --lib-dot-ring: calc(5 * var(--lu));
        width: calc(8 * var(--lu));
        height: calc(8 * var(--lu));
    }

    .lib-live-kicker {
        font-size: calc(11 * var(--lu));
    }

    .lib-live-rule {
        display: block;
        height: calc(14 * var(--lu));
    }

    .lib-live-rule ~ span {
        display: inline;
    }

    .lib-hero {
        max-width: calc(700 * var(--lu));
        margin: 0;
        padding-top: calc(64 * var(--lu));
    }

    html[data-nova-talk-switch="on"] .lib-hero {
        padding-top: calc(64 * var(--lu));
    }

    html:not([data-nova-talk-switch]) .lib-hero:not([hidden]) {
        display: block;
    }

    html:not([data-nova-talk-switch]) #lib-pills:not([hidden]),
    html:not([data-nova-talk-switch]) #lib-status:not([hidden]) {
        display: flex;
    }

    html:not([data-nova-talk-switch]) #lib-grid:not([hidden]) {
        display: grid;
    }

    .lib-label {
        gap: calc(12 * var(--lu));
        font-size: calc(11 * var(--lu));
    }

    .lib-label::before {
        width: calc(24 * var(--lu));
    }

    .lib-h1 {
        margin-top: calc(20 * var(--lu));
        font-size: calc(84 * var(--lu));
    }

    .lib-h1-line {
        padding-right: calc(8 * var(--lu));
    }

    .lib-intro {
        max-width: calc(560 * var(--lu));
        margin: calc(26 * var(--lu)) 0 0;
        font-size: calc(19 * var(--lu));
    }

    .lib-count {
        gap: calc(10 * var(--lu)) calc(14 * var(--lu));
        margin-top: calc(26 * var(--lu));
        font-size: calc(12 * var(--lu));
    }

    .lib-dot {
        width: calc(3 * var(--lu));
        height: calc(3 * var(--lu));
    }

    #lib-yours {
        gap: calc(8 * var(--lu));
    }

    #lib-yours::after {
        width: calc(6 * var(--lu));
        height: calc(6 * var(--lu));
    }

    .lib-pills {
        gap: calc(8 * var(--lu));
        margin: calc(56 * var(--lu)) 0 0;
        padding: 0;
    }

    .lib-pill {
        gap: calc(8 * var(--lu));
        height: calc(40 * var(--lu));
        padding: 0 calc(16 * var(--lu));
        font-size: calc(14 * var(--lu));
    }

    .lib-pill-n {
        font-size: calc(11 * var(--lu));
    }

    .lib-status {
        gap: calc(16 * var(--lu));
    }

    .lib-status-line {
        font-size: calc(16 * var(--lu));
    }

    .lib-status-line:not(:empty) {
        margin-top: calc(40 * var(--lu));
    }

    .lib-retry {
        height: calc(40 * var(--lu));
        padding: 0 calc(16 * var(--lu));
        font-size: calc(14 * var(--lu));
    }

    .lib-grid {
        grid-template-columns: repeat(4, calc(285 * var(--lu)));
        justify-content: space-between;
        gap: calc(20 * var(--lu));
        margin-top: calc(64 * var(--lu));
    }

    .lib-span-1 {
        grid-column: span 1;
    }

    .lib-span-2 {
        grid-column: span 2;
    }

    .lib-span-3 {
        grid-column: span 3;
    }

    .lib-span-4 {
        grid-column: span 4;
    }

    .lib-card {
        width: calc(285 * var(--lu));
        height: calc(380 * var(--lu));
        border-radius: calc(21.3 * var(--lu));
    }

    .lib-card.is-marked {
        transform: translateY(calc(-8 * var(--lu))) scale(1.015);
        box-shadow: 0 calc(30 * var(--lu)) calc(70 * var(--lu)) rgba(0, 0, 0, 0.55), 0 0 calc(60 * var(--lu)) color-mix(in srgb, var(--au-accent) 16%, transparent);
    }

    .lib-card-prog {
        position: absolute;
        left: calc(13.6 * var(--lu));
        right: calc(13.6 * var(--lu));
        top: calc(11.6 * var(--lu));
        z-index: 1;
        display: flex;
        gap: calc(3.9 * var(--lu));
    }

    .lib-card-prog span {
        height: calc(1.9 * var(--lu));
        border-radius: calc(1.9 * var(--lu));
    }

    .lib-card-play {
        position: absolute;
        right: calc(13.6 * var(--lu));
        top: calc(21.3 * var(--lu));
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: calc(31 * var(--lu));
        height: calc(31 * var(--lu));
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        color: #FFFFFF;
    }

    .lib-card.is-marked .lib-card-play {
        transform: scale(1.12);
    }

    .lib-card-play svg {
        width: calc(9.7 * var(--lu));
        height: calc(9.7 * var(--lu));
    }

    .lib-card-yours {
        position: absolute;
        right: calc(13.6 * var(--lu));
        top: calc(21.3 * var(--lu));
        z-index: 1;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: calc(6.8 * var(--lu));
        height: calc(31 * var(--lu));
        padding: 0 calc(11.6 * var(--lu)) 0 calc(8.7 * var(--lu));
        border-radius: 999px;
        background: rgba(124, 131, 255, 0.2);
        font-family: var(--au-mono);
        font-size: calc(10 * var(--lu) * 285 / 294);
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: #E6E8FF;
    }

    .lib-card-yours::before {
        content: "";
        width: calc(10.7 * var(--lu));
        height: calc(10.7 * var(--lu));
        border-radius: 50%;
        background: var(--au-accent);
    }

    .lib-card-art {
        width: 100%;
    }

    .lib-card-hook {
        left: calc(13.6 * var(--lu));
        top: calc(23.3 * var(--lu));
        bottom: auto;
        max-width: calc(150 * var(--lu));
        height: calc(24 * var(--lu) * 285 / 294);
        padding: 0 calc(8.7 * var(--lu));
        border-radius: calc(6.8 * var(--lu));
        font-size: calc(11 * var(--lu) * 285 / 294);
    }

    /* The foot is laid out in the board's own card px (a 294 px card) and scaled with the card from its bottom left, as the board
       scales its whole card, so its words round their font metrics at the board's sizes, not at 9.7 px and 17.4 px */
    .lib-card-foot {
        --card-foot-k: tan(atan2(var(--lu) * 285 / 294, 1px));
        position: absolute;
        left: 0;
        top: auto;
        right: auto;
        bottom: 0;
        width: calc(100% / var(--card-foot-k));
        transform: scale(var(--card-foot-k));
        transform-origin: 0 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 6px;
        min-height: 0;
        margin-left: 0;
        padding: 44px 16px 16px;
        background: linear-gradient(180deg, rgba(7,7,26,0) 0%, rgba(7,7,26,0.94) 34%);
    }

    .lib-card-meta {
        font-size: 10px;
        letter-spacing: 0.16em;
    }

    .lib-card-title {
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        font-size: 18px;
    }

    .lib-card-desc {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        max-height: none;
        clip-path: none;
        font-size: 12.5px;
        line-height: 1.45;
    }

    .lib-card-act {
        gap: 8px;
        margin-top: 6px;
    }

    .lib-btn {
        height: 36px;
        padding: 0 10px;
        border-radius: 12px;
        font-size: 13px;
    }

    .lib-open {
        padding: 0 14px;
    }

    .lib-follow {
        gap: 8px;
    }

    .lib-reel-art {
        display: none;
    }

    .lib-next {
        height: calc(380 * var(--lu));
        padding: calc(34 * var(--lu));
        border-radius: calc(21.3 * var(--lu));
    }

    .lib-next-orbit {
        right: calc(-30 * var(--lu));
        width: calc(300 * var(--lu));
        height: calc(300 * var(--lu));
        margin-top: calc(-150 * var(--lu));
    }

    .lib-next-ring {
        left: calc(20 * var(--lu));
        top: calc(122 * var(--lu));
        width: calc(260 * var(--lu));
        height: calc(56 * var(--lu));
    }

    .lib-next-core {
        left: calc(141 * var(--lu));
        top: calc(141 * var(--lu));
        width: calc(18 * var(--lu));
        height: calc(18 * var(--lu));
    }

    .lib-next-head {
        gap: calc(10 * var(--lu));
    }

    .lib-next-num {
        font-size: calc(11 * var(--lu));
    }

    .lib-next-pill {
        height: calc(24 * var(--lu));
        padding: 0 calc(10 * var(--lu));
        font-size: calc(10 * var(--lu));
    }

    .lib-next-text {
        max-width: calc(360 * var(--lu));
    }

    .lib-next-title {
        font-size: calc(30 * var(--lu));
    }

    .lib-next-line {
        margin-top: calc(12 * var(--lu));
        font-size: calc(15 * var(--lu));
    }

    .lib-next-link {
        gap: calc(9 * var(--lu));
        min-height: calc(44 * var(--lu));
        font-size: calc(14 * var(--lu));
    }

    html[data-nova-talk-switch="off"] .lib-next-link {
        height: calc(48 * var(--lu));
        min-height: calc(48 * var(--lu));
        padding: 0 calc(22 * var(--lu));
    }

    .lib-cta {
        flex-direction: row;
        align-items: center;
        gap: calc(28 * var(--lu));
        margin-top: calc(96 * var(--lu));
        padding: calc(44 * var(--lu)) calc(52 * var(--lu));
        border-radius: calc(26 * var(--lu));
    }

    .lib-cta-lead {
        gap: calc(26 * var(--lu));
    }

    .lib-cta-frame {
        width: calc(92 * var(--lu));
        height: calc(92 * var(--lu));
    }

    .lib-cta-text {
        gap: calc(10 * var(--lu));
        max-width: calc(560 * var(--lu));
    }

    .lib-cta-label {
        font-size: calc(11 * var(--lu));
    }

    .lib-cta-h {
        font-size: calc(36 * var(--lu));
    }

    .lib-cta-line {
        font-size: calc(15 * var(--lu));
    }

    .lib-cta-act {
        justify-content: flex-end;
    }

    .lib-talk {
        gap: calc(14 * var(--lu));
        height: calc(54 * var(--lu));
        padding: 0 calc(24 * var(--lu)) 0 calc(7 * var(--lu));
        font-size: calc(16 * var(--lu));
    }

    .lib-talk-badge {
        gap: calc(3 * var(--lu));
        width: calc(40 * var(--lu));
        height: calc(40 * var(--lu));
    }

    .lib-eq {
        width: calc(2.5 * var(--lu));
        height: calc(13 * var(--lu));
    }

    .lib-nova {
        left: calc(856 * var(--lu));
        top: calc(66 * var(--lu));
        width: calc(460 * var(--lu));
        height: calc(460 * var(--lu));
    }

    .lib-nova-frame {
        transform: scale(tan(atan2(var(--lu), 1px)));
    }

    .lib-narrator {
        left: calc((884 - 856) * var(--lu));
        top: calc((470 - 66) * var(--lu));
        align-items: flex-start;
        width: calc(420 * var(--lu));
        text-align: left;
        translate: none;
    }

    .lib-narrator-tag {
        gap: calc(10 * var(--lu));
        font-size: calc(10 * var(--lu));
    }

    .lib-narrator-dot {
        width: calc(6 * var(--lu));
        height: calc(6 * var(--lu));
    }

    .lib-narrator-bars {
        gap: calc(2 * var(--lu));
        height: calc(10 * var(--lu));
    }

    .lib-narrator-bar {
        width: calc(2 * var(--lu));
        height: calc(10 * var(--lu));
    }

    .lib-narrator-rule {
        width: calc(18 * var(--lu));
    }

    .lib-narrator-line {
        min-height: calc(78 * var(--lu));
        margin-top: calc(12 * var(--lu));
        font-size: calc(17 * var(--lu));
    }

    .lib-narrator .lib-talk {
        margin-top: calc(18 * var(--lu));
    }

    .lib-page .lib-foot {
        justify-content: space-between;
        gap: calc(14 * var(--lu));
        padding: calc(32 * var(--lu)) 0 calc(40 * var(--lu));
        font-size: calc(11 * var(--lu));
        letter-spacing: 0.16em;
    }

    .lib-foot-copy {
        flex-basis: auto;
    }

    .lib-foot-links {
        flex-wrap: nowrap;
        gap: calc(28 * var(--lu));
    }

    .lib-foot-note {
        display: inline;
    }
}

/* Touch from 900 px: step 1 sits in the button row, before step 2 */
@media (min-width: 900px) and (hover: none) {
    .lib-reel-row {
        display: flex;
    }
}

/* A window of 900 px or more with hover keeps today's card: "Watch reel" and a plain, solid "Comment <WORD>" chip with no step numbers */
@media (min-width: 900px) and (hover: hover) {
    .lib-watch {
        display: flex;
        flex: 0 0 auto;
        width: auto;
        padding: 0 10px;
        font-size: 13px;
    }

    .lib-watch::before {
        content: "";
        flex-shrink: 0;
        width: 8px;
        height: 8px;
        background: currentColor;
        clip-path: polygon(20% 12%, 20% 88%, 86% 50%);
    }

    .lib-watch:hover {
        border-color: rgba(255, 255, 255, 0.34);
        background: rgba(255, 255, 255, 0.08);
    }

    .lib-chip {
        display: block;
        min-height: 36px;
        padding: 9px 10px;
        border: 1px solid rgba(124, 131, 255, 0.45);
        border-radius: 12px;
        font-size: 13px;
        line-height: 15px;
        text-align: center;
    }

    .lib-step-n,
    .lib-sr {
        display: none;
    }

    .lib-word {
        font-family: inherit;
        font-size: inherit;
        font-weight: inherit;
        letter-spacing: inherit;
        color: inherit;
    }
}

/* The card's transitions are opt-in too: these selectors outrank the reduced-motion reset (`.lib *`), so they may not sit outside the no-preference query */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
    .lib-card-prog i {
        transition: width 0.3s ease;
    }

    .lib-card-play {
        transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    .lib-card.is-marked .lib-card-prog span:first-child i {
        transition: width 4.5s linear;
    }
}

/* Motion is opt-in: the rules above are the still states */
@media (prefers-reduced-motion: no-preference) {
    @keyframes lib-fadeup {
        from { opacity: 0; transform: translateY(16px); }
        to { opacity: 1; transform: none; }
    }

    @keyframes lib-eq {
        0%, 100% { transform: scaleY(0.3); }
        50% { transform: scaleY(1); }
    }

    @keyframes lib-run {
        from { stroke-dashoffset: 1; }
        to { stroke-dashoffset: 0; }
    }

    @keyframes lib-core {
        from { transform: scale(0.9); opacity: 0.75; }
        to { transform: scale(1.12); opacity: 1; }
    }

    @keyframes au-breathe {
        from { transform: scale(1) translateY(0); }
        to { transform: scale(1.012) translateY(-4px); }
    }

    @keyframes lib-lineup {
        from { transform: translateY(112%) rotateX(-50deg); }
        to { transform: none; }
    }

    @keyframes lib-shimmer {
        from { background-position: 0% 50%; }
        to { background-position: 100% 50%; }
    }

    @keyframes lib-coreglow {
        0%, 100% { opacity: 0.5; transform: scale(0.92); }
        50% { opacity: 1; transform: scale(1.08); }
    }

    @keyframes lib-softdot {
        0%, 100% { box-shadow: 0 0 0 0 rgba(124, 131, 255, 0.55); }
        50% { box-shadow: 0 0 0 var(--lib-dot-ring) rgba(124, 131, 255, 0); }
    }

    @keyframes lib-softping {
        0% { transform: scale(1); opacity: 0.55; }
        70%, 100% { transform: scale(1.5); opacity: 0; }
    }

    @keyframes lib-sheen {
        0% { transform: translateX(-120%) skewX(-18deg); }
        14%, 100% { transform: translateX(320%) skewX(-18deg); }
    }

    @keyframes lib-caret {
        0%, 49% { opacity: 1; }
        50%, 100% { opacity: 0; }
    }

    @keyframes lib-grainmove {
        0% { transform: translate(0, 0); }
        25% { transform: translate(-40px, 22px); }
        50% { transform: translate(28px, -36px); }
        75% { transform: translate(-18px, -12px); }
        100% { transform: translate(0, 0); }
    }

    .lib-label,
    .lib-narrator,
    .lib-intro,
    .lib-count,
    .lib-pills,
    .lib-in {
        animation: lib-fadeup 1.2s cubic-bezier(0.16, 1, 0.3, 1) var(--lib-delay) both;
    }

    .lib-h1-rise {
        animation: lib-lineup 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .lib-h1-mask:first-child .lib-h1-rise { animation-delay: 0.35s; }
    .lib-h1-mask:last-child .lib-h1-rise { animation-delay: 0.5s; }

    .lib-h1-line {
        animation: lib-shimmer 12s ease-in-out infinite alternate;
    }

    .lib-nova-frame {
        animation-duration: 2s;
    }

    .lib .au-stars.au-f {
        animation-duration: 2.4s;
    }

    .lib-next-core {
        animation: lib-coreglow 3s ease-in-out infinite;
    }

    .lib-live-dot {
        animation: lib-softdot 2.2s ease-in-out infinite;
    }

    .lib-talk-ring {
        animation: lib-softping 3.4s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
    }

    .lib-talk-sheen {
        animation: lib-sheen 9s cubic-bezier(0.4, 0, 0.2, 1) 3.3s infinite both;
    }

    .lib-nova-figure {
        animation: au-breathe 8s ease-in-out infinite alternate;
    }

    .lib-caret {
        animation: lib-caret 1.06s steps(1) infinite;
    }

    .lib-eq {
        animation: lib-eq 1.3s ease-in-out infinite;
    }

    .lib-eq:nth-child(1) { animation-delay: -0.2s; }
    .lib-eq:nth-child(2) { animation-delay: -0.65s; }
    .lib-eq:nth-child(3) { animation-delay: -0.4s; }
    .lib-eq:nth-child(4) { animation-delay: -0.9s; }

    .lib-narrator-bar { animation: lib-eq 1.3s ease-in-out infinite; }
    .lib-narrator-bar:nth-child(1) { animation-delay: -0.2s; }
    .lib-narrator-bar:nth-child(2) { animation-delay: -0.6s; }
    .lib-narrator-bar:nth-child(3) { animation-delay: -0.4s; }

    .lib-nova-run {
        animation: lib-run 7s linear infinite;
    }

    .lib-nova-core {
        animation: lib-core 2.6s ease-in-out infinite alternate;
    }

    .lib-narrator-bars {
        transition: opacity 0.3s ease;
    }

    .lib-nova-glow,
    .lib-nova-floor {
        transition: opacity 0.6s ease;
    }

    .lib-grain-noise {
        animation: lib-grainmove 0.9s steps(4) infinite;
    }

    .lib-pill {
        transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
    }

    .lib-btn {
        transition: border-color 0.25s ease, background 0.25s ease, filter 0.25s ease;
    }

    .lib-reel-art,
    .lib-reel-row {
        transition: border-color 0.25s ease, background 0.25s ease;
    }

    .lib-card {
        transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s ease, box-shadow 0.45s ease;
    }

    .lib-talk,
    html[data-nova-talk-switch="off"] .lib-next-link {
        transition: var(--au-3d-transition);
    }

    .lib-talk:active,
    html[data-nova-talk-switch="off"] .lib-next-link:active {
        transform: translateY(var(--au-3d-press-y));
    }

    .lib-arr {
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

.lib-label { --lib-delay: 0.2s; }
.lib-narrator { --lib-delay: 0.9s; }
.lib-intro { --lib-delay: 0.8s; }
.lib-count { --lib-delay: 1s; }
.lib-pills { --lib-delay: 1.15s; }
.lib-in { --lib-delay: 0s; }

/* Focus: a keyboard ring only (site.css hides it for the mouse) */
.lib a:focus-visible,
.lib button:focus-visible,
.lib-card:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--au-accent) 80%, transparent);
    outline-offset: 3px;
}

/* Reduced motion: nothing types, blinks, breathes or moves, and no transition runs */
@media (prefers-reduced-motion: reduce) {
    .lib *,
    .lib *::before,
    .lib *::after {
        animation: none;
        transition: none;
    }

    /* A pressed pill sits still: the hover lift would float it over the collapsed lip */
    .lib-talk:active,
    html[data-nova-talk-switch="off"] .lib-next-link:active {
        transform: none;
    }
}

/* Keyboard focus on a lime pill: the shared ring, in a colour that reads over the pill's lime glow */
.lib .lib-talk:focus-visible {
    outline-color: var(--au-ring-lime);
}

html[data-nova-talk-switch="off"] .lib-next-link:focus-visible {
    outline-color: var(--au-ring-lime);
}

/* Last, so that nothing above that sets a display shows an element the page hides */
.lib [hidden] {
    display: none;
}

/* The card opens its server-selected page; reel and follow links keep their own destinations. */
.lib-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.lib-card-foot { z-index: 2; pointer-events: none; }
.lib-card-foot a { pointer-events: auto; }
.lib-reel-art { z-index: 3; }
.lib-card-hook, .lib-card-prog, .lib-card-play, .lib-card-yours { pointer-events: none; }
.lib-open { order: -1; flex-basis: 100%; }
.lib-card:has(.lib-card-link:focus-visible) { outline: 2px solid var(--au-accent); outline-offset: 3px; }
.lib .lib-card-link:focus-visible { outline: none; }
