:root {
    --registration-navy: #062b60;
    --registration-navy-hover: #0a376f;
    --registration-gold: #c7942d;
    --registration-ink: #17243a;
    --registration-muted: #667085;
    --registration-line: #d9dee7;
    --registration-line-strong: #b9c2d0;
    --registration-soft: #f7f8fa;
    --registration-error: #a62b2b;
    --registration-success: #2d6a4f;
}

.registration-flow-header {
    position: relative;
    z-index: 10;
    min-height: 72px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    background: var(--registration-navy);
}

.registration-flow-header-inner {
    display: flex;
    width: min(1120px, calc(100% - 32px));
    min-height: 72px;
    align-items: center;
    gap: 20px;
    margin: 0 auto;
}

.registration-flow-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: var(--heading-font);
    font-size: 1rem;
    font-weight: 700;
}

.registration-flow-brand:hover {
    color: #fff;
}

.registration-flow-brand img {
    width: 34px;
    height: 40px;
    object-fit: contain;
}

.registration-flow-exit {
    margin-left: auto;
    border-bottom: 1px solid rgba(255, 255, 255, .55);
    color: rgba(255, 255, 255, .88);
    font-size: .79rem;
    font-weight: 650;
}

.registration-flow-exit:hover {
    border-color: #fff;
    color: #fff;
}

/* Shared spacing for the focused registration and application flows. */
.registration-page {
    padding: 56px 0 76px;
    background: #fff;
}

.registration-shell {
    width: min(860px, calc(100% - 32px));
    margin: 0 auto;
}

.registration-intro {
    margin-bottom: 30px;
}

.registration-kicker {
    margin: 0 0 7px;
    color: var(--registration-gold);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.registration-intro h1,
.registration-stage-title,
.registration-complete h1 {
    color: var(--registration-navy);
    font-family: var(--heading-font);
}

.registration-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.08;
}

.registration-intro p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--registration-muted);
    font-size: .98rem;
    line-height: 1.65;
}

.registration-progress {
    display: flex;
    max-width: 440px;
    align-items: center;
    margin: 0 auto 30px;
}

.registration-progress-item {
    position: relative;
    display: block;
    width: 12px;
    flex: 0 0 12px;
}

.registration-progress-marker {
    display: block;
    width: 12px;
    height: 12px;
    border: 1px solid var(--registration-line-strong);
    border-radius: 50%;
    background: #fff;
    transition: border-color .22s ease, background .22s ease, color .22s ease, transform .22s ease;
}

.registration-progress-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.registration-progress-line {
    height: 2px;
    margin: 0 8px;
    flex: 1 1 auto;
    background: var(--registration-line);
    transition: background .25s ease;
}

.registration-progress-item.is-active .registration-progress-marker {
    border-color: var(--registration-navy);
    background: var(--registration-navy);
    box-shadow: 0 0 0 4px rgba(6, 43, 96, .1);
    transform: scale(1.18);
}

.registration-progress-item.is-complete .registration-progress-marker {
    border-color: var(--registration-success);
    background: var(--registration-success);
}

.registration-progress-line.is-complete {
    background: var(--registration-success);
}

.registration-surface {
    border: 1px solid var(--registration-line);
    border-radius: 10px;
    background: #fff;
}

.registration-form-body {
    padding: 30px;
}

.registration-stage {
    display: none;
    overflow: visible;
    padding: 0;
}

.registration-stage.is-active {
    display: block;
}

.registration-stage.slide-forward {
    animation: registration-forward .24s cubic-bezier(.4, 0, .2, 1) both;
}

