/*
 * The account area and the public challenge page (ADR-027), on top of base.css and checkout.css. Nothing here styles another page.
 * OD-126: the private pages are a hub — the person's night card with the navigation on the side (a band with tabs on a phone), the
 * page in the main column; stats, shortcuts, cards and the profile's photo studio on the system's surfaces, the brand's night purple
 * and turquoise as the only accents. Every colour is a token or the fixed night card (the same in both themes, like the header).
 */
@layer components {
    .c-acct {
        --acct-night: linear-gradient(155deg, #3a2560 0%, var(--brand-purple, #2d1d47) 42%, var(--brand-night, #0c0712) 100%);
        --acct-on-night: #f1edf8;
        --acct-on-night-muted: #bfacdd;
        --acct-glow: #5ce1ff;
        --acct-lift: 0 1px 0 rgb(12 7 18 / 0.04), 0 14px 28px -22px rgb(12 7 18 / 0.45);

        inline-size: min(100% - 2 * var(--gutter), 46rem);
        margin-inline: auto;
        padding-block: var(--space-l) var(--space-xl);
    }

    .c-acct--hub {
        inline-size: min(100% - 2 * var(--gutter), 76rem);
        padding-block-start: var(--space-m);
    }

    /* ---- the hub: side card + main column -------------------------------------------------------------------------------- */
    .c-acct-hub {
        display: grid;
        gap: var(--space-m);
    }

    .c-acct-body {
        container-type: inline-size;
        min-inline-size: 0;
    }

    .c-acct-side {
        position: relative;
        display: grid;
        gap: var(--space-s);
        overflow: hidden;
        padding: var(--space-s);
        border-radius: var(--radius-m);
        background: var(--acct-night);
        color: var(--acct-on-night);
        box-shadow: var(--acct-lift);
    }

    /* A turquoise light behind the person, and the lane lines of a track: decoration only, never over the words (z-order). */
    .c-acct-side::before {
        position: absolute;
        inset: -40% -30% auto auto;
        inline-size: 18rem;
        block-size: 18rem;
        border-radius: 50%;
        background: radial-gradient(circle, rgb(92 225 255 / 0.28), transparent 65%);
        content: "";
        pointer-events: none;
    }

    .c-acct-side > * {
        position: relative;
    }

    .c-acct-id {
        display: flex;
        align-items: center;
        gap: var(--space-s);
        min-inline-size: 0;
    }

    .c-acct-id__text {
        min-inline-size: 0;
    }

    .c-acct-id__name {
        margin: 0;
        font-family: var(--font-display);
        font-size: var(--text-l);
        font-weight: var(--weight-bold);
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .c-acct-id__mail {
        overflow: hidden;
        margin: var(--space-3xs) 0 0;
        color: var(--acct-on-night-muted);
        font-size: var(--text-s);
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .c-acct-id__text {
        max-inline-size: 100%;
    }

    .c-acct-id__badges {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2xs);
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .c-acct-badge,
    .c-acct-badge a {
        display: inline-flex;
        align-items: center;
        gap: 0.4em;
        color: inherit;
        font-size: var(--text-xs);
        font-weight: var(--weight-semibold);
        text-decoration: none;
    }

    .c-acct-badge {
        padding: 0.3rem 0.65rem;
        border: 1px solid rgb(255 255 255 / 0.16);
        border-radius: 999px;
        background: rgb(255 255 255 / 0.07);
    }

    .c-acct-badge .c-icon {
        --icon-size: 0.95rem;
    }

    .c-acct-badge--ok {
        color: #86dba0;
    }

    .c-acct-badge--todo {
        border-color: rgb(242 198 107 / 0.5);
        color: #f2c66b;
    }

    .c-acct-badge a:focus-visible,
    .c-acct-side a:focus-visible {
        outline: 3px solid var(--acct-glow);
        outline-offset: 2px;
    }

    /* The area's navigation: tabs that scroll inside themselves on a phone, a vertical list in the side card on a wide screen. */
    .c-acct__nav {
        display: flex;
        gap: var(--space-3xs);
        overflow-x: auto;
        margin-inline: calc(-1 * var(--space-s));
        padding-inline: var(--space-s);
        scrollbar-width: none;
    }

    .c-acct__nav a {
        display: inline-flex;
        flex: none;
        align-items: center;
        gap: var(--space-2xs);
        min-block-size: var(--control-height);
        padding: var(--space-2xs) var(--space-s);
        border-radius: var(--radius-m);
        color: var(--acct-on-night-muted);
        font-weight: var(--weight-semibold);
        text-decoration: none;
        white-space: nowrap;
    }

    .c-acct__nav .c-icon {
        --icon-size: 1.15rem;
    }

    .c-acct__nav a:hover {
        background: rgb(255 255 255 / 0.07);
        color: var(--acct-on-night);
    }

    .c-acct__nav a[aria-current="page"] {
        background: rgb(92 225 255 / 0.14);
        color: #ffffff;
        box-shadow: inset 0 -3px 0 var(--acct-glow);
    }

    .c-acct__nav a[aria-current="page"] .c-icon {
        color: var(--acct-glow);
    }

    .c-acct-side__out {
        display: none;
    }

    @media (width >= 60rem) {
        .c-acct-hub {
            grid-template-columns: 17.5rem minmax(0, 1fr);
            gap: var(--space-xl);
            align-items: start;
        }

        .c-acct-side {
            position: sticky;
            inset-block-start: var(--space-m);
            gap: var(--space-m);
            padding: var(--space-m);
        }

        .c-acct-id {
            flex-direction: column;
            align-items: flex-start;
        }

        .c-acct__nav {
            display: grid;
            overflow: visible;
            margin: 0;
            padding: var(--space-s) 0 0;
            border-block-start: 1px solid rgb(255 255 255 / 0.12);
        }

        .c-acct__nav a[aria-current="page"] {
            box-shadow: inset 3px 0 0 var(--acct-glow);
        }

        .c-acct-side__out {
            display: inline-flex;
            align-items: center;
            gap: var(--space-2xs);
            min-block-size: var(--control-height);
            padding-inline: var(--space-s);
            color: var(--acct-on-night-muted);
            font-size: var(--text-s);
            text-decoration: none;
        }

        .c-acct-side__out:hover {
            color: #ffffff;
        }

        .c-acct-side__out .c-icon {
            --icon-size: 1.1rem;
        }
    }

    /* ---- the person's picture --------------------------------------------------------------------------------------------- */
    .c-acct-avatar {
        --size: 2.5rem;

        display: inline-grid;
        flex: none;
        place-items: center;
        inline-size: var(--size);
        block-size: var(--size);
        overflow: hidden;
        border-radius: 50%;
        background: linear-gradient(140deg, #0091b3, #5e3d94);
        color: #ffffff;
        box-shadow: 0 0 0 3px rgb(92 225 255 / 0.6), 0 0 0 7px rgb(92 225 255 / 0.12);
    }

    .c-acct-avatar--l {
        --size: 4.5rem;
    }

    .c-acct-avatar--xl {
        --size: clamp(7rem, 5rem + 6vw, 9rem);
    }

    .c-acct-avatar img {
        display: block;
        inline-size: 100%;
        block-size: 100%;
        object-fit: cover;
    }

    .c-acct-avatar .c-icon {
        --icon-size: calc(var(--size) * 0.45);
    }

    .c-acct-avatar__initial {
        font-family: var(--font-display);
        font-size: calc(var(--size) * 0.44);
        font-weight: var(--weight-bold);
        line-height: 1;
    }

    .c-acct-avatar.is-pending {
        box-shadow: 0 0 0 3px var(--color-warning), 0 0 0 7px var(--color-warning-bg);
    }

    /* ---- page heads, titles, notes ---------------------------------------------------------------------------------------- */
    .c-acct__panel > * + * {
        margin-block-start: var(--space-s);
    }

    .c-acct-head {
        margin-block-end: var(--space-m);
    }

    .c-acct-head > * {
        margin: 0;
    }

    .c-acct-head__eyebrow {
        color: var(--color-signal);
        font-family: var(--font-display);
        font-size: var(--text-xs);
        font-weight: var(--weight-bold);
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .c-acct-head h1 {
        margin-block: var(--space-3xs) var(--space-2xs);
        font-family: var(--font-display);
        font-size: clamp(2rem, 1.55rem + 1.8vw, 2.75rem);
        line-height: 1.05;
    }

    .c-acct__panel h2 {
        margin-block-start: var(--space-l);
    }

    .c-acct-section-title {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        font-family: var(--font-display);
        font-size: var(--text-l);
    }

    .c-acct-count {
        display: inline-grid;
        place-items: center;
        min-inline-size: 1.6rem;
        block-size: 1.6rem;
        padding-inline: 0.45rem;
        border-radius: 999px;
        background: var(--color-surface-alt);
        font-size: var(--text-xs);
    }

    .c-acct__lead,
    .c-acct__hint {
        color: var(--color-muted);
    }

    .c-acct__hint {
        font-size: 0.875rem;
    }

    .c-acct-note {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4em;
    }

    .c-acct-note > .c-icon {
        --icon-size: 1.1rem;

        color: var(--color-signal);
    }

    .c-acct__ok {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        padding: var(--space-xs) var(--space-s);
        border-radius: var(--radius-m);
        background: var(--color-success-bg);
        color: var(--color-success);
        font-weight: var(--weight-semibold);
    }

    .c-acct__errors {
        padding: var(--space-xs) var(--space-s) var(--space-xs) var(--space-l);
        border: var(--border-hairline, 1px) solid var(--color-error, currentColor);
        border-radius: var(--radius-m);
        background: var(--color-error-bg);
        color: var(--color-error);
    }

    /* ---- buttons ---------------------------------------------------------------------------------------------------------- */
    .c-acct__action,
    .c-acct__button,
    .c-acct button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-2xs);
        min-block-size: var(--control-height);
        padding: var(--space-2xs) var(--space-s);
        border: var(--border-hairline, 1px) solid var(--color-border-strong);
        border-radius: var(--radius-m);
        background: transparent;
        color: var(--color-link);
        font: inherit;
        font-weight: var(--weight-semibold);
        text-decoration: none;
        cursor: pointer;
    }

    .c-acct__button:hover,
    .c-acct button:hover {
        background: var(--color-surface-alt);
    }

    /* `.c-acct` raises it above the plain `.c-acct button`: a <button> that is the page's action stays filled. */
    .c-acct .c-acct__action {
        border-color: transparent;
        background: var(--color-primary);
        color: var(--color-on-primary);
        font-weight: var(--weight-bold);
    }

    .c-acct .c-acct__action:hover {
        background: var(--color-primary-hover);
    }

    .c-acct :is(.c-acct__action, .c-acct__button, button) .c-icon {
        --icon-size: 1.1rem;
    }

    .c-acct__action[hidden],
    .c-acct button[hidden] {
        display: none;
    }

    .c-acct form[action$="/retirar"] button {
        border-color: var(--color-error);
        color: var(--color-error);
    }

    .c-acct a:focus-visible,
    .c-acct button:focus-visible,
    .c-acct input:focus-visible {
        outline: 3px solid var(--color-focus);
        outline-offset: 2px;
    }

    /* ---- overview --------------------------------------------------------------------------------------------------------- */
    .c-acct-callout {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: var(--space-s);
        align-items: center;
        padding: var(--space-m);
        border: 1px solid color-mix(in srgb, var(--color-signal) 40%, var(--color-border));
        border-radius: var(--radius-m);
        background: linear-gradient(120deg, color-mix(in srgb, var(--color-signal) 13%, var(--color-bg)), var(--color-surface-alt));
    }

    .c-acct-callout__icon {
        display: grid;
        place-items: center;
        inline-size: 3rem;
        block-size: 3rem;
        border-radius: 50%;
        background: var(--color-primary);
        color: var(--color-on-primary);
    }

    .c-acct-callout h2 {
        margin: 0;
        font-family: var(--font-display);
        font-size: var(--text-l);
    }

    .c-acct-callout p {
        margin: var(--space-3xs) 0 0;
    }

    .c-acct-callout .c-acct__action {
        grid-column: 1 / -1;
        justify-self: start;
    }

    @media (width >= 44rem) {
        .c-acct-callout {
            grid-template-columns: auto minmax(0, 1fr) auto;
        }

        .c-acct-callout .c-acct__action {
            grid-column: auto;
        }
    }

    /* The figures: one tile each, the number in the display face, a turquoise lane on top. */
    /* Two by two, or one row of four when the column has room: never three and an orphan. */
    :is(.c-acct-overview, .c-acct-runs__hero) .c-acct__facts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-s);
        margin: 0;
    }

    .c-acct-runs__hero .c-acct__facts {
        grid-template-columns: auto;
    }

    .c-acct-overview .c-acct__facts {
        margin-block-start: var(--space-m);
    }

    @container (width >= 42rem) {
        .c-acct-overview .c-acct__facts {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }

    .c-acct-overview .c-acct__facts > div {
        position: relative;
        overflow: hidden;
        padding: var(--space-m) var(--space-s) var(--space-s);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-m);
        background: var(--color-bg);
        box-shadow: var(--acct-lift);
    }

    .c-acct-overview .c-acct__facts > div::before {
        position: absolute;
        inset: 0 0 auto;
        block-size: 3px;
        background: linear-gradient(90deg, var(--color-signal), #8c6bc2);
        content: "";
    }

    :is(.c-acct-overview, .c-acct-runs__hero) .c-acct__facts dt {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        color: var(--color-muted);
        font-size: var(--text-s);
        letter-spacing: 0;
        text-transform: none;
    }

    :is(.c-acct-overview, .c-acct-runs__hero) .c-acct__facts dt .c-icon {
        --icon-size: 1.1rem;

        color: var(--color-signal);
    }

    :is(.c-acct-overview, .c-acct-runs__hero) .c-acct__facts dd {
        margin: var(--space-2xs) 0 0;
        font-family: var(--font-display);
        font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
        font-weight: var(--weight-bold);
        font-variant-numeric: tabular-nums;
        line-height: 1;
    }

    .c-acct-shortcuts {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
        gap: var(--space-s);
        padding: 0;
        list-style: none;
    }

    .c-acct-shortcuts a {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: var(--space-s);
        align-items: center;
        block-size: 100%;
        padding: var(--space-s);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-m);
        background: var(--color-bg);
        color: var(--color-text);
        text-decoration: none;
        box-shadow: var(--acct-lift);
        transition: border-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
    }

    .c-acct-shortcuts a > .c-icon:first-child {
        --icon-size: 1.35rem;

        box-sizing: content-box;
        padding: 0.7rem;
        border-radius: var(--radius-m);
        background: var(--color-surface-alt);
        color: var(--color-signal);
    }

    .c-acct-shortcuts a > .c-icon:last-child {
        color: var(--color-muted);
    }

    .c-acct-shortcuts a:hover {
        border-color: var(--color-signal);
        transform: translateY(-2px);
    }

    .c-acct-shortcuts__text strong {
        display: block;
        font-family: var(--font-display);
    }

    .c-acct-shortcuts__text span {
        color: var(--color-muted);
        font-size: var(--text-s);
    }

    /* ---- profile ---------------------------------------------------------------------------------------------------------- */
    .c-acct-privacy {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
        gap: var(--space-s);
        padding: 0;
        list-style: none;
    }

    .c-acct-privacy__item {
        display: flex;
        gap: var(--space-xs);
        padding: var(--space-s);
        border-radius: var(--radius-m);
        background: var(--color-surface-alt);
    }

    .c-acct-privacy__item > .c-icon {
        --icon-size: 1.25rem;

        flex: none;
        color: var(--color-signal);
    }

    .c-acct-privacy__item p {
        margin: 0;
    }

    .c-acct-privacy__item strong {
        display: block;
    }

    .c-acct__form {
        display: grid;
        gap: var(--space-xs);
    }

    .c-acct-profile .c-acct__form {
        gap: var(--space-m);
        margin-block-start: var(--space-m);
    }

    .c-acct-card {
        display: grid;
        gap: var(--space-xs);
        padding: var(--space-m);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-m);
        background: var(--color-bg);
        box-shadow: var(--acct-lift);
    }

    .c-acct .c-acct-card h2 {
        margin: 0 0 var(--space-3xs);
        font-family: var(--font-display);
        font-size: var(--text-l);
    }

    .c-acct-card > p {
        margin: 0;
    }

    .c-acct__form input:not([type="radio"], [type="checkbox"], [type="file"]) {
        inline-size: 100%;
        min-block-size: var(--control-height);
        padding-inline: var(--space-xs);
        border: var(--border-hairline, 1px) solid var(--color-border-strong);
        border-radius: var(--radius-m);
        background: var(--color-bg);
        color: var(--color-text);
        font: inherit;
    }

    .c-acct__form fieldset {
        display: grid;
        gap: var(--space-2xs);
        margin: 0;
        padding: var(--space-s);
        border: var(--border-hairline, 1px) solid var(--color-border);
        border-radius: var(--radius-m);
    }

    .c-acct__form label {
        display: block;
        min-block-size: 1.75rem;
    }

    .c-acct__form button {
        justify-self: start;
    }

    .c-acct-photo {
        display: grid;
        gap: var(--space-m);
    }

    .c-acct-photo__stage {
        display: grid;
        justify-items: center;
        align-content: start;
        gap: var(--space-s);
        padding: var(--space-l) var(--space-s) var(--space-m);
        border-radius: var(--radius-m);
        background: radial-gradient(circle at 50% 38%, rgb(92 225 255 / 0.22), transparent 62%), var(--acct-night);
        color: var(--acct-on-night-muted);
        text-align: center;
    }

    .c-acct-photo__stage .c-acct__hint {
        margin: 0;
        color: inherit;
    }

    /* A fieldset is as wide as its widest content by default (the file picker): on a phone it stays in its column. */
    .c-acct .c-acct-photo__options {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2xs);
        min-inline-size: 0;
        padding: 0;
        border: 0;
    }

    .c-acct-photo__options.is-off {
        opacity: 0.45;
    }

    @media (width >= 48rem) {
        .c-acct-photo {
            grid-template-columns: 13rem minmax(0, 1fr);
            align-items: start;
        }
    }

    .c-acct__form .c-acct-choice {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: var(--space-s);
        align-items: center;
        padding: var(--space-xs) var(--space-s);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-m);
        background: var(--color-bg);
        cursor: pointer;
        transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
    }

    .c-acct-choice:hover {
        border-color: var(--color-border-strong);
    }

    .c-acct-choice:has(input:checked) {
        border-color: var(--color-signal);
        background: color-mix(in srgb, var(--color-signal) 8%, var(--color-bg));
        box-shadow: inset 0 0 0 1px var(--color-signal);
    }

    .c-acct-choice input {
        inline-size: 1.15rem;
        block-size: 1.15rem;
        margin: 0;
        accent-color: var(--color-signal);
    }

    .c-acct-choice__thumb {
        display: grid;
        place-items: center;
        inline-size: 3rem;
        block-size: 3rem;
        overflow: hidden;
        border-radius: 50%;
        background: var(--color-surface-alt);
        color: var(--color-signal);
    }

    .c-acct-choice__thumb img {
        inline-size: 100%;
        block-size: 100%;
        object-fit: cover;
    }

    .c-acct-choice__thumb--initial {
        color: var(--color-text);
        font-family: var(--font-display);
        font-size: 1.35rem;
        font-weight: var(--weight-bold);
    }

    .c-acct-choice__text strong {
        display: block;
    }

    .c-acct-choice__text span {
        color: var(--color-muted);
        font-size: var(--text-s);
    }

    .c-acct-drop {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2xs);
        margin-block-end: var(--space-2xs);
        padding: var(--space-s);
        border: 1.5px dashed var(--color-border-strong);
        border-radius: var(--radius-m);
        background: var(--color-surface-alt);
        transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
    }

    .c-acct-drop.is-over {
        border-color: var(--color-signal);
        background: color-mix(in srgb, var(--color-signal) 12%, var(--color-bg));
    }

    .c-acct-drop input {
        inline-size: 100%;
        max-inline-size: 100%;
        font: inherit;
        font-size: var(--text-s);
    }

    .c-acct-drop__hint {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        margin: 0;
        color: var(--color-muted);
        font-size: var(--text-s);
    }

    /* Switches: the native checkbox drawn as a switch (still a checkbox to the keyboard and to assistive technology). */
    .c-acct__form .c-acct-switch {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: var(--space-s);
        align-items: center;
        min-block-size: var(--control-height);
        cursor: pointer;
    }

    .c-acct-switch input {
        --knob: 0.75rem;

        appearance: none;
        inline-size: 2.9rem;
        block-size: 1.6rem;
        margin: 0;
        border: 1px solid var(--color-border-strong);
        border-radius: 999px;
        background: radial-gradient(circle at var(--knob) 50%, #ffffff 0.55rem, transparent 0.6rem), var(--color-border);
        cursor: pointer;
        transition: background-color var(--dur-fast) var(--ease-standard);
    }

    .c-acct-switch input:checked {
        --knob: calc(100% - 0.75rem);

        border-color: var(--color-signal);
        background-color: var(--color-signal);
        background-image: radial-gradient(circle at var(--knob) 50%, #ffffff 0.55rem, transparent 0.6rem);
    }

    /* In the flow, never pinned over the form: nothing covers what the person is reading (owner rule). */
    .c-acct-save {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-2xs) var(--space-m);
        padding-block: var(--space-s);
    }

    .c-acct-save .c-acct__hint {
        margin: 0;
    }

    /* ---- registrations and runs: cards with their state ------------------------------------------------------------------- */
    .c-acct__list {
        display: grid;
        gap: var(--space-s);
        padding: 0;
        list-style: none;
    }

    .c-acct__card {
        --state: var(--color-border-strong);

        position: relative;
        overflow: hidden;
        padding: var(--space-m) var(--space-m) var(--space-m) calc(var(--space-m) + 4px);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-m);
        background: var(--color-bg);
        box-shadow: var(--acct-lift);
    }

    .c-acct__card::before {
        position: absolute;
        inset: 0 auto 0 0;
        inline-size: 4px;
        background: var(--state);
        content: "";
    }

    .c-acct__card:is([data-status="paid"], [data-status="confirmed"]) {
        --state: var(--color-success);
    }

    .c-acct__card:is([data-status="pending_payment"], [data-status="payment_review"], [data-status="reserved"]) {
        --state: var(--color-warning);
    }

    .c-acct__card:is([data-status="expired"], [data-status="cancelled"], [data-status="refunded"], [data-status="partially_refunded"]) {
        --state: var(--color-muted);
    }

    .c-acct__card > * + * {
        margin-block-start: var(--space-2xs);
    }

    .c-acct__card h3 {
        margin: 0;
        font-family: var(--font-display);
        font-size: var(--text-xl);
        line-height: 1.15;
    }

    .c-acct__card > p:first-of-type {
        color: var(--color-muted);
    }

    .c-acct__facts {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2xs);
        margin: 0;
    }

    .c-acct__card .c-acct__facts {
        margin-block-start: var(--space-s);
    }

    .c-acct__card .c-acct__facts > div {
        padding: var(--space-2xs) var(--space-s);
        border-radius: var(--radius-m);
        background: var(--color-surface-alt);
    }

    .c-acct__facts dt {
        color: var(--color-muted);
        font-size: var(--text-xs);
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .c-acct__facts dd {
        margin: 0;
        font-weight: var(--weight-semibold);
    }

    .c-acct__card .c-acct__facts > div:first-child dd {
        color: color-mix(in srgb, var(--state) 70%, var(--color-text));
    }

    /* The bib, drawn as a race bib: white paper, the number in the display face. */
    .c-acct__card .c-acct-bib {
        border: 2px solid var(--color-text);
        background: #ffffff;
        color: #2d1d47;
    }

    .c-acct__card .c-acct-bib dt {
        color: #5e3d94;
    }

    .c-acct__card .c-acct-bib dd {
        color: #2d1d47;
        font-family: var(--font-display);
        font-size: var(--text-l);
        font-weight: var(--weight-bold);
        line-height: 1.1;
    }

    .c-acct__lines {
        display: grid;
        gap: 0;
        margin-block-start: var(--space-s);
        padding: 0;
        list-style: none;
    }

    .c-acct__lines li {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: var(--space-2xs) var(--space-s);
        align-items: center;
        padding-block: var(--space-xs);
        border-block-start: 1px solid var(--color-border);
    }

    .c-acct__lines form {
        grid-column: 2;
        display: inline-block;
    }

    .c-acct__lines li > form + form {
        margin-block-start: 0;
    }

    @media (width >= 44rem) {
        .c-acct__lines li {
            grid-template-columns: auto minmax(0, 1fr) auto auto;
        }

        .c-acct__lines form {
            grid-column: auto;
        }
    }

    .c-acct-line__initial {
        display: grid;
        place-items: center;
        inline-size: 2.25rem;
        block-size: 2.25rem;
        border-radius: 50%;
        background: var(--color-surface-alt);
        font-family: var(--font-display);
        font-weight: var(--weight-bold);
    }

    .c-acct__card-actions {
        margin-block-start: var(--space-s);
    }

    .c-acct-empty {
        display: grid;
        justify-items: start;
        gap: var(--space-xs);
        padding: var(--space-m);
        border: 1.5px dashed var(--color-border);
        border-radius: var(--radius-m);
        color: var(--color-muted);
    }

    .c-acct-empty p {
        margin: 0;
    }

    .c-acct-empty__icon {
        color: var(--color-signal);
    }

    .c-acct-empty__icon .c-icon {
        --icon-size: 2rem;
    }

    .c-acct-empty__actions {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2xs);
    }

    .c-acct__actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-xs) var(--space-m);
    }

    .c-acct__share {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-2xs);
    }

    .c-acct__pages {
        display: flex;
        justify-content: space-between;
        gap: var(--space-s);
        margin-block-start: var(--space-m);
    }

    /* MOTION RUNNERS: the best score on the night band with «Jugar», then the records and the runs. */
    .c-acct-runs__hero {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: var(--space-m);
        padding: var(--space-m) var(--space-l);
        border-radius: var(--radius-m);
        background: radial-gradient(circle at 85% 20%, rgb(92 225 255 / 0.25), transparent 55%), var(--acct-night);
        color: var(--acct-on-night);
    }

    .c-acct-runs__hero p {
        margin: 0;
    }

    .c-acct-runs__hero .c-acct__facts dt {
        color: var(--acct-on-night-muted);
    }

    .c-acct-runs__hero .c-acct__facts dt .c-icon {
        color: var(--acct-glow);
    }

    .c-acct-runs__hero .c-acct__facts dd {
        font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
    }

    .c-acct-runs__hero .c-acct__action {
        background: var(--acct-glow);
        color: var(--brand-night, #0c0712);
    }

    .c-acct-runs__hero .c-acct__action:hover {
        background: #b8f2ff;
    }

    .c-acct-runs .c-acct__card h3 {
        font-variant-numeric: tabular-nums;
    }

    /* MOTION RUNNERS records per track (A-3): the table scrolls inside its box on a narrow screen, never the page. */
    .c-acct__table-wrap {
        overflow-x: auto;
        margin-block: var(--space-s) var(--space-l);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-m);
    }

    .c-acct__table {
        inline-size: 100%;
        border-collapse: collapse;
        font-variant-numeric: tabular-nums;
    }

    .c-acct__table :is(th, td) {
        padding: var(--space-xs);
        border-block-end: var(--border-hairline, 1px) solid var(--color-border);
        font-size: var(--text-s);
        text-align: start;
        white-space: nowrap;
    }

    .c-acct__table :is(th, td):first-child {
        padding-inline-start: var(--space-s);
    }

    /* The last column is a sentence («9,779 points to go»): it wraps instead of pushing the table past its card. */
    .c-acct__table tbody td:last-child {
        min-inline-size: 7rem;
        white-space: normal;
    }

    .c-acct__table tbody tr:last-child :is(th, td) {
        border-block-end: 0;
    }

    .c-acct__table thead th {
        background: var(--color-surface-alt);
        color: var(--color-muted);
        font-size: var(--text-xs);
        font-weight: var(--weight-semibold);
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .c-acct__table tbody th {
        font-family: var(--font-display);
    }

    /* ---- other pages of the area (gate, notices, invitation, challenge) --------------------------------------------------- */
    .c-acct__url code {
        overflow-wrap: anywhere;
    }

    .c-acct__photo {
        display: inline-grid;
        place-items: center;
        inline-size: 6rem;
        block-size: 6rem;
        border-radius: 50%;
        object-fit: cover;
    }

    .c-acct__photo--initial {
        background: var(--color-surface-alt);
        font-family: var(--font-display);
        font-size: 2.5rem;
        font-weight: 700;
    }

    .c-acct__challenge {
        text-align: center;
    }

    .c-acct__eyebrow {
        color: var(--color-muted);
        font-family: var(--font-display);
        letter-spacing: 0.08em;
    }

    .c-acct__score {
        font-family: var(--font-display);
        font-size: clamp(3rem, 2rem + 6vw, 5rem);
        font-weight: 700;
        line-height: 1;
    }

    .c-acct__score span {
        font-size: 1.125rem;
    }

    .c-acct__question {
        font-size: 1.25rem;
        font-weight: 700;
    }

    /* Transitions are already near-instant there (base.css safety net); a card does not move either. */
    @media (prefers-reduced-motion: reduce) {
        .c-acct-shortcuts a:hover {
            transform: none;
        }
    }

    /* ---- the sign-in gate (OD-129d) ----------------------------------------------------------------------------------------
     * A night stage, the same in both themes (like the hub's card): an aurora of the brand's turquoise and a violet light, the
     * lane lines of a track with two lights running on them, sparks rising. Decoration only — behind the words, aria-hidden,
     * compositor-friendly (transform, opacity, stroke-dashoffset) and still with reduced motion. The words never wait for it.
     */
    .c-acct--gate {
        inline-size: 100%;
        padding-block: 0;
    }

    .c-acct-gate {
        --gate-violet: #a98bff;
        --gate-line: rgb(191 172 221 / 0.22);
        --gate-glass: linear-gradient(160deg, rgb(50 33 82 / 0.94), rgb(22 13 39 / 0.96)); /* opaque enough that no light runs behind the words */
        --gate-ink: #12091f;

        position: relative;
        isolation: isolate;
        overflow: hidden;
        padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5.5rem);
        background:
            radial-gradient(90% 70% at 100% 0%, rgb(58 37 96 / 0.9), transparent 70%),
            linear-gradient(165deg, #22143d 0%, var(--brand-purple, #2d1d47) 42%, var(--brand-night, #0c0712) 100%);
        color: var(--acct-on-night);
    }

    .c-acct-gate a {
        color: var(--acct-glow);
        text-underline-offset: 0.2em;
    }

    .c-acct-gate :focus-visible {
        outline-color: var(--acct-glow);
    }

    .c-acct-gate__stage {
        position: absolute;
        inset: 0;
        z-index: -1;
        overflow: hidden;
        pointer-events: none;
    }

    /* A grid of faint dots, brightest behind the headline, fading to the edges. */
    .c-acct-gate__stage::before {
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgb(241 237 248 / 0.16) 1px, transparent 1.5px);
        background-size: 26px 26px;
        content: "";
        -webkit-mask-image: radial-gradient(80% 70% at 30% 25%, #000 0%, transparent 75%);
        mask-image: radial-gradient(80% 70% at 30% 25%, #000 0%, transparent 75%);
    }

    .c-acct-gate__aurora {
        position: absolute;
        border-radius: 50%;
        animation: c-acct-gate-drift 22s ease-in-out infinite alternate;
    }

    .c-acct-gate__aurora--a {
        inset: -22rem auto auto -16rem;
        inline-size: 52rem;
        block-size: 52rem;
        background: radial-gradient(circle, rgb(0 145 179 / 0.5), transparent 62%);
    }

    .c-acct-gate__aurora--b {
        inset: -8rem -18rem auto auto;
        inline-size: 46rem;
        block-size: 46rem;
        background: radial-gradient(circle, rgb(140 98 235 / 0.42), transparent 62%);
        animation-duration: 27s;
        animation-direction: alternate-reverse;
    }

    .c-acct-gate__aurora--c {
        inset: auto auto -26rem 24%;
        inline-size: 50rem;
        block-size: 50rem;
        background: radial-gradient(circle, rgb(92 225 255 / 0.22), transparent 60%);
        animation-duration: 31s;
    }

    .c-acct-gate__lanes {
        position: absolute;
        inset: auto 0 0;
        inline-size: 100%;
        block-size: min(70%, 36rem);
    }

    .c-acct-gate__lane {
        fill: none;
        stroke: rgb(191 172 221 / 0.17);
        stroke-width: 1.5;
        stroke-dasharray: 1000;
        animation: c-acct-gate-draw 2.6s var(--ease-enter) backwards;
    }

    .c-acct-gate__lane:nth-child(2) {
        animation-delay: 0.12s;
    }

    .c-acct-gate__lane:nth-child(3) {
        animation-delay: 0.24s;
    }

    .c-acct-gate__lane:nth-child(4) {
        animation-delay: 0.36s;
    }

    /* A light running along a lane: one short dash travelling the whole path. */
    .c-acct-gate__comet {
        fill: none;
        stroke: var(--acct-glow);
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-dasharray: 70 930;
        filter: drop-shadow(0 0 6px rgb(92 225 255 / 0.9));
        animation: c-acct-gate-comet 7s linear infinite;
    }

    .c-acct-gate__comet--late {
        stroke: var(--gate-violet);
        filter: drop-shadow(0 0 6px rgb(169 139 255 / 0.9));
        animation-duration: 9.5s;
        animation-delay: -4s;
    }

    .c-acct-gate__sparks > span {
        position: absolute;
        inset-block-end: -1rem;
        inset-inline-start: 8%;
        inline-size: 4px;
        block-size: 4px;
        border-radius: 50%;
        background: #c8f5ff;
        box-shadow: 0 0 10px 2px rgb(92 225 255 / 0.7);
        opacity: 0;
        animation: c-acct-gate-float 12s linear infinite;
    }

    .c-acct-gate__sparks > span:nth-child(2) { inset-inline-start: 17%; animation-duration: 15s; animation-delay: -6s; --sway: -2rem; }
    .c-acct-gate__sparks > span:nth-child(3) { inset-inline-start: 26%; animation-duration: 11s; animation-delay: -2s; }
    .c-acct-gate__sparks > span:nth-child(4) { inset-inline-start: 38%; animation-duration: 17s; animation-delay: -9s; --sway: -3rem; }
    .c-acct-gate__sparks > span:nth-child(5) { inset-inline-start: 49%; animation-duration: 13s; animation-delay: -4s; }
    .c-acct-gate__sparks > span:nth-child(6) { inset-inline-start: 58%; animation-duration: 16s; animation-delay: -11s; --sway: -1.5rem; }
    .c-acct-gate__sparks > span:nth-child(7) { inset-inline-start: 67%; animation-duration: 12s; animation-delay: -7s; }
    .c-acct-gate__sparks > span:nth-child(8) { inset-inline-start: 76%; animation-duration: 14s; animation-delay: -1s; --sway: -2.5rem; }
    .c-acct-gate__sparks > span:nth-child(9) { inset-inline-start: 85%; animation-duration: 18s; animation-delay: -13s; }
    .c-acct-gate__sparks > span:nth-child(10) { inset-inline-start: 93%; animation-duration: 13s; animation-delay: -5s; --sway: -2rem; }

    /* ---- layout: words, card, steps, advantages. On a phone the card comes right after the headline. ---- */
    .c-acct-gate__grid {
        display: grid;
        grid-template-areas: "intro" "card" "how" "perks";
        gap: var(--space-l);
        inline-size: min(100% - 2 * var(--gutter), 74rem);
        margin-inline: auto;
    }

    .c-acct-gate__intro {
        grid-area: intro;
    }

    .c-acct-gate__side {
        position: relative;
        grid-area: card;
        min-inline-size: 0;
    }

    .c-acct-gate__how {
        grid-area: how;
    }

    .c-acct-gate__perks {
        grid-area: perks;
    }

    @media (width >= 62rem) {
        .c-acct-gate__grid {
            grid-template-areas: "intro card" "how card" "perks perks";
            grid-template-rows: auto 1fr auto;
            grid-template-columns: minmax(0, 1fr) minmax(23rem, 27rem);
            gap: var(--space-l) clamp(3rem, 6vw, 6rem);
            align-items: start;
        }

        .c-acct-gate__intro {
            padding-block-start: var(--space-l);
        }

        .c-acct-gate__perks {
            margin-block-start: var(--space-m);
        }
    }

    /* Entrance: the blocks rise in, one after another (instant with reduced motion: the tokens are 0). */
    .c-acct-gate__intro,
    .c-acct-gate__side,
    .c-acct-gate__how,
    .c-acct-gate__perks {
        animation: c-acct-gate-enter var(--dur-cinematic) var(--ease-enter) backwards;
    }

    .c-acct-gate__side {
        animation-delay: calc(var(--stagger) * 2);
    }

    .c-acct-gate__how {
        animation-delay: calc(var(--stagger) * 4);
    }

    .c-acct-gate__perks {
        animation-delay: calc(var(--stagger) * 6);
    }

    /* ---- the words ---- */
    .c-acct-gate__intro > * {
        margin: 0;
    }

    .c-acct-gate__eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 0.55em;
        padding: 0.4rem 0.9rem 0.4rem 0.7rem;
        border: 1px solid rgb(92 225 255 / 0.38);
        border-radius: 999px;
        background: rgb(92 225 255 / 0.08);
        color: var(--acct-glow);
        font-family: var(--font-display);
        font-size: var(--text-xs);
        font-weight: var(--weight-bold);
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .c-acct-gate__eyebrow .c-icon {
        --icon-size: 1rem;
    }

    .c-acct-gate__live {
        position: relative;
        inline-size: 0.5rem;
        block-size: 0.5rem;
        border-radius: 50%;
        background: var(--acct-glow);
    }

    .c-acct-gate__live::after {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: var(--acct-glow);
        content: "";
        animation: c-acct-gate-ping 2.2s var(--ease-standard) infinite;
    }

    .c-acct-gate h1 {
        margin-block: var(--space-s);
        font-family: var(--font-display);
        font-size: clamp(2.3rem, 1.3rem + 4vw, 4.25rem);
        font-weight: var(--weight-bold);
        line-height: 1.03;
        letter-spacing: -0.015em;
        text-wrap: balance;
    }

    .c-acct-gate h1 em {
        display: block;
        inline-size: fit-content;
        background: linear-gradient(95deg, var(--acct-glow) 0%, #b9f3ff 45%, var(--gate-violet) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        font-style: normal;
    }

    @media (forced-colors: active) {
        .c-acct-gate h1 em {
            background: none;
            color: CanvasText;
        }
    }

    .c-acct-gate__lead {
        max-inline-size: 36rem;
        color: var(--acct-on-night-muted);
        font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
        line-height: 1.55;
    }

    .c-acct-gate__kicker {
        display: flex;
        align-items: center;
        gap: var(--space-xs);
        margin: 0 0 var(--space-s);
        color: var(--acct-glow);
        font-family: var(--font-display);
        font-size: var(--text-xs);
        font-weight: var(--weight-bold);
        letter-spacing: 0.18em;
        text-transform: uppercase;
    }

    .c-acct-gate__kicker::after {
        flex: 1;
        block-size: 1px;
        background: linear-gradient(90deg, rgb(92 225 255 / 0.45), transparent);
        content: "";
    }

    /* ---- how it works: three steps on a track; a light runs down it ---- */
    .c-acct-gate__steps {
        position: relative;
        display: grid;
        gap: var(--space-m);
        margin: 0;
        padding: 0;
        list-style: none;
        counter-reset: gate-step;
    }

    .c-acct-gate__steps::before,
    .c-acct-gate__steps::after {
        position: absolute;
        inset-block: 1.5rem;
        inset-inline-start: calc(1.5rem - 1px);
        inline-size: 2px;
        content: "";
    }

    .c-acct-gate__steps::before {
        background: linear-gradient(var(--acct-glow), var(--gate-violet));
        opacity: 0.35;
        transform-origin: top;
        animation: c-acct-gate-grow 1.2s var(--ease-enter) 0.4s backwards;
    }

    .c-acct-gate__steps::after {
        background: linear-gradient(transparent 0%, var(--acct-glow) 7%, transparent 14%);
        filter: drop-shadow(0 0 5px var(--acct-glow));
        opacity: 0;
        animation: c-acct-gate-run 3.6s var(--ease-standard) 1.2s infinite;
    }

    .c-acct-gate__step {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: 3rem minmax(0, 1fr);
        gap: var(--space-s);
        align-items: start;
    }

    .c-acct-gate__bubble {
        position: relative;
        display: grid;
        place-items: center;
        inline-size: 3rem;
        block-size: 3rem;
        border: 1px solid rgb(92 225 255 / 0.5);
        border-radius: 50%;
        background: radial-gradient(circle at 30% 25%, #3c2a66, #160d29 70%);
        box-shadow: 0 0 0 6px rgb(92 225 255 / 0.07), 0 0 26px -4px rgb(92 225 255 / 0.55);
        color: var(--acct-glow);
        counter-increment: gate-step;
    }

    .c-acct-gate__bubble .c-icon {
        --icon-size: 1.3rem;
    }

    .c-acct-gate__bubble::after {
        position: absolute;
        inset: -0.3rem -0.3rem auto auto;
        display: grid;
        place-items: center;
        inline-size: 1.3rem;
        block-size: 1.3rem;
        border-radius: 50%;
        background: var(--acct-glow);
        color: var(--gate-ink);
        content: counter(gate-step);
        font-family: var(--font-display);
        font-size: 0.72rem;
        font-weight: var(--weight-heavy);
    }

    .c-acct-gate__step h3 {
        margin: 0.1rem 0 0.25rem;
        font-family: var(--font-display);
        font-size: var(--text-l);
        line-height: 1.2;
    }

    .c-acct-gate__step p {
        margin: 0;
        color: var(--acct-on-night-muted);
        line-height: 1.5;
    }

    /* ---- the advantages ---- */
    .c-acct-gate__perk-list {
        display: grid;
        gap: var(--space-s);
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* On a phone each advantage is a row (symbol beside the words): four short rows instead of four tall cards. */
    @media (width < 40rem) {
        .c-acct-gate__perk {
            display: grid;
            grid-template-columns: 2.75rem minmax(0, 1fr);
            column-gap: var(--space-s);
            padding: var(--space-s);
        }

        .c-acct-gate__perk-icon {
            grid-row: span 2;
            margin-block-end: 0;
        }
    }

    @media (width >= 40rem) {
        .c-acct-gate__perk-list {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (width >= 62rem) {
        .c-acct-gate__perk-list {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }

    .c-acct-gate__perk {
        position: relative;
        overflow: hidden;
        padding: var(--space-m);
        border: 1px solid var(--gate-line);
        border-radius: var(--radius-m);
        background: var(--gate-glass);
        transition:
            transform var(--dur-moderate) var(--ease-standard),
            border-color var(--dur-moderate) var(--ease-standard),
            box-shadow var(--dur-moderate) var(--ease-standard);
    }

    .c-acct-gate__perk::before {
        position: absolute;
        inset: 0 0 auto;
        block-size: 2px;
        background: linear-gradient(90deg, transparent, var(--acct-glow), transparent);
        content: "";
        opacity: 0.55;
        transform: scaleX(0.35);
        transition: transform var(--dur-slow) var(--ease-standard), opacity var(--dur-slow) var(--ease-standard);
    }

    .c-acct-gate__perk:hover {
        border-color: rgb(92 225 255 / 0.45);
        box-shadow: 0 22px 44px -26px rgb(92 225 255 / 0.6);
        transform: translateY(calc(-1 * var(--travel-xs)));
    }

    .c-acct-gate__perk:hover::before {
        opacity: 1;
        transform: scaleX(1);
    }

    .c-acct-gate__perk-icon {
        display: grid;
        place-items: center;
        inline-size: 2.75rem;
        block-size: 2.75rem;
        margin-block-end: var(--space-s);
        border: 1px solid rgb(92 225 255 / 0.35);
        border-radius: 0.85rem;
        background: linear-gradient(140deg, rgb(92 225 255 / 0.22), rgb(169 139 255 / 0.16));
        color: var(--acct-glow);
    }

    .c-acct-gate__perk-icon .c-icon {
        --icon-size: 1.35rem;
    }

    .c-acct-gate__perk h3 {
        margin: 0 0 var(--space-3xs);
        font-family: var(--font-display);
        font-size: var(--text-m);
        line-height: 1.25;
    }

    .c-acct-gate__perk p {
        margin: 0;
        color: var(--acct-on-night-muted);
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* ---- the card: a light runs around its edge; Clerk's sign-in inside (styled by account.js), then how it is protected ---- */
    .c-acct-gate__halo {
        position: absolute;
        inset: 6% -8% -4%;
        border-radius: 2rem;
        background: radial-gradient(60% 50% at 50% 40%, rgb(0 145 179 / 0.55), transparent 70%);
        filter: blur(30px);
        animation: c-acct-gate-breathe 6s ease-in-out infinite alternate;
    }

    .c-acct-gate__card {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        padding: 1.5px;
        border-radius: 1.5rem;
        background: rgb(191 172 221 / 0.22);
        box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.85);
    }

    .c-acct-gate__card::before {
        position: absolute;
        inset-block-start: 50%;
        inset-inline-start: 50%;
        z-index: -1;
        block-size: 200%;
        aspect-ratio: 1;
        background: conic-gradient(from 0deg, transparent 0 55%, var(--acct-glow) 70%, var(--gate-violet) 80%, transparent 92%);
        content: "";
        translate: -50% -50%;
        animation: c-acct-gate-spin 7s linear infinite;
    }

    .c-acct-gate__card-in {
        position: relative;
        display: grid;
        gap: var(--space-s);
        padding: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
        border-radius: calc(1.5rem - 1.5px);
        background: linear-gradient(180deg, rgb(32 20 56 / 0.97) 0%, rgb(17 10 31 / 0.98) 100%);
    }

    .c-acct-gate__card-in > * {
        margin: 0;
    }

    .c-acct-gate__emblem {
        position: relative;
        display: grid;
        place-items: center;
        justify-self: center;
        inline-size: 4.5rem;
        block-size: 4.5rem;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 30%, #43306e, #150c27 72%);
        box-shadow: inset 0 0 0 1px rgb(92 225 255 / 0.4), 0 0 40px -6px rgb(92 225 255 / 0.6);
    }

    .c-acct-gate__wave {
        inline-size: 2.9rem;
        block-size: 1.2rem;
        background: linear-gradient(90deg, var(--acct-glow), #ffffff 50%, var(--gate-violet));
        -webkit-mask: url("/assets/img/brand/motion-events-isotipo-ola.ed38e3cab8.svg") center / contain no-repeat;
        mask: url("/assets/img/brand/motion-events-isotipo-ola.ed38e3cab8.svg") center / contain no-repeat;
    }

    .c-acct-gate__ring {
        position: absolute;
        inset: 0;
        border: 1px solid rgb(92 225 255 / 0.6);
        border-radius: 50%;
        opacity: 0;
        animation: c-acct-gate-ripple 3.2s var(--ease-standard) infinite;
    }

    .c-acct-gate__ring--late {
        animation-delay: 1.6s;
    }

    .c-acct-gate__lock {
        position: absolute;
        inset: auto -0.15rem -0.15rem auto;
        display: grid;
        place-items: center;
        inline-size: 1.75rem;
        block-size: 1.75rem;
        border: 2px solid #1d1233;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--acct-glow), var(--brand-turquoise, #0091b3));
        color: var(--gate-ink);
    }

    .c-acct-gate__lock .c-icon {
        --icon-size: 0.85rem;
    }

    /* While ClerkJS loads: a spinner and the words, in the space the sign-in will take (no jump when it arrives). */
    .c-acct-gate__waiting {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-xs);
        min-block-size: 20rem;
        color: var(--acct-on-night-muted);
    }

    .c-acct-gate__waiting[hidden] {
        display: none;
    }

    .c-acct-gate__waiting::before {
        inline-size: 1.15rem;
        block-size: 1.15rem;
        border: 2px solid rgb(92 225 255 / 0.25);
        border-block-start-color: var(--acct-glow);
        border-radius: 50%;
        content: "";
        animation: c-acct-gate-spin 0.9s linear infinite;
    }

    #clerk-sign-in:empty {
        display: none;
    }

    .c-acct-gate__error {
        padding: var(--space-s);
        border: 1px solid rgb(255 138 160 / 0.45);
        border-radius: var(--radius-s);
        background: rgb(255 138 160 / 0.08);
        color: #ffdbe2;
    }

    .c-acct-gate__trust {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2xs) var(--space-s);
        padding: var(--space-s) 0 0;
        border-block-start: 1px solid var(--gate-line);
        color: var(--acct-on-night-muted);
        font-size: 0.82rem;
        line-height: 1.3;
        list-style: none;
    }

    .c-acct-gate__trust li {
        display: flex;
        align-items: center;
        gap: 0.5em;
    }

    .c-acct-gate__trust .c-icon,
    .c-acct-gate__privacy .c-icon {
        --icon-size: 1rem;

        flex: none;
        color: var(--acct-glow);
    }

    .c-acct-gate__privacy {
        display: flex;
        align-items: center;
        gap: 0.5em;
        color: var(--acct-on-night-muted);
        font-size: 0.82rem;
    }

    .c-acct-gate__privacy a {
        color: var(--acct-on-night);
        font-weight: var(--weight-semibold);
    }

    @keyframes c-acct-gate-enter {
        from {
            opacity: 0;
            transform: translate3d(0, var(--travel-l), 0);
        }
    }

    @keyframes c-acct-gate-drift {
        0% {
            transform: translate3d(0, 0, 0) scale(1);
        }

        50% {
            transform: translate3d(6%, 4%, 0) scale(1.08);
        }

        100% {
            transform: translate3d(-4%, 8%, 0) scale(0.96);
        }
    }

    @keyframes c-acct-gate-draw {
        from {
            stroke-dashoffset: 1000;
        }
    }

    @keyframes c-acct-gate-comet {
        from {
            stroke-dashoffset: 1000;
        }

        to {
            stroke-dashoffset: 0;
        }
    }

    @keyframes c-acct-gate-float {
        0% {
            opacity: 0;
            transform: translate3d(0, 0, 0);
        }

        12% {
            opacity: 1;
        }

        80% {
            opacity: 0.7;
        }

        100% {
            opacity: 0;
            transform: translate3d(var(--sway, 2rem), -62vh, 0);
        }
    }

    @keyframes c-acct-gate-ping {
        0% {
            opacity: 0.8;
            transform: scale(1);
        }

        100% {
            opacity: 0;
            transform: scale(3);
        }
    }

    @keyframes c-acct-gate-grow {
        from {
            transform: scaleY(0);
        }
    }

    @keyframes c-acct-gate-run {
        0% {
            opacity: 0;
            transform: translateY(-14%);
        }

        15%,
        80% {
            opacity: 1;
        }

        100% {
            opacity: 0;
            transform: translateY(100%);
        }
    }

    @keyframes c-acct-gate-breathe {
        from {
            opacity: 0.55;
            transform: scale(0.96);
        }

        to {
            opacity: 1;
            transform: scale(1.04);
        }
    }

    @keyframes c-acct-gate-spin {
        to {
            transform: rotate(1turn);
        }
    }

    @keyframes c-acct-gate-ripple {
        0% {
            opacity: 0.7;
            transform: scale(1);
        }

        100% {
            opacity: 0;
            transform: scale(1.9);
        }
    }

    /* Reduced motion (the system's or the site's own switch): a still stage — lanes drawn, no lights running, nothing moving. */
    @media (prefers-reduced-motion: reduce) {
        .c-acct-gate *,
        .c-acct-gate *::before,
        .c-acct-gate *::after {
            animation: none !important;
        }

        .c-acct-gate__comet {
            display: none;
        }

        .c-acct-gate__perk:hover {
            transform: none;
        }
    }

    :root.is-motion-reduced .c-acct-gate *,
    :root.is-motion-reduced .c-acct-gate *::before,
    :root.is-motion-reduced .c-acct-gate *::after {
        animation: none !important;
    }

    :root.is-motion-reduced .c-acct-gate__comet {
        display: none;
    }
}
