/* ============================================================================
 * Heliomath ACCOUNT ACCESS — login, signup & the account-access flow.
 *
 * The home for every style on the account-access pages: login / signup, password
 * reset, 2FA, the post-signup trial + payment funnel, interstitials, the
 * onboarding survey, and the logged-in learner-profile / account-settings pages.
 *
 * Consolidates styling that currently lives in two places:
 *   - heliomath_forms.css  — the LIVE Sunset treatment for login + signup
 *     (external_base pages; login/signup opt out of the legacy brand sheet).
 *   - brands/heliomath.css — the legacy cream re-theme still driving the rest of
 *     the flow (alpha_base pages, pulled in via each template's custom_css block).
 *
 * TOKENS: consume Sunset tokens from heliomath_tokens.css via var(); no hard-coded
 * hex or raw px type sizes, and NO legacy Grokkoli design injected here.
 *
 * (Populated once the account-access design is settled — see the migration plan.)
 * ========================================================================== */


/*//////////////*/
/* AUTH HEADER   */
/*//////////////*/
/* A bare, TRANSPARENT header on the account-access pages — just the bright
 * wordmark at top-left, so the dark field shows all the way to the top.
 * The Login link appears only on signup; the login view sets hide_nav_login, so
 * login is logo-only. Scoped to body.auth-page so no other page is touched. */

/* base.css paints <body> white, and grokkoli_base.css (which used to dark-fill the
 * page wrapper) isn't loaded on Heliomath — so the body shows through the transparent
 * header above the field. Paint it MIDNIGHT (the darkest, not the lighter --night) so
 * the strip behind the header reads as a deep field, not a distinct secondary-blue band. */
body.auth-page {
    background-color: var(--midnight);
    /* …with the midnight gradient over it (the hero A/B's default "manips" field). The colour
     * stays as the fallback, so the page is never unpainted if the image is dropped.
     * Deliberately NOT background-attachment:fixed — it buys nothing over a body-height
     * fade and is unreliable/janky on mobile Safari, which matters on the devices these
     * pages actually run on. */
    background-image: var(--surface-dark-gradient);
    font-family: var(--font-family-base);   /* Poppins — grokkoli_base (Quicksand) is dropped on these pages now */
}
/* "sky" variant (body.hero-sky — site_pages/hero_variant.py): --body-gradient instead
 * (cornflower-soft bottom-left -> twilight top), under the .sky-page / .horizon-page fields. */
body.auth-page.hero-sky {
    background-image: var(--body-gradient);
}

/* --- CLOUDSCAPE FIELD (.sky-page) — login, signup, forgot-password ----------------
 * (+ set-new-password and the 2FA verify / setup / setup-complete screens.)
 * The same cloudscape as the marketing heroes (.sky-hero in heliomath_marketing.css),
 * painted on the field (.login-area / .signup-area), which runs from the top of the page
 * to the footer — on <body> it would sit behind the footer. Opt-in per template via the
 * body class, which the templates add only for the hero A/B's "sky" visitor
 * (site_pages/hero_variant.py); everyone else keeps the midnight field.
 * The full cloudscape over the sky fade, as on .sky-hero — see --sky-full-clouds in
 * heliomath_tokens.css. */
.auth-page.sky-page .login-area,
.auth-page.sky-page .signup-area {
    background: var(--sky-full-clouds);
}
/* The form card was a 25% black tint over the dark field; over pale cloud that washes its
 * cream labels out, so it becomes a solid --night panel (what the tint rendered as). */
.auth-page.sky-page .credential-entry-container {
    background-color: var(--night);
}
/* Copy that sits directly on the sky: night ink, as on the marketing heroes. Inside the
 * card stays cream (the card is still a dark panel). */
.auth-page.sky-page .login-area h2,
.auth-page.sky-page .login-area > p,
.auth-page.sky-page .login-area > a,
.auth-page.sky-page .login-area > a:hover,
.auth-page.sky-page .signup-area .benefits-area h2,
.auth-page.sky-page .signup-area .benefits-area li {
    color: var(--night);
}
.auth-page.sky-page .login-area > p,
.auth-page.sky-page .login-area > a {
    opacity: 1;   /* the 0.7 dimming was for cream on the dark field */
}
/* Page-level error (e.g. set-new-password with a bad/missing link): no card behind it, so
 * it sits on the flat sky blue — cream (--text-on-dark), not night, to stand out there. */
.auth-page.sky-page .login-area > .error {
    color: var(--text-on-dark);
}

/* Transparent header, positioned ABSOLUTE so it scrolls with the page (not pinned) and
 * the field shows straight through to the top. Ported from grokkoli_public's
 * transparent-nav rules (background/border + its fixed-top→absolute override), so it all
 * holds once that file is dropped from these pages. */
.auth-page .header {
    position: absolute;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* On alpha_base pages (e.g. request_reset_password_link), #main carries an off-white
 * background + a fixed-nav-clearing top padding (grokkoli_base.css). With the header now
 * absolute (above), drop both so the dark field runs to the very top instead of a
 * light-grey strip. No-op on external_base auth pages, where #main has neither. */
/* --auth-top-space: the room reserved above the field for the absolute header, set per
 * breakpoint below. Normally it is #main's top padding; see SKY FIELDS for the sky look. */
.auth-page {
    --auth-top-space: 0px;
}
.auth-page #main {
    padding-top: var(--auth-top-space);
    background-color: transparent;
}

/* Nav: the regular top nav (heliomath_header.css + heliomath_components), with its
 * background cleared by .header--clear — same logo size and position as every other page. */

@media screen and (max-width: 500px) {
    /* The transparent header overlays #main. Reserve its height plus breathing
     * room so short funnel pages cannot put their first heading under the nav. */
    .auth-page { --auth-top-space: 96px; }
}

