/* Home second screen, the latest bundles: the board "Home 2 — Latest bundles with Nova" drawn on its 1440 x 900 frame,
   and the 390 x 844 phone board below 900 px. Every board length is calc(n * var(--bu)); the cards are drawn in
   their own 294 x 523 card pixels, calc(n * var(--bk)), at the board's 0.5404 (0.44 on a phone). Rules outside the
   motion blocks are the still state; the rise and reduced motion are at the end. */

#builds {
    --bu: min(1px, 100vw / 1440, 100lvh / 900);
    --bk: calc(0.5404 * var(--bu));
    position: relative;
    display: grid;
    place-items: center;
    overflow: clip;
}

/* :where() keeps the reset's reach and drops its weight, so the rules of the card parts win inside #builds */
:where(#builds) *,
:where(#builds) *::before,
:where(#builds) *::after {
    box-sizing: border-box;
}

.builds-frame {
    position: relative;
    width: calc(1440 * var(--bu));
    height: calc(900 * var(--bu));
}

/* Head */
.builds-head {
    position: absolute;
    left: calc(96 * var(--bu));
    top: calc(140 * var(--bu));
    width: calc(1248 * var(--bu));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.builds-head-main {
    display: flex;
    flex-direction: column;
    gap: calc(18 * var(--bu));
}

.builds-label {
    display: flex;
    align-items: center;
    gap: calc(12 * var(--bu));
    margin: 0;
    font-family: var(--au-mono);
    font-size: calc(11 * var(--bu));
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--au-accent);
}

.builds-label-rule {
    width: calc(24 * var(--bu));
    height: calc(1 * var(--bu));
    background: var(--au-accent);
}

#builds-h {
    margin: 0;
    font-size: calc(60 * var(--bu));
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

#builds-h .au-serif {
    font-size: 1.08em;
    color: var(--au-lime);
}

.builds-side {
    max-width: calc(320 * var(--bu));
    margin: 0 0 calc(14 * var(--bu));
    text-align: right;
    font-size: calc(16 * var(--bu));
    font-weight: 300;
    line-height: 1.5;
    color: var(--au-muted);
}

/* Nova's star: the shipped figure inside soft glows, breathing, lit while Nova types */
.builds-star {
    --su: var(--bu);
    position: absolute;
    left: calc(-8 * var(--bu));
    top: calc(244 * var(--bu));
    width: calc(510 * var(--su));
    height: calc(510 * var(--su));
    pointer-events: none;
}

.builds-star-arc {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.builds-star-run {
    stroke-dasharray: 0.07 0.93;
    animation: builds-run 7s linear infinite;
}

.builds-star-fig {
    position: absolute;
    inset: 0;
    transform-origin: 55% 62%;
    animation: builds-breathe 8s ease-in-out infinite alternate;
    -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%);
}

.builds-star-fig img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Nova's pixels (assets/nova-pixels.js): the board's 1000 px frame in screen blend, scaled with the figure as one piece.
   --su is the figure's own unit, so 510 of it over 1000 px is 0.51 at 1440 and 0.23 on a phone. */
.builds-star-pixels {
    position: absolute;
    left: 0;
    top: 0;
    width: 1000px;
    height: 1000px;
    transform-origin: 0 0;
    transform: scale(tan(atan2(calc(510 * var(--su)), 1000px)));
    mix-blend-mode: screen;
}

.builds-star-core {
    position: absolute;
    left: 50%;
    top: 78.92%;
    width: calc(40 * var(--su));
    height: calc(40 * var(--su));
    margin: calc(-20 * var(--su)) 0 0 calc(-20 * var(--su));
    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%);
    opacity: 0.55;
    transition: opacity 0.6s ease;
}

#builds.is-typing .builds-star-core {
    opacity: 1;
}

/* Nova's narrator */
.builds-guide {
    position: absolute;
    left: calc(96 * var(--bu));
    top: calc(704 * var(--bu));
    width: calc(390 * var(--bu));
}

