@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-700.woff2') format('woff2');
}

:root {
    --hp-yellow: #fbdb65;
    --hp-yellow-hover: #f5d44e;
    --hp-cream: #faf9f6;
    --hp-white: #ffffff;
    --hp-text: #1a1c21;
    --hp-text-muted: #706d63;
    --hp-text-tertiary: #4b4942;
    --hp-border: #c3bead;
    --hp-border-light: #ede9d9;
    --hp-border-input: #979485;
    --hp-error: #fb2c36;
    --hp-error-bg: #fef2f2;
    --hp-success: #2c8d56;
    --hp-success-bg: #f0fdf4;
    --hp-radius: 10px;
    --hp-radius-lg: 16px;
    --hp-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--hp-cream);
    font-family: var(--hp-font);
    color: var(--hp-text);
    -webkit-font-smoothing: antialiased;
}

/* Layout */

.page-content {
    padding: 24px 16px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hp-card {
    width: 100%;
    max-width: 552px;
    /* Auto margins rather than justify-content alone: a card taller than the viewport still
       scrolls from its top edge instead of being clipped. */
    margin: auto;
    background: var(--hp-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px;
    position: relative;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

/* Logo */

.hp-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hp-yellow);
    border-radius: var(--hp-radius);
    overflow: hidden;
}

.hp-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.hp-logo-wordmark {
    display: none;
    height: 48px;
    margin-bottom: 16px;
}

.hp-logo-wordmark img {
    height: 100%;
    width: auto;
    display: block;
}

/* Typography */

.hp-title {
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
    text-align: center;
    color: var(--hp-text);
    margin: 0 0 4px 0;
}

.hp-subtitle {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--hp-text-muted);
    text-align: center;
    margin: 0 0 24px 0;
}

.hp-step-h {
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
    color: var(--hp-text);
    margin: 0 0 24px 0;
    width: 100%;
    text-align: left;
}

.hp-step-sub {
    font-size: 14px;
    line-height: 20px;
    color: var(--hp-text-tertiary);
    margin: -16px 0 24px 0;
    width: 100%;
    text-align: left;
}

/* Forms */

.hp-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.hp-label {
    display: block;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--hp-text);
    margin-bottom: 4px;
}

.hp-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-family: var(--hp-font);
    font-size: 16px;
    line-height: 24px;
    background: var(--hp-white);
    border: 1px solid var(--hp-border-input);
    border-radius: var(--hp-radius);
    color: var(--hp-text);
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 12px;
}

.hp-input::placeholder {
    color: var(--hp-text-muted);
}

.hp-input:focus {
    border-color: var(--hp-text);
}

.hp-input:-webkit-autofill,
.hp-input:-webkit-autofill:hover,
.hp-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--hp-white) inset;
    -webkit-text-fill-color: var(--hp-text);
    caret-color: var(--hp-text);
    transition: background-color 9999s ease-in-out 0s;
}

.hp-input.is-valid {
    border-color: var(--hp-success);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232c8d56' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
    padding-right: 40px;
}

.hp-input.is-error {
    border-color: var(--hp-error);
}

select.hp-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%231a1c21' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 36px;
}

select.hp-input.is-valid {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%231a1c21' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    padding-right: 36px;
}