@media screen and (min-width: 501px) and (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
    /* These funnel pages begin near the top when a phone is held sideways. The
     * absolute header overlays that space, so reserve room above the first title. */
    .auth-page.auth-landscape-spaced { --auth-top-space: 88px; }
}

@media screen and (min-width: 501px) and (min-height: 501px) {
    /* These two longer funnel pages otherwise start their title behind the nav
     * on tablet landscape and desktop. */
    .auth-page.auth-roomy-title { --auth-top-space: 88px; }
}

/* SKY FIELDS (.sky-page / .horizon-page). Their bar is solid and shorter than
 * --auth-top-space, so #main's padding showed as a strip of the body's navy between the
 * bar and the field. The space is reserved inside the field instead, as a transparent
 * border its background paints under, so the field reaches the bar. The fields are
 * border-box, so their min-heights grow by the same amount to keep the layout. */
.auth-page.sky-page #main,
.auth-page.horizon-page #main {
    padding-top: 0;
}
.auth-page.sky-page .login-area,
.auth-page.sky-page .signup-area,
.auth-page.horizon-page .interstitial,
.auth-page.horizon-page .start-free-trial-area,
.auth-page.horizon-page .payment-details-area,
.auth-page.horizon-page .onboarding-survey-area {
    border-top: var(--auth-top-space) solid transparent;
    background-origin: border-box;
}
.auth-page.sky-page .login-area,
.auth-page.sky-page .signup-area,
.auth-page.horizon-page .start-free-trial-area,
.auth-page.horizon-page .payment-details-area,
.auth-page.horizon-page .onboarding-survey-area {
    min-height: calc(96vh - 6.25rem + var(--auth-top-space));   /* KEY FORMS below */
}
.auth-page.horizon-page .interstitial {
    min-height: calc(100vh - 9.625rem + var(--auth-top-space));   /* heliomath_system.css */
}
/* The trial and card-entry titles start ~41px down their field, under the solid bar on
 * desktop (the transparent standard bar shows them through). Keep them below it. */
.auth-page.horizon-page .start-free-trial-area,
.auth-page.horizon-page .payment-details-area {
    padding-top: max(calc(1.5625rem + 2vh), calc(var(--nav-height) + 1.25rem - var(--auth-top-space)));
}

@media screen and (min-width: 501px) and (max-height: 500px) {
    /* Phone landscape: the field's own top padding (~69px here) is less than the sky bar's
     * height, and that bar is solid, so it covered the top of the title. Clear the bar. */
    .auth-page.sky-page .login-area {
        padding-top: max(calc(3.8125rem + 2vh), calc(var(--nav-height) + 1.25rem));
    }
}

/* Nav-bar LINK-BUTTONS (Login, Learning Plans …) moved OUT to heliomath_nav.css —
 * the single source of truth shared by this auth flow AND the learning-differences
 * page. heliomath_nav.css is loaded right beside this file on both bases, so the
 * pill styling still lands on every account-access page; it's just no longer
 * duplicated here (or in heliomath_learning_differences.css). See that file. */


/*///////////*/
/* KEY FORMS */
/*///////////*/

.login-area, .signup-area, .start-free-trial-area, .payment-details-area, .pilot-inquiry-area, .onboarding-survey-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(96vh - 6.25rem);
    width: 100vw;
    margin: 0;
    padding-top: calc(1.5625rem + 2vh);
    padding-bottom: calc(1.5625rem + 2vh);
}

/* Per-page top spacing above the title/content (overrides the shared padding-top).
 * NOTE: these areas vertically CENTRE their content, so where the content is shorter
 * than the field the visible shift lands as ~half the padding change — easy to bump. */
.login-area {
    padding-top: calc(1.5625rem + 2vh + 2.25rem);   /* +36px — more room above the "Log in" title */
}
.signup-area {
    padding-top: calc(1.5625rem + 2vh - 1rem);       /* -16px — a touch tighter to the top */
}

.signup-content-area {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: auto;
    padding-top: 3.5vh;
    max-width: 50rem;
    width: 80vw;
}

.login-area h2, .signup-area h2, .payment-details-area h2, .start-free-trial-area h2, .pilot-inquiry-area h2,
.login-area h3, .signup-area h3, .payment-details-area h3, .start-free-trial-area h3, .pilot-inquiry-area h3,
.login-area p, .signup-area p, .payment-details-area p, .start-free-trial-area p, .pilot-inquiry-area p, .signup-area li {
    color: var(--text-on-dark);                 /* was: white — these forms sit on a dark surface */
}
.login-area a, .login-area p, .login-area p a {
    margin-top: 0.5rem;
    color: var(--text-on-dark);
    opacity: 0.7;
}
.login-area a:hover {
    opacity: 0.95;
    color: var(--text-on-dark);
}
.login-area p, .signup-area p, .payment-details-area p {
    max-width: 18.75rem;
    margin-left: 0.25rem;
    margin-bottom: 1.875rem;
}

.signup-area .benefits-area {
    text-align: left;
    /* Narrows with the viewport: 340px at 1000px -> 380px at 1500px (16.25rem + 8vw),
     * then held at 380px (23.75rem) beyond 1500px by the query below. */
    max-width: calc(16.25rem + 8vw);
    margin-right: calc(1.25rem + 3vw);
    margin-bottom: calc(0.9375rem + 2vw);
}
@media screen and (min-width: 1500px) {
    .signup-area .benefits-area { max-width: 23.75rem; }
}
@media screen and (max-width: 740px) {
    .signup-content-area {
        flex-direction: column;
        width: unset;
    }
    .signup-area .benefits-area {
        max-width: 20rem;
        margin: 0;
    }
    .signup-area .benefits-area ul {
        display: none;
    }
}
.signup-area .benefits-area h2, .signup-area .benefits-area li, .login-area h2, .onboarding-survey-area h2 {
    color: var(--cornflower-softest);
    max-width: 28.125rem;
}
/* The survey heading sat tight under the (transparent, absolute) nav — the area's own
 * padding-top is the only thing above it. Extra room, on this page only. */