.builds-guide-tag {
    display: flex;
    align-items: center;
    gap: calc(10 * var(--bu));
    margin: 0;
    font-family: var(--au-mono);
    font-size: calc(10 * var(--bu));
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #9EA3FF;
}

.builds-guide-dot {
    flex: none;
    width: calc(6 * var(--bu));
    height: calc(6 * var(--bu));
    border-radius: 50%;
    background: #74748C;
    box-shadow: 0 0 calc(8 * var(--bu)) #74748C;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#builds.is-reached .builds-guide-dot {
    background: #6FF0B4;
    box-shadow: 0 0 calc(8 * var(--bu)) #6FF0B4;
}

.builds-guide-bars {
    display: flex;
    align-items: center;
    gap: calc(2 * var(--bu));
    height: calc(10 * var(--bu));
    color: #C9CCFF;
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

#builds.is-typing .builds-guide-bars {
    opacity: 1;
}

.builds-guide-bars .builds-eq {
    width: calc(2 * var(--bu));
    height: calc(10 * var(--bu));
}

.builds-guide-bars .builds-eq {
    animation: builds-eq 1.3s ease-in-out infinite;
}

.builds-guide-rule {
    flex: none;
    width: calc(18 * var(--bu));
    height: calc(1 * var(--bu));
    background: rgba(158, 163, 255, 0.4);
}

.builds-guide-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    letter-spacing: 0.16em;
    color: #8C8FB8;
}

.builds-guide-line {
    margin: calc(12 * var(--bu)) 0 0;
    font-size: calc(18 * var(--bu));
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: -0.005em;
    color: #ECEDF8;
}

.builds-guide-typed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* The same box and font as the typed line, hidden, so the script measures where a line wraps */
.builds-guide-measure {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    visibility: hidden;
    pointer-events: none;
}

.builds-guide-caret {
    display: inline-block;
    width: calc(2 * var(--bu));
    height: 1.05em;
    margin-left: calc(2 * var(--bu));
    vertical-align: -0.16em;
    border-radius: 1px;
    background: #C9CCFF;
    animation: builds-caret 1.06s steps(1) infinite;
}

.builds-eq {
    display: block;
    width: calc(2.5 * var(--bu));
    height: calc(14 * var(--bu));
    border-radius: calc(2 * var(--bu));
    background: currentColor;
    transform: scaleY(0.3);
    transform-origin: 50% 50%;
}

/* Row */
.builds-row {
    position: absolute;
    left: calc(500 * var(--bu));
    top: calc(396 * var(--bu));
    width: calc(844 * var(--bu));
    display: flex;
    gap: calc(12.4 * var(--bu));
    margin: 0;
    padding: 0;
    list-style: none;
}

.builds-row[hidden] {
    display: none;
}

.builds-row > li {
    position: relative;
    flex: 0 0 auto;
    width: calc(294 * var(--bk));
    height: calc(523 * var(--bk));
    scroll-snap-align: start;
}

.builds-status {
    position: absolute;
    left: calc(500 * var(--bu));
    top: calc(396 * var(--bu));
    margin: 0;
    font-family: var(--au-mono);
    font-size: calc(13 * var(--bu));
    color: var(--au-muted);
}

.builds-loader {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 20px;
    color: var(--au-accent);
}

.builds-loader > span {
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 0 0 10px rgb(124 131 255 / 35%);
    animation: builds-loading 1.4s ease-in-out infinite;
}

.builds-loader > span:nth-child(2) { animation-delay: 0.16s; }
.builds-loader > span:nth-child(3) { animation-delay: 0.32s; }

@keyframes builds-loading {
    0%, 70%, 100% { opacity: 0.25; transform: translateY(0) scale(0.8); }
    35% { opacity: 0.9; transform: translateY(-4px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .builds-loader > span {
        animation: none;
        opacity: 0.6;
    }
}

/* Card */
.builds-card {
    position: relative;
    display: block;
    width: calc(294 * var(--bk));
    height: calc(523 * var(--bk));
    color: var(--au-text);
}

.builds-card-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: calc(22 * var(--bk));
    border: calc(1 * var(--bk)) solid rgba(255, 255, 255, 0.1);
    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%);
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s ease, box-shadow 0.45s ease;
}

