.tools-2fa-page,
.tools-2fa-page * {
    box-sizing: border-box;
    word-break: normal;
    overflow-wrap: anywhere;
}

/* Give this route a quiet canvas so the white tool surfaces have a clear boundary. */
html:has(.tools-2fa-page),
body:has(.tools-2fa-page) {
    background: #f3f7fc;
}

body:has(.tools-2fa-page) .content {
    background: linear-gradient(180deg, #f3f7fc 0%, #f8fafc 62%, #eef4fb 100%);
}

.tools-2fa-page {
    width: min(1400px, calc(100% - 48px));
    margin: 42px auto 76px;
    color: #172237;
}

.tools-2fa-hero {
    padding: 22px 24px;
    border: 1px solid #dce7f5;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%);
    box-shadow: 0 10px 24px rgba(31, 55, 88, .045);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.tools-2fa-hero__copy {
    min-width: 0;
}

.tools-2fa-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #246bfd;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.tools-2fa-eyebrow i {
    font-size: 15px;
}

.tools-2fa-hero h1 {
    margin: 0;
    color: #111c2f;
    font-size: 40px;
    font-weight: 750;
    line-height: 1.24;
}

.tools-2fa-hero__lead {
    max-width: 700px;
    margin: 12px 0 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.75;
}

.tools-2fa-privacy-badge {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    width: min(330px, 100%);
    padding: 14px 16px;
    border: 1px solid #d5e7df;
    border-radius: 8px;
    background: #f4fbf8;
}

.tools-2fa-privacy-badge__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 8px;
    background: #dff5eb;
    color: #087f5b;
    font-size: 22px;
    line-height: 1;
}

.tools-2fa-privacy-badge > div > strong,
.tools-2fa-privacy-badge > div > span {
    display: block;
}

.tools-2fa-privacy-badge > div > strong {
    color: #1f513f;
    font-size: 13px;
    line-height: 1.45;
}

.tools-2fa-privacy-badge > div > span {
    margin-top: 3px;
    color: #668277;
    font-size: 12px;
    line-height: 1.45;
}

.tools-2fa-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.tools-2fa-panel {
    min-width: 0;
    padding: 24px;
    border: 1px solid #d7e3f2;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 14px 30px rgba(31, 55, 88, .075), 0 2px 6px rgba(31, 55, 88, .035);
}

.tools-2fa-workspace > .tools-2fa-panel:first-child {
    display: flex;
    flex-direction: column;
}

.tools-2fa-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.tools-2fa-panel__head h2 {
    margin: 0;
    color: #172237;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.tools-2fa-panel__head p {
    margin: 5px 0 0;
    color: #7a8798;
    font-size: 13px;
    line-height: 1.55;
}

.tools-2fa-panel__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf4ff;
    color: #2164d8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.tools-2fa-field {
    margin-top: 18px;
}

.tools-2fa-field:first-of-type {
    margin-top: 0;
}

.tools-2fa-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.tools-2fa-field label span {
    color: #8b97a8;
    font-size: 12px;
    font-weight: 400;
}

.tools-2fa-input,
.tools-2fa-select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #d6deea;
    border-radius: 7px;
    outline: 0;
    background: #fbfcfe;
    color: #172237;
    font: inherit;
    font-size: 14px;
    line-height: 22px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.tools-2fa-input:hover,
.tools-2fa-select:hover {
    border-color: #a9b8cc;
    background: #fff;
}

.tools-2fa-input:focus,
.tools-2fa-select:focus {
    border-color: #4d83ed;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, .12);
}

.tools-2fa-input--secret {
    color: #163e77;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 15px;
    letter-spacing: 0;
}

.tools-2fa-helper {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    color: #788697;
    font-size: 12px;
    line-height: 1.55;
}

.tools-2fa-helper i {
    margin-top: 3px;
    color: #4b83df;
}

.tools-2fa-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

/* Keep the paired issuer/account fields on one shared baseline. */
.tools-2fa-form-grid > .tools-2fa-field {
    margin-top: 0;
}

.tools-2fa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e7edf5;
}