.registration-stage.slide-back {
    animation: registration-back .24s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes registration-forward {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes registration-back {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}

.registration-stage-header {
    margin-bottom: 25px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--registration-line);
}

.registration-stage-title {
    margin: 0;
    font-size: 1.55rem;
}

.registration-stage-copy {
    margin: 7px 0 0;
    color: var(--registration-muted);
    font-size: .91rem;
    line-height: 1.55;
}

.registration-section + .registration-section {
    margin-top: 28px;
    padding-top: 27px;
    border-top: 1px solid var(--registration-line);
}

.registration-section-title {
    margin: 0 0 17px;
    color: var(--registration-navy);
    font-family: var(--heading-font);
    font-size: 1.08rem;
}

.registration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.registration-field {
    min-width: 0;
}

.registration-field.is-wide {
    grid-column: 1 / -1;
}

.registration-label {
    display: block;
    margin-bottom: 6px;
    color: var(--registration-ink);
    font-size: .79rem;
    font-weight: 700;
}

.registration-required {
    color: var(--registration-error);
}

.registration-surface .form-control,
.registration-surface .form-select {
    min-height: 44px;
    border-color: var(--registration-line-strong);
    border-radius: 6px;
    color: var(--registration-ink);
    font-size: .91rem;
    box-shadow: none;
}

.registration-surface .form-control:focus,
.registration-surface .form-select:focus {
    border-color: var(--registration-navy);
    box-shadow: 0 0 0 3px rgba(6, 43, 96, .08);
}

.registration-surface .form-control[aria-invalid="true"],
.registration-surface .form-select[aria-invalid="true"] {
    border-color: var(--registration-error);
}

.registration-help {
    margin-top: 6px;
    color: var(--registration-muted);
    font-size: .75rem;
    line-height: 1.45;
}

.registration-field-error {
    margin-top: 6px;
    color: var(--registration-error);
    font-size: .76rem;
    font-weight: 600;
}

.registration-context {
    margin: 0 0 22px;
    padding-left: 13px;
    border-left: 3px solid var(--registration-gold);
    color: var(--registration-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.registration-server-error {
    margin: 0 0 22px;
    padding: 11px 13px;
    border-left: 3px solid var(--registration-error);
    background: #fff9f9;
    color: var(--registration-error);
    font-size: .84rem;
    font-weight: 650;
}

.registration-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--registration-ink);
    font-size: .87rem;
    line-height: 1.45;
}

.registration-choice input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--registration-navy);
}

/* Questions sharing one position (or team) stack in a single section under
   that one heading, so they need the gap a `.registration-grid` would give. */
[data-question-group] .registration-field + .registration-field {
    margin-top: 20px;
}

.registration-position-choice {
    align-items: center;
}

.registration-position-choice label {
    flex: 1;
    cursor: pointer;
}

.registration-position-choice select {
    width: 145px;
}

/* Past the overall or a team's limit, the remaining boxes are disabled
   rather than removed, so it stays clear what was on offer. */
.registration-position-choice:has(input:disabled) {
    opacity: .45;
}

.registration-student-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.registration-student-row .registration-choice {
    padding-top: 27px;
}

.registration-secondary {
    margin-top: 20px;
    padding: 20px 0 0;
    border-top: 1px solid var(--registration-line);
}

.registration-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 30px;
    border-top: 1px solid var(--registration-line);
    background: var(--registration-soft);
}

.registration-actions .registration-action-group {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.registration-btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px 17px;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.registration-btn:hover {
    transform: translateY(-1px);
}

.registration-btn-primary {
    border-color: var(--registration-navy);
    background: var(--registration-navy);
    color: #fff;
}

.registration-btn-primary:hover {
    border-color: var(--registration-navy-hover);
    background: var(--registration-navy-hover);
    color: #fff;
}

.registration-btn-secondary {
    border-color: var(--registration-line-strong);
    background: #fff;
    color: var(--registration-navy);
}

.registration-btn-secondary:hover {
    border-color: var(--registration-navy);
    color: var(--registration-navy);
}

.registration-btn-link {
    border-color: transparent;
    background: transparent;
    color: var(--registration-muted);
}

.registration-upload {
    position: relative;
    display: flex;
    min-height: 86px;
    align-items: center;
    gap: 15px;
    border: 1px dashed var(--registration-line-strong);
    border-radius: 7px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.registration-upload:hover,
.registration-upload:focus-within {
    border-color: var(--registration-navy);
    background: #fbfcfe;
}

.registration-upload-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    color: var(--registration-navy);
    font-size: 1.25rem;
}

.registration-upload-copy {
    min-width: 0;
    flex: 1;
}

.registration-upload-title {
    display: block;
    overflow: hidden;
    color: var(--registration-ink);
    font-size: .87rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.registration-upload-meta {
    display: block;
    margin-top: 3px;
    color: var(--registration-muted);
    font-size: .74rem;
}

.registration-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.registration-review {
    margin: 0;
    border-top: 1px solid var(--registration-line);
}

.registration-review-row {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    gap: 18px;
    padding: 11px 0;
    border-bottom: 1px solid var(--registration-line);
}

.registration-review-row dt {
    color: var(--registration-muted);
    font-size: .78rem;
    font-weight: 600;
}

.registration-review-row dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--registration-ink);
    font-size: .84rem;
    font-weight: 650;
    text-align: right;
}

.registration-review-empty {
    color: var(--registration-muted);
    font-weight: 500;
}

