* {
    box-sizing: border-box;
}

body.signup-page {
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--brand-blue), #155e75);
}

.signup-container {
    width: 100%;
    max-width: 960px;
}

.signup-header {
    margin-bottom: 2rem;
    color: #fff;
    text-align: center;
}

.signup-logo {
    width: 76px;
    height: 76px;
    margin-bottom: 0.5rem;
    border-radius: 18px;
    object-fit: contain;
}

.signup-header h1 {
    margin: 0;
    font-size: 2.2rem;
}

.signup-header p {
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
    opacity: 0.92;
}

.signup-card {
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--bg-secondary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.signup-body {
    display: flex;
    min-height: 500px;
}

.plan-column,
.form-column {
    padding: 2.5rem;
}

.plan-column {
    flex: 1;
    border-right: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.form-column {
    flex: 1.2;
}

.section-title {
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.billing-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: var(--border-medium);
    cursor: pointer;
}

.toggle-switch.active {
    background: var(--brand-blue);
}

.toggle-switch:focus-visible,
.plan-option:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-blue) 35%, transparent);
    outline-offset: 2px;
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(22px);
}

.savings-badge {
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--status-complete-bg);
    color: var(--status-complete-text);
    font-size: 0.78rem;
    font-weight: 600;
}

.plan-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-option {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.plan-option:hover {
    border-color: var(--brand-blue);
}

.plan-option.selected {
    border-color: var(--brand-blue);
    background: color-mix(in srgb, var(--brand-blue) 10%, var(--bg-secondary));
}

.plan-option-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 700;
}

.plan-price {
    color: var(--brand-blue);
    white-space: nowrap;
}

.plan-description {
    margin-top: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.skeleton-loading {
    min-height: 76px;
    cursor: default;
    animation: pulse 1.4s ease-in-out infinite;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.72rem 0.9rem;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 18%, transparent);
}

.name-row {
    display: flex;
    gap: 1rem;
}

.name-row .form-group {
    flex: 1;
    min-width: 0;
}

.terms-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.terms-check-row input {
    margin-top: 0.2rem;
    accent-color: var(--brand-blue);
}

/* Plain links only. Without the :not(), this rule — specificity (0,1,1) — outranks
   .cta-btn (0,1,0) and repaints the button's label in --brand-blue, which is also the
   button's own background: invisible text in both themes. */
.signup-page a:not(.cta-btn) {
    color: var(--brand-blue);
}

.signup-btn,
.cta-btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.signup-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem;
    font-size: 1.05rem;
}

.signup-btn:hover,
.cta-btn:hover {
    background: var(--brand-blue-hover);
}

.signup-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.login-link {
    margin: 1rem 0 0;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
}

.alert-error,
.alert-info {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-error {
    border: 1px solid var(--util-high-text);
    background: var(--util-high-bg);
    color: var(--util-high-text);
}

.alert-info {
    border: 1px solid var(--status-awarded-text);
    background: var(--status-awarded-bg);
    color: var(--status-awarded-text);
}

.initially-hidden {
    display: none;
}

/* Honeypot field — issue #193 layer 3. Deliberately NOT display:none/visibility:hidden.
   UNVERIFIED: the claim that a form-filling engine or crawler can detect those computed
   styles and skip the field outright — which would turn a legitimately-skipped honeypot into
   a false "the caller never rendered the page" signal instead of a true "a human correctly
   ignored it" one — is the stated design rationale, not a claim cited against a vendor
   source. Pushed off-screen instead, so its layout box exists and its computed style reads as
   an ordinary (if oddly positioned) visible element, while a sighted user never sees it —
   see wwwroot/signup.html for the aria-hidden/tabindex/autocomplete layers that keep it out
   of a screen reader and the Tab order too. */
.signup-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.success-card {
    padding: 3rem;
    color: var(--text-primary);
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--status-complete-bg);
    color: var(--status-complete-text);
    font-size: 2.6rem;
    line-height: 64px;
}

/* The .success-details definition list (organization / plan / trial end) was removed with the
   markup: the confirmation card is now identical for a new signup and for one on an address
   that already has an account, and a tenant has nothing to say on the second branch.
   See Docs/IDENTITY_AND_TENANCY.md. */

.cta-btn {
    padding: 0.8rem 2rem;
}

/* The sentence above the CTA carries the whole point of the card: the account is not
   usable until they finish the passcode sign-up. It has to read as instruction, not as
   the small print underneath it. */
.success-next {
    max-width: 430px;
    margin: 0 auto 1.25rem;
    color: var(--text-primary);
}

.success-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes pulse {
    50% {
        opacity: 0.55;
    }
}

@media (max-width: 768px) {
    body.signup-page {
        align-items: flex-start;
        padding: 1rem;
    }

    .signup-header {
        margin: 1rem 0;
    }

    .signup-body {
        flex-direction: column;
    }

    .plan-column {
        border-right: 0;
        border-bottom: 1px solid var(--border-light);
    }

    .plan-column,
    .form-column {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .name-row {
        display: block;
    }

    .billing-toggle {
        flex-wrap: wrap;
    }
}
