/* ==========================================================================
   SIGNUP PAGES -- one card and stepper system for the six signup templates:
   signup_email, signup_details, the promo email, code and details pages, and
   the set-password page. Every class is su- prefixed so nothing here can
   collide with style.css, which other pages still use.

   Palette is STYLE_GUIDE.md: navy #1e3a5f, one action colour #e69500 (navy
   text on it), neutral grays. Status colours are for form feedback only.
   ========================================================================== */

.su-page {
    background: #f8fafc;
    color: #374151;
    min-height: 60vh;
    padding: 32px 16px 64px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.su-page *,
.su-page *::before,
.su-page *::after { box-sizing: border-box; }

.su-wrap { max-width: 960px; margin: 0 auto; }

/* --- stepper ------------------------------------------------------------ */
.su-steps {
    display: flex;
    list-style: none;
    counter-reset: su-step;
    margin: 0 auto 24px;
    padding: 0;
    max-width: 560px;
}

.su-step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    counter-increment: su-step;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.su-step::before {
    content: counter(su-step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

/* the line that joins one step to the next */
.su-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 13px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    height: 2px;
    background: #e5e7eb;
}

.su-step.is-done { color: #1e3a5f; }
.su-step.is-done::before {
    content: "\2713";
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}
.su-step.is-done:not(:last-child)::after { background: #1e3a5f; }

.su-step.is-current { color: #1e3a5f; }
.su-step.is-current::before {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}

/* --- layout ------------------------------------------------------------- */
.su-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.su-layout--single { max-width: 480px; margin: 0 auto; }

@media (min-width: 901px) {
    .su-layout--split {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        align-items: start;
    }
}

.su-card,
.su-plan {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.06);
    padding: 28px 30px 30px;
}

.su-card h1 {
    margin: 0 0 18px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
}

.su-sub {
    margin: 0 0 20px;
    font-size: 0.94rem;
    color: #6b7280;
}

/* --- plan summary ------------------------------------------------------- */
.su-plan h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e3a5f;
}

.su-plan-sub {
    margin: 0 0 12px;
    font-size: 0.94rem;
    color: #6b7280;
}

.su-pill {
    display: inline-block;
    margin: 0 0 14px;
    padding: 3px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e3a5f;
}

.su-pill::before { content: "\2713\00a0"; }

.su-price {
    display: flex;
    align-items: flex-start;
    margin: 0;
    color: #1e3a5f;
    font-weight: 800;
    line-height: 1;
}

.su-price-cur { font-size: 1.3rem; margin-top: 6px; }
.su-price-amt { font-size: 3rem; }
.su-price-dec { font-size: 1.3rem; margin-top: 6px; }

.su-plan-doc {
    margin: 6px 0 16px;
    font-size: 0.9rem;
    color: #6b7280;
}

.su-features {
    list-style: none;
    margin: 0;
    padding: 16px 0 0;
    border-top: 1px solid #e5e7eb;
}

.su-features li {
    position: relative;
    margin: 0 0 10px;
    padding-left: 22px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.su-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
    color: #1e3a5f;
}

/* --- fields ------------------------------------------------------------- */
.su-field { margin: 0 0 18px; }

.su-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #111827;
}

.su-optional { font-weight: 500; color: #6b7280; }

.su-field input[type="text"],
.su-field input[type="email"],
.su-field input[type="tel"],
.su-field input[type="password"] {
    display: block;
    width: 100%;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 1rem;
    color: #111827;
    background: #ffffff;
    border: 1px solid #9ca3af;
    border-radius: 8px;
}

.su-field input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.18);
}

.su-field input[readonly] {
    background: #f8fafc;
    color: #6b7280;
    overflow-wrap: anywhere;
}

.su-code input {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-align: center;
}

/* the show/hide control sits inside the password field */
.su-pw { position: relative; }
.su-pw input { padding-right: 64px; }

.su-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    padding: 6px 8px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e3a5f;
    text-decoration: underline;
    cursor: pointer;
}

.su-help {
    margin: 16px 0 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #6b7280;
}

.su-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 20px;
}

.su-check input { flex: 0 0 auto; margin-top: 5px; }

.su-check label {
    font-size: 0.86rem;
    line-height: 1.5;
    color: #374151;
}

.su-agree {
    margin: 4px 0 14px;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #6b7280;
}

.su-agree a,
.su-terms a,
.su-help a { color: #1e3a5f; text-decoration: underline; }

/* Turnstile: reserve the widget's height so the card does not jump */
.su-turnstile { min-height: 65px; margin: 0 0 16px; }

/* --- the one action button ---------------------------------------------- */
.su-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1e3a5f;
    background: #e69500;
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.su-btn:hover { background: #f2a71b; }
.su-btn:focus-visible { outline: 3px solid #1e3a5f; outline-offset: 2px; }

/* a quiet navy link-button, e.g. "Login to your account" inside a notice */
.su-btn-quiet {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    background: #1e3a5f;
    border-radius: 8px;
    text-decoration: none;
}

.su-btn-quiet:hover { background: #152a45; }

/* --- footnote ----------------------------------------------------------- */
.su-terms {
    margin: 24px 0 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #6b7280;
}

/* --- flash messages (status colours: feedback only) --------------------- */
.su-flashes { margin: 0 0 18px; padding: 0; list-style: none; }

.su-flash {
    margin: 0 0 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
}

.su-flash-danger  { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.su-flash-success { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.su-flash-info,
.su-flash-warning { color: #854d0e; background: #fefce8; border: 1px solid #fde68a; }

/* --- small screens ------------------------------------------------------ */
@media (max-width: 560px) {
    .su-page { padding: 20px 12px 48px; }
    .su-card,
    .su-plan { padding: 22px 18px 24px; border-radius: 10px; }
    .su-card h1 { font-size: 1.3rem; }
    .su-price-amt { font-size: 2.6rem; }
    .su-step { font-size: 0.68rem; letter-spacing: 0; }
    .su-field input,
    .su-btn { font-size: 16px; }       /* 16px stops iOS zooming into a field */
}

@media (max-width: 400px) {
    .su-card,
    .su-plan { padding-left: 16px; padding-right: 16px; }   /* a 300px Turnstile fits at 360 */
}