.onboarding-survey-area h2 {
    margin-top: 50px;
}
/* Keep the auth-page headers off the viewport edge on very narrow devices (e.g.
   Galaxy Z Fold). Later + equal/greater specificity than the 28.125rem cap above,
   so it wins; only bites on small screens (90vw < 28.125rem there), harmless on
   desktop where the containers already cap width. */
.signup-area .benefits-area h2,
.login-area h2 {
    max-width: 90vw;
}
.signup-area .benefits-area h2 {
    font-size: calc(1.55rem + 0.95vw);
}
.signup-area .benefits-area li {
    font-size: calc(0.8rem + 0.6vw);
    font-weight: var(--font-weight-medium);
    margin-top: 3.125rem;
}
/* The ★ bullets, in night like the benefit copy beside them. Drawn as ::before rather
 * than ::marker: Safari below 17 ignores `content` on ::marker entirely (falls back to a
 * disc). Placed exactly where the outside marker sat:
 * the same "★ " string, its right edge against the item's content box, on the first
 * line's baseline. */
.signup-area .benefits-area li {
    list-style: none;
    position: relative;
}
.signup-area .benefits-area li::before {
    content: "★ ";
    white-space: pre;      /* keep the trailing space — it's the star-to-text gap */
    position: absolute;
    top: 0;
    right: 100%;
    color: var(--flare-on-dark);   /* the warm on-dark accent on the midnight field */
}
/* Sky (.sky-page): night, like the benefit copy beside them on the pale cloudscape. */
.auth-page.sky-page .signup-area .benefits-area li::before {
    color: var(--night);
}
.signup-area .form-container .btn-grokkoli-primary {
    font-size: 1.4375rem;              /* 23px — matches the legacy grokkoli CTA size */
    /* The shared button geometry uses em-based padding (0.75em); at this larger CTA
     * font that scaled up to ~17px top/bottom → a ~64px-tall button. Trim the
     * VERTICAL padding so the button sits ~51px like the other auth buttons and the
     * compact legacy grokkoli sizing (which used a small fixed Bootstrap padding). */
    padding: 0.5em 1.4em;
}
.signup-area .form-selection {
    display: flex;
    margin-bottom: 0.9375rem;
}
.signup-area .form-tab {
    padding: 0.4em 1em;
    margin-right: 0.625rem;
    border-radius: 30px;
    background-color: rgba(210, 200, 255, 0.55);   /* frosted — kept */
    opacity: 0.85;
    font-size: 80%;
    font-weight: var(--font-weight-bold);
}
.signup-area .form-tab:not(.active):hover {
    background-color: rgba(210, 200, 255, 0.5);   /* frosted — kept */
    cursor: pointer;
}
/* The selected tab is the same paint as the "Start Free Trial" submit below it — one
 * cornflower for every filled, interactive thing on the form. */
.signup-area .form-tab.active {
    background-color: var(--auth-btn-fill);
    cursor: default;
    opacity: 0.85;
}
.hidden {
    display: none;
}
.login-area h2 {
    margin-bottom: 1.875rem;
    max-width: 45.625rem;
}
.pilot-inquiry-area {
    padding-bottom: 6.25rem;
}
.pilot-inquiry-area h1 {
    font-size: 2.625rem;
    margin-top: 2.8125rem;
    color: var(--flare-on-dark);                /* was: --main-lemon */
}
.pilot-inquiry-area .single-option-select-field .single-option-select-field {
    margin-left: 1.25rem;
    margin-right: 0.3125rem;
}
.pilot-inquiry-area h2 {
    color: var(--flare-on-dark);                /* was: --main-gold */
    font-size: 1.75rem;
    max-width: 43.75rem;
    width: 85vw;
    padding: 1.25rem;
    text-align: center;
}
.pilot-inquiry-area h3 {
    font-size: 2.25rem;
    width: calc(25rem + 30vw);
    max-width: 90vw;
    margin-bottom: 5.3125rem;
}
.pilot-inquiry-area .account-access-form {
    max-width: 86vw;
}
.form-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
@media screen and (max-width: 755px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .pilot-inquiry-area .form-row .terms-accepted-text {
        margin-bottom: 1.25rem;
        margin-left: 0.625rem;
    }
    .pilot-inquiry-area .btn-grokkoli-primary {
        margin-left: 0.625rem;
    }
}
.form-row .field-group {
    margin-right: 0.625rem;
    margin-left:  0.625rem;
    max-width: calc(18.75rem + 3vw);
    width: 40vw;
    min-width: 16.25rem;
}
.product-selection-label {
    font-size: 130%;
    opacity: 0.6;
}
#product-selection {
    margin: 0 0.25rem 0 0;
}
#product-selection label {
    font-size: 90%;
    line-height: 125%;
    margin-top: 0.625rem;
    align-items: flex-start;
}
#product-selection label input {
    margin-top: 0.1875rem;
    margin-right: 0.625rem;
}
#product-selection .product-info span {
    opacity: 1;
    /* font-size: 90%; */
    color: var(--lavender-edge);                /* was: --main-lemon */
}
#product-selection .product-info span strong {
    font-size: 125%;
}
.form-row .radio-select-field-group {
    margin-right: 0.625rem;
    margin-left:  0.625rem;
}
.form-row .terms-accepted-text {
    margin-bottom: 0;
}
.pilot-inquiry-area .btn-grokkoli-primary {
    color: var(--text-on-dark-fill);            /* was: white */
    margin-right: 0.625rem;
}
.pilot-inquiry-area p {
    margin-bottom: 0;
    opacity: 0.7;
}

