.auth-flow {
    --auth-ink: #172033;
    --auth-muted: #5c667a;
    --auth-blue: #075bd8;
    --auth-blue-dark: #064caf;
    --auth-border: #d9e2ef;
    --auth-soft: #f4f7fb;
    --auth-positive: #087f5b;
    color: var(--auth-ink);
    background: linear-gradient(180deg, #f7f9fc 0, #fff 38rem);
    padding: clamp(2.5rem, 6vw, 5.5rem) 1.25rem clamp(4rem, 8vw, 7rem);
}

.auth-flow-shell { width: min(1120px, 100%); margin: 0 auto; }
.auth-flow-intro { max-width: 760px; margin-bottom: 2rem; }
.auth-flow-intro h1 { margin: .45rem 0 1rem; font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.055em; }
.auth-flow-intro > p:last-child { max-width: 680px; margin: 0; color: var(--auth-muted); font-size: clamp(1rem, 1.8vw, 1.2rem); }

.auth-error-summary { margin: 0 0 1.5rem; border: 1px solid #efb4ad; border-left: 4px solid #c83d2e; border-radius: 12px; background: #fff5f3; padding: 1rem 1.2rem; }
.auth-error-summary ul { margin: .5rem 0 0; padding-left: 1.25rem; }

.auth-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.auth-progress li { display: flex; align-items: center; gap: .65rem; min-height: 48px; border-bottom: 2px solid var(--auth-border); color: var(--auth-muted); font-weight: 750; }
.auth-progress li span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #eaf1fc; color: var(--auth-blue); font-size: .78rem; }
.auth-progress li[aria-current="step"] { border-color: var(--auth-blue); color: var(--auth-ink); }
.auth-progress li[data-complete="true"] { border-color: #77c8ae; color: var(--auth-positive); }

.auth-registration-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.auth-panel, .auth-order-summary, .auth-card { border: 1px solid var(--auth-border); border-radius: 18px; background: #fff; box-shadow: 0 18px 45px rgba(24, 43, 74, .07); }
.auth-registration-form { min-width: 0; }
.auth-step-panel { padding: clamp(1.4rem, 3vw, 2.5rem); }
.auth-flow.is-enhanced .auth-step-panel[hidden] { display: none; }
.auth-section-heading { margin-bottom: 1.5rem; }
.auth-section-heading p { margin: 0 0 .35rem; color: var(--auth-blue); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.auth-section-heading h2 { margin: 0 0 .5rem; font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.035em; }
.auth-section-heading span { color: var(--auth-muted); }

.auth-flow label, .auth-flow legend { color: var(--auth-ink); font-weight: 740; }
.auth-flow label > span:not(.auth-check span), .auth-flow summary > span { color: var(--auth-muted); font-size: .82rem; font-weight: 500; }
.auth-flow input:not([type="checkbox"]):not([type="radio"]), .auth-flow select, .auth-flow textarea { display: block; width: 100%; min-height: 48px; margin-top: .45rem; border: 1px solid #aebbcf; border-radius: 10px; background: #fff; color: var(--auth-ink); padding: .72rem .85rem; font: inherit; }
.auth-flow input:focus-visible, .auth-flow select:focus-visible, .auth-flow textarea:focus-visible, .auth-flow button:focus-visible, .auth-flow a:focus-visible, .auth-flow summary:focus-visible { outline: 3px solid rgba(7, 91, 216, .3); outline-offset: 2px; }
.auth-flow input[aria-invalid="true"], .auth-flow select[aria-invalid="true"] { border-color: #bd2d20; }
.auth-flow label small { display: block; margin-top: .4rem; color: var(--auth-muted); font-size: .8rem; font-weight: 450; }
.auth-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.auth-step-panel > label, .auth-step-panel > fieldset, .auth-step-panel > details { display: block; margin-bottom: 1rem; }

.auth-check { display: flex !important; align-items: flex-start; gap: .75rem; border-radius: 10px; padding: .75rem 0; cursor: pointer; }
.auth-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: .12rem 0 0; accent-color: var(--auth-blue); }
.auth-check span { font-weight: 500; }
.auth-check-optional { margin-top: .25rem; border: 1px solid var(--auth-border); background: var(--auth-soft); padding: .9rem 1rem; }
.auth-check-optional strong { display: block; margin-bottom: .15rem; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }

.auth-disclosure { border: 1px solid var(--auth-border); border-radius: 12px; background: var(--auth-soft); }
.auth-disclosure summary { min-height: 48px; padding: .85rem 1rem; cursor: pointer; }
.auth-disclosure[open] summary { border-bottom: 1px solid var(--auth-border); }
.auth-disclosure > .auth-field-grid { margin: 0; padding: 1rem; }

.auth-market-picker, .auth-goal-picker, .auth-plan-picker { min-width: 0; border: 0; padding: 0; }
.auth-market-picker > p { margin: .25rem 0 .75rem; color: var(--auth-muted); font-size: .86rem; }
.auth-market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 190px; overflow: auto; border: 1px solid var(--auth-border); border-radius: 12px; padding: .5rem; }
.auth-market-grid label { display: flex; align-items: center; gap: .45rem; min-height: 40px; border-radius: 7px; padding: .35rem .5rem; cursor: pointer; font-size: .88rem; }
.auth-market-grid label:hover { background: #edf4ff; }
.auth-market-grid input { width: 18px; height: 18px; accent-color: var(--auth-blue); }

.auth-goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.auth-goal-grid label { cursor: pointer; }
.auth-goal-grid input { position: absolute; opacity: 0; pointer-events: none; }
.auth-goal-grid span { display: flex; align-items: center; gap: .65rem; min-height: 58px; border: 1px solid var(--auth-border); border-radius: 11px; padding: .75rem .85rem; color: var(--auth-ink) !important; font-size: .9rem !important; font-weight: 700 !important; }
.auth-goal-grid svg { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 7px; background: #eaf2ff; padding: 4px; fill: none; stroke: var(--auth-blue); stroke-width: 2.2; }
.auth-goal-grid input:checked + span { border-color: var(--auth-blue); background: #f0f6ff; box-shadow: inset 0 0 0 1px var(--auth-blue); }
.auth-goal-grid input:focus-visible + span { outline: 3px solid rgba(7, 91, 216, .3); outline-offset: 2px; }

.auth-billing-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: .7rem 0 1rem; border: 1px solid var(--auth-border); border-radius: 999px; background: var(--auth-soft); padding: 4px; }
.auth-billing-toggle label { cursor: pointer; }
.auth-billing-toggle input { position: absolute; opacity: 0; }
.auth-billing-toggle span { display: grid; min-height: 40px; place-items: center; border-radius: 999px; padding: .45rem .85rem; color: var(--auth-muted) !important; font-size: .86rem !important; font-weight: 750 !important; }
.auth-billing-toggle input:checked + span { background: var(--auth-ink); color: #fff !important; }
.auth-billing-toggle input:focus-visible + span { outline: 3px solid rgba(7, 91, 216, .3); }
.auth-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.auth-plan-option { cursor: pointer; }
.auth-plan-option input { position: absolute; opacity: 0; }
.auth-plan-option > span { display: flex; min-height: 138px; flex-direction: column; border: 1px solid var(--auth-border); border-radius: 12px; padding: 1rem; color: var(--auth-ink) !important; }
.auth-plan-option strong { font-size: 1rem; }
.auth-plan-option b { margin-top: auto; font-size: 1.55rem; letter-spacing: -.035em; }
.auth-plan-option b small { color: var(--auth-muted); font-size: .72rem; font-weight: 600; }
.auth-plan-option em { margin-top: .25rem; color: var(--auth-positive); font-size: .75rem; font-style: normal; font-weight: 700; }
.auth-plan-option input:checked + span { border-color: var(--auth-blue); background: #f2f7ff; box-shadow: inset 0 0 0 1px var(--auth-blue); }
.auth-plan-option input:focus-visible + span { outline: 3px solid rgba(7, 91, 216, .3); outline-offset: 2px; }

.auth-checkout-assurance { display: flex; gap: .8rem; margin-top: 1.25rem; border-radius: 12px; background: #eef9f5; padding: 1rem; }
.auth-checkout-assurance svg { width: 28px; height: 28px; flex: 0 0 auto; fill: none; stroke: var(--auth-positive); stroke-width: 1.8; }
.auth-checkout-assurance p { margin: .15rem 0 0; color: #416257; font-size: .86rem; }

.auth-step-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.6rem; border-top: 1px solid var(--auth-border); padding-top: 1.2rem; }
.auth-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--auth-ink); border-radius: 999px; padding: .65rem 1.15rem; background: #fff; color: var(--auth-ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.auth-button:hover { transform: translateY(-1px); }
.auth-button-primary { border-color: var(--auth-blue); background: var(--auth-blue); color: #fff; }
.auth-button-primary:hover { background: var(--auth-blue-dark); }

.auth-order-summary { position: sticky; top: 1rem; padding: 1.35rem; }
.auth-order-summary > p:first-child { margin: 0 0 .3rem; color: var(--auth-blue); font-size: .75rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.auth-order-summary h2 { margin: 0; font-size: 1.35rem; }
.auth-order-price { display: flex; align-items: baseline; gap: .35rem; margin: 1rem 0 .2rem; }
.auth-order-price strong { font-size: 2rem; letter-spacing: -.04em; }
.auth-order-price span, .auth-order-summary > p[data-summary-saving] { color: var(--auth-muted); font-size: .82rem; }
.auth-order-summary > p[data-summary-saving] { min-height: 1.25rem; color: var(--auth-positive); font-weight: 700; }
.auth-order-summary dl { margin: 1.2rem 0; border-block: 1px solid var(--auth-border); padding: .7rem 0; }
.auth-order-summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem 0; font-size: .86rem; }
.auth-order-summary dt { color: var(--auth-muted); }
.auth-order-summary dd { margin: 0; text-align: right; font-weight: 750; }
.auth-summary-note { margin: 0; color: var(--auth-muted); font-size: .78rem; }
.auth-sign-in-link { margin: 1.2rem 0 0; text-align: center; color: var(--auth-muted); }

.auth-card { width: min(620px, 100%); margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.5rem); }
.auth-card-header { margin-bottom: 1.5rem; }
.auth-card-header h1 { margin: .35rem 0 .6rem; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.045em; }
.auth-card-header p:last-child { margin: 0; color: var(--auth-muted); }
.auth-card form > label { display: block; margin-bottom: 1rem; }
.auth-card .auth-button { margin-top: .25rem; }
.auth-card-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; border-top: 1px solid var(--auth-border); padding-top: 1rem; }
.auth-card-links a { color: var(--auth-blue); font-weight: 700; }
.auth-security-note { display: flex; gap: .75rem; margin-top: 1.25rem; border-radius: 11px; background: var(--auth-soft); padding: .85rem 1rem; color: var(--auth-muted); font-size: .84rem; }
.auth-security-note svg { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: var(--auth-blue); stroke-width: 1.8; }
.auth-code-input { max-width: 330px; font-size: 1.7rem !important; font-weight: 800 !important; letter-spacing: .32em; text-align: center; }
.auth-code-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; }
.auth-code-actions form { margin: 0; }
.auth-status-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: #eaf2ff; color: var(--auth-blue); }
.auth-status-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }

@media (max-width: 850px) {
    .auth-registration-layout { grid-template-columns: 1fr; }
    .auth-order-summary { position: static; grid-row: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .4rem 1rem; }
    .auth-order-summary > p:first-child, .auth-order-summary h2 { grid-column: 1; }
    .auth-order-price { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
    .auth-order-summary > p[data-summary-saving], .auth-order-summary dl, .auth-order-summary .auth-summary-note { display: none; }
}

@media (max-width: 640px) {
    .auth-flow { padding-inline: .85rem; }
    .auth-progress li { align-items: flex-start; flex-direction: column; justify-content: center; gap: .2rem; font-size: .75rem; }
    .auth-progress li span { width: 24px; height: 24px; }
    .auth-field-grid, .auth-goal-grid, .auth-plan-grid { grid-template-columns: 1fr; }
    .auth-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-plan-option > span { min-height: 100px; }
    .auth-order-summary { padding: 1rem; }
    .auth-order-price strong { font-size: 1.5rem; }
    .auth-step-actions { position: sticky; z-index: 3; bottom: 0; margin-inline: -1rem; background: rgba(255,255,255,.96); padding: 1rem; backdrop-filter: blur(10px); }
    .auth-button { min-height: 48px; }
    .auth-card-links { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { .auth-button { transition: none; } }
@media (forced-colors: active) { .auth-plan-option input:checked + span, .auth-goal-grid input:checked + span { outline: 3px solid CanvasText; } }