/* Use the same control height and rhythm for every action-bar button. */
.tools-2fa-actions .tools-2fa-button--quiet {
    min-height: 44px;
    padding: 0 17px;
    font-size: 13px;
}

.tools-2fa-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 8px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.tools-2fa-button:hover {
    transform: translateY(-1px);
}

.tools-2fa-button:focus-visible,
.tools-2fa-link:focus-visible {
    outline: 3px solid rgba(36, 107, 253, .22);
    outline-offset: 2px;
}

.tools-2fa-button--primary {
    background: #246bfd;
    box-shadow: 0 7px 16px rgba(36, 107, 253, .2);
    color: #fff;
}

.tools-2fa-button--primary:hover {
    background: #1759db;
}

.tools-2fa-button--secondary {
    border-color: #d4deeb;
    background: #fff;
    color: #3c4b60;
}

.tools-2fa-button--secondary:hover {
    border-color: #a9bde0;
    background: #f6f9ff;
    color: #175cd3;
}

.tools-2fa-button--quiet {
    min-height: 38px;
    padding: 0 12px;
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #5d6c7f;
    font-size: 12px;
}

.tools-2fa-button[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.tools-2fa-feedback {
    min-height: 22px;
    margin-top: 13px;
    color: #b54708;
    font-size: 12px;
    line-height: 1.55;
}

.tools-2fa-feedback.is-success {
    color: #087f5b;
}

.tools-2fa-feedback.is-error {
    color: #b42318;
}

.tools-2fa-result {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(220px, .88fr);
    grid-template-areas:
        "head head"
        "code qr"
        "privacy privacy";
    align-items: stretch;
    column-gap: 18px;
    align-content: start;
    min-height: 100%;
    overflow: hidden;
    border-color: #cbdcf4;
    background: linear-gradient(180deg, #edf5ff 0%, #f7fbff 100%);
}

.tools-2fa-result::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: #246bfd;
    content: "";
}

.tools-2fa-result__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    grid-area: head;
}

.tools-2fa-result__head h2 {
    margin: 0;
    color: #14213a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.tools-2fa-result__head p {
    margin: 5px 0 0;
    color: #718096;
    font-size: 12px;
    line-height: 1.5;
}

.tools-2fa-result__clock {
    flex: 0 0 auto;
    color: #246bfd;
    font-size: 20px;
    line-height: 1;
}

.tools-2fa-code-panel {
    grid-area: code;
    display: flex;
    flex-direction: column;
    margin-top: 24px;
    padding: 18px 18px 16px;
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(49, 92, 148, .045);
}

.tools-2fa-code-panel__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #738198;
    font-size: 12px;
    font-weight: 600;
}

.tools-2fa-code-panel__code {
    display: block;
    margin: 8px 0 3px;
    color: #123f85;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 48px;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.15;
    text-align: center;
}

.tools-2fa-code-panel__code.is-empty {
    color: #b4bfce;
    letter-spacing: 0;
}

.tools-2fa-code-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #8390a3;
    font-size: 12px;
}

.tools-2fa-progress {
    height: 5px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef8;
}

.tools-2fa-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #246bfd;
    transition: width .25s linear;
}

.tools-2fa-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.tools-2fa-qr-panel {
    display: flex;
    grid-area: qr;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    min-width: 0;
    margin-top: 24px;
    padding-top: 0;
    padding-left: 18px;
    border-top: 0;
    border-left: 1px solid #e1e8f2;
}

.tools-2fa-qr {
    display: grid;
    width: 150px;
    height: 150px;
    place-items: center;
    border: 1px solid #dbe4f0;
    border-radius: 7px;
    background: #fff;
}

.tools-2fa-qr canvas {
    display: block;
    width: 132px;
    height: 132px;
    image-rendering: pixelated;
}