.credential-entry-container {
    background-color: rgba(0, 0, 5, 0.25);
    padding: 1.25rem;
    display: inline-block;
    border-radius: 0 38px 38px 38px;
    text-align: left;
    max-width: min(26.875rem, 96vw);
}
.signup-area .credential-entry-container {
    margin-bottom: 1.25rem;
}

.credential-entry-container label {
    color: var(--text-on-dark);
    font-size: calc(0.95rem + 0.15vw);
}
.credential-entry-container label.product-selection-label {
    font-size: 0.875rem;
}
.credential-entry-container .invalid-feedback {
    color: var(--flare-on-dark);                /* was: --main-gold (invalid ON DARK) */
}
.credential-entry-container .text-muted {
    color: rgba(230, 220, 255, 0.70) !important;   /* frosted — kept */
}
.credential-entry-container .form-control {
    background-color: rgba(230, 220, 255, 0.70);   /* frosted — kept */
}

.credential-entry-container input {
    color: var(--text-primary);                 /* was: #001020 (ink inside the frosted input) */
}

/* Bootstrap's gray placeholder is faint on the translucent code field. */
.auth-page .credential-entry-container input[autocomplete="one-time-code"]::placeholder {
    color: var(--text-primary);
    opacity: 1;
}
/* .credential-entry-container #account-access-button,
.credential-entry-container #account-access-button-family,
.credential-entry-container #account-access-button-educator {
    color: var(--text-on-dark-fill);
} */
.credential-entry-container #account-access-button.disabled {
    opacity: 0.6;
}
.credential-entry-container.is-invalid {
    border: 1px solid var(--flare-on-dark);     /* was: --main-gold */
}
.credential-entry-container .error {
    color: var(--flare-on-dark);                /* was: --main-gold */
}
.credential-entry-container .form-control.is-invalid, .was-validated .form-control:invalid {
    border: 1px solid var(--flare-on-dark);     /* was: --main-gold */
    box-shadow: none;
}
.credential-entry-container #single-button {
    color: var(--text-primary);                 /* midnight label on the cornflower fill — matches the .btn component (was white) */
}

.add-learner-profile .form-container .field-group {
    width: calc(15rem + 3vw);
}

.terms-accepted-text {
    color: rgba(255, 255, 255, 0.6);              /* frosted — kept */
    margin-bottom: 1.25rem;
    width: calc(16.25rem + 3vw);
    font-size: 0.875rem;
    padding-left: 0.125rem;
}

.legal-copy {
    max-width: 50rem;
}
.terms-accepted-text a {
    color: var(--sunbeam);
    /* On-dark surface: re-point the link pill fill + ring to the on-dark pair. */
    --link-fill: var(--link-fill-on-dark);
    --focus-ring-link: var(--focus-ring-link-on-dark);
}
.terms-accepted-text a:hover {
    color: var(--sunbeam-lift);
}
.terms-accepted-text a:focus {
    color: var(--sunbeam-lifter);
}

/* ============================================================================
 * PRIMARY SUBMIT BUTTON
 *
 * The account-access markup renders its primary action as the legacy
 * <button class="btn btn-grokkoli-primary">. grokkoli_base.css used to give
 * `.btn` its geometry and `.btn-grokkoli-primary` its fill; both are gone for
 * Heliomath (grokkoli_base snipped, and heliomath_components' `.btn` base
 * deliberately skips the legacy class). Skin it here on Sunset tokens, scoped to
 * the account-access containers so it can't reach any other legacy button.
 * (Retire this when the auth markup migrates to .btn--accent.)
 * ========================================================================== */
/* THE AUTH-FLOW BUTTON RAMP — cornflower, pinned.
 *
 * These screens keep CORNFLOWER whatever --accent-primary points at. The palette trial
 * moved that role to true-blue, which dragged the login / signup / onboarding submits
 * to a much darker blue AND broke their labels: this block's buttons take the base
 * .btn's midnight label, which is 5.08:1 on cornflower but only 2.27:1 on true-blue.
 * Cornflower + midnight is the pairing the design system was built around, so the ramp
 * is named here rather than inherited — retune these three lines to move the whole flow.
 *
 * On these dark fields the ramp LIGHTENS as you interact (rest -> hover -> press), the
 * default for any cornflower button on dark (--btn-on-dark-* in heliomath_tokens.css). */
.login-area,
.signup-area,
.start-free-trial-area,
.payment-details-area,
.pilot-inquiry-area,
.onboarding-survey-area,
.credential-entry-container {
    --auth-btn-fill:  var(--btn-on-dark-fill);   /* rest  — cornflower-lift, 6.94:1 under the midnight label */
    --auth-btn-hover: var(--btn-on-dark-hover);  /* hover — lighter (cornflower-lifter), 8.05:1 */
    --auth-btn-press: var(--btn-on-dark-press);  /* press — lighter still (cornflower-liftest), 10.06:1 */
}

.login-area .btn-grokkoli-primary,
.signup-area .btn-grokkoli-primary,
.start-free-trial-area .btn-grokkoli-primary,
.payment-details-area .btn-grokkoli-primary,
.pilot-inquiry-area .btn-grokkoli-primary,
.onboarding-survey-area .btn-grokkoli-primary,
.credential-entry-container .btn-grokkoli-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1.4em;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    background-color: var(--auth-btn-fill);
    transition: background-color 0.18s ease;
}
.login-area .btn-grokkoli-primary:hover,
.signup-area .btn-grokkoli-primary:hover,
.start-free-trial-area .btn-grokkoli-primary:hover,
.payment-details-area .btn-grokkoli-primary:hover,
.pilot-inquiry-area .btn-grokkoli-primary:hover,
.onboarding-survey-area .btn-grokkoli-primary:hover,
.credential-entry-container .btn-grokkoli-primary:hover {
    background-color: var(--auth-btn-hover);
}
/* Pressed / focus ring — the detached full-opacity accent outline, matching the
 * Heliomath .btn--accent ring (see heliomath_components.css). This legacy class is
 * excluded from that system by its :not(.btn-grokkoli-primary) guard, so the ring is
 * reproduced here. Plain :focus (not :focus-visible) so it shows on click too. */
