:root {
    --brand-blue: #233487;
    --brand-purple: #951b82;
    --brand-gradient: linear-gradient(120deg, var(--brand-blue), var(--brand-purple));
    --ink: #202536;
    --muted: #5b6476;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #e9edf5;
    line-height: 1.5;
}

.mfa-qr svg { width: min(16rem, 100%); height: auto; background: #fff; padding: .5rem; }
.recovery-codes { columns: 2; padding-left: 1.5rem; }
.recovery-codes li { margin-bottom: .5rem; }

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)),
        url("../assets/yfc-one-background.png") center / cover fixed no-repeat;
}

.skip-link {
    position: fixed;
    top: -5rem;
    left: 1rem;
    z-index: 10;
    padding: .75rem 1rem;
    color: var(--brand-blue);
    background: #fff;
    border: 3px solid var(--brand-blue);
    border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.identity-header {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem clamp(1.25rem,5vw,4rem);
    color: #fff;
    background: var(--brand-gradient);
    box-shadow: 0 4px 18px rgba(35,52,135,.22);
}
.identity-header strong { font-size: 1.35rem; letter-spacing: -.02em; }
.identity-header span { font-size: .9rem; font-weight: 600; letter-spacing: .025em; opacity: .92; }

#main-content { padding: clamp(1.25rem,5vw,4rem); }

.identity-card {
    position: relative;
    width: min(100%,32rem);
    margin: clamp(1rem,6vh,4rem) auto;
    padding: clamp(1.5rem,5vw,2.75rem);
    overflow: hidden;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 1.25rem;
    box-shadow: 0 20px 55px rgba(35,52,135,.2);
    backdrop-filter: blur(8px);
}
.identity-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: .4rem;
    background: var(--brand-gradient);
}

.identity-brand { display: flex; justify-content: center; margin: .25rem 0 1.75rem; }
.identity-brand img { display: block; width: min(100%,19rem); height: auto; }
.identity-card-heading { margin-bottom: 1.75rem; text-align: center; }
.identity-eyebrow {
    margin: 0 0 .35rem;
    color: var(--brand-purple);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
h1 {
    margin: 0;
    color: var(--brand-blue);
    font-size: clamp(1.7rem,5vw,2.15rem);
    line-height: 1.2;
    letter-spacing: -.035em;
}
.identity-card-heading > p:last-child { margin: .7rem 0 0; color: var(--muted); }

.identity-card form { display: grid; gap: 1.15rem; }
.identity-field { display: grid; gap: .45rem; }
.identity-field label { color: #32394a; font-size: .95rem; font-weight: 700; }
.identity-field input {
    width: 100%;
    min-height: 3.1rem;
    padding: .65rem .85rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid #aeb6c8;
    border-radius: .7rem;
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.identity-field input:hover { border-color: #79849a; }
.identity-field input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(35,52,135,.14);
    outline: none;
}
.identity-field .identity-code-input {
    min-height: 3.5rem;
    padding-inline: 1rem;
    border-width: 2px;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: .08em;
}

.identity-card button {
    min-height: 3.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    margin-top: .25rem;
    padding: .65rem 1.2rem;
    color: #fff;
    background: var(--brand-gradient);
    border: 0;
    border-radius: .7rem;
    box-shadow: 0 8px 20px rgba(77,42,134,.24);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: box-shadow .15s ease, transform .15s ease;
}
.identity-card button:hover { box-shadow: 0 10px 24px rgba(77,42,134,.34); transform: translateY(-1px); }
.identity-card button:active { box-shadow: 0 4px 12px rgba(77,42,134,.24); transform: translateY(0); }
:focus-visible { outline: 3px solid #1677c8; outline-offset: 3px; }

.validation-summary-errors {
    padding: .8rem 1rem;
    color: #782b11;
    background: #fff2ee;
    border-left: 4px solid #a63f18;
    border-radius: .35rem;
}
.validation-summary-errors ul { margin: .25rem 0; padding-left: 1.25rem; }
.identity-notice {
    margin: 1rem 0;
    padding: .8rem 1rem;
    color: #23315f;
    background: #eef2ff;
    border-left: 4px solid var(--brand-blue);
    border-radius: .35rem;
}

@media (max-width:35rem) {
    .identity-header { min-height: 4rem; }
    #main-content { padding: 1rem; }
    .identity-card { margin: 1rem auto; padding: 1.5rem; border-radius: 1rem; }
    .identity-brand img { width: min(100%,15rem); }
}

@media (prefers-reduced-motion:reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
