:root {
    --reg-ink: #172b3d;
    --reg-navy: #102747;
    --reg-blue: #205a82;
    --reg-orange: #e9812b;
    --reg-muted: #637281;
    --reg-line: #e1e7ea;
    --reg-surface: #f5f7f5;
}

html { min-height: 100%; background: var(--reg-surface); }

body {
    min-height: 100vh;
    min-height: 100svh;
    padding: 82px 24px 44px;
    color: var(--reg-ink);
    background:
        radial-gradient(ellipse at 9% 12%, rgba(233, 129, 43, 0.1), transparent 25rem),
        radial-gradient(ellipse at 92% 88%, rgba(32, 90, 130, 0.1), transparent 28rem),
        var(--reg-surface);
}

body::before { display: none; }

#elidz-loader,
#reg-closed-head {
    background: linear-gradient(145deg, var(--reg-navy), #1b456c 72%, var(--reg-orange));
}

#reg-closed-head { border-bottom: 4px solid var(--reg-orange); }

#reg-closed-body .rcl-btn {
    background: var(--reg-orange);
    border-radius: 999px;
}

.back-link {
    top: 20px;
    left: max(20px, calc((100% - 1140px) / 2));
    padding: 10px 15px;
    color: var(--reg-navy);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(16, 39, 71, 0.1);
    border-radius: 999px;
    box-shadow: 0 5px 16px rgba(16, 39, 71, 0.07);
    backdrop-filter: blur(12px);
}

.back-link:hover {
    color: var(--reg-blue);
    background: #fff;
    border-color: rgba(32, 90, 130, 0.2);
}

.card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    width: 100%;
    max-width: 1100px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(16, 39, 71, 0.08);
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(16, 39, 71, 0.13);
}

.card-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand privacy" "intro intro" "highlights highlights";
    align-content: start;
    align-items: center;
    gap: 0;
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    padding: 28px clamp(28px, 3.5vw, 46px) 20px;
    overflow: hidden;
    color: #fff;
    text-align: left;
    background:
        radial-gradient(circle at 100% 4%, rgba(243, 163, 75, 0.2), transparent 18rem),
        linear-gradient(155deg, #173b60, var(--reg-navy) 72%);
}

.card-header::before {
    inset: auto -110px -150px auto;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.025);
}

.card-header::after {
    position: absolute;
    inset: auto auto 0 0;
    width: 88px;
    height: 4px;
    background: var(--reg-orange);
    content: "";
}

.register-brand,
.register-intro,
.register-highlights,
.register-privacy { position: relative; z-index: 1; }

.register-brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: uppercase;
}

.register-brand img {
    display: block;
    width: 164px;
    height: 42px;
    padding: 4px 8px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.register-brand span {
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.register-intro {
    display: grid;
    grid-area: intro;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    row-gap: 4px;
    margin: 24px 0 20px;
    padding: 0;
}

.card-header-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    grid-row: 1 / span 2;
    margin: 0;
    color: #f3a34b;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    font-size: 1.2rem;
}

.card-header h1 {
    max-width: none;
    margin-bottom: 0;
    font-size: 32px;
    line-height: 1.12;
    letter-spacing: 0;
}

.card-header p { color: rgba(255, 255, 255, 0.72); }
.register-intro > p { grid-column: 2; font-size: 0.94rem; line-height: 1.5; }

.register-highlights {
    grid-area: highlights;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    list-style: none;
}

.register-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
    line-height: 1.45;
}

.register-highlights i {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #f3a34b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
}