.login-area .btn-grokkoli-primary:active,
.signup-area .btn-grokkoli-primary:active,
.start-free-trial-area .btn-grokkoli-primary:active,
.payment-details-area .btn-grokkoli-primary:active,
.pilot-inquiry-area .btn-grokkoli-primary:active,
.onboarding-survey-area .btn-grokkoli-primary:active,
.credential-entry-container .btn-grokkoli-primary:active,
.login-area .btn-grokkoli-primary:focus,
.signup-area .btn-grokkoli-primary:focus,
.start-free-trial-area .btn-grokkoli-primary:focus,
.payment-details-area .btn-grokkoli-primary:focus,
.pilot-inquiry-area .btn-grokkoli-primary:focus,
.onboarding-survey-area .btn-grokkoli-primary:focus,
.credential-entry-container .btn-grokkoli-primary:focus {
    outline: 2px solid var(--auth-btn-fill);
    outline-offset: 3px;
    box-shadow: none;
}
/* …and while HELD the button takes the press tone, with the ring matching it — the
 * same rule the .btn--* variants follow (--btn-ring-press in heliomath_components.css).
 * Listed after the block above so it wins on source order. */
.login-area .btn-grokkoli-primary:active,
.signup-area .btn-grokkoli-primary:active,
.start-free-trial-area .btn-grokkoli-primary:active,
.payment-details-area .btn-grokkoli-primary:active,
.pilot-inquiry-area .btn-grokkoli-primary:active,
.onboarding-survey-area .btn-grokkoli-primary:active,
.credential-entry-container .btn-grokkoli-primary:active {
    background-color: var(--auth-btn-press);
    outline-color: var(--auth-btn-press);
}
/* Same subtle downward nudge on press as the homepage .btn:active. */
.login-area .btn-grokkoli-primary:active,
.signup-area .btn-grokkoli-primary:active,
.start-free-trial-area .btn-grokkoli-primary:active,
.payment-details-area .btn-grokkoli-primary:active,
.pilot-inquiry-area .btn-grokkoli-primary:active,
.onboarding-survey-area .btn-grokkoli-primary:active,
.credential-entry-container .btn-grokkoli-primary:active {
    transform: translateY(1px);
}
.login-area .btn-grokkoli-primary.disabled,
.signup-area .btn-grokkoli-primary.disabled,
.credential-entry-container .btn-grokkoli-primary.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ============================================================================
 * INTERSTITIALS (.auth-page)
 *
 * The answer-history consent page (answer_history_consent.html) is the step
 * straight after signup, so it wears the SAME dark field as signup/login rather
 * than the cream app treatment heliomath_app.css gives the interstitials.
 *
 * heliomath_app.css still loads on this page — it is the account/app brand layer
 * for every alpha_base Heliomath page — and it loads BEFORE this file, so the
 * rules below reverse its `.interstitial` cream block. Everything is scoped to
 * .auth-page (the body class the template opts in with), which both raises the
 * specificity over heliomath_app's two-class selectors AND keeps the other
 * .interstitial page, dissolve_account.html, on its cream treatment — it sets
 * neither the body class nor the account-access flag, so it loads none of this.
 *
 * The heliomath_system.css base already colours .interstitial for a dark surface;
 * these rules mostly just undo the light-field overrides layered on top of it.
 * ========================================================================== */

/* Let body.auth-page's midnight field show through. heliomath_app paints this
 * cream, and grokkoli_base's green→blue .grokkoli-gradient is not loaded here. */
.auth-page .interstitial.grokkoli-gradient {
    background-color: transparent;
    background-image: none;
}

/* Copy back to the on-dark pair (heliomath_app recolours these navy/slate).
 *
 * The headings are named one by one ON PURPOSE. heliomath_base.css carries a bare
 * `h1, h2, h3, h4, h5, h6 { color: var(--text-lively) }`, and a rule that matches the
 * heading ELEMENT beats a colour inherited from its parent no matter how specific that
 * parent's selector is -- so setting `.interstitial-message` alone never reaches them.
 * That left `Account confirmed!` (h1) and the consent question (h2) painted
 * --text-lively, which resolves to --night #0A1A52 on a --midnight #0B122C field that
 * fades TOWARDS night: at the top-right corner the text and the background are the same
 * colour. h5/h6 are included so a heading added here later cannot reintroduce it.
 *
 * h3 is left out because no .auth-page interstitial uses one today -- NOT because it is
 * safe. heliomath_system.css gives it --cornflower-softest at 0.4 opacity, which blends
 * to #465477 on the midnight field: 2.46:1, no better than the .text-accent problem
 * fixed a few rules below. An h3 added here needs its own treatment. */
.auth-page .interstitial-message,
.auth-page .interstitial-message h1,
.auth-page .interstitial-message h2,
.auth-page .interstitial-message h4,
.auth-page .interstitial-message h5,
.auth-page .interstitial-message h6 {
    color: var(--text-on-dark);
}
/* The emphasised phrases ("store and analyze…", "NEVER") — the warm accent in its
 * on-dark strength. !important matches heliomath_app's, which it must out-rank. */
.auth-page .interstitial-message .accent-color-lemon,
.auth-page .interstitial-message .accent-color-gold {
    color: var(--flare-on-dark) !important;
}

