/* ==========================================================
   PUBLIC / SIGNUP LANDING PAGES
   ----------------------------------------------------------
   Owns the public landing/login page and the register/* signup
   step pages (entry-card panels, the interest/topic pill picker,
   and the usage-intent choice cards). Do not duplicate the
   entry-card/form-stack/field-* primitives here — those live in
   the shared admin-and-public CSS files; this file only owns
   layout/composition specific to these pages.
========================================================== */

.st-page-landing {
    background: var(--st-bg);
}

.landing-entry {
    display: grid;
    width: min(100% - 40px, var(--st-max-page));
    min-height: calc(100vh - 72px);
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
    align-items: center;
    gap: clamp(36px, 7vw, 92px);
    margin: 0 auto;
    padding: 56px 0 64px;
}

.landing-brand {
    display: grid;
}

.landing-brand__message {
    display: grid;
    max-width: 620px;
    gap: 18px;
}

.landing-brand h1 {
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    line-height: .98;
    font-weight: 720;
}

.landing-copy {
    max-width: 520px;
    color: var(--st-muted);
    font-size: 1.05rem;
}

.landing-panel {
    width: 100%;
}

.register-consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.register-consent__checkbox {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--st-primary);
}

.register-consent__copy {
    color: var(--st-muted);
    font-size: .84rem;
    line-height: 1.55;
}

.register-consent__link {
    border: 0;
    background: transparent;
    color: var(--st-primary);
    padding: 0;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.register-consent__link:focus-visible {
    border-radius: 2px;
    outline: 3px solid rgba(37, 99, 235, .2);
    outline-offset: 2px;
}

.register-consent__link:disabled {
    color: var(--st-muted);
    cursor: not-allowed;
}

.field-help,
.username-preview {
    color: var(--st-muted);
    font-size: .8rem;
    line-height: 1.5;
}

.username-preview {
    font-weight: 700;
}

.customize-topics {
    display: grid;
    gap: 10px;
    min-width: 0;
    border: 0;
    padding: 0;
}

.interest-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-pill {
    position: relative;
}

.interest-pill input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.interest-pill span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    border: 1px solid var(--st-border);
    border-radius: 999px;
    background: var(--st-surface);
    color: var(--st-text);
    padding: 7px 12px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.interest-pill input:checked + span {
    border-color: var(--st-primary);
    background: var(--st-primary-soft);
    color: var(--st-primary);
}

.interest-pill input:focus-visible + span {
    outline: 3px solid rgba(37, 99, 235, .2);
    outline-offset: 2px;
}

.usage-choices {
    display: grid;
    gap: 12px;
}

.usage-choice {
    position: relative;

    display: block;

    padding: 16px;

    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-md);
    background: var(--st-surface);

    cursor: pointer;
}

.usage-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.usage-choice__title {
    display: block;

    margin-bottom: 4px;

    color: var(--st-text);
    font-size: .96rem;
    font-weight: 800;
}

.usage-choice__desc {
    display: block;

    color: var(--st-muted);
    font-size: .82rem;
}

.usage-choice input:checked ~ .usage-choice__title {
    color: var(--st-primary);
}

.usage-choice:has(input:checked) {
    border-color: var(--st-primary);
    background: var(--st-primary-soft);
}

.usage-choice input:focus-visible ~ .usage-choice__title {
    outline: 3px solid rgba(37, 99, 235, .2);
    outline-offset: 2px;
}

.register-legal-dialog {
    width: min(calc(100% - 32px), 680px);
    max-height: min(82vh, 720px);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-md);
    background: var(--st-surface);
    color: var(--st-text);
    padding: 0;
    box-shadow: var(--st-shadow);
}

.register-legal-dialog::backdrop {
    background: rgba(15, 23, 42, .58);
}

.register-legal-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--st-border);
    padding: 18px 20px;
}

.register-legal-dialog__header h2 {
    font-size: 1.1rem;
}

.register-legal-dialog__header p {
    margin-top: 3px;
    color: var(--st-muted);
    font-size: .78rem;
}

.register-legal-dialog__content {
    max-height: min(64vh, 560px);
    overflow-y: auto;
    padding: 20px;
    color: var(--st-text);
    font-size: .88rem;
    line-height: 1.7;
}

@media (max-width: 860px) {
    .landing-entry {
        width: min(100% - 36px, 620px);
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0 52px;
    }

    .landing-brand h1 {
        font-size: 3.2rem;
    }

}

@media (max-width: 680px) {
    .landing-entry {
        width: min(100% - 28px, 480px);
        padding: 22px 0 36px;
    }

    .landing-brand {
        display: none;
    }

    .entry-card__header {
        padding: 20px 18px 0;
    }

    .entry-card .alert {
        margin: 14px 18px 0;
    }

    .entry-card .form-stack,
    .entry-card .entry-actions {
        padding: 20px 18px;
    }

    .entry-card__header h2 {
        font-size: 1.2rem;
    }
}