.registration-complete {
    padding: 38px 30px;
    text-align: center;
}

.registration-complete-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    place-items: center;
    border: 1px solid #a9cfba;
    border-radius: 50%;
    color: var(--registration-success);
    font-size: 1.45rem;
}

.registration-complete h1 {
    margin: 0;
    font-size: 2rem;
}

.registration-complete p {
    max-width: 540px;
    margin: 11px auto 0;
    color: var(--registration-muted);
    line-height: 1.65;
}

.registration-complete-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.registration-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--registration-line);
    border-bottom: 1px solid var(--registration-line);
}

.registration-option {
    display: flex;
    min-height: 240px;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    color: inherit;
}

.registration-option + .registration-option {
    border-left: 1px solid var(--registration-line);
}

.registration-option-icon {
    margin-bottom: 21px;
    color: var(--registration-gold);
    font-size: 1.35rem;
}

.registration-option h2 {
    margin: 0;
    color: var(--registration-navy);
    font-family: var(--heading-font);
    font-size: 1.35rem;
}

.registration-option p {
    margin: 9px 0 24px;
    color: var(--registration-muted);
    font-size: .87rem;
    line-height: 1.55;
}

.registration-option .registration-btn {
    margin-top: auto;
}

.registration-choice-stage .registration-intro {
    margin-bottom: 24px;
}

.apply-track-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apply-track-options .registration-option {
    min-height: 210px;
    padding: 24px;
}

.registration-login-note {
    margin: 22px 0 0;
    color: var(--registration-muted);
    font-size: .83rem;
    text-align: center;
}

.registration-login-note a {
    color: var(--registration-navy);
    font-weight: 700;
}

/* Segmented choice — a styled radio group used where a two/three-way dropdown
   or checkbox would otherwise be. Exactly one option is always selected. */
.registration-segmented {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 8px;
}

.registration-segment {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    border: 1px solid var(--registration-line-strong);
    border-radius: 6px;
    padding: 9px 13px;
    color: var(--registration-muted);
    background: #fff;
    font-size: .87rem;
    font-weight: 650;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.registration-segment input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.registration-segment:hover {
    border-color: var(--registration-navy);
    color: var(--registration-navy);
}

/* `.is-selected` is kept in sync by registration_wizard.js so the selected
   state still renders where :has() is unsupported. */
.registration-segment.is-selected,
.registration-segment:has(input:checked) {
    border-color: var(--registration-navy);
    background: var(--registration-navy);
    color: #fff;
}

.registration-segment:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(6, 43, 96, .16);
}

.registration-segmented[aria-invalid="true"] .registration-segment {
    border-color: var(--registration-error);
}

/* Repeatable advisor blocks */
.registration-repeat-item {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--registration-line);
}

.registration-repeat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.registration-repeat-head .registration-section-title {
    margin: 0;
}

.registration-repeat-remove {
    margin-left: auto;
    border-color: transparent;
    background: transparent;
    padding: 6px 10px;
    min-height: 34px;
    color: var(--registration-error);
    font-size: .79rem;
}

.registration-repeat-remove:hover {
    border-color: var(--registration-error);
    background: #fff9f9;
}

.registration-repeat-add {
    margin-top: 18px;
}

.registration-repeat-note {
    margin: 10px 0 0;
    color: var(--registration-muted);
    font-size: .76rem;
}

/* Payment method picker */
.registration-pay-options {
    display: grid;
    gap: 12px;
}

.registration-pay-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 13px;
    margin: 0;
    border: 1px solid var(--registration-line-strong);
    border-radius: 7px;
    padding: 15px 17px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.registration-pay-option:hover {
    border-color: var(--registration-navy);
}

.registration-pay-option:has(input:checked) {
    border-color: var(--registration-navy);
    background: #fbfcfe;
    box-shadow: inset 3px 0 0 var(--registration-navy);
}

.registration-pay-option input {
    width: 17px;
    height: 17px;
    margin-top: 3px;
    accent-color: var(--registration-navy);
}

.registration-pay-title {
    display: block;
    color: var(--registration-ink);
    font-size: .92rem;
    font-weight: 700;
}

.registration-pay-copy {
    display: block;
    margin-top: 4px;
    color: var(--registration-muted);
    font-size: .8rem;
    line-height: 1.5;
}

.registration-pay-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    border-radius: 4px;
    padding: 5px 9px;
    background: #fdf6e7;
    color: #7a5a12;
    font-size: .75rem;
    font-weight: 650;
}

