/* =============================================================================
   Sign-in pages (layouts.auth + x-auth-split)

   One column: a single white card, centred on a soft brand-blue page, holding
   the logo, the heading and the form. Rubik for reading, Quicksand for
   headings, rounded fields with an icon inside, a full-width brand button.
   The card is padded and type-sized to fit a laptop screen without scrolling;
   short viewports squeeze it further.
   ============================================================================= */

.kk-auth2-body {
    --au-primary: #2777be;
    --au-primary-hover: #1f62a0;
    --au-primary-dark: #1a5488;
    --au-tint: #e4eef9;
    --au-text: #3c4653;
    --au-muted: #8a94a0;
    --au-line: #cfd6de;
    --au-radius: 6px;
    --au-font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --au-font-heading: "Quicksand", var(--au-font);

    --kk-primary: var(--au-primary);
    --kk-primary-hover: var(--au-primary-hover);
    --kk-font-body: var(--au-font);
    --kk-font-heading: var(--au-font-heading);

    min-height: 100vh;
    margin: 0;
    font-family: var(--au-font);
    color: var(--au-text);
    background: #f4f8fc;
}

.kk-auth2-body a {
    color: var(--au-primary);
}

.kk-auth2-body a:hover {
    color: var(--au-primary-hover);
}

.kk-auth2 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.75rem 1rem;
    background: linear-gradient(165deg, #f5fafd 0%, #e8f1fa 55%, #dbeaf8 100%);
}

/* The card =================================================================== */
.kk-auth2__back {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: var(--au-muted) !important;
}

.kk-auth2__back:hover {
    color: var(--au-primary) !important;
    text-decoration: none;
}

.kk-auth2__form {
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    padding: 1.75rem;
    background: #fff;
    border: 1px solid #e8eef4;
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(13, 38, 66, .09);
}

.kk-auth2__form--wide {
    max-width: 46rem;
}

.kk-auth2__brand {
    margin-bottom: .875rem;
    text-align: center;
}

.kk-auth2__brand img {
    width: auto;
    max-width: 12rem;
    height: 1.375rem;
}

.kk-auth2__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .375rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--au-primary);
}

.kk-auth2__title {
    margin-bottom: .375rem;
    font-family: var(--au-font-heading);
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--au-text);
}

.kk-auth2__subtitle {
    margin-bottom: 1.125rem;
    font-size: .9375rem;
    line-height: 1.5;
    color: var(--au-muted);
}

/* Fields: rounded, thin grey border, icon inside on the left. */
.kk-auth2 label {
    display: block;
    margin-bottom: .375rem;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--au-text);
}

.kk-auth2 .form-group {
    margin-bottom: .875rem;
}

.kk-auth2 .form-control,
.kk-auth2 .custom-select {
    height: 2.5rem;
    font-size: .9375rem;
    color: #1b2430;
    background: #fff;
    border: 1px solid var(--au-line);
    border-radius: var(--au-radius);
    box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
}

.kk-auth2 textarea.form-control {
    height: auto;
}

.kk-auth2 .form-control::placeholder {
    color: var(--au-muted);
}

.kk-auth2 .form-control:focus,
.kk-auth2 .custom-select:focus {
    border-color: var(--au-primary);
    box-shadow: 0 0 0 3px rgba(39, 119, 190, .15);
}

.kk-auth2 .kk-input-icon > .kk-icon {
    left: .875rem;
    font-size: 1.125rem;
    color: #555;
}

.kk-auth2 .kk-input-icon > .form-control,
.kk-auth2 .kk-input-icon > .kk-password > .form-control {
    padding-left: 3rem;
}

.kk-auth2 .kk-password__toggle {
    font-size: 1.125rem;
    color: #555;
}

.kk-auth2 .custom-control-label {
    color: var(--au-muted);
}

.kk-auth2 .custom-control-label::before {
    border-radius: 2px;
}

.kk-auth2 .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--au-primary);
    border-color: var(--au-primary);
}

/* "Remember me" and "Forgot password?" on one line. */
.kk-auth2 .kk-auth__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin: .25rem 0 1.75rem;
}

.kk-auth2 .kk-auth__row .custom-control {
    margin-bottom: 0 !important;
}

.kk-auth2 .btn {
    font-family: var(--au-font);
    font-weight: 600;
    border-radius: var(--au-radius);
}

.kk-auth2 .btn-primary {
    height: 2.75rem;
    padding: 0 1rem;
    font-size: .9375rem;
    color: #fff;
    background: var(--au-primary);
    border-color: var(--au-primary);
}

.kk-auth2 .btn-primary:hover,
.kk-auth2 .btn-primary:focus {
    background: var(--au-primary-hover);
    border-color: var(--au-primary-hover);
}

.kk-auth2 .btn-outline-primary {
    color: var(--au-primary);
    border-color: var(--au-primary);
}

.kk-auth2 .btn-outline-primary:hover {
    color: #fff;
    background: var(--au-primary);
}

.kk-auth2 .btn-lg {
    height: 2.75rem;
    font-size: .9375rem;
}

.kk-auth2 .kk-disclosure {
    margin-bottom: 1.125rem;
    border: 0;
}

.kk-auth2 .kk-disclosure summary {
    margin-bottom: .5rem;
    font-size: .9375rem;
    color: var(--au-primary);
    cursor: pointer;
}

.kk-auth2 .kk-auth__fieldset {
    margin-bottom: 1.25rem;
    padding: 0;
    border: 0;
}

.kk-auth2 .kk-auth__fieldset legend {
    margin-bottom: .5rem;
    padding: 0;
    font-family: var(--au-font-heading);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--au-primary);
    border: 0;
}

