.rtd {
    /* нейтральная шкала */
    --rtd-ink: #0e1726;
    --rtd-ink-2: #5b6675;
    --rtd-line: #e7ebf1;
    --rtd-card: #f2f5f8;
    --rtd-radius: 20px;
    --rtd-radius-sm: 12px;
    --rtd-media-ratio: 1 / 1;
    /* фикс. пропорция коробки под фото — держит CLS = 0 */
    --rtd-gap: 18px;

    /* производные от фирменного цвета */
    --rtd-b-06: color-mix(in srgb, var(--color_brand) 6%, #fff);
    --rtd-b-14: color-mix(in srgb, var(--color_brand) 14%, #fff);
    --rtd-b-26: color-mix(in srgb, var(--color_brand) 26%, #fff);
    --rtd-b-deep: color-mix(in srgb, var(--color_brand) 76%, #0b1220);
    --rtd-b-lite: color-mix(in srgb, var(--color_brand) 84%, #fff);
    --rtd-b-glow: color-mix(in srgb, var(--color_brand) 42%, transparent);

    display: block;
    padding: clamp(30px, 4.5vw, 60px) 0;
    color: var(--rtd-ink);
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.rtd *,
.rtd *::before,
.rtd *::after {
    box-sizing: border-box;
}

.rtd__inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- заголовок ---------- */
.rtd__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 clamp(18px, 2.4vw, 28px);
}

.rtd__title {
    margin: 0;
    font-size: clamp(21px, 2.5vw, 32px);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -.02em;
}

.rtd__title em {
    font-style: normal;
    color: var(--color_brand);
}

.rtd__count {
    font-size: 14px;
    color: var(--rtd-ink-2);
    white-space: nowrap;
}

/* ---------- сетка ---------- */
.rtd__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--rtd-gap);
}

.rtd__item {
    min-width: 0;
}

.rtd__item[hidden] {
    display: none;
}

/* ---------- карточка ---------- */
.rtd__card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 186px;
    padding: 18px 18px 0;
    border-radius: var(--rtd-radius);
    border: 1px solid transparent;
    background: var(--rtd-card);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: background .25s ease, border-color .25s ease,
        box-shadow .25s ease, transform .25s ease;
}

/* фирменная «рейка» слева — подпись компонента */
.rtd__card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--color_brand);
    transform: scaleY(0);
    transform-origin: 50% 0;
    transition: transform .3s cubic-bezier(.22, .7, .3, 1);
}

.rtd__card:hover,
.rtd__card:focus-visible {
    background: #fff;
    border-color: var(--rtd-b-26);
    box-shadow: 0 16px 34px -20px var(--rtd-b-glow);
    transform: translateY(-3px);
}

.rtd__card:hover::before,
.rtd__card:focus-visible::before {
    transform: scaleY(1);
}

.rtd__card:focus-visible {
    outline: 2px solid var(--color_brand);
    outline-offset: 3px;
}

.rtd__name {
    display: block;
    margin: 0;
    padding-right: 36px;
    min-height: calc(1.32em * 2);
    /* две строки — цены в ряду выравниваются */
    font-size: 15px;
    line-height: 1.32;
    font-weight: 600;
    letter-spacing: -.01em;
}

.rtd__price {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--rtd-ink-2);
}

.rtd__price b {
    font-weight: 600;
    color: var(--rtd-ink);
    transition: color .25s ease;
}

.rtd__card:hover .rtd__price b {
    color: var(--color_brand);
}

/* стрелка */
.rtd__go {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--color_brand);
    color: #fff;
    opacity: 0;
    transform: translate(4px, -4px) scale(.86);
    transition: opacity .25s ease, transform .25s ease;
}

.rtd__go svg {
    width: 14px;
    height: 14px;
    display: block;
}

.rtd__card:hover .rtd__go,
.rtd__card:focus-visible .rtd__go {
    opacity: 1;
    transform: none;
}

/* картинка устройства */
.rtd__media {
    display: block;
    width: min(64%, 152px);
    margin: auto 0 0 auto;
    /* прижимаем к правому нижнему углу */
    padding-top: 12px;
    pointer-events: none;
}

.rtd__media img,
.rtd__media svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--rtd-media-ratio);
    object-fit: contain;
    object-position: 100% 100%;
    transform-origin: 100% 100%;
    transition: transform .38s cubic-bezier(.22, .7, .3, 1);
}

.rtd__card:hover .rtd__media img,
.rtd__card:hover .rtd__media svg {
    transform: scale(1.07);
}

/* ---------- CTA «Не нашли нужное?» ---------- */
.rtd__cta {
    grid-column: 1 / -1;
}