/* .text-accent is the OTHER emphasis these templates use -- the consent page's
 * paraprofessional copy says accent-color-lemon, its educator and parent copy say
 * text-accent, so half the audience got the untreated colour. Base points it at
 * --accent-primary (then true-blue #3636CF), which is a FILL colour: 2.27:1 as text on midnight,
 * barely better than the --text-lively headings above. --accent-primary-on-dark is the
 * token that exists for exactly this, so the phrase stays emphasised instead of being
 * flattened into the sentence. Not scoped to one template: it covers every .auth-page
 * interstitial, so the confirmation page is right too if it ever uses the class. */
.auth-page .interstitial-message .text-accent {
    color: var(--accent-primary-on-dark);
}
/* T&S / Privacy links: the template carries an inline light-green colour for the
 * Grokkoli gradient, so these need !important to beat it (as heliomath_app's do). */
.auth-page .interstitial a {
    color: var(--link-on-dark) !important;
}
.auth-page .interstitial a:hover {
    color: var(--link-on-dark-hover) !important;
}

/* "I Accept" — the same cornflower pill as the signup CTA. The PRIMARY SUBMIT
 * BUTTON skin above is keyed on the auth-page CONTAINERS (.signup-area etc.), and
 * .interstitial is not one of them; its sizing comes from heliomath_system's
 * `.interstitial .btn` instead, which is the sizing this page wants. So rather
 * than widen those lists, re-point only what is wrong here: the frosted-white
 * fill + 0.8 opacity that base gives `.interstitial .btn`, and the gold gradient
 * heliomath_app paints over it. */
.auth-page .interstitial .btn-grokkoli-primary {
    opacity: 1;
    color: var(--text-on-dark-fill);
    background-color: var(--btn-accent-fill);   /* the true-blue button ramp (was dusk-muted --accent-primary-fill) */
    background-image: none;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    transition: background-color 0.18s ease;
}
.auth-page .interstitial .btn-grokkoli-primary:hover {
    color: var(--text-on-dark-fill);
    background-color: var(--btn-accent-hover);   /* lighter */
    background-image: none;
}
/* Pressed / focus ring — the detached full-opacity accent outline shared with the
 * other account-access buttons. Plain :focus so it shows on click too. Focus keeps the
 * rest fill (only the ring); press takes the lighter press fill. */
.auth-page .interstitial .btn-grokkoli-primary:focus,
.auth-page .interstitial .btn-grokkoli-primary:active {
    color: var(--text-on-dark-fill);
    background-image: none;
    outline: 2px solid var(--btn-accent-fill);
    outline-offset: 3px;
    box-shadow: none;
}
.auth-page .interstitial .btn-grokkoli-primary:active {
    outline-color: var(--btn-accent-press);   /* the held ring matches the press fill */
    background-color: var(--btn-accent-press);   /* lighter still */
    transform: translateY(1px);
}


/* "Resend Email" (.btn-grokkoli-secondary, the confirmation wait page) — the only
 * action on that page, and deliberately quiet: the real next step is in the user's
 * inbox. heliomath_system skins it for the old green→blue gradient (a translucent
 * navy fill at 0.4 opacity), which on the midnight field is a near-invisible
 * dark-on-dark smudge. Re-cut it as a quiet outlined pill on the dark surface,
 * with the same detached ring as the other account-access buttons. */
.auth-page .interstitial .btn-grokkoli-secondary {
    opacity: 1;
    color: var(--text-on-dark);
    background-color: transparent;
    background-image: none;
    border: 1px solid var(--border-on-dark);
    border-radius: var(--radius-pill);
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    transition: background-color 0.18s ease, border-color 0.18s ease;
}
.auth-page .interstitial .btn-grokkoli-secondary:hover {
    color: var(--text-on-dark);
    background-color: var(--link-fill-on-dark);
    border-color: var(--link-on-dark);
}
.auth-page .interstitial .btn-grokkoli-secondary:focus,
.auth-page .interstitial .btn-grokkoli-secondary:active {
    color: var(--text-on-dark);
    background-color: var(--link-fill-on-dark);
    border-color: var(--link-on-dark);
    outline: 2px solid var(--link-on-dark);
    outline-offset: 3px;
    box-shadow: none;
}
.auth-page .interstitial .btn-grokkoli-secondary:active {
    transform: translateY(1px);
}


/* ============================================================================
 * ONBOARDING SURVEY (.auth-page)
 *
 * "How did you hear about us", the step between email confirmation and the consent
 * page. Same story as the INTERSTITIALS block above: heliomath_app.css gives
 * .onboarding-survey-area a CREAM field with navy copy, white inputs and a gold
 * button, and it loads BEFORE this file, so these rules reverse it for .auth-page.
 *
 * The form PANEL itself needs nothing here: the template already marks it
 * .form-container.credential-entry-container, so it picks up the frosted signup
 * panel (fill, pill radius, on-dark labels, frosted inputs) from KEY FORMS above.
 * What follows is only the cream-treatment reversal.
 * ========================================================================== */

/* Let body.auth-page's midnight field show through. */
.auth-page .onboarding-survey-area.grokkoli-gradient {
    background-color: transparent;
    background-image: none;
}

/* Title + the radio labels back to the on-dark pair (heliomath_app paints them
 * navy/slate). The title matches the signup/login headings. */
.auth-page .onboarding-survey-area h2 {
    color: var(--cornflower-softest);
    text-shadow: none;
}
.auth-page .onboarding-survey-area label {
    color: var(--text-on-dark);
}

/* Row hover on the radio list. The template's own <style> asks for a frosted white
 * wash (the dark-field intent), but heliomath_app's midnight-6% rule out-ranks it
 * on specificity; restate the frosted value at a weight that wins. */
.auth-page .onboarding-survey-area .single-option-select-field label:hover {
    background-color: rgba(255, 255, 255, 0.1);   /* frosted — kept */
}