select.hp-input--calendar {
    background-image:
        url("data:image/svg+xml;utf8,<svg fill='none' stroke='%231a1c21' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>"),
        url("data:image/svg+xml;utf8,<svg fill='%231a1c21' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat, no-repeat;
    background-position: 12px center, right 12px center;
    background-size: 20px 20px, 16px 16px;
    padding-left: 44px;
    padding-right: 36px;
}

.hp-input-wrap {
    position: relative;
    width: 100%;
}

.hp-input-wrap .hp-input {
    padding-right: 44px;
}

.hp-input-wrap .eye {
    position: absolute;
    right: 12px;
    top: 24px;
    transform: translateY(-50%);
    color: var(--hp-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    padding: 0;
}

.hp-input-wrap .eye svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hp-input-wrap .eye .icon-off {
    display: none;
}

.hp-input-wrap .eye[data-visible="true"] .icon-on {
    display: none;
}

.hp-input-wrap .eye[data-visible="true"] .icon-off {
    display: block;
}

.hp-field-error {
    display: block;
    font-size: 12px;
    line-height: 16px;
    color: var(--hp-error);
    margin: -8px 0 12px 0;
}

/* Buttons */

.hp-btn {
    width: 100%;
    min-height: 56px;
    padding: 18px 44px;
    background: var(--hp-yellow);
    color: var(--hp-text);
    border: none;
    border-radius: var(--hp-radius);
    font-family: var(--hp-font);
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hp-btn:hover {
    background: var(--hp-yellow-hover);
}

.hp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hp-btn-back {
    display: none;
    min-height: 56px;
    padding: 18px 44px;
    background: var(--hp-white);
    border: 1px solid var(--hp-border-input);
    color: var(--hp-text);
    border-radius: var(--hp-radius);
    font-family: var(--hp-font);
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.hp-btn-back:hover {
    background: var(--hp-cream);
}

.hp-btn-loader {
    width: 52px;
    height: 12px;
}

.hp-btn-loader circle {
    fill: currentColor;
}

/* Login-island toastr (React islands) — keep unchanged for login/register. */

.hp-toaster {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    width: 300px;
    max-width: calc(100vw - 32px);
}

.hp-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 15px 15px 50px;
    border: none;
    border-radius: 3px;
    font-family: var(--hp-font);
    font-size: 14px;
    line-height: 20px;
    color: var(--hp-white);
    text-align: left;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 24px 24px;
}

.hp-toast-text {
    flex: 1;
    word-break: break-word;
}

.hp-toast-close {
    background: none;
    border: none;
    padding: 0;
    color: var(--hp-white);
    font-family: var(--hp-font);
    font-size: 20px;
    line-height: 20px;
    font-weight: 700;
    opacity: 0.8;
    cursor: pointer;
}

.hp-toast-close:hover {
    opacity: 1;
}

.hp-toast-error {
    background-color: #ef4444;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='13'/><line x1='12' y1='16.5' x2='12' y2='16.5'/></svg>");
}

.hp-toast-success {
    background-color: #51a351;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}

/* Members-parity OTP toasts (Radix-style viewport — not the login-island toastr greens). */

#hp-members-toast-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    overflow: visible;
}

.hp-members-toast-viewport {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    max-height: 100vh;
    width: 100%;
    flex-direction: column-reverse;
    overflow: hidden;
    padding: 16px;
    pointer-events: none;
}

.hp-members-toast-viewport > * {
    pointer-events: auto;
}

@media (min-width: 640px) {
    .hp-members-toast-viewport {
        top: auto;
        bottom: 0;
        left: auto;
        right: 0;
        flex-direction: column;
        max-width: 420px;
    }
}

.hp-members-toast {
    position: relative;
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0f172a;
    padding: 24px 32px 24px 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.hp-members-toast--destructive {
    border-color: hsl(0 84.2% 60.2%);
    background: hsl(0 84.2% 60.2%);
    color: hsl(210 40% 98%);
}

.hp-members-toast-body {
    display: grid;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.hp-members-toast-title {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    white-space: pre-line;
}

.hp-members-toast-desc {
    font-size: 14px;
    line-height: 20px;
    opacity: 0.9;
    white-space: pre-line;
}

.hp-members-toast-close {
    position: absolute;
    right: 8px;
    top: 8px;
    border: none;
    background: transparent;
    padding: 6px;
    border-radius: 6px;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.hp-members-toast-close:hover {
    opacity: 1;
}

.hp-members-toast--destructive .hp-members-toast-close {
    color: #fecaca;
}

.hp-step-actions {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Mobile only: pushes the terms row down with the CTA so both sit at the foot of
   the viewport. Hidden on desktop, where the CTA alone drops to the card bottom. */
.hp-spacer {
    flex: 1;
}

.hp-back-arrow {
    position: absolute;
    top: 36px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: var(--hp-white);
    border: 1px solid var(--hp-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--hp-text);
    transition: background 0.15s;
    padding: 0;
    z-index: 10;
}

.hp-back-arrow:hover {
    background: var(--hp-cream);
}

.hp-back-arrow svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Terms checkbox */

.hp-terms-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 16px 0;
}

.hp-terms-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--hp-yellow);
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

.hp-checkbox {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--hp-text);
    border-radius: 4px;
    background: var(--hp-white);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.hp-checkbox.checked {
    background: var(--hp-yellow);
}

.hp-checkbox.checked::after {
    content: '\2713';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--hp-text);
    font-weight: 700;
    line-height: 1;
}

.hp-terms-row .text {
    font-size: 13px;
    line-height: 18px;
    color: var(--hp-text);
}

.hp-terms-row .text a {
    color: var(--hp-text);
    text-decoration: underline;
    font-weight: 500;
}

/* Links and footer */

.hp-help-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: 24px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.hp-help-title {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-help-sub {
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
    color: var(--hp-text-muted);
}

.hp-help-block:hover .hp-help-sub {
    text-decoration: underline;
}

.hp-note {
    width: 100%;
    margin: 16px 0 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    color: var(--hp-text-muted);
}

.hp-link-row {
    width: 100%;
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    line-height: 16px;
}

.hp-link-row a {
    color: var(--hp-text-muted);
    text-decoration: underline;
}

.hp-link-row a:hover {
    color: var(--hp-text);
}

.hp-footer {
    margin-top: 16px;
    font-size: 12px;
    line-height: 16px;
    color: var(--hp-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hp-footer a {
    color: var(--hp-text);
    text-decoration: underline;
}

.hp-footer .sep {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: var(--hp-border);
}

/* Alerts */

.hp-alert {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--hp-radius);
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 16px;
}

.hp-alert-error {
    background: var(--hp-error-bg);
    border: 1px solid var(--hp-error);
    color: #991b1b;
}

.hp-alert-success {
    background: var(--hp-success-bg);
    border: 1px solid var(--hp-success);
    color: #166534;
}

.hp-alert-info {
    background: var(--hp-cream);
    border: 1px solid var(--hp-border);
    color: var(--hp-text-tertiary);
    word-break: break-all;
}

/* Step indicators */

.hp-progress {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-bottom: 16px;
}

.hp-progress .seg {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--hp-border);
    transition: background 0.2s;
}

.hp-progress .seg.active {
    background: var(--hp-yellow);
}

.hp-stepper {
    display: none;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    /* One circle tall: the labels hang below on absolute positioning and overlap the first
       24px of the margin, so the visible gap to the step heading is 32px. */
    height: 36px;
    margin-bottom: 56px;
}

.hp-step {
    position: relative;
    height: 36px;
    flex: 0 0 auto;
}

.hp-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hp-border);
    color: var(--hp-text-tertiary);
    font-size: 18px;
    line-height: 26px;
    font-weight: 400;
}

.hp-step.active .hp-step-num {
    background: var(--hp-yellow);
    color: var(--hp-text);
    font-weight: 600;
}

.hp-step-label {
    position: absolute;
    top: 44px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: var(--hp-text);
}

.hp-step-line {
    flex: 0 0 97px;
    width: 97px;
    height: 1px;
    background: var(--hp-border);
    margin-top: 18px;
}

/* OTP */

.hp-otp-heading {
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
}

.hp-otp-title {
    font-size: 24px;
    line-height: 30px;
    font-weight: 600;
    color: var(--hp-text);
    margin: 0 0 4px 0;
    width: 100%;
    text-align: left;
}

.hp-otp-sub {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--hp-text-muted);
    margin: 0;
    width: 100%;
    text-align: left;
}

.hp-otp-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 20px;
    color: var(--hp-text);
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--hp-font);
}

