.its-badge-page {
    max-width: 1180px;
    margin: 0 auto 3rem;
    color: #172033;
}

.its-badge-page * {
    box-sizing: border-box;
}

.its-badge-hero {
    margin-bottom: 1.5rem;
    padding: 2rem 2.1rem;
    border: 1px solid #e6ebf2;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.its-badge-hero__content {
    max-width: 860px;
}

.its-badge-hero__label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 1rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: rgba(56,103,214,.08);
    color: #3867d6;
    font-size: .8rem;
    font-weight: 700;
}

.its-badge-title {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    color: #14213d;
}

.its-badge-hero__lead {
    max-width: 800px;
    margin: 0;
    color: #5c667a;
    font-size: 1.05rem;
    line-height: 1.7;
}

.its-badge-hero__lead--secondary {
    margin-top: .7rem;
    font-size: .95rem;
}

.its-badge-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e7ebf1;
    border-radius: 18px;
    background: #fff;
}

.its-badge-section__head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.3rem;
}

.its-badge-step {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3867d6;
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
}

.its-badge-section__head h2 {
    margin: 0 0 .35rem;
    color: #172033;
    font-size: 1.25rem;
    font-weight: 800;
}

.its-badge-section__head p {
    margin: 0;
    color: #687386;
    line-height: 1.6;
}

.its-badge-url-box {
    padding: 1.1rem;
    border-radius: 14px;
    background: #f8fafc;
}

.its-badge-url-box label {
    display: block;
    margin-bottom: .55rem;
    color: #2c374b;
    font-size: .88rem;
    font-weight: 700;
}

.its-badge-url-row {
    display: flex;
    gap: .75rem;
}

.its-badge-input {
    width: 100%;
    min-height: 46px;
    padding: .75rem .9rem;
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #172033;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.its-badge-input:focus {
    border-color: #3867d6;
    box-shadow: 0 0 0 3px rgba(56,103,214,.1);
}

.its-badge-input.is-error {
    border-color: #df4f4f;
}

.its-badge-url-hint {
    margin-top: .55rem;
    color: #7a8496;
    font-size: .8rem;
}

.its-badge-url-hint.is-error {
    color: #c83d3d;
}

.its-badge-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .7rem 1.1rem;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none !important;
    font-weight: 700;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.its-badge-button:hover {
    transform: translateY(-1px);
}

.its-badge-button--primary {
    background: #3867d6;
    color: #fff !important;
}

.its-badge-button--secondary {
    border: 1px solid #dfe5ed;
    background: #fff;
    color: #25324a !important;
}

.its-badge-variants {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 1rem;
}

.its-badge-variant {
    overflow: hidden;
    border: 1px solid #e4e9f0;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.its-badge-variant:hover {
    transform: translateY(-1px);
    border-color: #cfd8e6;
}

.its-badge-variant.is-active {
    border-color: #3867d6;
    box-shadow: 0 0 0 3px rgba(56,103,214,.08);
}

.its-badge-variant__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem .9rem;
}

.its-badge-variant__top h3 {
    margin: 0 0 .2rem;
    color: #172033;
    font-size: 1rem;
    font-weight: 800;
}

.its-badge-variant__top p {
    margin: 0;
    color: #7b8596;
    font-size: .82rem;
}

.its-badge-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.its-badge-radio span {
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
    border: 2px solid #cfd7e4;
    border-radius: 50%;
    background: #fff;
}

.its-badge-radio input:checked + span {
    border-color: #3867d6;
}

.its-badge-radio input:checked + span::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #3867d6;
}

.its-badge-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 155px;
    padding: 1.25rem;
}

