/* Use the public-page container so account content shares the site's outer edges. */
.account-section {
    background: var(--paper)
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
    grid-template-areas: "welcome signin";
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 36px #26304d0b
}

.account-signin {
    grid-area: signin;
    min-width: 0;
    padding: clamp(1.5rem,4.4vw,4rem)
}

.account-eyebrow {
    margin: 0 0 .8rem;
    font-size: .7rem;
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: .16em;
    color: #80612b
}

.account-signin h1 {
    font-size: clamp(2rem,3vw,2.65rem);
    letter-spacing: -.035em;
    color: var(--navy);
    margin-bottom: .65rem
}

.account-intro {
    font-size: 1rem;
    color: #586273;
    line-height: 1.65;
    margin: 0 0 1.8rem
}

.account-form label {
    display: block;
    color: var(--navy);
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .55rem
}

.account-form input:not([type=hidden]) {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #a9b2c0;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 1rem
}

.account-form input::placeholder {
    color: #697483
}

.account-form input:focus-visible {
    border-color: var(--navy)
}

.account-password-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-top: 1.35rem
}

    .account-password-label a {
        font-size: .82rem;
        padding-block: .25rem
    }

.account-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 1.5rem;
    justify-content: space-between;
    padding: 12px 18px;
    font-size: .82rem;
    box-shadow: none;
    border-radius: 4px
}

    .account-submit span {
        font-size: inherit
    }

.account-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.6rem 0;
    font-size: .8rem;
    color: #586273;
    text-align: center
}

    .account-divider:before, .account-divider:after {
        content: "";
        height: 1px;
        background: var(--line);
        flex: 1
    }

.account-signin .external-signins {
    display: grid;
    gap: .7rem
}

    .account-signin .external-signins form {
        margin: 0
    }

    .account-signin .external-signins button {
        width: 100%;
        min-height: 48px;
        padding: 10px 14px;
        border: 1px solid #b9c1cb;
        border-radius: 4px;
        background: #fff;
        color: var(--navy);
        font-size: .9rem;
        font-weight: 700
    }

        .account-signin .external-signins button:hover:not(:disabled) {
            background: #f3f4f7;
            border-color: var(--navy)
        }

        .account-signin .external-signins button:disabled {
            opacity: .55;
            cursor: not-allowed
        }

.account-help {
    margin: 1.5rem 0 0;
    font-size: .82rem;
    line-height: 1.75;
    color: #586273
}

    .account-help a {
        white-space: nowrap
    }

.account-welcome {
    grid-area: welcome;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    min-width: 0;
    padding: clamp(2rem,4vw,3.5rem);
    background: var(--navy);
    color: #fff;
    border-radius: 7px 0 0 7px
}

.account-welcome-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid #9ba5bb66;
    border-radius: 50%;
    margin-bottom: 2.5rem;
    color: #e1be77
}

    .account-welcome-icon .icon {
        width: 27px;
        height: 27px
    }

.account-welcome .account-eyebrow {
    color: #e1be77
}

.account-welcome h2 {
    font-size: var(--section-heading-size);
    line-height: 1.18;
    letter-spacing: -.035em;
    margin-bottom: 1.25rem
}

.account-welcome p:not(.account-eyebrow) {
    font-size: .98rem;
    line-height: 1.8;
    color: #e0e4ec;
    margin: 0;
    max-width: 34ch
}

.account-signup {
    padding-top: 2rem;
    border-top: 1px solid #9ba5bb66
}

    .account-signup h3 {
        font-family: inherit;
        font-size: 1.1rem;
        margin-bottom: .6rem
    }

    .account-signup .account-signup-link {
        margin-top: 1.3rem;
        min-height: 48px;
        justify-content: space-between;
        gap: 1.5rem;
        padding: 12px 18px;
        border: 1px solid #e1be77;
        background: transparent;
        color: #f3d6a4;
        box-shadow: none;
        border-radius: 4px;
        font-size: .78rem
    }

        .account-signup .account-signup-link:hover {
            background: #ffffff12;
            color: #fff
        }

.account-status, .account-form .validation-summary-errors {
    padding: 14px 16px;
    margin: 0 0 1.5rem;
    font-size: .9rem;
    line-height: 1.6;
    border-radius: 4px
}

