.portal {
    padding: 180px max(40px, calc((100% - 1320px) / 2)) 90px;
    background: #1d1b29;
}

.portal-intro {
    max-width: 1100px;
    margin: 0 auto 50px;
    text-align: center;
}

.portal-intro .affiliate-eyebrow {
    justify-content: center;
}

.portal-intro h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -.05em;
    line-height: 1.15;
}

@media (min-width: 901px) {
    .portal-intro h1 {
        white-space: nowrap;
    }
}

.portal-intro h1 em {
    color: #ffc107;
    font-style: normal;
}

.portal-intro > p:last-child {
    max-width: 760px;
    margin: 16px auto 0;
    color: rgba(255,255,255,.65);
    font-size: 16px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    max-width: 960px;
    margin: 0 auto;
    align-items: start;
}

.portal-grid-wide {
    max-width: none;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr);
}

.portal-card {
    padding: 32px;
    border: 1px solid #353535;
    border-radius: 8px;
    background: #111019;
}

.portal-card h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
}

.portal-help {
    margin: 0 0 20px;
    color: rgba(255,255,255,.6);
    font-size: 14px;
}

.portal-card label:not(.portal-check) {
    display: block;
    margin: 16px 0 6px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
    font-weight: 600;
}

.portal-card input[type="text"],
.portal-card input[type="email"],
.portal-card input[type="tel"] {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #353535;
    border-radius: 4px;
    background: #1a1825;
    color: #fff;
    font: inherit;
    font-size: 15px;
}

.portal-card input:focus-visible {
    border-color: #ffc107;
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}

.portal-trap {
    position: absolute !important;
    left: -9999px !important;
}

.portal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 0;
    color: rgba(255,255,255,.7);
    font-size: 13px;
    line-height: 1.55;
}

.portal-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #ffc107;
}

.portal-check a,
.portal-footnote a {
    color: #ffc107;
}

.portal-card .affiliate-button {
    width: 100%;
    margin-top: 22px;
    border: 1px solid #ffc107;
    cursor: pointer;
    font-family: inherit;
}

.portal-card .affiliate-button:disabled {
    cursor: wait;
    opacity: .6;
}

.portal-message {
    min-height: 20px;
    margin: 14px 0 0;
    font-size: 13px;
}

.portal-message[data-type="error"] { color: #ff8a80; }
.portal-message[data-type="success"] { color: #7ee2a8; }
.portal-message[data-type="info"] { color: rgba(255,255,255,.75); }

.portal-link {
    display: block;
    margin: 16px auto 0;
    border: 0;
    background: none;
    color: #ffc107;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
}

.portal-welcome {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin: 0;
    text-align: center;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .75);
}

.portal-welcome[hidden] {
    display: none;
}

.portal-welcome .affiliate-eyebrow {
    justify-content: center;
}

.portal-code {
    display: inline-block;
    margin: 18px 0 8px;
    padding: 14px 24px;
    border: 1px dashed #ffc107;
    border-radius: 6px;
    color: #ffc107;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: .08em;
    user-select: all;
}

.portal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    color: rgba(255,255,255,.75);
    font-size: 14px;
}

.portal-bar p { margin: 0; }
.portal-bar .portal-link { margin: 0; }

.portal-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.portal-stats div {
    padding: 22px;
    border: 1px solid #353535;
    border-radius: 8px;
    background: #111019;
}

.portal-stats span {
    display: block;
    color: rgba(255,255,255,.6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.portal-stats strong {
    display: block;
    margin-top: 6px;
    color: #ffc107;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.03em;
}

.portal-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-item {
    padding: 20px 0;
    border-top: 1px solid #353535;
}

.portal-item:first-child { border-top: 0; padding-top: 4px; }

.portal-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
}

.portal-item-head span {
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

.portal-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.portal-steps li {
    padding-top: 10px;
    border-top: 3px solid #353535;
    color: rgba(255,255,255,.45);
    font-size: 11px;
    line-height: 1.35;
}

.portal-steps li.done { border-color: rgba(255,193,7,.55); color: rgba(255,255,255,.7); }
.portal-steps li.current { border-color: #ffc107; color: #ffc107; font-weight: 700; }

.portal-badge-stop {
    display: inline-block;
    margin: 12px 0 0;
    padding: 4px 12px;
    border: 1px solid #ff8a80;
    border-radius: 99px;
    color: #ff8a80;
    font-size: 12px;
}

.portal-meta {
    margin: 12px 0 0;
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

.portal-note {
    margin: 8px 0 0;
    color: rgba(255,255,255,.75);
    font-size: 13px;
    font-style: italic;
}

.portal-footnote {
    margin: 24px 0 0;
    color: rgba(255,255,255,.5);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .portal-grid,
    .portal-grid-wide {
        grid-template-columns: 1fr;
    }

    .portal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .portal {
        padding: 150px 20px 70px;
    }

    .portal-card {
        padding: 24px 20px;
    }

    .portal-steps {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .portal-steps li {
        padding: 4px 0 4px 10px;
        border-top: 0;
        border-left: 3px solid #353535;
    }

    .portal-steps li.done { border-left-color: rgba(255,193,7,.55); }
    .portal-steps li.current { border-left-color: #ffc107; }
}