.registration-pay-body {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--registration-line);
}

.registration-amount {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 22px;
    border: 1px solid var(--registration-line);
    border-radius: 7px;
    padding: 15px 18px;
    background: var(--registration-soft);
}

.registration-amount-label {
    color: var(--registration-muted);
    font-size: .82rem;
    font-weight: 650;
}

.registration-amount-value {
    color: var(--registration-navy);
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Pre-registration showcase */
.registration-hero-gallery {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--registration-line);
    border-radius: 10px;
    aspect-ratio: 16 / 7;
    background: var(--registration-navy);
}

.registration-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity .9s ease;
}

.registration-hero-slide.is-active {
    opacity: 1;
}

.registration-hero-gallery::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 43, 96, .05) 40%, rgba(6, 43, 96, .82) 100%);
    pointer-events: none;
}

.registration-hero-dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
}

.registration-hero-dot {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: var(--registration-line-strong);
    transition: background .2s ease, transform .2s ease;
}

.registration-hero-dot.is-active {
    background: var(--registration-navy);
    transform: scale(1.35);
}

.registration-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0 0;
    border-top: 1px solid var(--registration-line);
    border-bottom: 1px solid var(--registration-line);
    padding: 22px 0;
    text-align: center;
}

.registration-hero-stat strong {
    display: block;
    color: var(--registration-navy);
    font-family: var(--heading-font);
    font-size: 1.75rem;
    line-height: 1.1;
}

.registration-hero-stat span {
    display: block;
    margin-top: 5px;
    color: var(--registration-muted);
    font-size: .78rem;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.registration-hero-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.phone-country-input {
    display: flex;
    gap: 5px;
    align-items: stretch;
}

.phone-country-control {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 5px 7px;
    border: 1px solid var(--registration-line-strong);
    border-radius: 6px;
    background: #fff;
}

.phone-country-control img {
    border-radius: 2px;
    flex-shrink: 0;
}

.phone-country-select {
    max-width: 68px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--registration-ink);
    font: inherit;
    font-size: .82rem;
}

.phone-country-input .form-control {
    min-width: 0;
}

@media (max-width: 767px) {
    .registration-page {
        padding: 40px 0 54px;
    }

    .registration-shell {
        width: min(100% - 22px, 860px);
    }

    .registration-progress {
        margin-bottom: 24px;
    }

    .registration-progress-item {
        width: 12px;
        flex-basis: 12px;
    }

    .registration-progress-marker {
        width: 12px;
        height: 12px;
    }

    .registration-progress-line {
        margin: 0 7px;
    }

    .registration-form-body {
        padding: 22px 18px;
    }

    .registration-grid,
    .registration-student-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .registration-student-row .registration-choice {
        padding-top: 0;
    }

    .registration-actions {
        padding: 15px 18px;
    }

    .registration-actions,
    .registration-actions .registration-action-group {
        align-items: stretch;
    }

    .registration-actions .registration-action-group {
        margin-left: auto;
    }

    .registration-btn {
        padding-inline: 13px;
    }

    .registration-review-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .registration-review-row dd {
        text-align: left;
    }

    .registration-complete {
        padding: 32px 20px;
    }

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

    .registration-option {
        min-height: 0;
        padding: 24px 18px;
    }

    .apply-track-options .registration-option {
        min-height: 0;
        padding: 24px 18px;
    }

    .registration-option + .registration-option {
        border-top: 1px solid var(--registration-line);
        border-left: 0;
    }

    .registration-segmented {
        grid-auto-flow: row;
    }

    .registration-hero-gallery {
        aspect-ratio: 4 / 3;
    }

    .registration-hero-stats {
        gap: 14px;
        padding: 18px 0;
    }

    .registration-hero-stat strong {
        font-size: 1.35rem;
    }

    .registration-hero-stat span {
        font-size: .67rem;
    }

    .registration-hero-actions {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registration-stage.slide-forward,
    .registration-stage.slide-back {
        animation: none;
    }

    .registration-progress-marker,
    .registration-progress-line,
    .registration-btn {
        transition: none;
    }
}

/* Existing profile photo shown to a returning applicant alongside the
   "keep the photo we already have" choice. */
.registration-photo-preview {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-top: 12px;
    display: block;
}

/* A refused photo is dimmed and outlined in the error colour, so the preview
   itself carries the verdict rather than leaving it to the text alone. */
.registration-photo-preview[data-kind="block"] {
    border-color: #c13515;
    opacity: 0.6;
}
