.reg-header {
    background: linear-gradient(120deg, var(--fe-dark-green-1), var(--fe-dark-green-2));
    padding: 36px 40px 28px;
    text-align: center;
}
.reg-header h1 {
    font-family: 'Arvo', serif;
    color: white;
    font-size: 1.6rem;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.reg-header p {
    color: var(--fe-light-green-1);
    font-size: 0.88rem;
    margin-top: 4px;
}

/* Timeline */
.reg-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 44px 40px 40px;
    position: relative;
}
.reg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 0 0 52px;
    width: 52px;
    position: relative;
    z-index: 2;
    padding-bottom: 22px;
}
.reg-step.disabled { pointer-events: none; }

.reg-step-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e1e6ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--grey);
    position: relative;
    isolation: isolate;
    transition: color 0.3s ease, border-color 0.5s ease, box-shadow 0.4s ease;
}
.reg-step-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fe-primary-green), #17857a);
    transform: scale(0);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: -1;
}
.reg-step-circle span,
.reg-step-circle svg {
    position: relative;
    z-index: 1;
    transition: opacity 0.25s, transform 0.25s;
}
.reg-step-circle svg { display: none; width: 22px; height: 22px; }

.reg-step.active .reg-step-circle {
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(30, 169, 155, 0.35);
}
.reg-step.active .reg-step-circle::after { transform: scale(1); }

.reg-step.completed .reg-step-circle {
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(30, 169, 155, 0.25);
}
.reg-step.completed .reg-step-circle::after { transform: scale(1); }
.reg-step.completed .reg-step-circle span { display: none; }
.reg-step.completed .reg-step-circle svg { display: block; animation: checkPop 0.4s ease-out; }
@keyframes checkPop {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.reg-step-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--grey);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.3s ease;
}
.reg-step.active .reg-step-label { color: var(--fe-dark-green-1); }
.reg-step.completed .reg-step-label { color: var(--fe-primary-green); }

.reg-connector {
    flex: 1;
    height: 4px;
    background: #e1e6ea;
    margin: 0 -6px;
    position: relative;
    top: 24px;
    max-width: 180px;
    min-width: 60px;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
}
.reg-connector .fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--fe-primary-green), #17857a);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 4px;
}
.reg-connector.filled .fill { transform: scaleX(1); }
.reg-connector .fill::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 12px rgba(30, 169, 155, 0.9), 0 0 4px white;
    opacity: 0;
    transition: opacity 0.2s;
}
.reg-connector.filling .fill::after { opacity: 1; }

@media (max-width: 600px) {
    .reg-timeline { padding: 30px 14px 36px; }
    .reg-step { flex: 0 0 44px; width: 44px; padding-bottom: 28px; }
    .reg-step-circle { width: 44px; height: 44px; font-size: 0.9rem; }
    .reg-connector { top: 20px; min-width: 30px; }
    .reg-step-label { font-size: 0.7rem; }
}

/* Body */
.reg-body { padding: 8px 44px 36px; position: relative; }
.reg-panel { display: none; animation: fadeSlideIn 0.35s ease-out; }
.reg-panel.active { display: block; }
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reg-section-title {
    font-family: 'Arvo', serif;
    font-size: 1.15rem;
    color: var(--fe-dark-green-1);
    margin-bottom: 4px;
}
.reg-section-subtitle {
    font-size: 0.82rem;
    color: var(--grey);
    margin-bottom: 22px;
}
.reg-subsection-title {
    font-family: 'Arvo', serif;
    font-size: 0.98rem;
    color: var(--fe-dark-green-1);
    margin: 6px 0 12px;
}