.hp-otp-link:hover {
    opacity: 0.7;
}

.hp-otp-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hp-otp-box {
    width: 100%;
    border: 1px solid var(--hp-border-light);
    border-radius: var(--hp-radius);
    padding: 24px;
    margin-top: 24px;
}

.hp-otp-inner {
    width: 100%;
    max-width: 481px;
    margin: 0 auto;
}

.hp-otp-section-label {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--hp-text);
    margin: 0 0 12px 0;
    width: 100%;
    text-align: left;
}

.pin-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.pin-input {
    flex: 1 1 0;
    min-width: 0;
    max-width: 97px;
    height: 78px;
    background: var(--hp-cream);
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius-lg);
    font-family: var(--hp-font);
    font-size: 24px;
    line-height: 40px;
    font-weight: 600;
    color: var(--hp-text);
    text-align: center;
    padding: 0;
    outline: none;
    caret-color: transparent;
    transition: border-color 0.2s ease;
}

.pin-input:hover {
    border-color: var(--hp-yellow);
}

.pin-input:focus {
    border-color: var(--hp-yellow);
    border-width: 2px;
}

.hp-otp-spinner {
    width: 36px;
    height: 36px;
    margin: 32px auto 0;
    border: 3px solid transparent;
    border-top-color: var(--hp-yellow);
    border-left-color: var(--hp-yellow);
    border-radius: 50%;
    animation: hp-otp-spin 1s linear infinite;
}

