.totp-generator {
    margin-top: 1.5rem;
    padding: clamp(1rem, 3vw, 1.6rem);
    background: #f0f7f7;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.totp-generator label { display: block; margin: 1rem 0 .4rem; font-weight: 700; }
.totp-name { width: 100%; min-height: 44px; padding: .65rem .75rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.totp-name-info { margin-top: .4rem; font-size: .9rem; }
.totp-name[aria-invalid="true"] { border: 2px solid var(--danger); }
.totp-secret {
    display: block;
    width: 100%;
    min-height: 56px;
    padding: .75rem;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--brand-dark);
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
    font-size: clamp(.75rem, 2.5vw, 1.35rem);
    font-weight: 700;
    letter-spacing: .025em;
}

.totp-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.totp-actions button { min-height: 44px; cursor: pointer; }
.totp-actions button:disabled { opacity: .6; cursor: default; }
.totp-status { min-height: 1.7em; margin-top: .75rem; }
.totp-qr-panel { padding-top: 1rem; border-top: 1px solid var(--line); }
.totp-qr-panel[hidden] { display: none; }
.totp-qr-panel canvas { display: block; width: min(343px, 100%); height: auto; background: #fff; image-rendering: pixelated; }
.totp-account { margin-top: .75rem; font-weight: 700; overflow-wrap: anywhere; }
.totp-instructions { margin-top: 2rem; }
.totp-instructions ol { padding-left: 1.4rem; }
.totp-instructions li + li { margin-top: .6rem; }
.totp-instructions p { margin-top: 1rem; }
.totp-sources { font-size: .9rem; }
.high-contrast .totp-generator { color: #fff; background: #000; border-color: #fff; }

@media (max-width: 480px) {
    .totp-actions { flex-direction: column; }
    .totp-actions button { width: 100%; }
    .totp-secret { padding-inline: .4rem; letter-spacing: 0; }
}
