:root {
    color-scheme: dark;
    --gold: #f3c623;
    --gold-soft: #ffe16a;
    --page: #0b0f19;
    --surface: #121a29;
    --surface-raised: #182235;
    --line: rgba(255, 255, 255, .09);
    --muted: #aab4c8;
    --green: #36d399;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
    min-height: 100vh;
    margin: 0;
    color: #fff;
    background:
        radial-gradient(ellipse at 80% 0, rgba(243, 198, 35, .11), transparent 34rem),
        linear-gradient(155deg, #0b0f19 15%, #101827 65%, #0b0f19);
    font-family: "Poppins", "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.setup-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 64px; }
.setup-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 38px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; letter-spacing: -.5px; }
.brand img { width: 37px; height: 37px; }
.brand strong { color: var(--gold); }
.back-link { color: #d1d8e5; text-decoration: none; font-size: 13px; font-weight: 600; }
.back-link:hover { color: var(--gold-soft); }
.back-link i { margin-right: 7px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin: 8px 0 30px; }
.eyebrow, .section-heading small, .enrolled-heading small { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.eyebrow i { margin-right: 7px; }
.intro h1 { margin: 12px 0; font-size: clamp(35px, 6vw, 58px); line-height: 1.12; letter-spacing: -2px; }
.intro h1 span { color: var(--gold); }
.intro-copy > p { max-width: 590px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.setup-progress { display: flex; align-items: center; gap: 13px; min-width: 220px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(20, 29, 45, .78); }
.progress-icon, .section-icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--gold); background: rgba(243, 198, 35, .12); }
.setup-progress small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: 1px; }
.setup-progress strong { display: block; font-size: 13px; }
.setup-progress strong span { margin-left: 10px; color: var(--gold); font-size: 10px; }
.page-message { margin: 0 0 18px; padding: 13px 16px; border: 1px solid rgba(239, 68, 68, .35); border-radius: 12px; color: #ffb4b4; background: rgba(127, 29, 29, .19); line-height: 1.6; }
.page-message.success { border-color: rgba(54, 211, 153, .3); color: #a5f3d0; background: rgba(6, 95, 70, .18); }
.loading-panel { display: flex; min-height: 150px; align-items: center; justify-content: center; gap: 14px; color: var(--muted); text-align: center; }
.spinner { width: 22px; height: 22px; border: 2px solid rgba(243, 198, 35, .2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.account-banner, .selection-panel, .enrolled-panel { border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, rgba(24, 34, 53, .96), rgba(15, 23, 37, .96)); box-shadow: 0 20px 60px rgba(0, 0, 0, .18); }
.account-banner { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 20px 24px; }
.account-icon { display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(243, 198, 35, .24); border-radius: 15px; color: var(--gold); background: rgba(243, 198, 35, .1); font-size: 24px; }
.account-copy { min-width: 0; flex: 1; }
.account-copy small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.account-copy h2 { overflow: hidden; margin: 4px 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.account-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.account-copy p strong { color: #fff; }
.connected-pill, .verified-pill, .status-pill { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(54, 211, 153, .23); border-radius: 999px; color: #8be7c2; background: rgba(54, 211, 153, .08); font-size: 10px; font-weight: 700; }
.connected-pill i { margin-right: 5px; }
.selection-panel, .enrolled-panel { padding: clamp(18px, 4vw, 32px); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2, .enrolled-heading h2 { margin: 6px 0 0; font-size: clamp(19px, 3vw, 24px); }
.verified-pill { border-color: rgba(243, 198, 35, .25); color: var(--gold); background: rgba(243, 198, 35, .08); }
.verified-pill i { margin-right: 5px; }
.selection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.selection-grid label { color: #dce2ec; font-size: 12px; font-weight: 600; }
.selection-grid select { display: block; width: 100%; height: 47px; margin-top: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: #fff; background: #101827; }
.selection-grid select:focus, .lot-input input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 198, 35, .1); }
.selection-grid select:disabled { opacity: .48; }
.lot-card { display: flex; align-items: center; gap: 13px; margin-top: 20px; padding: 16px; border: 1px solid rgba(243, 198, 35, .18); border-radius: 13px; background: rgba(243, 198, 35, .045); }
.lot-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--gold); background: rgba(243, 198, 35, .12); }
.lot-copy { flex: 1; }
.lot-copy strong { font-size: 13px; }
.lot-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.lot-input { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.lot-input input { width: 112px; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: #fff; background: #101827; }
.rules-panel { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.rules-heading { margin-bottom: 8px; }
.rules-intro, #enrolledDescription { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.source-link { color: var(--gold); font-size: 11px; text-decoration: none; white-space: nowrap; }
.source-link i { margin-left: 4px; }
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.confirmed-rules { margin-top: 18px; border-top: 1px solid var(--line); }
.confirmed-rules summary { padding: 14px 0; color: #dce2ec; cursor: pointer; font-size: 12px; font-weight: 700; }
.confirmed-rules[open] summary { margin-bottom: 12px; }
.confirmed-rules .rules-grid { padding-bottom: 4px; }
.rule-card { display: flex; min-height: 70px; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .025); }
.rule-mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--gold); background: rgba(243, 198, 35, .1); font-size: 11px; }
.rule-card strong { display: block; margin: 1px 0 4px; font-size: 11px; }
.rule-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.confirm-row { display: flex; align-items: flex-start; gap: 11px; margin: 21px 0 16px; color: #d9dfeb; cursor: pointer; font-size: 12px; line-height: 1.6; }
.confirm-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-check { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; color: #111; font-size: 10px; }
.confirm-row input:checked + .custom-check { border-color: var(--gold); background: var(--gold); }
.confirm-row input:focus-visible + .custom-check { outline: 2px solid #fff; outline-offset: 3px; }
.primary-action { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px; padding: 0 19px; border: 0; border-radius: 10px; color: #15130b; background: linear-gradient(120deg, var(--gold), var(--gold-soft)); font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-action:disabled { opacity: .45; cursor: not-allowed; }
.primary-action:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
.secure-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.secure-note i { margin-right: 5px; color: var(--green); }
.enrolled-heading { display: flex; min-width: 0; align-items: center; gap: 13px; margin-bottom: 15px; }
.enrolled-heading > div { min-width: 0; flex: 1; }
.enrolled-heading h2 { overflow-wrap: anywhere; }
.enrolled-heading small { color: var(--green); }
.enrolled-heading .section-icon { color: var(--green); background: rgba(54, 211, 153, .1); }
.status-pill { max-width: 100%; border-color: var(--line); color: #dce2ec; background: rgba(255,255,255,.05); text-align: center; overflow-wrap: anywhere; }
.return-action { margin-top: 19px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 650px) {
    .setup-shell { width: min(100% - 28px, 540px); padding-top: 16px; }
    .setup-header { padding-bottom: 28px; }
    .intro { display: block; margin-bottom: 22px; }
    .intro h1 { letter-spacing: -1.4px; }
    .setup-progress { margin-top: 19px; }
    .account-banner { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
    .account-icon { width: 44px; height: 44px; }
    .connected-pill { margin-left: 59px; }
    .selection-grid, .rules-grid { grid-template-columns: 1fr; }
    .lot-card { align-items: flex-start; flex-wrap: wrap; }
    .lot-copy { min-width: calc(100% - 60px); }
    .lot-input { width: 100%; margin-left: 53px; }
    .lot-input input { flex: 1; }
    .section-heading { align-items: flex-start; }
    .verified-pill { margin-top: 2px; }
    .enrolled-heading { align-items: flex-start; flex-wrap: wrap; }
    .enrolled-heading .section-icon { width: 38px; height: 38px; }
    .enrolled-heading > div { flex-basis: calc(100% - 108px); }
    .enrolled-heading h2 { font-size: 18px; }
    .enrolled-heading .status-pill { max-width: 100%; margin-left: 51px; }
    .return-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