.tools-2fa-qr.is-empty::before {
    width: 105px;
    color: #9ba8b9;
    content: "生成密钥后显示二维码";
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.tools-2fa-qr-copy h3 {
    margin: 0;
    color: #26364c;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.tools-2fa-qr-copy p {
    margin: 6px 0 0;
    color: #788697;
    font-size: 12px;
    line-height: 1.65;
    text-align: center;
}

.tools-2fa-qr-copy .tools-2fa-button {
    display: flex;
    width: 100%;
    margin-top: 11px;
}

.tools-2fa-qr-copy {
    width: 100%;
    min-width: 0;
}

.tools-2fa-privacy-note {
    grid-area: privacy;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 13px 14px;
    border: 1px solid #dbe7f6;
    border-radius: 7px;
    background: #f8fbff;
    color: #53657d;
    font-size: 12px;
    line-height: 1.65;
}

.tools-2fa-privacy-note i {
    margin-top: 3px;
    color: #246bfd;
}

.tools-2fa-privacy-note strong {
    color: #2b4569;
    font-weight: 700;
}

.tools-2fa-footnotes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.tools-2fa-footnote {
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 6px 18px rgba(31, 55, 88, .04);
}

.tools-2fa-footnote > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 7px;
    background: #edf4ff;
    color: #246bfd;
    font-size: 13px;
}

.tools-2fa-footnote strong,
.tools-2fa-footnote span {
    display: block;
}

.tools-2fa-footnote strong {
    color: #344054;
    font-size: 12px;
    line-height: 1.5;
}

.tools-2fa-footnote span {
    margin-top: 3px;
    color: #7d8999;
    font-size: 12px;
    line-height: 1.55;
}

.tools-2fa-faq {
    margin-top: 24px;
    padding: 26px 24px 24px;
    border: 1px solid #d7e3f2;
    border-radius: 8px;
    background: #f8fbff;
    box-shadow: 0 10px 24px rgba(31, 55, 88, .045);
}

.tools-2fa-faq__intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 21px;
    border-bottom: 1px solid #dfe9f5;
}

.tools-2fa-faq__intro .tools-2fa-eyebrow {
    margin-bottom: 8px;
}

.tools-2fa-faq__intro h2 {
    margin: 0;
    color: #172237;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
}

.tools-2fa-faq__intro p:last-child {
    margin: 7px 0 0;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.tools-2fa-faq__trust {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #cfe5dc;
    border-radius: 999px;
    background: #f2fbf7;
    color: #28745d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tools-2fa-faq__trust i {
    color: #16805f;
}

.tools-2fa-faq__groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.tools-2fa-faq-group {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    background: #fff;
}

.tools-2fa-faq-group__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e7eef7;
}

.tools-2fa-faq-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    background: #edf4ff;
    color: #246bfd;
    font-size: 15px;
}

.tools-2fa-faq-group:nth-child(2) .tools-2fa-faq-group__icon {
    background: #eef8f5;
    color: #16805f;
}

.tools-2fa-faq-group:nth-child(3) .tools-2fa-faq-group__icon {
    background: #fff6e8;
    color: #b76b09;
}

.tools-2fa-faq-group__head h3 {
    margin: 0;
    color: #26364c;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.tools-2fa-faq-group__head p {
    margin: 3px 0 0;
    color: #8995a6;
    font-size: 11px;
    line-height: 1.45;
}

.tools-2fa-faq-list {
    margin-top: 5px;
}

.tools-2fa-faq-item {
    border-bottom: 1px solid #edf2f7;
}

.tools-2fa-faq-item:last-child {
    border-bottom: 0;
}

.tools-2fa-faq-item summary {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 8px 1px;
    color: #344054;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
    list-style: none;
    outline: 0;
}

.tools-2fa-faq-item summary::-webkit-details-marker {
    display: none;
}

.tools-2fa-faq-item summary:focus-visible {
    border-radius: 5px;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, .14);
}

.tools-2fa-faq-item summary > span:nth-child(2) {
    min-width: 0;
}

.tools-2fa-faq-item__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 22px;
    border-radius: 5px;
    background: #f1f5fa;
    color: #8190a5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.tools-2fa-faq-item summary > i {
    color: #8a98aa;
    font-size: 15px;
    text-align: center;
    transition: transform .18s ease, color .18s ease;
}