.builds-card.is-marked .builds-card-face {
    transform: translateY(calc(-8 * var(--bk))) scale(1.015);
    border-color: rgba(124, 131, 255, 0.5);
    box-shadow: 0 calc(30 * var(--bk)) calc(70 * var(--bk)) rgba(0, 0, 0, 0.55), 0 0 calc(60 * var(--bk)) rgba(124, 131, 255, 0.16);
}

.builds-card-ring {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: calc(11.9 * var(--bu));
    box-shadow: inset 0 0 0 calc(1 * var(--bu)) rgba(190, 195, 255, 0.65), 0 0 0 calc(1 * var(--bu)) rgba(124, 131, 255, 0.25), 0 0 calc(42 * var(--bu)) rgba(124, 131, 255, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.builds-card.is-marked .builds-card-ring {
    opacity: 1;
}

.builds-card-tag {
    position: absolute;
    left: 50%;
    top: calc(-13 * var(--bu));
    z-index: 3;
    display: flex;
    align-items: center;
    box-sizing: content-box;
    gap: calc(6 * var(--bu));
    height: calc(24 * var(--bu));
    padding: 0 calc(10 * var(--bu)) 0 calc(6 * var(--bu));
    border-radius: 999px;
    border: calc(1 * var(--bu)) solid rgba(170, 176, 255, 0.35);
    background: rgba(14, 15, 40, 0.92);
    font-family: var(--au-mono);
    font-size: calc(9 * var(--bu));
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #C9CCFF;
    opacity: 0;
    transform: translateX(-50%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.builds-card-tag img {
    width: calc(14 * var(--bu));
    height: calc(14 * var(--bu));
    border-radius: 50%;
}

.builds-card.is-marked .builds-card-tag {
    opacity: 1;
}

.builds-card-prog {
    position: absolute;
    left: calc(14 * var(--bk));
    right: calc(14 * var(--bk));
    top: calc(12 * var(--bk));
    display: flex;
    gap: calc(4 * var(--bk));
}

.builds-card-prog span {
    flex: 1;
    height: calc(2 * var(--bk));
    border-radius: calc(2 * var(--bk));
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.builds-card-prog i {
    display: block;
    width: 0;
    height: 100%;
    background: #FFFFFF;
    transition: width 0.3s ease;
}

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

.builds-card-by {
    position: absolute;
    left: calc(14 * var(--bk));
    top: calc(26 * var(--bk));
    display: flex;
    align-items: center;
    gap: calc(8 * var(--bk));
    font-family: var(--au-mono);
    font-size: calc(10 * var(--bk));
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(236, 236, 244, 0.75);
}

.builds-card-by img {
    width: calc(20 * var(--bk));
    height: calc(20 * var(--bk));
    border-radius: 50%;
}

.builds-card-art {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.builds-card-hook {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(300 * var(--bk));
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    font-family: var(--au-mono);
    font-size: calc(40 * var(--bk));
    letter-spacing: -0.02em;
    color: #FFFFFF;
    opacity: 0.14;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.builds-card-hook:empty {
    display: none;
}

.builds-card.is-marked .builds-card-hook {
    opacity: 0.32;
    transform: translateY(calc(-6 * var(--bk)));
}

.builds-card-play {
    position: absolute;
    right: calc(14 * var(--bk));
    top: calc(22 * var(--bk));
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(32 * var(--bk));
    height: calc(32 * var(--bk));
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s ease;
}

.builds-card-play svg {
    width: calc(10 * var(--bk));
    height: calc(10 * var(--bk));
}

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

/* The foot is laid out in the board's own card pixels and scaled by the card's scale, as the board scales its whole
   card, so the label and title round their font metrics at the board's 10 px and 20 px */
.builds-card-foot {
    --card-foot-k: tan(atan2(var(--bk), 1px));
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% / var(--card-foot-k));
    transform: scale(var(--card-foot-k));
    transform-origin: 0 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 70px 18px 18px;
    background: linear-gradient(180deg, rgba(7, 7, 26, 0) 0%, rgba(7, 7, 26, 0.92) 45%);
}

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

.builds-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.builds-card-get {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    margin-top: 6px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--au-accent);
    font-size: 14px;
    font-weight: 500;
    color: #0A0A1A;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.builds-card-get svg {
    width: 13px;
    height: 13px;
}

.builds-card.is-marked .builds-card-get {
    opacity: 1;
    transform: none;
}

/* Foot row */
.builds-foot {
    position: absolute;
    right: calc(96 * var(--bu));
    top: calc(713 * var(--bu));
    display: flex;
    align-items: center;
    gap: calc(22 * var(--bu));
}

.builds-all-link {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--bu));
    min-height: 44px;
    font-size: calc(15 * var(--bu));
    color: var(--au-muted-2);
    transition: color 0.2s ease;
}

.builds-all-link:hover {
    color: var(--au-text);
}

.builds-all-link svg {
    width: calc(13 * var(--bu));
    height: calc(13 * var(--bu));
}

/* Switch off: the same link is the board's lime pill (.ex-cta, HomeScroll-q4v8.dc.html:368). With the switch on, or
   unknown (the row is hidden then), it stays the link above. */
html[data-nova-talk-switch="off"] .builds-all-link {
    gap: calc(10 * var(--bu));
    height: calc(52 * var(--bu));
    padding: 0 calc(24 * var(--bu));
    border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--au-lime) 82%, #FFFFFF) 0%, var(--au-lime) 100%);
    color: #0A0A1A;
    font-size: calc(15 * var(--bu));
    font-weight: 500;
    box-shadow: 0 calc(10 * var(--bu)) calc(30 * var(--bu)) color-mix(in srgb, var(--au-lime) 26%, transparent), var(--au-3d-rest);
}

/* A touch screen has no hover, so the colour and brightness need a pointer that hovers too */
@media (hover: hover) {
    html[data-nova-talk-switch="off"] .builds-all-link:hover {
        color: #0A0A1A;
        filter: brightness(1.08);
    }
}

/* The lift moves, so it also needs motion */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    html[data-nova-talk-switch="off"] .builds-all-link:hover {
        transform: translateY(calc(-1 * var(--bu)));
    }
}

.builds-talk {
    position: relative;
    display: flex;
    align-items: center;
    gap: calc(12 * var(--bu));
    height: calc(48 * var(--bu));
    margin: 0;
    padding: 0 calc(22 * var(--bu)) 0 calc(6 * var(--bu));
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(180deg, color-mix(in srgb, var(--au-lime) 82%, #FFFFFF) 0%, var(--au-lime) 100%);
    font-family: var(--au-font);
    font-size: calc(15 * var(--bu));
    font-weight: 500;
    color: #0A0A1A;
    box-shadow: 0 calc(10 * var(--bu)) calc(30 * var(--bu)) color-mix(in srgb, var(--au-lime) 26%, transparent), var(--au-3d-rest);
}

.builds-talk:hover {
    transform: translateY(calc(-2 * var(--bu)));
    filter: brightness(1.06);
}

/* Pressed: the canvas's pressed shadow, after the hover rules so it wins at the same weight */
html[data-nova-talk-switch="off"] .builds-all-link:active {
    box-shadow: var(--au-3d-press);
}

.builds-talk:active {
    box-shadow: var(--au-3d-press);
}

/* The transition and the 2 px press move need motion; the pressed shadow above shows with reduce motion on */
@media (prefers-reduced-motion: no-preference) {
    html[data-nova-talk-switch="off"] .builds-all-link {
        transition: var(--au-3d-transition);
    }

    .builds-talk {
        transition: var(--au-3d-transition);
    }

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

    .builds-talk:active {
        transform: translateY(var(--au-3d-press-y));
    }
}

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

.builds-talk-sheen::before {
    content: "";
    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));
    animation: builds-sheen 9s cubic-bezier(0.4, 0, 0.2, 1) 3.3s infinite both;
}

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

.builds-talk-badge .builds-eq {
    height: calc(12 * var(--bu));
    animation: builds-eq 1.3s ease-in-out infinite;
}

/* Keyboard focus */
#builds a:focus-visible,
#builds button:focus-visible {
    outline: 2px solid var(--au-accent);
    outline-offset: 3px;
}

