:root {
    --bg: #f6f6f3;
    --card: #ffffff;
    --text: #111111;
    --muted: #6b6b6b;
    --border: #ececec;
    --primary: #111111;
    --primary-hover: #2a2a2a;
    --success: #1e7a3d;
    --error: #b1241b;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 480px;
    padding: 40px 36px;
    margin: 0 auto;
}

.brand {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.brand-mark {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

.state {
    display: block;
}

.state.hidden {
    display: none;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
    letter-spacing: -0.01em;
}

.lead {
    margin: 0 0 28px 0;
    color: var(--text);
    line-height: 1.55;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.muted a {
    color: var(--muted);
    text-decoration: underline;
}

.info {
    margin: 0 0 28px 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.info > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 14px 16px;
    align-items: baseline;
}

.info > div + div {
    border-top: 1px solid var(--border);
}

.info dt {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.info dd {
    margin: 0;
    font-size: 15px;
    color: var(--text);
    word-break: break-word;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-spinner.hidden {
    display: none;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 24px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fineprint {
    font-size: 13px;
    color: var(--muted);
    margin: 16px 0 0 0;
    text-align: center;
}

.check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px auto;
}

#state-thanks {
    text-align: center;
}

.footer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer .sep {
    opacity: 0.5;
}

@media (max-width: 520px) {
    .card {
        padding: 32px 24px;
    }
    .info > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    h1 {
        font-size: 22px;
    }
}