.hp-otp-spinner[hidden] {
    display: none;
}

@keyframes hp-otp-spin {
    from { transform: rotate(-90deg); }
    to { transform: rotate(270deg); }
}

.hp-otp-expiry-wrap {
    width: 100%;
    margin-top: 32px;
}

.hp-otp-expiry-wrap[hidden] {
    display: none;
}

.hp-otp-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--hp-border-light);
    overflow: hidden;
}

.hp-otp-progress-fill {
    height: 100%;
    width: 100%;
    background: var(--hp-yellow);
    border-radius: 999px;
    transition: width 1s linear;
}

.hp-otp-expiry {
    margin-top: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--hp-text);
    text-align: left;
}

.hp-otp-actions {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.hp-otp-resend {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-height: 56px;
    padding: 12px 16px;
    background: var(--hp-white);
    border: 1px solid var(--hp-border-input);
    border-radius: var(--hp-radius);
    color: var(--hp-text-muted);
    font-family: var(--hp-font);
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.hp-otp-resend:hover {
    background: var(--hp-cream);
}

.hp-otp-resend:disabled,
.hp-otp-resend.hp-btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.hp-otp-submit-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hp-otp-verify-form {
    position: relative;
}

/* Status page */

.hp-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hp-cream);
    border: 1px solid var(--hp-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--hp-text);
    margin-bottom: 16px;
}

.hp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hp-success);
}

.hp-status-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.hp-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--hp-cream);
    border: 1px solid var(--hp-border-light);
    border-radius: var(--hp-radius);
    font-size: 14px;
    line-height: 20px;
}

.hp-status-row .label {
    color: var(--hp-text-muted);
}

.hp-status-row .value {
    color: var(--hp-text);
    font-weight: 500;
}

.hp-btn-secondary {
    width: 100%;
    min-height: 56px;
    padding: 18px 44px;
    background: var(--hp-white);
    border: 1px solid var(--hp-border-input);
    color: var(--hp-text);
    border-radius: var(--hp-radius);
    font-family: var(--hp-font);
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: 12px;
}

.hp-btn-secondary:hover {
    background: var(--hp-cream);
}

/* Responsive */

@media (max-width: 1023px) {
    .page-content {
        padding: 24px 16px;
    }

    .hp-card {
        max-width: 380px;
        padding: 32px 20px;
        border-color: var(--hp-border-light);
    }
}

@media (min-width: 640px) {
    .hp-otp-box {
        padding: 32px;
    }

    .pin-input-container {
        gap: 31px;
    }

    .pin-input {
        height: 92px;
        font-size: 32px;
    }
}

@media (min-width: 1024px) {
    .hp-logo {
        display: none;
    }

    .hp-logo-wordmark {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .page-content {
        padding: 24px;
    }

    .hp-card {
        max-width: 678px;
        padding: 32px 75px;
    }
}

/* OTP card: match legacy CheckoutLayout inset (full-width mobile, lg:p-8) */
.hp-card--otp {
    max-width: 552px;
    padding: 24px 16px;
    border-color: var(--hp-border-light);
}

.hp-card--otp .hp-footer {
    display: none;
}

@media (max-width: 1023px) {
    .page-content:has(.hp-card--otp) {
        padding: 16px;
    }

    .hp-card--otp {
        max-width: 100%;
        padding: 24px 16px;
    }
}

@media (min-width: 1024px) {
    .hp-card--otp {
        max-width: 680px;
        padding: 32px;
    }
}

/* Wizard card: full-bleed on mobile, tall docked card on desktop */

.hp-card--wizard {
    max-width: 552px;
    margin: 40px auto;
    border-color: var(--hp-border-light);
    padding: 32px 16px;
    /* Contains the sliding step panel. `clip` rather than `hidden` so the vertical axis
       stays visible instead of turning the card into its own scroll container. */
    overflow-x: clip;
}

/* React islands mount into a bare wrapper div, which would otherwise sit between the card's
   flex column and the form and swallow both the full width and the free height. Version5
   flattens its equivalent wizard chain the same way. */
.hp-card > [data-island] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
}