.its-badge-preview--light {
    border-top: 1px solid #edf1f6;
    background:
        linear-gradient(45deg,#f3f5f8 25%,transparent 25%),
        linear-gradient(-45deg,#f3f5f8 25%,transparent 25%),
        linear-gradient(45deg,transparent 75%,#f3f5f8 75%),
        linear-gradient(-45deg,transparent 75%,#f3f5f8 75%);
    background-size: 18px 18px;
    background-position: 0 0,0 9px,9px -9px,-9px 0;
}

.its-badge-preview--dark {
    border-top: 1px solid #303744;
    background: #151922;
}

.itsnew-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}

.itsnew-badge:hover {
    transform: translateY(-1px);
}

.itsnew-badge--light {
    border: 1px solid #dfe5ed;
    background: #fff;
    color: #202634 !important;
    box-shadow: 0 5px 16px rgba(35,53,85,.08);
}

.itsnew-badge--dark {
    border: 1px solid #394253;
    background: #222936;
    color: #f6f8fb !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.itsnew-badge__logo {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
}

.itsnew-badge__text strong {
    color: #3867d6;
    font-weight: 800;
}

.itsnew-badge--dark .itsnew-badge__text strong {
    color: #56d8bc;
}

.itsnew-badge__arrow {
    margin-left: 1px;
    opacity: .55;
    font-size: 14px;
}

.its-badge-code-box {
    overflow: hidden;
    border: 1px solid #e2e7ee;
    border-radius: 14px;
    background: #f8fafc;
}

.its-badge-code-box__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem .9rem;
    border-bottom: 1px solid #e6eaf0;
    background: #fff;
}

.its-badge-code-box__head strong {
    color: #25324a;
    font-size: .88rem;
}

.its-badge-copy {
    border: 0;
    border-radius: 8px;
    padding: .55rem .8rem;
    background: #3867d6;
    color: #fff;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
}

.its-badge-code {
    display: block;
    width: 100%;
    min-height: 190px;
    resize: vertical;
    border: 0;
    outline: 0;
    padding: 1rem;
    background: #10151f;
    color: #e9edf5;
    font: 12px/1.6 Consolas,Monaco,monospace;
}

.its-badge-copy-status {
    min-height: 35px;
    padding: .55rem .9rem;
    color: #6d788a;
    font-size: .8rem;
}

.its-badge-copy-status.is-success {
    color: #16895b;
}

.its-badge-copy-status.is-error {
    color: #c54141;
}

.its-badge-info-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1rem;
}

.its-badge-info {
    padding: 1.25rem;
    border: 1px solid #e5eaf1;
    border-radius: 16px;
    background: #fff;
}

.its-badge-info__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: .8rem;
    border-radius: 10px;
    background: rgba(56,103,214,.08);
    color: #3867d6;
    font-weight: 800;
}

.its-badge-info h3 {
    margin: 0 0 .4rem;
    font-size: 1rem;
    font-weight: 800;
}

.its-badge-info p {
    margin: 0;
    color: #6d788a;
    line-height: 1.6;
    font-size: .88rem;
}

.its-badge-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(90deg,rgba(56,103,214,.04),rgba(86,216,188,.05));
}

.its-badge-help__content h2 {
    margin: 0 0 .35rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.its-badge-help__content p {
    margin: 0;
    color: #697487;
    line-height: 1.6;
}

@media (max-width:820px) {
    .its-badge-variants,
    .its-badge-info-grid {
        grid-template-columns: 1fr;
    }

    .its-badge-help {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width:620px) {
    .its-badge-hero,
    .its-badge-section {
        padding: 1rem;
        border-radius: 14px;
    }

    .its-badge-url-row {
        flex-direction: column;
    }

    .its-badge-section__head {
        gap: .7rem;
    }

    .its-badge-step {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    .its-badge-code-box__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .its-badge-copy,
    .its-badge-button {
        width: 100%;
    }

    .itsnew-badge {
        max-width: 100%;
        white-space: normal;
        line-height: 1.25;
    }
}

/* ===== Button polish ===== */

.its-badge-button,
.its-badge-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    text-decoration: none !important;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.its-badge-button:hover,
.its-badge-copy:hover {
    transform: translateY(-1px);
}

.its-badge-button:active,
.its-badge-copy:active {
    transform: translateY(0);
}

.its-badge-button:focus-visible,
.its-badge-copy:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(56, 103, 214, .16);
}

/* Main action: "Обновить код" */
.its-badge-button--primary {
    flex: 0 0 auto;
    min-width: 138px;
    background: #3867d6;
    border-color: #3867d6;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(56, 103, 214, .18);
}

.its-badge-button--primary:hover {
    background: #315bc0;
    border-color: #315bc0;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(56, 103, 214, .24);
}

/* "Скопировать код" */
.its-badge-copy {
    min-width: 142px;
    background: #3867d6;
    border-color: #3867d6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 103, 214, .16);
}

.its-badge-copy:hover {
    background: #315bc0;
    border-color: #315bc0;
    color: #fff;
}

/* Secondary CTA: "Перейти в каталог сервисов" */
.its-badge-button--secondary {
    flex: 0 0 auto;
    min-width: 210px;
    background: #fff;
    border-color: #d7deea;
    color: #25324a !important;
    box-shadow: 0 2px 8px rgba(32, 64, 128, .05);
}

.its-badge-button--secondary:hover {
    background: #f7f9fc;
    border-color: #bfc9da;
    color: #18233d !important;
}

/* Input + action should look like one balanced control row */
.its-badge-url-row {
    align-items: stretch;
}

.its-badge-url-row .its-badge-input {
    min-height: 42px;
}

.its-badge-code-box__head {
    min-height: 58px;
}

/* Mobile: full-width buttons, but still one line */
@media (max-width: 620px) {
    .its-badge-url-row {
        gap: 10px;
    }

    .its-badge-button,
    .its-badge-copy,
    .its-badge-button--primary,
    .its-badge-button--secondary {
        width: 100%;
        min-width: 0;
    }

    .its-badge-code-box__head {
        gap: 10px;
    }
}