.account-status {
    background: #edf5ed;
    border: 1px solid #adc9ad;
    color: #28512b
}

.account-form .validation-summary-errors {
    background: #fff3f1;
    border: 1px solid #d9a5a0;
    color: #852b25
}

    .account-form .validation-summary-errors ul {
        margin: 0;
        padding-left: 1.1rem
    }

.account-form .validation-summary-valid {
    display: none
}

@media(max-width:760px) {
    .account-layout {
        grid-template-columns: minmax(0,1fr);
        grid-template-areas: "signin" "welcome"
    }

    .account-signin {
        padding: 1.75rem 1.25rem
    }

    .account-welcome {
        border-radius: 0 0 7px 7px;
        padding: 2rem 1.5rem;
        gap: 2rem
    }

    .account-welcome-icon {
        margin-bottom: 1.5rem
    }

    .account-welcome h2 br {
        display: none
    }

    .account-welcome p:not(.account-eyebrow) {
        max-width: none
    }

    .account-help a {
        white-space: normal
    }
}

/* Registration and recovery use the same card, fields and button sizing as login. */
.account-flow {
    line-height: 1.65
}

    .account-flow > p:not(.account-eyebrow) {
        font-size: 1rem;
        color: #586273;
        margin: 0 0 1.4rem
    }

    .account-flow > h2 {
        font-size: 1.15rem;
        color: var(--navy);
        margin: 1.8rem 0 .6rem
    }

    .account-flow > .account-form {
        margin: 1.5rem 0
    }

    .account-flow .account-form input:not([type=hidden]) + label {
        margin-top: 1.25rem
    }

    .account-flow .account-form > p {
        font-size: .88rem;
        color: #586273;
        line-height: 1.65
    }

    .account-flow .account-submit {
        justify-content: center
    }

    .account-flow h1 {
        overflow-wrap: anywhere
    }

    .account-flow .account-form input:not([type=hidden]) {
        line-height: 1.3
    }

.account-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    margin-top: 1.5rem
}

    .account-actions .account-submit {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        margin: 0;
        justify-content: center;
        gap: .4rem
    }

    .account-actions .account-clear {
        flex: 0 0 auto;
        margin-left: auto;
        background: #fff;
        color: var(--navy);
        border-color: #a9b2c0;
        box-shadow: none;
        border-radius: 4px;
        gap: .4rem
    }

        .account-actions .account-clear:hover {
            background: #f3f4f7;
            border-color: var(--navy)
        }

.account-action-label-compact { display: none; }

/* Keep both actions on one row using a concise verification caption on phones.
   Shared mobile button metrics use !important, so match it for readable sizing. */
@media (max-width: 760px) {
    #content .account-actions { gap: 6px; }
    #content .account-actions :is(.account-submit, .account-clear) {
        min-height: 48px;
        padding: 12px 8px !important;
        font-size: .8125rem !important;
        letter-spacing: 0;
        gap: 5px;
    }
    .account-actions .account-action-label-full { display: none; }
    .account-actions .account-action-label-compact { display: inline; }
}
.account-signup .account-signup-link {
    justify-content: center;
    gap: .5rem
}

/* Account home: the sign-in card with the person on the navy side and their options as a list of action cards. */
.account-action-list {
    display: grid;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none
}

.account-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .account-action:hover {
        border-color: #c9a86a;
        box-shadow: var(--hover-shadow);
        transform: translateY(-1px)
    }
}

    .account-action:focus-visible {
        outline: 2px solid var(--navy);
        outline-offset: 2px
    }

.account-action-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f6efdf;
    color: #80612b
}

    .account-action-icon .icon {
        width: 20px;
        height: 20px
    }

.account-action-text {
    display: grid;
    gap: .15rem;
    min-width: 0;
    flex: 1
}

    .account-action-text strong {
        color: var(--navy);
        font-size: 1rem
    }

    .account-action-text span {
        color: #586273;
        font-size: .87rem;
        line-height: 1.5
    }

/* A short state beside an action's title: two-step verification "On", "Needed" or "Optional". */
.account-action-text .account-action-tag {
    display: inline-block;
    margin-left: .4rem;
    padding: .05rem .5rem;
    border-radius: 999px;
    background: #eef1f5;
    color: #586273;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .06em;
    text-transform: none;
    vertical-align: 2px
}

    .account-action-text .account-action-tag.is-on {
        background: #edf5ed;
        color: #28512b
    }

    .account-action-text .account-action-tag.is-needed {
        background: #fff6e0;
        color: #7a5212
    }