.register-privacy {
    grid-area: privacy;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
    max-width: 360px;
    margin: 0 !important;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.56) !important;
    font-size: 0.72rem !important;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.register-privacy i { color: #f3a34b; }

.wizard-progress {
    grid-column: 1;
    grid-row: 2;
    justify-content: space-between;
    gap: 0;
    padding: 22px clamp(24px, 4vw, 48px);
    background: #fff;
    border-bottom: 1px solid var(--reg-line);
}

.step-wrap { gap: 8px; }

.step-circle {
    width: 36px;
    height: 36px;
    color: #8997a2;
    background: #edf1f3;
}

.step-label { color: #83909b; font-size: 0.72rem; }
.step-wrap.active .step-circle {
    color: #fff;
    background: var(--reg-blue);
    box-shadow: 0 0 0 4px rgba(32, 90, 130, 0.12);
}
.step-wrap.active .step-label { color: var(--reg-blue); }
.step-wrap.done .step-circle { background: #43856e; }
.step-wrap.done .step-label { color: #43856e; }
.step-line { background: #e7ecee; }
.step-line.done { background: linear-gradient(90deg, #43856e, var(--reg-blue)); }

.card-body {
    grid-column: 1;
    grid-row: 3;
    min-width: 0;
    padding: 32px clamp(24px, 4vw, 48px) 28px;
}

.step-title {
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 17px;
    color: var(--reg-navy);
    border-bottom-color: #edf0f2;
    font-size: 1.08rem;
}

.step-title i {
    width: 38px;
    height: 38px;
    color: var(--reg-blue);
    background: rgba(32, 90, 130, 0.09);
    border-radius: 12px;
}

.form-row { gap: 16px; }
.form-group label { color: #33475b; font-size: 0.78rem; }

.form-group input,
.form-group select,
.form-group textarea {
    min-height: 46px;
    padding: 11px 13px;
    color: var(--reg-ink);
    border: 1px solid #dce4e8;
    border-radius: 11px;
    background: #fbfcfc;
    font-size: 0.88rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(32, 90, 130, 0.58);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(32, 90, 130, 0.09);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #9aa7b1; }
.pw-toggle:hover { color: var(--reg-blue); }

.location-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-group .location-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 88px;
    margin: 0;
    padding: 15px;
    color: var(--reg-ink);
    border: 1px solid var(--reg-line);
    border-radius: 12px;
    background: #fbfcfc;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.location-choice:hover {
    border-color: var(--reg-orange);
    transform: translateY(-1px);
}

.location-choice:has(input:checked) {
    border-color: var(--reg-orange);
    background: #fff8f1;
    box-shadow: inset 0 0 0 1px var(--reg-orange);
}

.location-choice input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: grid;
    flex: 0 0 20px !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    height: 20px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    border: 1.5px solid #a8b4bc !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: none !important;
    place-items: center;
    cursor: pointer;
}

.location-choice input[type="radio"]:checked {
    border-color: var(--reg-orange) !important;
}

.location-choice input[type="radio"]:checked::after {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--reg-orange);
    content: "";
}

.location-choice input[type="radio"]:focus-visible {
    outline: 3px solid rgba(233, 129, 43, 0.32);
    outline-offset: 2px;
}

.location-choice span { display: block; min-width: 0; }
.location-choice strong { display: block; color: var(--reg-navy); font-size: 0.88rem; line-height: 1.4; }
.location-choice small { display: block; margin-top: 4px; color: var(--reg-muted); font-size: 0.77rem; line-height: 1.45; }

.current-location-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 17px 18px;
    border: 1px solid #d6e5ed;
    border-radius: 14px;
    background: #f2f8fb;
}

.current-location-copy { min-width: 0; }
.current-location-title { margin-bottom: 4px; color: var(--reg-blue); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }
.current-location-text { color: var(--reg-muted); font-size: 0.88rem; line-height: 1.5; }
.location-permission-help {
    margin-top: 9px;
    padding: 9px 11px;
    color: #6f4a16;
    border-left: 3px solid var(--reg-orange);
    border-radius: 0 8px 8px 0;
    background: #fff8f1;
    font-size: 0.78rem;
    line-height: 1.5;
}
.location-permission-help[hidden] { display: none; }

#useCurrentLocationBtn.location-detect-btn {
    flex: 0 0 auto;
    min-height: 44px;
    max-width: 240px;
    padding: 10px 17px;
    border-radius: 10px;
    white-space: nowrap;
}
.checkbox-group label { color: #586979; }
.checkbox-group label a,
.login-link a { color: var(--reg-blue); }
.checkbox-group input[type="checkbox"] { accent-color: var(--reg-blue); }

.step-nav {
    margin-top: 24px;
    padding-top: 20px;
    border-top-color: #edf0f2;
}

.btn-prev {
    color: #526576;
    border-color: #dce4e8;
    border-radius: 999px;
    background: #fff;
}

.btn-prev:hover { color: var(--reg-navy); background: #f5f8f8; }

.btn-next,
.btn-submit {
    min-height: 46px;
    color: #fff;
    border-radius: 999px;
    background: var(--reg-orange);
    box-shadow: 0 7px 17px rgba(233, 129, 43, 0.2);
}

.btn-next:hover,
.btn-submit:hover {
    background: #d9711e;
    box-shadow: 0 10px 22px rgba(233, 129, 43, 0.26);
}

.alert-error { color: #a93636; border-color: #f1c7c3; background: #fff4f2; }
.alert-success { color: #256547; border-color: #c4e3d1; background: #f0faf4; }
.login-link { color: var(--reg-muted); }

.success-screen {
    grid-column: 1;
    grid-row: 2 / span 2; /* below the header, in place of progress + form */
    align-self: center;
    padding: 72px 28px;
}

.success-screen .icon { background: linear-gradient(145deg, var(--reg-blue), #43856e); }
.success-screen h2 { color: var(--reg-navy); }
.success-screen p { color: var(--reg-muted); }

.btn-login {
    border-radius: 999px;
    background: var(--reg-orange);
    box-shadow: 0 7px 17px rgba(233, 129, 43, 0.2);
}

.footer-credit {
    margin-top: 18px;
    color: #7d8b96;
}
.footer-credit a { color: var(--reg-blue); }

.back-link:focus-visible,
.register-brand:focus-visible,
.step-nav button:focus-visible,
.checkbox-group a:focus-visible {
    outline: 3px solid rgba(233, 129, 43, 0.55);
    outline-offset: 3px;
}

@media (max-width: 820px) {
    body { padding: 78px 18px 36px; }

    .card {
        max-width: 680px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto 1fr;
    }

    .card-header {
        grid-column: 1;
        grid-row: 1;
        justify-content: flex-start;
        min-height: 0;
        padding: 28px clamp(22px, 6vw, 42px);
    }

    .register-intro { margin: 24px 0 20px; padding: 0; }
    .card-header-icon { margin: 0; }
    .card-header h1 { max-width: none; font-size: 30px; }

    .register-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }

    .register-privacy { justify-self: start; margin: 0 0 16px !important; border-radius: 12px; }

    .register-highlights li {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        font-size: 0.72rem;
    }

    .wizard-progress {
        grid-column: 1;
        grid-row: 2;
        padding: 18px clamp(20px, 5vw, 34px);
    }

    .card-body {
        grid-column: 1;
        grid-row: 3;
        padding: 28px clamp(22px, 6vw, 42px);
    }

    .success-screen { grid-column: 1; grid-row: 2 / span 2; }
    .footer-credit { padding-inline: 1rem; text-align: center; }
}

@media (max-width: 560px) {
    body { padding: 70px 12px 28px; }
    .back-link { top: 14px; left: 12px; padding: 8px 12px; }
    .card { border-radius: 20px; }
    .card-header {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "brand" "intro" "highlights" "privacy";
        row-gap: 0;
        padding: 23px 20px;
    }
    .register-brand img { width: 142px; height: 37px; }
    .register-brand { gap: 9px; font-size: 0.62rem; }
    .register-brand span { padding-left: 9px; }
    .register-intro { grid-template-columns: 42px minmax(0, 1fr); margin: 22px 0 16px; }
    .card-header-icon { width: 42px; height: 42px; flex-basis: 42px; margin: 0; font-size: 1.05rem; }
    .card-header h1 { margin-bottom: 0; font-size: 26px; }
    .register-intro > p { font-size: 0.84rem; }
    .register-highlights { grid-template-columns: 1fr; gap: 10px; }
    .register-highlights li { align-items: center; flex-direction: row; font-size: 0.78rem; }
    .register-highlights i { flex-basis: 30px; width: 30px; height: 30px; }
    .register-privacy { max-width: none; justify-self: stretch; margin: 0 !important; font-size: 0.68rem !important; }
    .wizard-progress { padding: 16px 18px; }
    .step-wrap { gap: 0; }
    .step-line { min-width: 14px; max-width: 42px; margin: 0 5px; }
    .step-label { display: none; }
    .card-body { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .step-title { margin-bottom: 19px; }
    .location-options { grid-template-columns: 1fr; gap: 9px; }
    .form-group .location-choice { min-height: 0; padding: 13px; }
    .current-location-box { align-items: stretch; flex-direction: column; padding: 15px; }
    #useCurrentLocationBtn.location-detect-btn { width: 100%; max-width: none; }
    .step-nav { gap: 9px; }
    .btn-prev { padding: 10px 16px; }
    .btn-next,
    .btn-submit { padding: 11px 16px; }
    .success-screen { padding: 48px 20px; }
}

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

/* "My town isn't listed" — typed city / municipality */
.form-group .other-location-input { margin-top: 10px; }
.form-group .other-location-input[hidden] { display: none !important; }
