:root {
    color-scheme: dark;
    --ink: #f2eee4;
    --muted: #a5b3af;
    --surface: #0d211d;
    --surface-strong: #071713;
    --line: rgba(242, 238, 228, 0.2);
    --gold: #c7a85d;
    --danger: #e3a29b;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--surface-strong);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.recovery-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 80% 10%, rgba(199, 168, 93, 0.12), transparent 34%),
        linear-gradient(145deg, var(--surface) 0%, var(--surface-strong) 68%);
}

.recovery-panel {
    width: min(100%, 820px);
    padding: clamp(28px, 6vw, 64px);
    border: 1px solid var(--line);
    background: rgba(7, 23, 19, 0.78);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.22em;
}

h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    max-width: 12ch;
    font-size: clamp(2.55rem, 6vw, 4.7rem);
    font-weight: 500;
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 clamp(34px, 6vw, 58px);
    padding: 0;
    list-style: none;
}

.progress li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.progress li[aria-current="step"],
.progress li.is-complete {
    border-color: var(--gold);
    color: var(--ink);
}

.progress span {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.68rem;
}

.progress li.is-complete span {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--surface-strong);
}

.intro,
.warning {
    color: var(--muted);
    line-height: 1.65;
}

.intro {
    margin: 24px 0 34px;
}

.warning {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 0.86rem;
}

label {
    display: block;
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

fieldset {
    margin: 0;
    padding: 24px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

fieldset:first-of-type {
    padding-top: 0;
    border-top: 0;
}

legend {
    margin: 0 0 8px;
    padding: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.field-note {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

input,
button {
    width: 100%;
    min-height: 56px;
    border-radius: 0;
    font: inherit;
}

input {
    padding: 0 16px;
    border: 1px solid var(--line);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

input:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(199, 168, 93, 0.18);
}

button {
    margin-top: 20px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #10251f;
    cursor: pointer;
    font-weight: 750;
}

button:hover,
button:focus-visible {
    background: #d4ba7a;
}

button:focus-visible,
.primary-link:focus-visible {
    outline: 3px solid rgba(199, 168, 93, 0.32);
    outline-offset: 3px;
}

.alert {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-left: 3px solid var(--danger);
    background: rgba(227, 162, 155, 0.08);
    color: var(--danger);
    line-height: 1.5;
}

.transaction-note {
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.success-mark {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 0 24px;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.5rem;
}

.primary-link {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: var(--surface-strong);
    font-weight: 750;
    text-decoration: none;
}

.primary-link:hover {
    background: #d4ba7a;
}

@media (max-width: 640px) {
    .recovery-shell {
        padding: 14px;
    }

    .recovery-panel {
        padding: 26px 20px 32px;
    }

    .progress li {
        align-items: flex-start;
        flex-direction: column;
        font-size: 0.68rem;
    }

    .field-pair {
        grid-template-columns: 1fr;
    }
}