/* Version5's register card ends at the buttons — the shared footer links would otherwise
   hold 48px at the foot of the card and stop the actions docking flush. */
.hp-card--wizard .hp-footer {
    display: none;
}

/* Step transition: the outgoing step slides out the way the wizard is travelling and the
   incoming one follows it in from the opposite edge. The stepper and the buttons stay put. */
.hp-step-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    animation: hp-step-in 220ms ease-out;
}

.hp-step-panel[data-direction="back"] {
    animation-name: hp-step-in-back;
}

.hp-step-panel.is-leaving {
    animation: hp-step-out 160ms ease-in forwards;
}

.hp-step-panel.is-leaving[data-direction="back"] {
    animation-name: hp-step-out-back;
}

@keyframes hp-step-in {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
}

@keyframes hp-step-in-back {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
}

@keyframes hp-step-out {
    to {
        opacity: 0;
        transform: translateX(-24px);
    }
}

@keyframes hp-step-out-back {
    to {
        opacity: 0;
        transform: translateX(24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-step-panel,
    .hp-step-panel.is-leaving {
        animation: none;
    }
}

/* Version5 anchors the wizard to the top of the page rather than centring it. */
.page-content:has(.hp-card--wizard) {
    justify-content: flex-start;
}

@media (max-width: 767px) {
    html,
    body:has(.hp-card--wizard) {
        background-color: var(--hp-white);
    }

    .hp-card--wizard {
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0 auto;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .page-content:has(.hp-card--wizard) {
        padding: 0;
    }
}

@media (min-width: 1024px) {
    .hp-card--wizard {
        max-width: 678px;
        padding: 32px;
        min-height: 640px;
    }

    .hp-card--wizard .hp-progress,
    .hp-card--wizard .hp-back-arrow,
    .hp-card--wizard .hp-spacer {
        display: none;
    }

    .hp-card--wizard .hp-stepper {
        display: flex;
    }

    .hp-card--wizard .hp-step-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        padding-top: 24px;
    }

    .hp-card--wizard .hp-step-actions .hp-btn,
    .hp-card--wizard .hp-step-actions .hp-btn-back {
        display: flex;
        flex: 0 0 200px;
        width: 200px;
        height: 56px;
        min-height: 56px;
        padding: 18px 44px;
        margin: 0;
        align-self: center;
    }
}

/* Authenticator (TOTP)

   Authenticator codes are six digits rather than four, so the boxes shrink to hold the row on one
   line. These rules sit last on purpose: they share specificity with the responsive .pin-input
   rules above and win on source order. */

.pin-input-container--six {
    gap: 8px;
}

.pin-input-container--six .pin-input {
    max-width: 72px;
    height: 64px;
    font-size: 20px;
}

@media (min-width: 640px) {
    .pin-input-container--six {
        gap: 12px;
    }

    .pin-input-container--six .pin-input {
        height: 76px;
        font-size: 24px;
    }
}

.hp-totp-enrol {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 24px;
}

.hp-totp-qr {
    width: 200px;
    height: 200px;
    padding: 12px;
    background: var(--hp-white);
    border: 1px solid var(--hp-border-light);
    border-radius: var(--hp-radius);
}

.hp-totp-manual-label {
    font-size: 12px;
    line-height: 16px;
    color: var(--hp-text-muted);
    margin: 16px 0 8px 0;
}

.hp-totp-secret {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--hp-text);
    background: var(--hp-cream);
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    padding: 10px 16px;
    text-align: center;
    word-break: break-all;
}