/* Phone: 390 x 844 frame, one breakpoint at 900 px */
@media not all and (min-width: 900px) {
    #builds {
        --bu: min(1px, 100vw / 390, 100lvh / 844);
        --bk: calc(0.44 * var(--bu));
        container-type: inline-size;
    }

    .builds-frame {
        width: calc(390 * var(--bu));
        height: calc(844 * var(--bu));
    }

    .builds-head {
        left: calc(24 * var(--bu));
        top: calc(82 * var(--bu));
        width: calc(342 * var(--bu));
        flex-direction: column;
        align-items: flex-start;
    }

    #builds-h {
        font-size: calc(34 * var(--bu));
    }

    .builds-side {
        display: none;
    }

    .builds-star {
        --su: calc(var(--bu) * 166 / 510);
        left: calc(16 * var(--bu));
        top: calc(178 * var(--bu));
    }

    .builds-guide {
        left: calc(190 * var(--bu));
        top: calc(216 * var(--bu));
        width: calc(176 * var(--bu));
        text-align: left;
    }

    .builds-guide-tag {
        justify-content: flex-start;
    }

    .builds-guide-line {
        margin-top: calc(10 * var(--bu));
        font-size: calc(15 * var(--bu));
    }

    .builds-guide-typed {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    /* The row spans the whole screen, not just the 390 board, so a card is never cut by a hard edge inside a
       600-899 viewport; the padding keeps the first card on the board's left edge. */
    .builds-row {
        --bx: calc((100cqw - 390 * var(--bu)) / 2);
        left: calc(-1 * var(--bx));
        right: calc(-1 * var(--bx));
        top: calc(354 * var(--bu));
        width: auto;
        gap: calc(10 * var(--bu));
        padding: calc(18 * var(--bu)) calc(24 * var(--bu) + var(--bx)) calc(8 * var(--bu));
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: calc(24 * var(--bu) + var(--bx));
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .builds-row::-webkit-scrollbar {
        display: none;
    }

    .builds-status {
        left: calc(24 * var(--bu));
        top: calc(354 * var(--bu));
    }

    /* A phone has no hover, so the offer shows on every card at rest */
    .builds-card-get {
        opacity: 1;
        transform: none;
    }

    .builds-foot {
        left: calc(24 * var(--bu));
        right: calc(24 * var(--bu));
        top: calc(620 * var(--bu));
        justify-content: space-between;
    }
}

/* Give a short landscape window a wide board instead of shrinking a portrait one. */
@media (min-width: 600px) and (max-width: 899px) and (max-height: 500px) {
    #builds { --bu: min(1px, 100vw / 844, 100lvh / 390); --bk: calc(.25 * var(--bu)); }
    .builds-frame { width: 100%; height: 100%; }
    .builds-head { top: calc(44 * var(--bu)); width: calc(100% - 48 * var(--bu)); }
    .builds-head-main { gap: calc(8 * var(--bu)); }
    .builds-label { font-size: calc(9 * var(--bu)); }
    #builds-h { font-size: calc(28 * var(--bu)); }
    .builds-star { --su: calc(var(--bu) * 140 / 510); top: calc(108 * var(--bu)); left: calc(24 * var(--bu)); }
    .builds-guide { left: calc(24 * var(--bu)); top: calc(250 * var(--bu)); width: calc(170 * var(--bu)); }
    .builds-guide-line { font-size: calc(12 * var(--bu)); }
    .builds-guide-typed { -webkit-line-clamp: 2; line-clamp: 2; }
    .builds-row { left: calc(214 * var(--bu)); right: calc(24 * var(--bu)); top: calc(104 * var(--bu)); padding: 0; scroll-padding-inline: 0; }
    .builds-status { left: calc(214 * var(--bu)); top: calc(104 * var(--bu)); }
    .builds-foot { left: calc(214 * var(--bu)); top: calc(246 * var(--bu)); }
}

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

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

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

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

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

/* Arrival: driven by the film's --film-p, with no script. film.css leaves --film-p undefined (no @property,
   film.css:4-6), so every rule keys on #builds[style*="--film-p"]: the declarations hold only once film.js has written
   --film-p into this screen's style attribute (it writes the screen, not the stage, so a frame restyles this screen and
   not the whole stage), and without it they are invalid at computed-value time and the parts show in place. Ranges are the board's px of the 900 px move: --r0 and --r1 are where a part starts and ends (p x 900) and
   --rise how far it rises. The heading takes over as the hero fades; the shorter
   card stagger brings the whole section into view without a long empty beat. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    [data-film] #builds[style*="--film-p"] [data-builds-rise] {
        --k: clamp(0, (var(--film-p) * 900 - var(--r0)) / (var(--r1) - var(--r0)), 1);
        --v: calc(var(--k) * var(--k) * (3 - 2 * var(--k)));
        opacity: var(--v);
        translate: 0 calc((1 - var(--v)) * var(--rise) * var(--bu));
    }

    [data-film] #builds[style*="--film-p"] [data-builds-rise="head"] {
        --r0: 396;
        --r1: 558;
        --rise: 24;
    }

    [data-film] #builds[style*="--film-p"] [data-builds-rise="guide"] {
        --r0: 360;
        --r1: 612;
        --rise: 18;
    }

    [data-film] #builds[style*="--film-p"] [data-builds-rise="foot"] {
        --r0: 450;
        --r1: 540;
        --rise: 16;
    }

    [data-film] #builds[style*="--film-p"] [data-builds-rise="how"] {
        --r0: 450;
        --r1: 576;
        --rise: 12;
        /* Clear the reading row before Nova's departing pixels cross it. */
        --exit: clamp(0, (var(--film-p) - 1.02) / .08, 1);
        opacity: calc(var(--v) * (1 - var(--exit) * var(--exit) * (3 - 2 * var(--exit))));
    }

    /* The hand-over: the foot row and the cards' links fade to 0 from 1.3H to the 1.5H hand-over, 1 - smoothstep(1.3, 1.5), so
       no drawn control of the inert screen looks pressable; the row keeps its rise opacity (--v) under it */
    [data-film] #builds[style*="--film-p"] [data-builds-rise="foot"] {
        --h: clamp(0, (var(--film-p) - 1.3) / 0.2, 1);
        opacity: calc(var(--v) * (1 - var(--h) * var(--h) * (3 - 2 * var(--h))));
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li > .builds-card {
        --h: clamp(0, (var(--film-p) - 1.3) / 0.2, 1);
        opacity: calc(1 - var(--h) * var(--h) * (3 - 2 * var(--h)));
    }

    /* Nova's figure arrives and brightens (the board's b2 and land): opacity b, scale 0.92 + 0.08 b about 50% / 70%,
       brightness 1 + 0.6 l, so it rests at 1.49 on the stop */
    [data-film] #builds[style*="--film-p"] .builds-star {
        --s-ia: clamp(0, (var(--film-p) - 0.8) / 0.175, 1);
        --s-oa: clamp(0, (var(--film-p) - 1.05) / 0.25, 1);
        --s-b: calc(var(--s-ia) * var(--s-ia) * (3 - 2 * var(--s-ia)) * (1 - var(--s-oa) * var(--s-oa) * (3 - 2 * var(--s-oa))));
        --s-la: clamp(0, (var(--film-p) - 0.9) / 0.075, 1);
        --s-lb: clamp(0, (var(--film-p) - 0.985) / 0.055, 1);
        --s-l: calc(var(--s-la) * var(--s-la) * (3 - 2 * var(--s-la)) * (1 - var(--s-lb) * var(--s-lb) * (3 - 2 * var(--s-lb))));
        transform-origin: 50% 70%;
        opacity: var(--s-b);
        scale: calc(0.92 + 0.08 * var(--s-b));
    }

    [data-film] #builds[style*="--film-p"] .builds-star-fig img {
        filter: brightness(calc(1 + 0.6 * var(--s-l)));
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li {
        --k: clamp(0, (var(--film-p) * 900 - var(--r0)) / (var(--r1) - var(--r0)), 1);
        --v: calc(var(--k) * var(--k) * (3 - 2 * var(--k)));
        opacity: var(--v);
        translate: 0 calc((1 - var(--v)) * 16 * var(--bu));
    }

    /* Cards gently turn toward the visitor as they arrive. The same progress
       drives scroll, wheel and touch; the settled cards are flat and still. */
    [data-film] #builds[style*="--film-p"] .builds-row > li > .builds-card {
        --card-turn: -0.55;
        perspective: 1000px;
        perspective-origin: 50% 75%;
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li:nth-child(even) > .builds-card {
        --card-turn: 0.55;
    }

    [data-film] #builds[style*="--film-p"] .builds-card-face {
        transform-origin: 50% 75%;
        rotate: 1 var(--card-turn) 0 calc((1 - var(--v)) * 10deg);
    }

    [data-film] #builds[style*="--film-p"] .builds-card-face::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 4;
        pointer-events: none;
        background: linear-gradient(115deg, transparent 30%, rgba(224, 217, 255, .18) 49%, transparent 68%);
        opacity: calc(2.2 * var(--v) * (1 - var(--v)));
        transform: translateX(calc((2 * var(--v) - 1) * 100%));
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li:nth-child(1) {
        --r0: 450;
        --r1: 540;
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li:nth-child(2) {
        --r0: 457;
        --r1: 547;
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li:nth-child(3) {
        --r0: 464;
        --r1: 554;
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li:nth-child(4) {
        --r0: 471;
        --r1: 561;
    }

    [data-film] #builds[style*="--film-p"] .builds-row > li:nth-child(5) {
        --r0: 478;
        --r1: 568;
    }

    /* A short ripple completes just after input opens at 0.5H. Keyboard
       focus reveals its item immediately, even at the start of that fade. */
    [data-film] #builds[style*="--film-p"] .builds-row > li:focus-within,
    [data-film] #builds[style*="--film-p"] [data-builds-rise="foot"]:focus-within {
        --v: 1;
    }

    /* A navigation glide keeps the originating screen active until arrival. */
    [data-film] #builds[style*="--film-p"][inert] .builds-row > li,
    [data-film] #builds[style*="--film-p"][inert] [data-builds-rise="foot"] {
        opacity: 0;
    }
}

/* film.js makes every screen but the current one inert, so the loops run only while the screen shows */
#builds[inert] *,
#builds[inert] *::before,
#builds[inert] *::after {
    animation-play-state: paused;
}

/* Reduced motion: nothing on the screen moves; the id in the selector outranks every class rule above */
@media (prefers-reduced-motion: reduce) {
    #builds *,
    #builds *::before,
    #builds *::after {
        animation: none;
        transition: none;
    }

    /* A pressed pill sits still: the hover lift would float it over the collapsed lip */
    .builds-talk:active {
        transform: none;
    }
}

/* Keyboard focus on a lime pill: the shared ring, in a colour that reads over the pill's lime glow */
html[data-nova-talk-switch="off"] #builds .builds-all-link:focus-visible {
    outline-color: var(--au-ring-lime);
}

#builds .builds-talk:focus-visible {
    outline-color: var(--au-ring-lime);
}