.kk-auth2 .alert {
    border-radius: var(--au-radius);
}

/* The submit button sits on its own line, under both columns. */
.kk-auth2 .kk-auth__submit {
    margin-top: .25rem;
}

/* The sign-in button (or the two account-type buttons) always sits on its
   own line under the fields. */
.kk-auth__submit .btn + .btn {
    margin-top: .5rem;
}

.kk-auth__choose-label {
    margin: 0 0 .5rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--au-text);
}

/* A quiet note beside a column of fields (e.g. what happens after approval). */
.kk-auth__note {
    display: flex;
    gap: .5rem;
    margin: 0;
    padding: .75rem .875rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--au-muted);
    background: #f7fafd;
    border: 1px dashed var(--au-line);
    border-radius: var(--au-radius);
}

.kk-auth__note .kk-icon {
    flex-shrink: 0;
    margin-top: .125rem;
    color: var(--au-primary);
}

/* The address a reset link was sent to, on the "check your email" screen. */
.kk-auth__sent-to {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .75rem .875rem;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--au-text);
    background: #f4f9fe;
    border: 1px solid var(--au-line);
    border-radius: var(--au-radius);
    word-break: break-all;
}

.kk-auth2__footer {
    margin-top: 1.25rem;
    padding-top: .625rem;
    font-size: .875rem;
    text-align: center;
    color: var(--au-muted);
    border-top: 1px solid #eef1f5;
}

.kk-auth2__footer p {
    margin-bottom: 0;
}

.kk-auth2 .kk-auth__help,
.kk-auth2 .kk-auth__other {
    font-size: .875rem;
    color: var(--au-muted);
}

/* "How it works" disclosure ================================================== */
.kk-auth2__more {
    margin-top: .875rem;
    padding-top: .5rem;
    border-top: 1px solid #eef1f5;
}

.kk-auth2__more > summary {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--au-primary);
    cursor: pointer;
}

.kk-auth2__more[open] > summary {
    margin-bottom: .5rem;
}

.kk-auth2__about {
    font-size: .875rem;
    line-height: 1.55;
    color: var(--au-muted);
}

.kk-auth2__about p {
    margin-bottom: .5rem;
}

/* Lists and steps a page puts behind the disclosure. */
.kk-auth2__about ul,
.kk-auth2__about ol {
    margin: 0;
    padding-left: 1.125rem;
}

.kk-auth2__about li {
    margin-bottom: .25rem;
}

/* Notes written for the old dark photo panel keep inheriting their colour. */
.kk-auth2__about .kk-auth__pitch-note,
.kk-auth2__about .kk-auth__pitch-title {
    font-size: inherit;
    color: inherit;
}

/* Small screens ============================================================== */
@media (max-width: 575.98px) {
    .kk-auth2 {
        align-items: flex-start;
        padding: 1.75rem 1rem;
    }

    .kk-auth2__back {
        top: 1rem;
        left: 1rem;
    }

    .kk-auth2__form,
    .kk-auth2__form--wide {
        padding: 1.25rem 1rem 1rem;
    }
}

/* Two-column form body ======================================================
   Sign-up carries three steps. Below 768px they stack; from 768px up the card
   is 46rem wide and the steps sit side by side, which keeps the form short
   enough for a laptop screen without shrinking any control. */
.kk-auth__cols {
    display: grid;
    gap: 0 2rem;
}

@media (min-width: 768px) {
    .kk-auth__cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

.kk-auth__col > .kk-auth__fieldset:last-child {
    margin-bottom: 1.25rem;
}

/* A second step in the same column needs air above its legend, or it reads as
   part of the field above. */
.kk-auth__col > .kk-auth__fieldset + .kk-auth__fieldset {
    margin-top: .375rem;
}


/* The password field is wrapped (kk-password, for the eye button), and the
   wrapper would otherwise paint over the field's icon. */
.kk-auth2 .kk-input-icon > .kk-icon {
    z-index: 3;
}

/* Plan picker on the sign-up page =========================================== */
.kk-planpick__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

@media (min-width: 768px) {
    .kk-planpick__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .kk-planpick__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.kk-planpick__option {
    position: relative;
    display: block;
    padding: .625rem .75rem;
    margin: 0;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--au-line);
    border-radius: var(--au-radius);
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.kk-planpick__option:hover {
    border-color: var(--au-primary);
}

/* Selected state: server-rendered on load, live as soon as a radio changes
   (in browsers that support :has). */
.kk-planpick__option.is-selected,
.kk-planpick__option:has(.kk-planpick__input:checked) {
    background: #f4f9fe;
    border-color: var(--au-primary);
    box-shadow: 0 0 0 2px rgba(39, 119, 190, .14);
}

.kk-planpick__option:focus-within {
    border-color: var(--au-primary);
    box-shadow: 0 0 0 3px rgba(39, 119, 190, .22);
}

.kk-planpick__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.kk-planpick__name {
    display: block;
    font-family: var(--au-font-heading);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--au-text);
}

.kk-planpick__price {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--au-primary);
}

.kk-planpick__price small {
    margin-left: .15rem;
    font-weight: 400;
    color: var(--au-muted);
}

.kk-planpick__meta {
    display: block;
    font-size: .6875rem;
    line-height: 1.25;
    color: var(--au-muted);
}

.kk-planpick__more {
    display: inline-block;
    margin-top: .375rem;
    font-size: .8125rem;
}

.kk-auth__fineprint {
    margin: .75rem 0 0;
    font-size: .8125rem;
    color: var(--au-muted);
    text-align: center;
}
