.pair-layout {
    grid-template-columns: 1.4fr 0.9fr;
}

.pair-hero {
    grid-template-columns: 1.35fr 0.8fr;
}

.pair-stack {
    display: grid;
    gap: 16px;
}

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

.field-help {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.progress-hint {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 20px;
    color: var(--accent-2);
    font-size: 14px;
    font-weight: 700;
}

.progress-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(29, 78, 216, 0.18);
    border-top-color: var(--accent-2);
    animation: pair-spin 0.8s linear infinite;
}

.status-banner {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(70, 51, 34, 0.10);
    font-weight: 700;
    line-height: 1.7;
}

.status-muted {
    background: rgba(255, 255, 255, 0.88);
    color: var(--muted);
}

.status-info {
    background: rgba(29, 78, 216, 0.10);
    color: #1d4ed8;
}

.status-success {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.status-warn {
    background: rgba(200, 95, 47, 0.12);
    color: #9a4d28;
}

.status-danger {
    background: rgba(185, 28, 28, 0.10);
    color: #b91c1c;
}

.pair-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
    flex-wrap: wrap;
}

.inline-field {
    min-width: 170px;
    flex: 0 1 220px;
}

.code-frame {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(70, 51, 34, 0.12);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.32), transparent 32%),
        linear-gradient(140deg, #d07a3f 0%, #1d4ed8 58%, #0f766e 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.code-frame::after {
    content: "";
    position: absolute;
    inset: -20% auto -20% -35%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    opacity: 0;
    transform: rotate(12deg);
}

.code-frame.is-loading::after {
    opacity: 1;
    animation: pair-sheen 1.2s ease-in-out infinite;
}

.code-frame span {
    display: block;
    color: #fff;
    font-size: clamp(26px, 4.2vw, 42px);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-align: center;
}

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

.compact-grid {
    margin-top: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(70, 51, 34, 0.08);
}

.info-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.info-card strong {
    display: block;
    font-size: 16px;
    line-height: 1.4;
    word-break: break-word;
}

.action-btn[disabled] {
    opacity: 0.56;
    cursor: not-allowed;
    pointer-events: none;
}

.action-btn.is-loading {
    position: relative;
    padding-right: 42px;
}

.action-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: pair-spin 0.8s linear infinite;
}

.action-btn-secondary.is-loading::after {
    border-color: rgba(29, 78, 216, 0.18);
    border-top-color: var(--accent-2);
}

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

@keyframes pair-sheen {
    0% {
        transform: translateX(-12%) rotate(12deg);
    }

    100% {
        transform: translateX(420%) rotate(12deg);
    }
}

@media (max-width: 1080px) {
    .pair-layout,
    .pair-hero,
    .form-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }
}