/* The "Other" textarea. Its frosted fill already comes from
 * .credential-entry-container .form-control above; strip the light-field border,
 * inner shadow and blue focus glow heliomath_app adds on top, so it reads as the
 * same flat frosted control as the signup inputs. */
.auth-page .onboarding-survey-area .form-control {
    border: none;
    box-shadow: none;
    color: var(--text-primary);   /* ink inside the frosted control — as on signup */
}
.auth-page .onboarding-survey-area .form-control:focus {
    border: none;
    box-shadow: none;
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* "Continue". The cornflower fill + geometry already come from the PRIMARY SUBMIT
 * BUTTON block above (which lists .onboarding-survey-area), and that now wins on
 * load order. Only heliomath_app's gold GRADIENT survives it -- background-image is
 * not a property that block sets -- so clear it, and pin the midnight label the
 * signup CTA uses. */
.auth-page .onboarding-survey-area .btn-grokkoli-primary,
.auth-page .onboarding-survey-area .btn-grokkoli-primary:hover,
.auth-page .onboarding-survey-area .btn-grokkoli-primary:focus,
.auth-page .onboarding-survey-area .btn-grokkoli-primary:active {
    background-image: none;
    color: var(--text-primary);
}


/* ============================================================================
 * POST-SIGNUP FUNNEL: TRIAL EXPLAINER / ESA STATES / CARD ENTRY (.auth-page)
 *
 * The last three steps of the funnel: "How your free trial works"
 * (start_free_trial.html), the ESA-states page (possible_gov_reimbursement.html,
 * which reuses .start-free-trial-area plus .gov-reimbursement) and card entry
 * (enter_payment_details.html, also rendered by update_payment_method).
 *
 * Same story as the INTERSTITIALS and ONBOARDING SURVEY blocks above:
 * heliomath_app.css gives these a CREAM field with navy copy, gold accents and a
 * gold button, and it loads BEFORE this file, so these rules reverse it for
 * .auth-page. heliomath_forms.css already holds the ON-DARK values for the
 * timeline and the ESA columns, so most of this is restoring what it had.
 *
 * The form PANELS need nothing: both templates already mark them
 * .form-container.credential-entry-container, so they pick up the frosted signup
 * panel from KEY FORMS above.
 * ========================================================================== */

/* Let body.auth-page's midnight field show through. */
.auth-page .start-free-trial-area.grokkoli-gradient,
.auth-page .payment-details-area.grokkoli-gradient {
    background-color: transparent;
    background-image: none;
}

/* Copy back to the on-dark pair (heliomath_app paints it navy). */
.auth-page .start-free-trial-area h2,
.auth-page .start-free-trial-area h3,
.auth-page .start-free-trial-area p,
.auth-page .payment-details-area h2,
.auth-page .payment-details-area h3,
.auth-page .payment-details-area p {
    color: var(--text-on-dark);
    text-shadow: none;
}

/* Free-trial timeline: back to heliomath_forms' on-dark bar — the warm accent
 * fading into the deep blue last stop, with teal notches ringed in the same warm
 * accent. (heliomath_app re-cuts all three in gold/navy for the cream field.) */
.auth-page .free-trial-explainer-container {
    max-width: min(22rem, 96vw);
    display: flex;
}
.auth-page .free-trial-explainer-container h4 {
    font-size: 1.4rem;

}
.auth-page .free-trial-explainer-container .free-trial-text-block p {
    color: var(--gray-100);
    font-size: 1rem;
}
.auth-page .free-trial-timeline {
    background-image: linear-gradient(var(--sunbeam), var(--sunbeam), var(--sunbeam), #091a52);
}
.auth-page .free-trial-timeline-notch {
    background-color: var(--night);
}

/* Card-entry page: the plan-selection labels and the discount line. */
.auth-page .payment-details-area label,
.auth-page .payment-details-area .product-info {
    color: var(--text-on-dark);
}
.auth-page .payment-details-area .accent-color-lemon {
    color: var(--flare-on-dark) !important;     /* matches heliomath_app's weight */
}
.auth-page .payment-details-area .plan-selection label{
    font-size: 1rem;
    color: var(--sunbeam);
    opacity: 1;
}

/* Primary CTAs (#start-free-trial, #submit-payment-btn). The cornflower fill and
 * geometry come from the PRIMARY SUBMIT BUTTON block above, which now wins on load
 * order; only heliomath_app's gold GRADIENT survives it (background-image is not a
 * property that block sets), so clear it and pin the signup CTA's midnight label. */
.auth-page .start-free-trial-area .btn-grokkoli-primary,
.auth-page .start-free-trial-area .btn-grokkoli-primary:hover,
.auth-page .start-free-trial-area .btn-grokkoli-primary:focus,
.auth-page .start-free-trial-area .btn-grokkoli-primary:active,
.auth-page .payment-details-area .btn-grokkoli-primary,
.auth-page .payment-details-area .btn-grokkoli-primary:hover,
.auth-page .payment-details-area .btn-grokkoli-primary:focus,
.auth-page .payment-details-area .btn-grokkoli-primary:active {
    background-image: none;
    color: var(--text-primary);
}


/* ============================================================================
 * HORIZON FIELD (.horizon-page) — the post-signup funnel
 *
 * Email confirmation, the onboarding survey, answer-history consent, the free-trial
 * explainer and card entry wear the About hero's background (heliomath_about.css `#about-us .light-hero`):
 * --sky-horizon-gradient (sky blue at the top -> aqua -> cream -> gold) with the
 * right-hand cloud bank pinned bottom-right at 75% width. Opt-in per template via the
 * body class, alongside .auth-page — added only for the hero A/B's "sky" visitor
 * (site_pages/hero_variant.py). Painted on the content field, not <body>, so it
 * stops above the footer (as .sky-page does). The transparent header sits on the
 * fade's dark --sky top, so the on-dark wordmark still reads.
 *
 * Below ~25% the fade is LIGHT, so — as on the About hero — copy that sits directly on
 * it takes night ink, not cream. The form PANELS become a solid --night (as on
 * .sky-page) so everything inside them keeps its on-dark styling untouched.
 * ========================================================================== */
.auth-page.horizon-page .interstitial.grokkoli-gradient,
.auth-page.horizon-page .start-free-trial-area.grokkoli-gradient,
.auth-page.horizon-page .payment-details-area.grokkoli-gradient,
.auth-page.horizon-page .onboarding-survey-area.grokkoli-gradient {
    background: var(--sky-right-clouds);   /* the About hero's backdrop — see heliomath_tokens.css */
}
/* The 25% black tint washes out over the pale lower fade — solid night, as .sky-page. */
.auth-page.horizon-page .credential-entry-container {
    background-color: var(--night);
}

/* Free-trial / card-entry titles sit on the field, above the panel. */
.auth-page.horizon-page .start-free-trial-area > h2,
.auth-page.horizon-page .payment-details-container > h2,
.auth-page.horizon-page .onboarding-survey-area > h2 {
    color: var(--night);
}

/* Interstitial copy (confirmation + consent): night ink at full strength — the
 * dimming opacities were tuned for cream on the dark field. */
.auth-page.horizon-page .interstitial-message,
.auth-page.horizon-page .interstitial-message h1,
.auth-page.horizon-page .interstitial-message h2,
.auth-page.horizon-page .interstitial-message h3,
.auth-page.horizon-page .interstitial-message h4,
.auth-page.horizon-page .interstitial-message h5,
.auth-page.horizon-page .interstitial-message h6 {
    color: var(--night);
    opacity: 1;
}
/* Emphasis ("store and analyze…", "NEVER"). No accent hue holds contrast across the
 * whole blue -> aqua -> cream span, so emphasis is carried by weight, in midnight. */
.auth-page.horizon-page .interstitial-message .text-accent,
.auth-page.horizon-page .interstitial-message .text-flare,
.auth-page.horizon-page .interstitial-message .accent-color-lemon,
.auth-page.horizon-page .interstitial-message .accent-color-gold {
    color: var(--midnight) !important;   /* out-ranks the !important on-dark rule above */
    font-weight: var(--font-weight-bold);
}
/* T&S / Privacy links: midnight + underline (the inline light green needs !important). */
.auth-page.horizon-page .interstitial a:not(.self-centered),
.auth-page.horizon-page .interstitial a:not(.self-centered):hover {
    color: var(--midnight) !important;
    text-decoration: underline;
}

/* "Resend Email" (.btn--accent-on-dark .btn--quiet): a pale cornflower pill at 0.6
 * opacity disappears into the aqua, so it becomes a quiet night-outlined pill. */
.auth-page.horizon-page .interstitial .btn--quiet {
    --btn-ring-color: var(--night);
    --btn-ring-press: var(--night);
    opacity: 1;
    color: var(--night);
    background-color: transparent;
    border: 1px solid var(--night);
}
.auth-page.horizon-page .interstitial .btn--quiet:hover,
.auth-page.horizon-page .interstitial .btn--quiet:focus,
.auth-page.horizon-page .interstitial .btn--quiet:active {
    color: var(--night);
    background-color: rgba(10, 26, 82, 0.08);   /* --night @ 8% */
    border: 1px solid var(--night);
}

/* "I Accept" (consent page): the homepage hero CTA's colours (heliomath_home.css
 * `#home .light-hero .btn`) — sunbeam fill, lifting on hover/press, midnight label.
 * Overrides the dusk-muted fill + white label of the .auth-page interstitial CTA above. */
.auth-page.horizon-page .interstitial .btn-grokkoli-primary {
    --btn-ring-color: var(--sunbeam);
    --btn-ring-press: var(--sunbeam-lifter);
    color: var(--midnight);
    background-color: var(--sunbeam);
}
.auth-page.horizon-page .interstitial .btn-grokkoli-primary:hover {
    color: var(--midnight);
    background-color: var(--sunbeam-lift);
}
.auth-page.horizon-page .interstitial .btn-grokkoli-primary:focus,
.auth-page.horizon-page .interstitial .btn-grokkoli-primary:active {
    color: var(--midnight);
    outline-color: var(--sunbeam);
}
.auth-page.horizon-page .interstitial .btn-grokkoli-primary:active {
    background-color: var(--sunbeam-lifter);
}

/* "Account Settings" (alpha_base's .nav-link-quiet, the funnel's one nav link): the
 * home page's Login pill (heliomath_nav.css — keep the two in step), instead of the
 * quiet text link heliomath_app.css makes it. heliomath_nav.css IS loaded here, but
 * heliomath_app.css's `.auth-page .navbar-nav .nav-link.nav-link-quiet` rules
 * deliberately strip its pill from .nav-link-quiet, so the pill is restated. #navbar_header
 * lifts this over those rules and the solid-nav focus ring in heliomath_components.css. */
.auth-page.horizon-page #navbar_header .navbar-nav .nav-link.nav-link-quiet {
    color: var(--text-on-dark);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 7px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-family-base);
    font-size: 1.0625rem;   /* 17px */
    font-weight: var(--font-weight-regular);
    line-height: 1.5;
    letter-spacing: normal;
    text-decoration: none;
}
.auth-page.horizon-page #navbar_header .navbar-nav .nav-link.nav-link-quiet:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.15);
}
.auth-page.horizon-page #navbar_header .navbar-nav .nav-link.nav-link-quiet:focus,
.auth-page.horizon-page #navbar_header .navbar-nav .nav-link.nav-link-quiet:active {
    outline: 2px solid var(--text-on-dark);
    outline-offset: 3px;
    box-shadow: none;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: 0;
    margin-right: 0;
}
