:root {
    --registration-green: #009b5a;
    --registration-green-dark: #007c48;
    --registration-text: #333333;
    --registration-muted: #777777;
    --registration-border: #dedede;
    --registration-surface: #ffffff;
    --registration-background: #eeeeee;
    --registration-error: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body.registration-gate-page {
    min-height: 100%;
    margin: 0;
}

body.registration-gate-page {
    min-height: 100vh;
    background: var(--registration-background);
    color: var(--registration-text);
    font-family: Arial, Helvetica, sans-serif;
}

.registration-brand {
    position: fixed;
    top: 16px;
    left: 18px;
    z-index: 2;
}

.registration-brand img {
    display: block;
    width: clamp(86px, 8.5vw, 124px);
    height: auto;
}

.registration-gate-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(72px, 8vh, 104px) clamp(20px, 3vw, 64px);
}

.registration-gate-card {
    width: clamp(40rem, 62.5vw, 90rem);
    max-width: calc(100vw - clamp(40px, 6vw, 128px));
    min-width: 0;
    min-height: clamp(40rem, 90vh, 72rem);
    padding: clamp(28px, 3vw, 52px) clamp(28px, 4vw, 72px) clamp(24px, 2.5vw, 42px);
    background: var(--registration-surface);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    animation: registration-card-in 200ms ease-out both;
}

.registration-gate-card h1 {
    margin: 0 0 clamp(16px, 1.8vh, 22px);
    font-size: clamp(22px, 1.8vw, 28px);
    line-height: 1.25;
    text-align: center;
}

.registration-section-title {
    margin: 0 0 clamp(18px, 2.2vh, 26px);
    font-size: clamp(16px, 1.3vw, 20px);
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

.registration-intro,
.registration-choice-group,
.registration-consent,
.registration-legal-copy {
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.5;
}

.registration-intro {
    margin: 0 0 clamp(18px, 2.2vh, 24px);
}

.registration-intro a {
    color: var(--registration-green);
    font-weight: 600;
}

.registration-choice-group {
    display: grid;
    gap: clamp(10px, 1.4vh, 14px);
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.registration-choice-group legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.registration-choice-group label,
.registration-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.registration-choice-group input,
.registration-consent input {
    flex: 0 0 auto;
    width: clamp(18px, 1.4vw, 21px);
    height: clamp(18px, 1.4vw, 21px);
    margin: 1px 0 0;
    accent-color: var(--registration-green);
}

.registration-consent {
    margin: clamp(64px, 15vh, 136px) 0 clamp(20px, 2.5vh, 28px);
}

.registration-gate-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 1.2vw, 18px);
}

.registration-button {
    min-height: clamp(40px, 4.8vh, 48px);
    border-radius: 5px;
    font: inherit;
    font-size: clamp(14px, 1vw, 16px);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.registration-button:not(:disabled):active {
    transform: translateY(1px);
}

.registration-button-primary {
    border: 1px solid var(--registration-green);
    background: var(--registration-green);
    color: #ffffff;
}

.registration-button-primary:hover:not(:disabled) {
    background: var(--registration-green-dark);
    border-color: var(--registration-green-dark);
}

.registration-button-primary:disabled {
    border-color: #dddddd;
    background: #e5e5e5;
    color: #aaaaaa;
    cursor: not-allowed;
}

.registration-button-secondary {
    border: 1px solid var(--registration-green);
    background: #ffffff;
    color: var(--registration-green);
}

.registration-legal-copy {
    margin: clamp(14px, 1.8vh, 20px) 0 0;
    color: #999999;
    font-size: clamp(12px, 0.85vw, 14px);
}

.registration-alert {
    margin: -12px 0 16px;
    padding: 10px 12px;
    border: 1px solid #f1b5b0;
    border-radius: 4px;
    background: #fff4f2;
    color: var(--registration-error);
    font-size: 12px;
}

@keyframes registration-card-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .registration-gate-card {
        width: calc(100vw - 32px);
        max-width: 48rem;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .registration-brand {
        position: absolute;
        top: 14px;
        left: 16px;
    }

    .registration-brand img {
        width: 86px;
    }

    .registration-gate-main {
        align-items: flex-start;
        padding: 68px 10px 18px;
    }

    .registration-gate-card {
        width: 100%;
        max-width: none;
        min-height: 0;
        padding: 24px 20px 18px;
    }

    .registration-consent {
        margin-top: 40px;
    }

    .registration-gate-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registration-gate-card {
        animation: none;
    }

    .registration-button {
        transition: none;
    }
}
