/* ==========================================================================
   FSINET — Web index. Section components.
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.hero__title {
    text-align: center;
    color: var(--color-text);
    font-size: var(--h1);
    font-weight: 500;
    line-height: 1.2;
}

/* ==========================================================================
   Bento grid
   ========================================================================== */
.bento {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.bento__card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* left stacked column: check balance + autopay */
.bento__col {
    flex: 1 1 284px;
    min-width: 284px;
    height: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bento__col .bento__card { flex: 1 1 0; height: 152px; }

.bento__card--balance  { background: var(--color-primary-light); }
.bento__card--autopay  { background: var(--color-bg); }
.bento__card--topup    { background: var(--color-primary); flex: 1 1 284px; min-width: 284px; height: 320px; }
.bento__card--app      { background: var(--color-bg); flex: 1 1 584px; min-width: 584px; height: 320px;
                         display: flex; flex-direction: column; justify-content: space-between; }
.bento__card--max { background: var(--color-primary-light); flex: 1 1 100%; min-width: 374px; height: 172px; }

.bento__card-title {
    position: relative;
    z-index: 2;
    font-size: var(--h4);
    font-weight: 500;
    line-height: 1.2;
}
.bento__card--balance .bento__card-title,
.bento__card--topup   .bento__card-title { color: var(--color-white); }
.bento__card--autopay .bento__card-title { color: var(--color-text-dark); }

/* decorative illustrations inside bento cards */
.bento__img { position: absolute; z-index: 1; pointer-events: none; object-fit: contain; }

.bento__card--balance .bento__img { width: 185px; height: 185px; bottom: -42px; left: calc(50% + 4px); }
.bento__card--autopay .bento__img { width: 168px; height: 168px; right: -32px; bottom: -24px; }
.bento__card--topup   .bento__img { width: 282px; height: 282px; right: -100px; bottom: -16px; }

/* gradient glow behind the top-up bank card */
.bento__glow--topup { width: 300px; height: 300px; right: -120px; bottom: -110px; }

/* ---- Mobile-app card ---- */
.app-card__head { position: relative; z-index: 2; }
.app-card__head .h3 { color: var(--color-text-dark); }
.app-card__sub { margin-top: 8px; font-size: var(--b2); color: var(--color-text-dark); }

.app-badges {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 258px;
    max-width: 100%;
    margin-top: 16px;
}

/* ---- Store link buttons (Google Play / App Store / RuStore / AppGallery) ---- */
.store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 125px;
    height: 38px;
    padding: 0 10px;
    background: #000;
    border-radius: 12px;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 14px;
    color: #fafafa;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}
.store-badge__icon { display: block; flex-shrink: 0; }
.store-badge--google-play .store-badge__icon { width: 20px; height: 23.361px; }
.store-badge--app-store   .store-badge__icon { width: 19.099px; height: 21.776px; }
.store-badge--rustore     .store-badge__icon { width: 24px; height: 24px; }
.store-badge--appgallery  .store-badge__icon { width: 25.328px; height: 25.333px; }

/* small variant used on the FAQ page */
.store-badge--sm {
    width: 114px;
    height: 33px;
    gap: 6px;
    border-radius: 11px;
    font-size: 13px;
}
.store-badge--sm.store-badge--google-play .store-badge__icon { width: 17.978px; height: 21px; }
.store-badge--sm.store-badge--app-store   .store-badge__icon { width: 15px; height: 17.103px; }
.store-badge--sm.store-badge--rustore     .store-badge__icon { width: 20px; height: 20px; }
.store-badge--sm.store-badge--appgallery  .store-badge__icon { width: 20px; height: 20.004px; }

.app-card__phone {
    position: absolute;
    z-index: 1;
    right: 53px;
    bottom: -200px;
    width: 238px;
    pointer-events: none;
}
.app-card__glow { width: 495px; height: 507px; right: -58px; bottom: -300px; }
.app-card__deco { position: absolute; z-index: 1; pointer-events: none; }
.app-card__deco--check { width: 77px;  right: 18px; bottom: 190px; }
.app-card__deco--cube  { width: 102px; right: 259px; bottom: -55px; transform: rotate(15deg); }
.app-card__deco--mail  { width: 156px; right: -58px; bottom: -48px; }

/* Payment-request and video-message landing pages */
.session-slogan { font-size: var(--h4); line-height: 1.4; text-align: center; }
.session-slogan__accent { color: var(--color-primary); }
.session-slogan__line { display: block; }
.session-card {
    display: flex;
    width: 100%;
    gap: 48px;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
}
.session-card__details { flex: 1; min-width: 0; }
.session-card__details .h2 { overflow-wrap: anywhere; }
.session-card__number { white-space: nowrap; }
.session-card__form { flex: 1; min-width: 0; padding: 24px; border-radius: var(--radius-md); background: var(--color-white); }
.session-card__hint { font-size: var(--b1); color: var(--color-text-muted); }
.session-card__form .pay-field { gap: 8px; }
.session-details { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.session-details > div { display: flex; flex-wrap: wrap; column-gap: 16px; }
.session-details dt { color: var(--color-text-muted); min-width: 112px; }
.session-details dd { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.message-session { display: flex; flex-direction: column; gap: 32px; width: 100%; max-width: 584px; }
.message-session__sender { margin: 24px 0; font-size: var(--h4); line-height: 1.5; overflow-wrap: anywhere; }
.message-session > .bento__card--app { flex: none; width: 100%; min-width: 0; }

/* ---- Telegram card ---- */
.bento__card--max .h3 { color: var(--color-white); position: relative; z-index: 2; }
.bento__card--max .app-card__sub { color: var(--color-white); position: relative; z-index: 2; }
/* gradient blobs behind the decorations (positions as % of card width, from Figma) */
.tg__glow {
    position: absolute;
    z-index: 0;
    width: 256px;
    height: 256px;
    border-radius: 90px;
    background: radial-gradient(circle at 32% 30%, var(--grad-from) 0%, var(--grad-to) 100%);
    pointer-events: none;
}
.tg__glow--1 { left: 79.8%;  margin-left: -128px; bottom: -190px; transform: rotate(45deg); }
.tg__glow--2 { left: 58.2%;  margin-left: -128px; bottom: -52px;  transform: rotate(-135deg); }
.tg__glow--3 { left: 36.2%;  margin-left: -128px; bottom: -190px; transform: rotate(45deg); }
.tg__glow--4 { left: 101.3%; margin-left: -128px; bottom: -52px;  transform: rotate(45deg); }

/* decorations spread across the full-width card (positions as % of card width, from Figma) */
.tg__deco { position: absolute; z-index: 1; pointer-events: none; }
.tg__deco--card  {
    width: 304px;
    left: 62.2%;
    margin-left: -158px;
    bottom: -100px;
}
.tg__deco--icon  {
    width: 164px; left: 46.3%; margin-left: -82px;  bottom: 0;
}
.tg__deco--mail  { width: 111px; left: 77.8%; margin-left: -55px;  bottom: 39px; }
.tg__deco--box   { width: 182px; left: 91.7%; margin-left: -91px;  bottom: -60px; transform: rotate(13deg); }
.tg__deco--check { display: none; }

/* ==========================================================================
   Services + Advantages wrapper
   ========================================================================== */
.block-stack {
    display: flex;
    flex-direction: column;
    gap: 128px;
    padding-bottom: 64px;
    width: 100%;
}

/* Services ---------------------------------------------------------------- */
.services { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.services__title { color: #000; }

.services__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.service-card {
    flex: 1 1 300px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.service-card__icon { width: 128px; height: 128px; object-fit: contain; }
.service-card__title { font-size: var(--h4); font-weight: 500; line-height: 1.2; color: #000; text-transform: uppercase; }
.service-card__text { font-size: var(--b2); color: var(--color-text-muted); }

/* Advantages -------------------------------------------------------------- */
.advantages { display: flex; flex-direction: column; gap: 32px; align-items: center; width: 100%; }
.advantages__title { text-align: center; color: #000; max-width: 996px; }

.advantages__rows { display: flex; flex-direction: column; width: 100%; }

.adv-row {
    display: flex;
    align-items: center;
    gap: 64px;
    width: 100%;
    padding: 2px;
}
.adv-row + .adv-row { margin-top: -64px; }

.adv-row__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; color: #000; }
.adv-row__text .h3 { color: #000; }
.adv-row__text p { font-size: var(--b2); }

.adv-row__media {
    position: relative;
    flex-shrink: 0;
    width: 535px;
    height: 535px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.adv-row__media .glow { width: 376px; height: 381px; }
.adv-row__media img {
    position: relative;
    z-index: 1;
    width: 400px;
    height: 400px;
    object-fit: contain;
}

/* ==========================================================================
   Other services
   ========================================================================== */
.other { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.other__title { color: #000; }
.other__grid { display: flex; flex-wrap: wrap; gap: 8px; }

.other-card {
    flex: 1 1 170px;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 24px;
    overflow: hidden;
    text-align: center;
}
.other-card__name { width: 100%; text-align: left; font-size: 17px; font-weight: 500; color: #000; }
.other-card__icon { width: 128px; height: 128px; object-fit: contain; }
.other-card__desc { width: 100%; text-align: left; font-size: 13px; color: var(--color-neutral); }

/* ==========================================================================
   CTA — questions
   ========================================================================== */
.cta {
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    gap: 16px;
}
.cta__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 561px;
    max-width: 100%;
    flex-shrink: 0;
}
.cta__title { color: #000; }
.cta__tags { display: flex; flex-wrap: wrap; gap: 9px; }
.cta__tag {
    border: 1px solid var(--color-primary);
    border-radius: 100px;
    padding: 7px 15px;
    font-size: var(--b2);
    color: #000;
    background: transparent;
    cursor: pointer;
    line-height: 1.5;
    transition: background .15s ease, color .15s ease;
}
.cta__tag:hover { background: var(--color-primary); color: var(--color-white); }
.cta__link { color: var(--color-primary); text-decoration: underline; font-size: var(--b2); width: fit-content; }

.cta__decorations { position: relative; flex: 1; min-width: 0; pointer-events: none; }
.cta__deco { position: absolute; z-index: 1; pointer-events: none; }
.cta__deco--glow {
    right: -9px;
    top: 92px;
    width: 506px;
    height: 513px;
    border-radius: 123px;
    background: radial-gradient(ellipse farthest-side at 9.06% 9.97%, #e3ebff 0%, #bfcefa 50%, #9ab2f4 100%);
}
.cta__deco--q-big { right: 120px; top: 10px; width: 275px; height: 274px; }
.cta__deco--q-1   { right: 47px; top: 126px; width: 147px; height: 146px; transform: rotate(15deg); }
.cta__deco--q-2   { right: 296px; top: 126px; width: 147px; height: 146px; transform: rotate(-15deg); }

/* ==========================================================================
   Payment page — balance top-up / check hero
   ========================================================================== */
.pay-hero { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; }

.pay-hero__panel {
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 64px;
    display: flex;
    align-items: stretch;
    gap: 32px;
}

.pay-hero__glow {
    width: 753.54px;
    height: 762.75px;
    right: -210.54px;
    top: calc(50% - 762.75px/2 - 90.62px);
    border-radius: 120px;
}

.pay-hero__text {
    position: relative;
    z-index: 2;
    /* Figma width on a full desktop; gives way first when the panel narrows */
    flex: 0 1 601px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.pay-hero__text h1 { margin: 0; }

.pay-steps { display: flex; gap: 24px; }
.pay-step { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pay-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 100px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--b1);
}
.pay-step p { font-size: var(--b1); color: var(--color-text-muted-2); margin: 0; }

.pay-hero__deco { position: absolute; z-index: 1; pointer-events: none; }
.pay-hero__deco--coin  { width: 124px; height: 124px; top: 44px; left: 513px; }
.pay-hero__deco--check { width: 77px; height: 77px; top: 69px; right: 16px; z-index: 3; }
.pay-hero__deco--mail  { width: 153px; height: 153px; right: -17px; bottom: -53px; z-index: 3; }

.pay-card {
    position: relative;
    z-index: 2;
    flex: 1 1 0;
    min-width: 360px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 8px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pay-tabs { display: flex; width: 100%; }
.pay-tabs__tab {
    flex: 1 1 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui-tabs);
    font-weight: 500;
    font-size: 15px;
    background: none;
    border: 0;
    color: var(--color-text-muted-2);
    cursor: pointer;
}
.pay-tabs__tab.is-active { color: rgba(27, 31, 59, .8); box-shadow: inset 0 -2px 0 0 #526ed3; }

.pay-forms { width: 100%; }
.pay-form { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.pay-form.is-hidden { display: none; }

/* Fields render as a single filled box (placeholder doubles as the label) */
.pay-field { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.pay-field input {
    width: 100%;
    background: var(--color-bg);
    border: 0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: var(--font-base);
    font-size: var(--b1);
    color: var(--color-text);
}
.pay-field input::placeholder { color: var(--color-text-muted-2); }
.pay-field input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.pay-field__error { font-size: 11px; color: var(--color-error); }
.pay-field.is-error input { background: var(--color-error-bg); border: 1px solid var(--color-error); color: var(--color-error); }
.pay-field.is-error input::placeholder { color: var(--color-error); }

/* Regular-payment toggle switch */
.pay-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pay-toggle__input { position: absolute; width: 0; height: 0; opacity: 0; }
.pay-toggle__track {
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 32px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 999px;
    background: var(--color-white);
}
.pay-toggle__handle {
    position: absolute;
    top: 1px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ccc;
    transition: transform .15s ease, background .15s ease;
}
.pay-toggle__input:checked ~ .pay-toggle__track { border-color: var(--color-primary); }
.pay-toggle__input:checked ~ .pay-toggle__track .pay-toggle__handle { transform: translateX(12px); background: var(--color-primary); }
.pay-toggle__label { font-size: var(--b2); color: var(--color-primary); }

/* Custom policy checkbox */
.pay-checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.pay-checkbox__input { position: absolute; width: 0; height: 0; opacity: 0; }
.pay-checkbox__box {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: var(--color-white);
}
.pay-checkbox__input:checked ~ .pay-checkbox__box { background: var(--color-primary); border-color: var(--color-primary); }
.pay-checkbox__input:checked ~ .pay-checkbox__box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.pay-checkbox__text { font-size: 14px; color: #000; }
.pay-checkbox__text a { color: var(--color-primary); text-decoration: underline; }

.pay-btn {
    width: 100%;
    background: var(--color-primary);
    color: #fafafa;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-family: var(--font-ui-button);
    font-size: 16px;
    cursor: pointer;
    /* Also worn by the modal's close link, which has to be an anchor to work without JS. */
    display: block;
    text-align: center;
    text-decoration: none;
}
.pay-btn:disabled { background: #d9d7df; color: var(--color-text-muted-2); cursor: not-allowed; }

/* ---- Order card / Telegram banners ---- */
/* Figma keeps the banners close under the hero, not a whole section gap away */
.pay-hero + .pay-banners { margin-top: calc(8px - var(--gap-section)); }
.pay-banners { display: flex; gap: 16px; }
.pay-banner {
    position: relative;
    overflow: hidden;
    flex: 1 1 0;
    min-height: 172px;
    min-width: 374px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--color-white);
}
.pay-banner--card { background: var(--color-primary); }
.pay-banner--max { background: var(--color-primary-light); flex-grow: 1.15; }
.pay-banner h3 { position: relative; z-index: 2; font-size: var(--h3); font-weight: 500; line-height: 1.2; margin: 0; }
.pay-banner p { position: relative; z-index: 2; font-size: var(--b2); margin: 0; }
.pay-banner__deco--card { position: absolute; z-index: 1; pointer-events: none; width: 240px; height: 240px; right: -29px; top: 50%; transform: translateY(-50%); }
.pay-banner__deco--bot  { position: absolute; z-index: 1; pointer-events: none; width: 230px; left: calc(52% + 122px); bottom: -70px; transform: translateX(-50%); }
.pay-banner__glow--bot  { width: 362.2px; height: 362.2px; left: calc(52% + 156.1px); bottom: -260.5px; transform: translateX(-50%) rotate(45deg); }
.pay-banner__glow--card { width: 582.505px; height: 582.505px; right: -400.5px; top: calc(50% + 24.25px); transform: translateY(-50%) rotate(45deg); }

/* ==========================================================================
   Balance check result modal
   ========================================================================== */
.balance-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    padding: 16px;
}
.balance-modal[hidden] { display: none; }
.balance-modal__card {
    position: relative;
    width: 423px;
    max-width: 100%;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.balance-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.balance-modal__title { font-size: var(--h4); font-weight: 500; margin: 0; }
.balance-modal__close { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--color-text-muted-2); cursor: pointer; text-decoration: none; }
.balance-modal__desc { font-size: 14px; color: #000; opacity: .5; margin: 0 0 16px; }
.balance-modal__amount { font-size: var(--h4); font-weight: 500; margin: 0 0 16px; }

/* ==========================================================================
   Autopay confirmation popup — "Подключение автопополнения" (СБП)
   ========================================================================== */
.autopay-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    padding: 16px;
}
.autopay-modal[hidden] { display: none; }
.autopay-modal__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 423px;
    max-width: 100%;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.autopay-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.autopay-modal__title { font-size: var(--h4); font-weight: 500; line-height: 1.2; margin: 0; }
.autopay-modal__close { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--color-text-muted-2); cursor: pointer; }
.autopay-modal__text p { font-size: 14px; line-height: 20px; color: #000; margin: 0 0 10px; }
.autopay-modal__text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Feedback modal — "Обратная связь" (FAQ "Спросить")
   ========================================================================== */
.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    padding: 16px;
}
.feedback-modal[hidden] { display: none; }
.feedback-modal__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 423px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.feedback-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.feedback-modal__title { font-size: var(--h4); font-weight: 500; line-height: 1.2; margin: 0; }
.feedback-modal__close { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--color-text-muted-2); cursor: pointer; padding: 0; }
.feedback-modal__desc { font-size: 14px; line-height: 20px; color: #000; opacity: .5; margin: 0; }

.feedback-form { display: flex; flex-direction: column; gap: 16px; }
.feedback-form[hidden] { display: none; }
.feedback-form__field--textarea { position: relative; }
.feedback-form__field--textarea textarea {
    width: 100%;
    height: 130px;
    background: var(--color-bg);
    border: 0;
    border-radius: var(--radius-sm);
    padding: 14px 16px 28px;
    font-family: var(--font-base);
    font-size: var(--b1);
    color: var(--color-text);
    resize: none;
}
.feedback-form__field--textarea textarea::placeholder { color: var(--color-text-muted-2); }
.feedback-form__field--textarea textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.feedback-form__counter {
    position: absolute;
    right: 16px;
    bottom: 12px;
    font-size: 11px;
    color: var(--color-text-muted-2);
    pointer-events: none;
}
.feedback-form__status { font-size: 14px; color: var(--color-text); margin: 0; }
.feedback-form__status--error { color: var(--color-error); }

/* ==========================================================================
   Payment confirmation card — "Пополнение баланса карты"
   ========================================================================== */
.page--confirm { align-items: center; }

.confirm-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 690px;
    max-width: 100%;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 48px;
}
.confirm-card__intro { font-size: var(--b2); color: #000; margin: 0; }

.confirm-rows { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.confirm-rows[hidden] { display: none; }
.confirm-row { display: flex; gap: 30px; width: 100%; font-size: var(--b2); }
.confirm-row__label { flex-shrink: 0; width: 210px; color: var(--color-text-muted-2); }
.confirm-row__value { flex: 1 1 0; min-width: 0; color: #000; }

.confirm-row--total .confirm-row__label,
.confirm-row--total .confirm-row__value { font-weight: 700; color: #000; }

.confirm-divider { border: 0; border-top: 1px solid #e5e3ec; width: 100%; margin: 0; }

.confirm-note { font-size: var(--b2); color: #000; margin: 0; }

.confirm-qr { display: block; width: 180px; height: auto; margin: 0 auto; }

.confirm-method { display: flex; gap: 30px; width: 100%; }
.confirm-method__label { flex-shrink: 0; width: 210px; font-size: var(--b2); color: var(--color-text-muted-2); }
.confirm-radios { display: flex; flex-direction: column; gap: 10px; flex: 1 1 0; min-width: 0; }
.confirm-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.confirm-radio__input { position: absolute; width: 0; height: 0; opacity: 0; }
.confirm-radio__dot {
    position: relative;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--color-text-muted-2);
    background: var(--color-white);
}
.confirm-radio__input:checked ~ .confirm-radio__dot { border-color: var(--color-primary); }
.confirm-radio__input:checked ~ .confirm-radio__dot::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    background: var(--color-primary);
}
.confirm-radio__text { font-size: var(--b2); color: #595959; }
.confirm-radio__input:checked ~ .confirm-radio__text { color: #000; }

.confirm-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.confirm-toggle__input { position: absolute; width: 0; height: 0; opacity: 0; }
.confirm-toggle__track {
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    width: 32px;
    height: 18px;
    border: 1px solid var(--color-text-muted-2);
    border-radius: 999px;
    background: var(--color-white);
}
.confirm-toggle__handle {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-text-muted-2);
    transition: transform .15s ease, background .15s ease;
}
.confirm-toggle__input:checked ~ .confirm-toggle__track { border-color: var(--color-primary); }
.confirm-toggle__input:checked ~ .confirm-toggle__track .confirm-toggle__handle { transform: translateX(14px); background: var(--color-primary); }
.confirm-toggle__label { font-size: var(--b2); color: #000; }
.confirm-toggle__input:checked ~ .confirm-toggle__label { color: var(--color-primary); }

.confirm-toggle__input:disabled ~ .confirm-toggle__track { border-color: #ccc; opacity: .6; }
.confirm-toggle__input:disabled ~ .confirm-toggle__track .confirm-toggle__handle { background: #ccc; }
.confirm-toggle__input:disabled ~ .confirm-toggle__label { color: var(--color-text-muted-2); }
.confirm-toggle:has(.confirm-toggle__input:disabled) { cursor: not-allowed; }

.confirm-warning {
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #fff4e5;
    color: #8a5a00;
    font-size: var(--b1);
    border: 1px solid #FEC84B;
}
.confirm-warning[hidden] { display: none; }

/* Autopay schedule — shown only while the toggle above is checked */
.confirm-schedule { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.confirm-schedule[hidden] { display: none; }

.confirm-radio--schedule { width: 100%; gap: 8px; flex-wrap: wrap; }
.confirm-radio__text--grow { flex: 1 1 0; min-width: 0; }
.confirm-schedule__input {
    flex-shrink: 0;
    width: 170px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: var(--color-white);
    font-family: var(--font-base);
    font-size: var(--b2);
    color: var(--color-text-muted-2);
    opacity: .5;
}
.confirm-radio__input:checked ~ .confirm-schedule__input { opacity: 1; }
.confirm-schedule__input.is-error { border-color: var(--color-error); }
.confirm-schedule__input:focus { outline: none; border-color: var(--color-primary); }
.confirm-schedule__input.is-error:focus { border-color: var(--color-error); }
.confirm-schedule__error {
    display: block;
    width: 170px;
    margin: 4px 0 0 auto;
    font-size: 11px;
    color: var(--color-error);
}
.confirm-schedule__error:empty { display: none; }
.confirm-schedule__input--select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5 7l5 5 5-5' fill='none' stroke='%237e7e7e' stroke-width='1.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 20px;
    padding-right: 26px;
}

.confirm-actions { display: flex; flex-wrap: wrap; gap: 30px; width: 100%; }
.confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-base);
    font-size: 16px;
    padding: 11px 24px 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.confirm-btn--outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.confirm-btn--outline:hover { background: rgba(99, 135, 230, .08); }
.confirm-btn--solid { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-white); }
.confirm-btn--solid:hover { background: #4f6fd0; }

/* ==========================================================================
   Payment success screen — "Пополнение баланса карты" (after payment)
   ========================================================================== */
.success-card {
    display: grid;
    grid-template-columns: 128px 1fr 24px;
    grid-template-areas: "icon body close";
    align-items: start;
    gap: 32px;
    width: 785px;
    max-width: 100%;
    background: var(--color-white);
    border: 1px solid #ccc;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 16px 16px -8px rgba(12, 12, 13, .1), 0 4px 4px -4px rgba(12, 12, 13, .05);
    --b2: 18px;
}
.success-card[hidden] { display: none; }
.success-card__icon { grid-area: icon; width: 128px; height: 128px; }
.success-card__body { grid-area: body; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.success-card__title { margin: 0; }
.success-card__text { font-size: var(--b2); line-height: 1.5; color: #000; }
.success-card__text p { margin: 0; }
.success-card__text .success-card__highlight { color: var(--color-primary); }
.success-card__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.success-card__close { grid-area: close; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--color-text-muted-2); cursor: pointer; }

/* ==========================================================================
   Error pages — 404 / 500
   ========================================================================== */
.error-page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 64px var(--pad-x);
    text-align: center;
    --b2: 16px;
}
.error-page__icon { width: 180px; height: 180px; }
.error-page__title { font-size: var(--h1); font-weight: 500; line-height: 1.2; color: #202428; margin: 0; }
.error-page__text { font-size: var(--b2); line-height: 1.5; color: #202428; margin: 0; }
.error-page__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    max-width: 100%;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 4px;
    padding: 11px 24px 12px;
    font-family: 'Open Sans', var(--font-base);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}
.error-page__btn:hover { background: #4f6fd0; }

/* ==========================================================================
   FAQ page — "Ответы на вопросы"
   ========================================================================== */
.faq-hero { display: flex; flex-direction: column; gap: 24px; }
.faq-tabs { display: flex; flex-wrap: wrap; gap: 8px 9px; }
.faq-tab {
    border: 1px solid var(--color-primary);
    border-radius: 100px;
    padding: 8px 16px;
    font-family: var(--font-ui-button);
    font-size: 14px;
    color: #000;
}
.faq-tab:hover { background: rgba(99, 135, 230, .08); }

.faq-list { display: flex; flex-direction: column; gap: var(--gap-section); }

.faq-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--color-bg);
    border-radius: 32px;
    padding: 32px;
    scroll-margin-top: 24px;
}
.faq-section__side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
    flex-shrink: 0;
    width: 430px;
    gap: 24px;
}
.faq-section__title { font-size: var(--h3); font-weight: 500; line-height: 1.2; color: #000; margin: 0; }
.faq-section__intro { font-size: 18px; line-height: 1.5; color: #000; margin: 16px 0 0; }
.faq-section__icon { width: 128px; height: 128px; }

.faq-steps { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; }
.faq-step { display: flex; gap: 16px; align-items: flex-start; background: var(--color-white); border-radius: 32px; padding: 24px; }
.faq-step__num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 100px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 18px;
}
.faq-step__text { flex: 1 1 0; min-width: 0; font-size: 18px; line-height: 1.5; color: #000; }
.faq-step__text p { margin: 0 0 16px; }
.faq-step__text p:last-child { margin-bottom: 0; }

.faq-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--color-white);
    border-radius: 32px;
    padding: 32px;
    font-size: 18px;
    line-height: 1.5;
    color: #000;
    align-self: stretch;
}
.faq-card p { margin: 0; }
.faq-card__highlight { color: var(--color-primary); }

.faq-callout { background: #d6d3e4; border-radius: 32px; padding: 24px; }
.faq-callout p { margin: 0; font-size: 18px; color: #000; }

.faq-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.faq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-family: var(--font-ui-button);
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}
.faq-btn:hover { background: #4f6fd0; }
.faq-btn--outline { background: transparent; color: var(--color-primary); }
.faq-btn--outline:hover { background: rgba(99, 135, 230, .08); }

/* compact app/telegram promo pair used inside step lists (messages/video sections) */
.faq-promo-row { display: flex; gap: 8px; width: 100%; }
.faq-promo picture { display: contents; }
.faq-promo {
    position: relative;
    overflow: hidden;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--color-white);
    min-height: 172px;
}
.faq-promo--max { background: var(--color-primary-light); }
.faq-promo__title { font-size: 20px; font-weight: 500; line-height: 1.2; margin: 0; position: relative; z-index: 2; }
.faq-promo__sub { font-size: var(--b2); margin: 0; position: relative; z-index: 2; }
.faq-promo__badges { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 2; width: 260px; }
.faq-promo__phone {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    /*width: 100px;*/
    right: -6px;
    /*top: 62px;*/
}

.faq-promo__check {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    width: 28px;
    height: 28px;
    right: 65px;
    top: 15px;
}
.faq-promo__big-check {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    width: 56px;
    height: 56px;
    right: 5px;
    top: 45px;
}
.faq-promo__cloud {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    width: 76px;
    /*left: 42%;*/
    right: 152px;
    bottom: -16px;
}

/* wide single-card variant (video-call section): bigger phone, check at its
   top-right instead of top-left, 2x2 badge grid needs more room */
.faq-promo--wide { min-height: 192px; }
.faq-promo--wide .faq-promo__phone { width: 150px; right: 32px; top: 54px; }
.faq-promo--wide .faq-promo__check { right: 20px; top: 50px; }

.faq-promo__check-2 {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    width: 74px;
    height: 74px;
    right: 320px;
    top: 88px;
    transform: rotate(-15deg);
}
.faq-promo__max {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    right: -28px;
    top: 28px;
    width: 132px;
    height: auto;
}
.faq-promo__bot {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    width: 180px;
    right: -40px;
    bottom: -40px;
}
.faq-promo__glow {
    position: absolute;
    z-index: 0;
    width: 280px;
    height: 280px;
    transform: translateX(-50%) rotate(45deg);
}
.faq-promo--max .faq-promo__glow { left: calc(50% + 107px); bottom: -150px; }

/* large standalone Telegram-bot promo card, bonus FAQ section */
.faq-promo--large { min-height: 172px; padding: 32px; }
.faq-promo--large .faq-promo__title { font-size: var(--h3); }
.faq-promo--large .faq-promo__bot {
    right: 40px;
    bottom: -100px;
    width: 300px;
}
.faq-promo--large .faq-promo__glow { left: calc(50% + 129px);  }

.faq-cta { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--b2); color: #000; text-align: center; }
.faq-cta a { color: var(--color-primary); text-decoration: underline; }

/* ==========================================================================
   Text pages — «Условия использования сервиса», «Политика обработки данных»

   A heading over a block of HTML written in the admin («Текстовые разделы» →
   «Главные разделы»). Nothing inside the body carries our classes, so every rule below
   has to hang off the tags a WYSIWYG produces.
   ========================================================================== */
.text-page {
    /* .page starts its content 32px under the header; these two open with a lone heading
       that the layout gives more room to. */
    padding-top: 64px;
    padding-bottom: 64px;
}

.text-page__title {
    font-size: var(--h1);
    font-weight: 500;
    line-height: 1.2;
    color: #000;
    margin: 0;
}

.text-page__body {
    font-size: var(--b2);
    line-height: 1.7;
    color: var(--color-text);
    overflow-wrap: break-word;
}

.text-page__body h3,
.text-page__body h4 { font-weight: 500; line-height: 1.2; margin: 0 0 24px; }
.text-page__body h3 { font-size: var(--h3); }
.text-page__body h4 { font-size: var(--h4); }

.text-page__body p { margin: 0 0 24px; }
.text-page__body p:last-child { margin-bottom: 0; }

.text-page__body ul,
.text-page__body ol { margin: 0 0 24px; padding-left: 24px; }
.text-page__body ul { list-style: disc; }
.text-page__body ol { list-style: decimal; }
.text-page__body li { margin-bottom: 8px; }

.text-page__body a { color: var(--color-primary); text-decoration: underline; }

.text-page__body img { display: inline-block; height: auto; margin: 8px 0; }

/* Pasted documents bring their own tables (the policy opens with a contents one), sized
   by inline width/border attributes that predate the design. */
.text-page__body table {
    border-collapse: collapse;
    max-width: 100%;
    margin: 0 0 24px;
}
.text-page__body th,
.text-page__body td {
    border: 1px solid #e5e3ec;
    padding: 8px 12px;
    vertical-align: top;
}
.text-page__body th p,
.text-page__body td p { margin: 0; }

/* align="center" on the wrapper is how the editor centres a table; it only reaches the
   text inside it on its own. */
.text-page__body div[align="center"] > table { margin-left: auto; margin-right: auto; }