.rtd__ctaBox {
    position: relative;
    /* overflow НЕ режем — над ним всплывает тултип */
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 30px);
    flex-wrap: wrap;
    padding: clamp(16px, 2vw, 20px) clamp(18px, 2.4vw, 26px);
    border-radius: var(--rtd-radius);
    color: #fff;
    background:
        radial-gradient(120% 180% at 88% 0%, color-mix(in srgb, #fff 22%, transparent) 0%, transparent 58%),
        linear-gradient(102deg, var(--rtd-b-deep) 0%, var(--color_brand) 52%, var(--rtd-b-lite) 100%);
    box-shadow: 0 18px 36px -24px var(--rtd-b-glow);
}

.rtd__ctaText {
    flex: 1 1 300px;
    min-width: 0;
    font-size: clamp(15px, 1.5vw, 19px);
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0;
}

.rtd__ctaText span {
    font-weight: 400;
    opacity: .92;
}

/* подсказка на «бесплатно» */
.rtd__hint {
    position: relative;
    display: inline-block;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.rtd__hint:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}

.rtd__tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    z-index: 6;
    padding: 7px 12px;
    border-radius: 10px;
    background: #1e2632;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 14px 28px -14px rgba(10, 16, 26, .7);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 5px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.rtd__tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: #1e2632;
}

.rtd__hint:hover .rtd__tip,
.rtd__hint:focus-visible .rtd__tip,
.rtd__hint.is-open .rtd__tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.rtd__ctaPhone {
    font-size: clamp(16px, 1.7vw, 20px);
    font-weight: 700;
    letter-spacing: -.01em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}

.rtd__ctaPhone:hover {
    color: #fff;
    border-bottom-color: currentColor;
}

.rtd__ctaPhone:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 4px;
}

.rtd__ctaBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--rtd-b-deep);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.rtd__ctaBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -12px rgba(10, 16, 26, .55);
}

.rtd__ctaBtn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.rtd__ctaBtn svg {
    width: 15px;
    height: 15px;
}

.rtd__ctaBadge {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, #fff 45%, transparent);
    background: color-mix(in srgb, #fff 14%, transparent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
}

.rtd__ctaBadge svg {
    width: 26px;
    height: 26px;
    display: block;
}

/* ---------- плитка услуг (только для kbt-сайтов) ---------- */
.rtd__services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--rtd-gap);
    margin-top: clamp(18px, 2.4vw, 26px);
}

.rtd__srv {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--rtd-line);
    border-radius: 14px;
    background: #fff;
}

.rtd__srvIco {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--rtd-b-06);
    color: var(--color_brand);
    font-size: 19px;
    line-height: 1;
}

.rtd__srvName {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.rtd__srvVal {
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--rtd-ink-2);
    white-space: nowrap;
}

.rtd__srvVal--accent {
    color: var(--color_brand);
}

/* ---------- кнопка «показать остальные» ---------- */
.rtd__more {
    display: flex;
    justify-content: center;
    margin-top: clamp(18px, 2.4vw, 26px);
}

.rtd__moreBtn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border: 1px solid var(--rtd-b-26);
    border-radius: 999px;
    background: var(--rtd-b-06);
    color: var(--color_brand);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .22s ease, border-color .22s ease, transform .22s ease;
}

.rtd__moreBtn:hover {
    background: var(--rtd-b-14);
    border-color: var(--color_brand);
}

.rtd__moreBtn:active {
    transform: translateY(1px);
}

.rtd__moreBtn:focus-visible {
    outline: 2px solid var(--color_brand);
    outline-offset: 3px;
}

.rtd__moreBtn b {
    font-weight: 700;
}

.rtd__moreIco {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    transition: transform .28s cubic-bezier(.22, .7, .3, 1);
}

.rtd__moreBtn[aria-expanded="true"] .rtd__moreIco {
    transform: rotate(180deg);
}

/* ---------- анимация раскрытия ---------- */
.rtd__item--extra {
    opacity: 0;
    transform: translateY(12px);
}

.rtd__item--extra.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .4s ease, transform .4s cubic-bezier(.22, .7, .3, 1);
}

/* ---------- адаптив ---------- */
@media (max-width:1080px) {

    .rtd__grid,
    .rtd__services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width:760px) {
    .rtd__ctaBox {
        gap: 14px;
    }

    .rtd__ctaText {
        flex: 1 1 100%;
    }

    .rtd__ctaBadge {
        display: none;
    }

    .rtd__ctaBtn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width:520px) {
    .rtd {
        --rtd-gap: 12px;
        --rtd-radius: 16px;
    }

    .rtd__card {
        min-height: 158px;
        padding: 14px 14px 0;
    }

    .rtd__name {
        font-size: 14px;
        padding-right: 0;
    }

    .rtd__go {
        display: none;
    }

    .rtd__media {
        width: min(74%, 120px);
    }

    .rtd__tip {
        white-space: normal;
        width: max-content;
        max-width: 220px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .rtd * {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    .rtd__card:hover {
        transform: none;
    }

    .rtd__item--extra {
        opacity: 1;
        transform: none;
    }
}