.reg-body input[type="text"],
.reg-body input[type="email"],
.reg-body input[type="tel"],
.reg-body input[type="password"],
.reg-body input[type="number"],
.reg-body input[type="date"],
.reg-body select,
.reg-body textarea {
    width: 100%;
    height: 42px;
    border: 1.5px solid #d6dade;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 0.9rem;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}
.reg-body input:focus,
.reg-body select:focus,
.reg-body textarea:focus {
    border-color: var(--fe-primary-green);
    box-shadow: 0 0 0 3px rgba(30, 169, 155, 0.12);
}
.reg-body label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dark-grey);
    margin-bottom: 5px;
    letter-spacing: 0.2px;
    display: block;
}
.reg-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.reg-row.triple { gap: 12px; }
.reg-col { flex: 1; }
.reg-col-half { width: 50%; }
.reg-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--fe-off-white);
    border-radius: 8px;
    cursor: pointer;
}
.reg-check:hover { background: #e8eeee; }
.reg-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--fe-primary-green);
    flex-shrink: 0;
    margin: 0;
}
.reg-check label {
    font-size: 0.88rem;
    color: var(--dark-grey);
    margin: 0 !important;
    font-weight: 500;
    cursor: pointer;
}

.reg-radio-group {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}
.reg-radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid #d6dade;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-grey);
}
.reg-radio-option:hover {
    border-color: var(--fe-light-green-1);
    background: #f0faf8;
}
.reg-radio-option.selected {
    border-color: var(--fe-primary-green);
    background: rgba(30, 169, 155, 0.08);
    color: var(--fe-dark-green-1);
}

.reg-terms-box {
    border: 1.5px solid #d6dade;
    border-radius: 8px;
    padding: 16px;
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.8rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 14px;
    background: #fdfdfd;
}

.reg-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #dde1e4, transparent);
    margin: 24px 0;
}
.reg-helper {
    font-size: 0.75rem;
    color: var(--grey);
    margin-top: 4px;
}
.reg-help-link {
    font-size: 0.78rem;
    color: var(--fe-primary-green) !important;
    text-decoration: none !important;
    font-weight: 600;
    cursor: pointer;
}
.reg-help-link:hover { text-decoration: underline !important; }

.reg-btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eef0f2;
}
.reg-btn-back {
    background: none;
    border: 2px solid #d6dade;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark-grey);
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
}
.reg-btn-back:hover { border-color: var(--fe-primary-green); color: var(--fe-dark-green-1); }
.reg-btn-back.hidden { visibility: hidden; }
.reg-btn-next {
    background: var(--fe-primary-green);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 0.92rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    box-shadow: 0 4px 14px rgba(30, 169, 155, 0.3);
}
.reg-btn-next:hover {
    background: var(--fe-dark-green-1);
    transform: translateY(-1px);
}
.reg-btn-submit {
    background: var(--fe-primary-gold);
    box-shadow: 0 4px 14px rgba(245, 175, 60, 0.35);
}
.reg-btn-submit:hover { background: var(--fe-dark-gold); }

/* Shake animation for failed validation */
@keyframes regShake {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
    100% { transform: translateX(0); }
}
.reg-btn-shake {
    animation: regShake 0.45s ease-out;
}

/* Step 1: Continue right-aligned (no invisible Back spacer) */
#reg-panel-1 .reg-btn-row {
    justify-content: flex-end;
}

/* White fade cover — overlays reg-body during step transition */
.reg-fade-cover {
    position: absolute;
    inset: 0;
    background: white;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.reg-fade-cover.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Disabled Continue button */
.reg-btn-next:disabled {
    background: #b0bbbf;
    cursor: not-allowed;
    box-shadow: none;
}
.reg-btn-next:disabled:hover {
    background: #b0bbbf;
    transform: none;
}

.reg-footer {
    font-size: 0.78rem;
    color: var(--grey);
    margin-top: 18px;
    text-align: center;
}

/* Greyed/disabled input state (unknown cert, unknown NON) */
.reg-body input.reg-input-disabled,
.reg-body select.reg-input-disabled {
    background: #f0f2f4;
    color: #aab0b7;
    border-color: #dde1e4;
    cursor: not-allowed;
}

/* NON number field — "NON" prefix label + digit-only input */
.reg-non-field-wrap #id_pjms_non { display: none; }
.reg-non-input-wrap {
    display: flex;
    align-items: center;
    height: 42px;
    border: 1.5px solid #d6dade;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.reg-non-input-wrap:focus-within {
    border-color: var(--fe-primary-green);
    box-shadow: 0 0 0 3px rgba(30, 169, 155, 0.12);
}
.reg-non-prefix {
    padding: 0 10px 0 14px;
    font-size: 0.9rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    border-right: 1.5px solid #d6dade;
    height: 100%;
    display: flex;
    align-items: center;
    background: #f7f9fa;
}
#id_pjms_non_digits {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 0.9rem;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background: transparent;
    box-sizing: border-box;
}
.reg-non-input-wrap.reg-input-disabled {
    background: #f0f2f4;
    border-color: #dde1e4;
    cursor: not-allowed;
}
.reg-non-input-wrap.reg-input-disabled .reg-non-prefix {
    color: #aab0b7;
    background: #e8eaec;
    border-right-color: #dde1e4;
}
.reg-non-input-wrap.reg-input-disabled #id_pjms_non_digits {
    color: #aab0b7;
    cursor: not-allowed;
}