.tools-2fa-faq-item[open] summary > i {
    color: #246bfd;
    transform: rotate(180deg);
}

.tools-2fa-faq-item[open] summary {
    color: #1f4f97;
}

.tools-2fa-faq-item[open] .tools-2fa-faq-item__index {
    background: #eaf2ff;
    color: #246bfd;
}

.tools-2fa-faq-item__answer {
    margin: 0 0 8px 37px;
    padding: 10px 11px 11px;
    border-left: 2px solid #dce9fb;
    background: #f8fbff;
    color: #68788d;
    font-size: 12px;
    line-height: 1.7;
}

.tools-2fa-faq-item__answer p {
    margin: 0;
}

.tools-2fa-faq-item__answer code {
    padding: 1px 4px;
    border-radius: 4px;
    background: #edf3fb;
    color: #2159a5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}

@media (max-width: 1080px) {
    .tools-2fa-hero {
        display: block;
        padding: 20px 18px;
    }

    .tools-2fa-privacy-badge {
        margin-top: 18px;
    }

    .tools-2fa-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .tools-2fa-result {
        min-height: 0;
    }

    .tools-2fa-faq__groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    /* Keep the fixed consultation rail from covering the result column. */
    .tools-2fa-page {
        padding-right: 80px;
    }
}

@media (max-width: 720px) {
    .tools-2fa-page {
        width: min(100% - 28px, 620px);
        margin-top: 28px;
        margin-bottom: 48px;
    }

    .tools-2fa-hero {
        display: block;
    }

    .tools-2fa-privacy-badge {
        width: 100%;
        margin-top: 18px;
    }

    .tools-2fa-panel {
        padding: 19px 16px;
    }

    .tools-2fa-faq {
        padding: 20px 16px 16px;
    }

    .tools-2fa-faq__intro {
        display: block;
    }

    .tools-2fa-faq__trust {
        margin-top: 14px;
    }

    .tools-2fa-faq__groups {
        grid-template-columns: minmax(0, 1fr);
    }

    .tools-2fa-form-grid,
    .tools-2fa-footnotes {
        grid-template-columns: minmax(0, 1fr);
    }

    .tools-2fa-result {
        display: flex;
        flex-direction: column;
    }

    .tools-2fa-qr-panel {
        flex-direction: row;
        gap: 13px;
        align-items: center;
        margin-top: 18px;
        padding-top: 18px;
        padding-left: 0;
        border-top: 1px solid #e1e8f2;
        border-left: 0;
    }

    .tools-2fa-qr {
        width: 128px;
        height: 128px;
    }

    .tools-2fa-qr canvas {
        width: 112px;
        height: 112px;
    }
}

@media (max-width: 430px) {
    .tools-2fa-hero {
        padding: 18px 16px;
    }

    .tools-2fa-hero h1 {
        font-size: 28px;
    }

    .tools-2fa-hero__lead {
        font-size: 14px;
    }

    .tools-2fa-faq__intro h2 {
        font-size: 21px;
    }

    .tools-2fa-faq-group {
        padding: 13px;
    }

    .tools-2fa-panel__head {
        display: block;
    }

    .tools-2fa-panel__step {
        margin-top: 10px;
    }

    .tools-2fa-code-panel__code {
        font-size: 33px;
    }

    .tools-2fa-qr-panel {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-top: 18px;
        padding-top: 18px;
        border-top: 1px solid #e1e8f2;
    }

    .tools-2fa-qr {
        margin: 0 auto;
    }

    .tools-2fa-qr-copy {
        width: auto;
        text-align: center;
    }

    .tools-2fa-qr-copy h3,
    .tools-2fa-qr-copy p {
        text-align: center;
    }

    .tools-2fa-qr-copy .tools-2fa-button {
        display: inline-flex;
        width: 100%;
    }

    .tools-2fa-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tools-2fa-actions .tools-2fa-button {
        width: 100%;
    }

    .tools-2fa-actions .tools-2fa-button--primary {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tools-2fa-button,
    .tools-2fa-input,
    .tools-2fa-select,
    .tools-2fa-progress span {
        transition: none;
    }
}
