:root {
    color-scheme: light dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #eef2f7;
    color: #172033;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1.5rem;
}

.auth-card {
    width: min(100%, 28rem);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1.25rem 3.5rem rgb(15 23 42 / 12%);
}

.eyebrow {
    margin: 0 0 .5rem;
    color: #334e98;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(1.65rem, 6vw, 2.15rem);
    line-height: 1.15;
}

.intro {
    margin: .75rem 0 1.75rem;
    color: #526078;
    line-height: 1.55;
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 650;
}

.field input {
    width: 100%;
    min-height: 2.9rem;
    padding: .7rem .8rem;
    border: 1px solid #94a3b8;
    border-radius: .55rem;
    background: #ffffff;
    color: #172033;
    font: inherit;
}

.field input:focus-visible,
.check input:focus-visible,
button:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.check {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .2rem 0 1.35rem;
}

.check input {
    width: 1.1rem;
    height: 1.1rem;
}

button {
    width: 100%;
    min-height: 3rem;
    border: 0;
    border-radius: .55rem;
    background: #203f91;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

button:hover {
    background: #173274;
}

/* Anchor-styled CTAs — nav/landing/pricing use <a class="button">. */
.button {
    display: inline-block;
    padding: .7rem 1.4rem;
    border: 1px solid #203f91;
    border-radius: .55rem;
    background: #203f91;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}

.button:hover {
    background: #173274;
    border-color: #173274;
    color: #ffffff;
}

.button-secondary {
    border-color: #cbd5e1;
    background: transparent;
    color: #172033;
}

.button-secondary:hover {
    background: #eef2f7;
    border-color: #94a3b8;
    color: #172033;
}

.button:focus-visible,
button:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.notice {
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    border: 1px solid;
    border-radius: .55rem;
    line-height: 1.45;
}

.notice p {
    margin: 0;
}

.notice.error {
    border-color: #b42318;
    background: #fff1f0;
    color: #7a271a;
}

.notice.success {
    border-color: #067647;
    background: #ecfdf3;
    color: #05603a;
}

.auth-card-wide {
    width: min(100%, 38rem);
}

.qr-code {
    display: block;
    width: min(100%, 17.5rem);
    height: auto;
    margin: 0 auto 1.5rem;
    border: .75rem solid #ffffff;
}

.manual-secret {
    margin-bottom: 1.4rem;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: .55rem;
    background: #f8fafc;
}

.manual-secret span {
    display: block;
    margin-bottom: .45rem;
    color: #526078;
    font-size: .85rem;
    font-weight: 700;
}

.manual-secret code {
    overflow-wrap: anywhere;
    color: #172033;
    font-size: 1rem;
    letter-spacing: .08em;
}

.recovery-note {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #cbd5e1;
}

.recovery-note h2 {
    margin: 0 0 .6rem;
    font-size: 1rem;
}

.recovery-note ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #526078;
    line-height: 1.55;
}

.secondary-action,
.print-instruction {
    margin: 1.25rem 0 0;
    color: #526078;
    font-size: .92rem;
    line-height: 1.5;
}

.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem 1.5rem;
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.backup-codes code {
    color: #172033;
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: .1em;
}

.continue-link {
    display: block;
    margin-top: 1.25rem;
    padding: .8rem 1rem;
    border-radius: .55rem;
    background: #203f91;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.continue-link:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

@media (max-width: 28rem) {
    .backup-codes {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        background: #101828;
        color: #f8fafc;
    }

    .auth-card {
        border-color: #344054;
        background: #1d2939;
    }

    .eyebrow {
        color: #b9c6ff;
    }

    .intro {
        color: #cbd5e1;
    }

    .field input {
        border-color: #667085;
        background: #101828;
        color: #f8fafc;
    }

    .manual-secret {
        border-color: #475467;
        background: #101828;
    }

    .manual-secret span,
    .recovery-note ul,
    .secondary-action,
    .print-instruction {
        color: #cbd5e1;
    }

    .manual-secret code,
    .backup-codes code {
        color: #f8fafc;
    }
}

@media print {
    :root,
    body,
    .auth-card,
    .manual-secret {
        background: #ffffff;
        color: #000000;
    }

    .auth-shell {
        display: block;
        padding: 0;
    }

    .auth-card {
        width: 100%;
        border: 0;
        box-shadow: none;
    }

    .continue-link,
    .qr-code,
    form {
        display: none;
    }
}

/* Public pricing page — plan cards inside the auth shell */
.pricing-card {
    width: min(100%, 46rem);
    max-width: 46rem;
    text-align: start;
}

.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.plan-card {
    border: 1px solid var(--line, #d6dbe3);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plan-card-featured {
    border-color: var(--accent, #2563eb);
    box-shadow: 0 0 0 1px var(--accent, #2563eb) inset;
}

.plan-card h2 {
    margin: 0;
    font-size: 1.1rem;
}

.plan-price {
    margin: 0;
    font-size: 0.95rem;
}

.plan-price strong {
    font-size: 1.35rem;
}

.plan-term {
    color: var(--muted, #64748b);
    font-size: 0.85rem;
}

.plan-features {
    list-style: none;
    margin: 0.5rem 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.plan-features li::before {
    content: "✓ ";
    color: var(--accent, #2563eb);
    font-weight: 600;
}

.plan-card .button {
    margin-top: auto;
    text-align: center;
}
