/* Spider Updates. Built on inner.css + flow.css (the page title, .p-hero). The latest release in
   a featured white card, the earlier ones in a hairline list under it, and «Your update» pinned
   beside them. Phones: latest → your update → earlier releases → help. */

.u-page {
    padding-bottom: var(--section-space);
    interpolate-size: allow-keywords;
}

.u-layout {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    align-items: start;
    gap: 24px;
    margin-top: var(--section-space);
}

.u-latest {
    grid-column: 1;
    grid-row: 1;
}

.u-archive {
    grid-column: 1;
    grid-row: 2;
    margin-top: calc(var(--section-space) - 24px);   /* the grid's 24 px row gap + this = 64 */
}

.u-side {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: calc(var(--lnav-h) + 24px);
    display: grid;
    gap: 16px;
}

/* ---------- latest release ---------- */
.u-latest {
    padding: 48px 56px 40px;
    border-radius: var(--radius-big);
    background: var(--card);
}

.u-latest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.u-tag {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--red-t);
    color: var(--red-ink);
    font-size: 13px;
    font-weight: 600;
}

.u-latest-head img {
    width: 44px;
    height: 44px;
}

.u-version {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin: 28px 0 0;
}

.u-version strong {
    color: var(--g900);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.u-version span {
    color: var(--g700);
    font-size: 17px;
}

.u-latest .h2 {
    margin-top: 20px;
    font-size: clamp(1.75rem, 2.6vw, 2.5rem);
}

.u-highlights {
    display: grid;
    gap: 16px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.u-highlights li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px;
    color: var(--g900);
    font-size: 19px;
    line-height: 1.5;
}

.u-highlights svg {
    width: 28px;
    height: 28px;
    fill: var(--red);
}

.u-compat {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.u-compat span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--g300);
    border-radius: 999px;
    color: var(--g700);
    font-size: 14px;
}

.u-compat b {
    color: var(--g900);
    font-weight: 600;
}

.u-compat em {
    margin-left: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--red-t);
    color: var(--red-ink);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

/* ---------- open-and-close rows (all release notes, earlier releases, the rule) ---------- */
.u-page details > summary {
    list-style: none;
    cursor: pointer;
}

.u-page details > summary::-webkit-details-marker {
    display: none;
}

.u-page details .ctl svg {
    transition: transform .4s var(--ease);
}

.u-page details[open] > summary .ctl svg {
    transform: rotate(45deg);
}

.u-page summary:hover .ctl {
    background: var(--g300);
    color: var(--g900);
}

.u-page details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size .5s var(--ease), content-visibility .5s var(--ease) allow-discrete;
}

.u-page details[open]::details-content {
    block-size: auto;
}

.u-all {
    margin-top: 36px;
    border-top: 1px solid var(--g300);
}

.u-all > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    color: var(--g900);
    font-size: 17px;
    font-weight: 600;
}

.u-body {
    color: var(--g700);
    font-size: 16px;
    line-height: 1.65;
}

.u-all .u-body {
    padding-top: 16px;
}

.u-body p {
    margin: 0 0 14px;
}

.u-notes {
    margin: 0;
    padding-left: 1.15em;
}

.u-notes li + li {
    margin-top: 8px;
}

.u-notes li::marker {
    color: var(--g500);
}

/* ---------- earlier releases ---------- */
.u-archive .h2 {
    margin-bottom: var(--title-gap);
}

.u-list {
    padding: 4px 36px;
    border-radius: var(--radius-card);
    background: var(--card);
}

.u-release + .u-release {
    border-top: 1px solid var(--g300);
}

.u-release > summary {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
}

.u-id strong {
    display: block;
    color: var(--g900);
    font-size: 19px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.u-id span {
    color: var(--g700);
    font-size: 14px;
}

.u-line {
    color: var(--g900);
    font-size: 17px;
}

.u-release .u-body {
    padding: 0 60px 26px 184px;
}

.u-release .link {
    margin-top: 14px;
    font-size: 15px;
}

.inner .u-older {
    width: auto;
    margin: 20px 0 0;
    padding: 0 26px;
}

/* ---------- your update · help ---------- */
.u-access,
.u-help {
    padding: 36px;
    border-radius: var(--radius-card);
    background: var(--card);
}

.u-access h2 {
    margin: 10px 0 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.u-access > p:not(.eyebrow),
.u-help p {
    margin: 10px 0 0;
    color: var(--g700);
    font-size: 16px;
    line-height: 1.6;
}

.u-access .btn {
    margin-top: 24px;
}

.u-access > p.u-sub {
    margin-top: var(--after-button);
    font-size: 13px;
}

.u-rule {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--g200);
}

.u-rule > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--g900);
    font-size: 15px;
    font-weight: 600;
}

.u-rule p {
    margin: 12px 0 0;
    color: var(--g700);
    font-size: 15px;
    line-height: 1.6;
}

.u-help h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
}

.u-help .link {
    margin-top: 16px;
    font-size: 15px;
}

/* ---------- tablet and phones: one column ---------- */
@media (max-width: 1068px) {
    .u-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .u-side {
        display: contents;
    }

    .u-latest,
    .u-archive,
    .u-access,
    .u-help {
        grid-column: 1;
        grid-row: auto;
    }

    .u-latest { order: 1; }
    .u-access { order: 2; }
    .u-archive { order: 3; margin-top: calc(var(--section-space) - 24px); }
    .u-help { order: 4; }
}

@media (max-width: 734px) {
    .u-layout {
        gap: 16px;
        margin-top: var(--section-space);
    }

    .u-latest {
        padding: 32px 24px 28px;
    }

    .u-version strong {
        font-size: 48px;
    }

    .u-highlights li {
        font-size: 17px;
    }

    .u-list {
        padding: 4px 20px;
    }

    .u-release > summary {
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 8px 16px;
    }

    .u-id {
        grid-column: 1;
    }

    .u-line {
        grid-column: 1;
        grid-row: 2;
        font-size: 16px;
    }

    .u-release .ctl {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .u-release .u-body {
        padding: 0 0 24px;
    }

    .u-access,
    .u-help {
        padding: 28px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .u-page details::details-content {
        transition: none;
    }
}