/* Password strength bar */
.pw-strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}
.pw-strength-seg {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: #e1e6ea;
    transition: background 0.25s;
}

.reg-error {
    background: #fdecea;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

/* Validation banner (JS-driven) */
.reg-validation-banner {
    background: #fff8f0;
    border-left: 4px solid #e67e22;
    color: #a04000;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.84rem;
    animation: fadeSlideIn 0.2s ease-out;
}
.reg-validation-banner strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.86rem;
}
.reg-validation-banner ul {
    margin: 0;
    padding-left: 18px;
}
.reg-validation-banner ul li {
    margin-bottom: 2px;
}

/* Ownership radios */
.reg-ownership-wrap ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.reg-ownership-wrap ul li {
    flex: 1;
    border: 2px solid #d6dade;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-grey);
}
.reg-ownership-wrap ul li:hover {
    border-color: var(--fe-light-green-1);
    background: #f0faf8;
}
.reg-ownership-wrap ul li label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: inherit;
    text-transform: none;
    letter-spacing: 0;
}
.reg-ownership-wrap ul li input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--fe-primary-green);
    margin: 0;
}
.reg-ownership-wrap ul li.selected {
    border-color: var(--fe-primary-green);
    background: rgba(30, 169, 155, 0.08);
    color: var(--fe-dark-green-1);
}



/* ============================================================
   Registration Summary (Step 3)
   ============================================================ */

.reg-summary {
    margin-bottom: 26px;
}
.reg-summary-inner {
    animation: fadeSlideIn 0.3s ease-out;
}
.reg-summary-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #a0adb0;
    margin-bottom: 12px;
}
.reg-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.reg-summary-card {
    background: white;
    border: 1px solid #e4eaea;
    border-radius: 12px;
    padding: 16px 18px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.reg-summary-card:hover {
    border-color: var(--fe-light-green-1);
    box-shadow: 0 4px 14px rgba(30, 169, 155, 0.08);
}
.reg-summary-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.reg-summary-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(30, 169, 155, 0.15), rgba(30, 169, 155, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fe-primary-green);
    flex-shrink: 0;
}
.reg-summary-icon svg {
    width: 18px;
    height: 18px;
}
.reg-summary-card-title {
    font-family: 'Arvo', serif;
    font-size: 0.9rem;
    color: var(--fe-dark-green-1);
    flex: 1;
}
.reg-summary-edit {
    font-size: 0.72rem;
    color: var(--fe-primary-green);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(30, 169, 155, 0.08);
    border: none;
    font-family: 'Open Sans', sans-serif;
    transition: background 0.15s;
}
.reg-summary-edit:hover {
    background: rgba(30, 169, 155, 0.18);
}
.reg-summary-row {
    display: flex;
    font-size: 0.8rem;
    padding: 4px 0;
    gap: 10px;
    line-height: 1.45;
}
.reg-summary-key {
    color: #a0adb0;
    min-width: 90px;
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-top: 2px;
    flex-shrink: 0;
}
.reg-summary-val {
    color: var(--dark-grey);
    flex: 1;
    word-break: break-word;
}