.account-action-arrow {
    color: #9aa3b2;
    transition: color .15s ease, transform .15s ease
}

    .account-action-arrow .icon {
        width: 16px;
        height: 16px
    }

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .account-action:hover .account-action-arrow {
        color: var(--navy);
        transform: translateX(3px)
    }
}

/* Administration stands apart: it is the way into the management portal. */
.account-action-admin {
    border-color: var(--navy);
    background: #f5f7fb
}

    .account-action-admin .account-action-icon {
        background: var(--navy);
        color: #e1be77
    }

.account-avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 2rem;
    border: 2px solid #e1be77;
    border-radius: 50%;
    color: #f3d6a4;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .04em
}

.account-home .account-welcome h2 {
    margin-bottom: .5rem;
    overflow-wrap: anywhere
}

.account-home .account-welcome .account-profile-email {
    overflow-wrap: anywhere
}

.account-home .account-signup form {
    margin: 0
}

.account-home .account-signup .account-signup-link {
    width: 100%;
    cursor: pointer;
    text-transform: none
}

@media (prefers-reduced-motion: reduce) {
    .account-action, .account-action-arrow {
        transition: none
    }

    .account-action:hover, .account-action:hover .account-action-arrow {
        transform: none
    }
}

@media(max-width:760px) {
    .account-action {
        padding: .85rem .9rem;
        gap: .8rem
    }

    .account-avatar {
        margin-bottom: 1.25rem
    }
}

/* Passkey sign-in is a separate public-site action; Bootstrap is scoped to admin. */
#content .account-signin [data-passkey-sign-in] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    min-height: 48px;
    margin-top: 0;
    padding: 12px 18px;
    border: 1px solid #6c757d;
    border-radius: 4px;
    background: #6c757d;
    color: #fff;
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
    box-shadow: none;
}
#content .account-signin [data-passkey-sign-in]:is(:hover, :focus-visible):not(:disabled) {
    background: #5c636a;
    color: #fff;
    border-color: #fff;
}
#content .account-signin [data-passkey-sign-in]:disabled {
    opacity: .65;
    cursor: wait;
}
/* The shared verification dialog normally uses spaced-out code inputs; email is ordinary text. */
#passkey-sign-in-dialog input[type="email"] {
    letter-spacing: normal;
    font: inherit;
    text-align: left;
}
#passkey-sign-in-dialog .mfa-dialog-actions {
    flex-direction: column;
}

/* Face ID or Touch ID sign-in on an iPhone or iPad. js/apple-biometrics.js names the passkey button for it and
   js/passkey-sign-in.js makes it one tap; these rules add its status line and the "offered first" placement. */
.account-password-divider {
    display: none;
}
.account-passkey-status {
    margin: .75rem 0 0;
    color: #586273;
    font-size: .85rem;
    line-height: 1.5;
    text-align: center;
}
    .account-passkey-status.is-error {
        padding: 10px 12px;
        border: 1px solid #d9a5a0;
        border-radius: 4px;
        background: #fff3f1;
        color: #852b25;
        text-align: left;
    }
/* A device that has signed in this way before gets it first, above the password. */
.account-passkey-section.is-promoted .account-passkey-divider {
    display: none;
}
.account-passkey-section.is-promoted .account-password-divider {
    display: flex;
}
#content .account-signin .is-promoted [data-passkey-sign-in] {
    min-height: 56px;
    gap: .7rem;
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
    font-size: 1rem;
}
    #content .account-signin .is-promoted [data-passkey-sign-in] > .icon {
        width: 1.75em;
        height: 1.75em;
        color: var(--gold-on-dark);
    }
    #content .account-signin .is-promoted [data-passkey-sign-in]:is(:hover, :focus-visible):not(:disabled) {
        border-color: #18233c;
        background: #18233c;
        color: #fff;
    }
/* Offered on My Account until this device has it. */
.account-action-biometric {
    border-color: #d9c79d;
    background: #fdfaf2;
}
.account-action-text .account-action-tag.is-new {
    background: #f6efdf;
    color: #70501f;
}
