/*
 * /invoices/ — оплата счетов (инвойсов) криптовалютой (seo-1107, зона page-invoices).
 * Только токены r26 (assets/r26.css): тёмная тема — без атрибута, светлая — html[data-theme="light"].
 * Приставка inv-. Телефон: 899 / 719 / 359 px, без боковой прокрутки на 320. RTL — логические свойства.
 */

.inv .r-wrap :is(h1, h2) { text-wrap: balance; }
.inv-top { padding-top: 12px; }
.inv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Суммы и коды читаются слева направо и в арабском. */
.inv bdi { unicode-bidi: isolate; direction: ltr; white-space: nowrap; }

/* ══ Первый экран: чек оплаты справа ═════════════════════════════════════ */
.inv-hero { grid-template-columns: 1.15fr 0.85fr; }
.inv-chips { padding-top: 4px; }
.inv-hero-art { min-width: 0; }
.inv-rc {
  width: 100%; max-width: 360px; box-sizing: border-box; padding: 20px; border-radius: 24px;
  background: var(--r-surface-3); border: 1px solid var(--r-line-2); box-shadow: var(--r-pop-shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.inv-rc-top { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.inv-rc-ico {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.inv-rc-tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-rc-tt b { font-size: 15px; font-weight: 800; }
.inv-rc-tt > span { font-size: 12px; color: var(--r-muted); }
.inv-rc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--r-muted); }
.inv-rc-row b { color: var(--r-text); font-weight: 800; }
.inv-rc-total { padding-top: 12px; border-top: 1px dashed var(--r-line-3); color: var(--r-text); font-weight: 700; }
.inv-rc-total b { font-size: 18px; color: var(--r-green); }
.inv-rc-st { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.inv-rc-s {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: var(--r-faint); background: var(--r-fill-2); border: 1px solid var(--r-line-2);
}
.inv-rc-s--ok { color: var(--r-green); background: var(--r-green-tint); border-color: transparent; }
.inv-rc-s--now { color: var(--r-text); border-color: var(--r-brand-2); }
.inv-rc-s--now i { width: 7px; height: 7px; border-radius: 99px; background: var(--r-accent); }

/* ══ Шаги ═════════════════════════════════════════════════════════════════ */
.inv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.inv-step { padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inv-step-top { display: flex; justify-content: space-between; align-items: center; }
.inv-ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.inv-step-n { font-size: 13px; font-weight: 800; color: var(--r-accent); letter-spacing: 0.08em; }
.inv-step-t { font-size: 17px; font-weight: 800; color: var(--r-text); line-height: 1.25; }
.inv-step-d { font-size: 14px; color: var(--r-muted); line-height: 1.55; }

/* ══ Калькулятор ══════════════════════════════════════════════════════════ */
.inv-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.inv-form { padding: 32px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.inv-f { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.inv-f[hidden] { display: none; }
.inv-f-l { padding: 0; font-size: 13px; font-weight: 800; color: var(--r-text-2); line-height: 1.35; }
.inv-in {
  width: 100%; box-sizing: border-box; height: 54px; padding: 0 16px; border-radius: 14px;
  background: var(--r-fill-2); border: 1px solid var(--r-line-3); color: var(--r-text);
  font: inherit; font-size: 18px; font-weight: 800; text-align: start;
}
.inv-in::placeholder { color: var(--r-faint); font-size: 15px; font-weight: 600; }
.inv-in:focus { outline: 2px solid var(--r-accent); outline-offset: 1px; border-color: transparent; }
.inv-in[aria-invalid="true"] { border-color: var(--r-red); }
.inv-seg { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--r-fill-2); border: 1px solid var(--r-line-2); }
.inv-seg label { flex: 1 1 0; position: relative; min-width: 0; }
.inv-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.inv-seg span {
  display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 4px 10px; border-radius: 12px;
  font-size: 14px; font-weight: 800; color: var(--r-muted); cursor: pointer; text-align: center; line-height: 1.2;
}
.inv-seg input:checked + span { background: var(--r-brand); color: #FFFFFF; }
.inv-seg input:focus-visible + span { outline: 2px solid var(--r-accent); outline-offset: 2px; }
.inv-out {
  padding: 32px; display: flex; flex-direction: column; gap: 14px; justify-content: center; min-width: 0;
  background: var(--r-fill-1); border-inline-start: 1px solid var(--r-line-2);
}
.inv-out-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--r-muted); }
.inv-out-row b { color: var(--r-text); font-size: 17px; font-weight: 800; }
.inv-out-total { padding-top: 14px; border-top: 1px solid var(--r-line-3); color: var(--r-text); font-weight: 700; }
.inv-out-total b { font-size: clamp(24px, 2vw + 12px, 32px); color: var(--r-green); }
.inv-msg { margin: 0; font-size: 13px; line-height: 1.5; color: var(--r-muted); min-height: 2.9em; }
.inv-msg.is-warn { color: var(--r-red); }
.inv-out-btn { align-self: flex-start; margin-top: 4px; }

/* ══ Таблицы ══════════════════════════════════════════════════════════════ */
.inv-tbl-wrap {
  overflow-x: auto; border-radius: 24px; border: 1px solid var(--r-line); background: var(--r-surface);
  box-shadow: var(--r-block-shadow); -webkit-overflow-scrolling: touch;
}
.inv-tbl-wrap:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }
.inv-tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.inv-tbl :is(th, td) { padding: 16px 22px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--r-line); }
.inv-tbl tbody tr:last-child :is(th, td) { border-bottom: 0; }
.inv-tbl th { font-weight: 800; color: var(--r-text); }
.inv-tbl td { color: var(--r-text-2); }
.inv-tbl--terms th { width: 32%; }
.inv-tbl--cmp { min-width: 720px; }
.inv-tbl--cmp thead th { font-size: 13px; color: var(--r-muted); background: var(--r-fill-1); }
.inv-tbl--cmp tbody th { width: 18%; font-size: 14px; color: var(--r-muted); }
.inv-tbl--cmp thead .inv-th-on { color: var(--r-link); }
.inv-tbl--cmp .inv-td-on { color: var(--r-text); font-weight: 700; background: var(--r-brand-tint); }
.inv-tbl--cmp thead .inv-th-on { background: var(--r-brand-tint); }
.inv-foot { margin: -8px 0 0; font-size: 13px; color: var(--r-faint); line-height: 1.5; }

/* ══ Статусы ══════════════════════════════════════════════════════════════ */
.inv-st { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.inv-st-i { padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inv-st-dot {
  width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.inv-st--paid .inv-st-dot { background: var(--r-green-tint); color: var(--r-green); }
.inv-st--rej .inv-st-dot { background: var(--r-red-line); color: var(--r-red); }
.inv-st-t { font-size: 18px; font-weight: 800; color: var(--r-text); }
.inv-st-d { font-size: 14px; color: var(--r-muted); line-height: 1.55; }

/* ══ Сценарии ═════════════════════════════════════════════════════════════ */
.inv-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inv-case { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.inv-case-t { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--r-text); }
.inv-case-d { margin: 0; font-size: 14.5px; color: var(--r-muted); line-height: 1.6; }

/* ══ Распознавание и проверка ═════════════════════════════════════════════ */
.inv-duo { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px; }
.inv-duo-b { padding: 32px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.inv-h2s { font-size: clamp(26px, 1.6vw + 14px, 34px); }
.inv-p { margin: 0; font-size: 15.5px; color: var(--r-text-2); line-height: 1.65; }
.inv-chk { display: flex; gap: 12px; align-items: flex-start; }
.inv-chk p { margin: 0; font-size: 14.5px; color: var(--r-muted); line-height: 1.55; }
.inv-chk b { color: var(--r-text); }
.inv-chk-i {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 99px; display: grid; place-items: center;
  background: var(--r-green-tint); color: var(--r-green);
}

/* ══ Риски ════════════════════════════════════════════════════════════════ */
.inv-risk { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inv-risk-i {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border-radius: 20px;
  background: var(--r-surface); border: 1px solid var(--r-red-line); min-width: 0;
}
.inv-risk-i:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inv-risk-ic { flex: none; color: var(--r-red); margin-top: 2px; }
.inv-risk-i p { margin: 0; font-size: 14.5px; color: var(--r-muted); line-height: 1.55; }
.inv-risk-i b { color: var(--r-text); }

/* ══ Вопросы ══════════════════════════════════════════════════════════════ */
.inv-qa { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.inv-qa-i { border-radius: 20px; background: var(--r-surface); border: 1px solid var(--r-line); }
.inv-qa-i summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font-size: 16px; font-weight: 800; color: var(--r-text); line-height: 1.4;
}
.inv-qa-i summary::-webkit-details-marker { display: none; }
.inv-qa-i summary:focus-visible { outline: 2px solid var(--r-accent); outline-offset: -2px; border-radius: 20px; }
.inv-qa-ic {
  flex: none; width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center;
  background: var(--r-fill-3); color: var(--r-text-2); transition: transform .2s ease;
}
.inv-qa-i[open] .inv-qa-ic { transform: rotate(45deg); }
.inv-qa-i p { margin: 0; padding: 0 22px 20px; font-size: 15px; color: var(--r-text-2); line-height: 1.65; max-width: 75ch; }

/* ══ Блог и связанные разделы ═════════════════════════════════════════════ */
.inv-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inv-link {
  position: relative; padding: 22px 52px 22px 22px; display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: var(--r-text); min-width: 0; transition: border-color .16s ease;
}
[dir="rtl"] .inv-link { padding: 22px 22px 22px 52px; }
.inv-link:hover { border-color: var(--r-brand-2); }
.inv-link b { font-size: 16px; font-weight: 800; line-height: 1.35; }
.inv-link span { font-size: 14px; color: var(--r-muted); line-height: 1.5; }
.inv-link .inv-arr { position: absolute; inset-inline-end: 22px; top: 24px; color: var(--r-link); }
[dir="rtl"] .inv-arr { transform: scaleX(-1); }

.sx-next.inv-rel { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }

/* ══ Финальный призыв ═════════════════════════════════════════════════════ */
.inv-final { padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.inv-final-txt { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 640px; min-width: 0; }
.inv-final .r-btns { position: relative; flex: none; }

/* ══ Планшет и телефон ════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .inv-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inv-st { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .inv-hero { grid-template-columns: 1fr; }
  .inv-hero-art { justify-content: flex-start; }
  .inv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-calc { grid-template-columns: 1fr; }
  .inv-out { border-inline-start: 0; border-top: 1px solid var(--r-line-2); }
  .inv-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-duo { grid-template-columns: 1fr; }
  .inv-risk { grid-template-columns: 1fr; }
  .inv-links { grid-template-columns: 1fr; }
  .inv-final { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
}
@media (max-width: 719px) {
  .inv-rc { max-width: none; }
  .inv-rc.r-float { animation: none; }
  .inv-steps, .inv-st, .inv-cases { grid-template-columns: 1fr; }
  .inv-step, .inv-st-i, .inv-case { padding: 20px; }
  .inv-form, .inv-out { padding: 22px 20px; }
  .inv-out-btn, .inv-final .r-btns, .inv-final .r-btn { align-self: stretch; width: 100%; }
  .inv .r-hero-txt .r-btns .r-btn { flex: 1 1 100%; }
  .inv-duo-b { padding: 24px 20px; }
  .inv-tbl :is(th, td) { padding: 14px 16px; font-size: 14px; }
  .inv-tbl--terms, .inv-tbl--terms tbody, .inv-tbl--terms tr, .inv-tbl--terms th, .inv-tbl--terms td { display: block; width: auto; }
  .inv-tbl--terms th { padding-bottom: 2px; border-bottom: 0; font-size: 13px; color: var(--r-muted); }
  .inv-tbl--terms td { padding-top: 0; }
  .inv-final { padding: 28px 20px; }
  .inv-qa-i summary { padding: 16px 18px; font-size: 15px; }
  .inv-qa-i p { padding: 0 18px 18px; }
  .inv-risk-i { padding: 18px; }
}
@media (max-width: 359px) {
  .inv-rc { padding: 16px; }
  .inv-rc-row { font-size: 13px; }
  .inv-form, .inv-out { padding: 18px 16px; }
  .inv-in { font-size: 16px; }
  .inv .r-chip { white-space: normal; height: auto; min-height: 34px; padding: 6px 12px; }
}

/* qa seo-1107: на узком телефоне (320–375) длинная подпись кнопки (de/pt/fr) переносится, а не вылезает за кнопку. */
@media (max-width: 379px) {
  main .r-btn { white-space: normal; height: auto; min-height: 52px; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; text-align: center; }
}