@media (max-width: 600px) {
    .reg-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Incomplete summary card */
.reg-summary-card.reg-card-incomplete {
    border-color: #f0ad4e;
    background: #fffdf7;
}
.reg-summary-card.reg-card-incomplete .reg-summary-icon {
    background: rgba(240, 173, 78, 0.15);
    color: #d97a00;
}
.reg-card-warning {
    font-size: 0.75rem;
    color: #b8680a;
    background: rgba(240, 173, 78, 0.12);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 10px;
}
.reg-summary-edit.reg-edit-incomplete {
    background: rgba(240, 173, 78, 0.2);
    color: #b8680a;
    font-weight: 700;
}
.reg-summary-edit.reg-edit-incomplete:hover {
    background: rgba(240, 173, 78, 0.35);
}
.reg-submit-error {
    display: none;
    font-size: 0.82rem;
    color: #c0392b;
    text-align: center;
    padding: 8px 14px;
    background: rgba(192, 57, 43, 0.08);
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Modals */
.reg-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.reg-modal-overlay.open { display: flex; }
.reg-modal {
    background: white;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.reg-modal-header {
    padding: 16px 48px 16px 20px;
    border-bottom: 1px solid #eef0f2;
    font-family: 'Arvo', serif;
    color: var(--fe-dark-green-1);
    font-size: 1rem;
}
.reg-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--grey);
    padding: 4px 10px;
}
.reg-modal-close:hover { color: var(--fe-dark-green-1); }
.reg-modal-body { padding: 18px 20px; }
.reg-modal-body img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

@media (max-width: 600px) {
    .reg-container { margin: 16px 8px 40px; border-radius: 12px; }
    .reg-header { padding: 26px 18px 22px; }
    .reg-header h1 { font-size: 1.25rem; }
    .reg-timeline { padding: 22px 14px 16px; }
    .reg-step-circle { width: 38px; height: 38px; font-size: 0.85rem; }
    .reg-step-label { font-size: 0.7rem; }
    .reg-connector { min-width: 30px; }
    .reg-body { padding: 8px 18px 26px; }
    .reg-row, .reg-row.triple { flex-direction: column; gap: 0; }
    .reg-row > .reg-col { margin-bottom: 14px; }
    .reg-radio-group { flex-direction: column; }
    .reg-ownership-wrap ul { flex-direction: column; }
    .reg-btn-next { padding: 12px 22px; font-size: 0.85rem; }
    .reg-btn-back { padding: 10px 18px; font-size: 0.85rem; }
    .reg-summary-grid { flex-direction: column; gap: 14px; }
    .reg-validation-banner { margin: 0 0 12px; }
}
.page-wrapper {
    background: none !important;
    padding: 50px 0px;
    position: relative;
}


.reg-container {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    overflow: hidden;
    font-family: 'Open Sans', sans-serif;
}



.page-wrapper {
    position: relative;
    background: transparent;
    min-height: 100vh;
    overflow: hidden;
}

.bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 270vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.reg-yn-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 2px;
}
.reg-yn-row:last-of-type { border-bottom: none; }

.reg-yn-q {
    flex: 1;
    font-size: 0.88rem;
    color: var(--dark-grey);
}

.reg-yn-group {
    display: inline-flex;
    border: 1.5px solid #d6dade;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.reg-yn-btn {
    padding: 7px 22px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--grey);
    background: white;
    border: none;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    transition: background 0.15s, color 0.15s;
    min-width: 56px;
}
.reg-yn-btn + .reg-yn-btn { border-left: 1.5px solid #d6dade; }
.reg-yn-btn:hover:not(.active-yes):not(.active-no) { background: #f7f9f9; }

.reg-yn-btn.active-yes {
    background: var(--fe-primary-green);
    color: white;
}
.reg-yn-btn.active-no {
    background: #8a9299;
    color: white;
}

/* Conditional reveal — replaces inline display:none toggling.
   Sections start collapsed and animate open when .open is added. */
.reg-yn-conditional {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease, padding 0.25s ease;
    margin-top: 0;
}
.reg-yn-conditional.open {
    max-height: 1200px;
    opacity: 1;
    margin-top: 12px;
    overflow: visible;
    pointer-events: auto;
}

@media (max-width: 600px) {
    .reg-yn-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .reg-yn-q { font-size: 0.86rem; }
    .reg-yn-group { width: 100%; }
    .reg-yn-btn { flex: 1; padding: 10px 0; }
}