/* /partners/ — партнёрская программа (seo-1107, зона page-partners).
   Только токены r26 (assets/r26.css), обе темы, приставка ptn-. Телефон: 899 / 719 / 359 px. RTL — логические свойства. */

/* RTL: числа с USDT и % обёрнуты в <bdi> в разметке — направление блоков не трогаем, иначе ломается выравнивание по концу. */

/* ── Первый экран ── */
.ptn-top { padding-top: 12px; }
.ptn-hero { padding: 44px 56px; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 40px; align-items: center; }
.ptn-hero-txt { position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ptn-btns .r-btn svg { flex: none; }
.ptn-stats { display: flex; gap: 28px; padding-top: 10px; flex-wrap: wrap; }
.ptn-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptn-stat-n { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--r-text); }
.ptn-acc { color: var(--r-accent); }
.ptn-stat-t { font-size: 13px; color: var(--r-muted); max-width: 190px; line-height: 1.4; overflow-wrap: break-word; hyphens: auto; }

.ptn-hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-width: 0; padding-top: 40px; }
.ptn-coins { position: absolute; top: -28px; inset-inline-end: -24px; width: 150px; height: 150px; object-fit: contain; pointer-events: none; }
.ptn-panel {
  position: relative; width: 340px; max-width: 100%; box-sizing: border-box; padding: 20px; border-radius: 28px;
  background: var(--r-surface-3); border: 1px solid var(--r-line-2); box-shadow: var(--r-pop-shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.ptn-panel-h { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.ptn-panel-s { font-size: 12px; font-weight: 700; color: var(--r-muted); padding-top: 4px; }
.ptn-link {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; min-width: 0;
  background: var(--r-fill-3); border: 1px solid var(--r-line-2); font-size: 12px; font-weight: 700;
}
.ptn-link-ic { display: flex; color: var(--r-accent); flex: none; }
.ptn-link-ic svg { width: 18px; height: 18px; }
.ptn-link-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--r-text-2); }
.ptn-link-code { flex: none; padding: 3px 8px; border-radius: 999px; background: var(--r-brand-tint); color: var(--r-link); font-size: 11px; }
.ptn-share { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--r-surface); border: 1px solid var(--r-line); }
.ptn-share-n { font-size: 22px; font-weight: 800; color: var(--r-accent); letter-spacing: -0.02em; flex: none; }
.ptn-share-t { font-size: 13px; font-weight: 700; color: var(--r-text-2); line-height: 1.3; }
.ptn-fun { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; font-size: 12px; font-weight: 700; color: var(--r-text-2); }
.ptn-bar { height: 8px; border-radius: 999px; background: var(--r-fill-3); overflow: hidden; }
.ptn-bar i { display: block; height: 100%; border-radius: 999px; background: var(--r-brand); }
.ptn-panel-btn {
  margin-top: 6px; height: 44px; border-radius: 14px; background: var(--r-brand); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 800;
}
.ptn-panel-btn svg { width: 18px; height: 18px; }

/* ── Шаги ── */
.ptn-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ptn-step {
  display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 22px; min-width: 0;
  background: var(--r-surface); border: 1px solid var(--r-line); box-shadow: var(--r-block-shadow);
}
.ptn-step-n { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--r-accent); }
.ptn-step-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ptn-step-h { font-size: 18px; font-weight: 800; }
.ptn-step-d { font-size: 14px; color: var(--r-muted); line-height: 1.5; }

/* ── Блоки с таблицами и списками ── */
.ptn-terms-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }
.ptn-terms-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ptn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.ptn-tbl-box { padding: 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; border-radius: 28px; }
.ptn-h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.ptn-h3-ic { display: flex; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border-radius: 12px; background: var(--r-brand-tint); color: var(--r-link); }
.ptn-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptn-tbl th, .ptn-tbl td { text-align: start; vertical-align: top; padding: 14px 0; border-top: 1px solid var(--r-line-2); line-height: 1.45; }
.ptn-tbl tbody tr:first-child th, .ptn-tbl tbody tr:first-child td { border-top: 0; }
.ptn-tbl--cards thead + tbody tr:first-child th, .ptn-tbl--cards thead + tbody tr:first-child td { border-top: 1px solid var(--r-line-2); }
.ptn-tbl th[scope="row"] { width: 40%; padding-inline-end: 16px; font-weight: 700; color: var(--r-muted); }
.ptn-tbl td { color: var(--r-text); font-weight: 600; }
.ptn-tbl thead th { padding-top: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-faint); }
.ptn-tbl--cards th[scope="row"] { width: auto; }
.ptn-tbl--cards td, .ptn-tbl--cards thead th:not(:first-child) { text-align: end; white-space: nowrap; padding-inline-start: 14px; }
.ptn-card-n { display: block; font-weight: 800; color: var(--r-text); }
.ptn-card-k { display: block; font-size: 13px; font-weight: 600; color: var(--r-muted); }
.ptn-cut { color: var(--r-green) !important; font-weight: 800 !important; }
.ptn-foot { margin: 0; font-size: 13px; color: var(--r-muted); line-height: 1.5; }

.ptn-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ptn-li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--r-text-2); line-height: 1.5; }
.ptn-li-ic { display: flex; width: 26px; height: 26px; flex: none; align-items: center; justify-content: center; border-radius: 999px; margin-top: -1px; }
.ptn-li-ic svg { width: 15px; height: 15px; }
.ptn-li--ok .ptn-li-ic { background: var(--r-green-tint); color: var(--r-green); }
.ptn-li--no .ptn-li-ic { background: var(--r-red-line); color: var(--r-red); }
.ptn-li--mute .ptn-li-ic { background: var(--r-fill-3); color: var(--r-muted); }

/* ── Калькулятор ── */
.ptn-calc { padding: 40px 48px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
.ptn-calc-txt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ptn-calc-note { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--r-muted); line-height: 1.5; }
.ptn-calc-note svg { flex: none; color: var(--r-link); margin-top: 1px; }
.ptn-calc-box {
  display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 24px; min-width: 0;
  background: var(--r-surface-3); border: 1px solid var(--r-line-2);
}
.ptn-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(84px, auto); gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 16px; background: var(--r-surface); border: 1px solid var(--r-line);
}
.ptn-row-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptn-row-n { font-size: 16px; font-weight: 800; }
.ptn-row-d { font-size: 13px; color: var(--r-muted); font-weight: 600; }
.ptn-step-ctl { display: flex; align-items: center; gap: 4px; }
.ptn-pm {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--r-line-3); background: var(--r-fill-3);
  color: var(--r-text); font: inherit; font-size: 18px; font-weight: 800; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; box-sizing: border-box;
}
.ptn-pm:hover { background: var(--r-hover); }
.ptn-pm:focus-visible, .ptn-in:focus-visible { outline: 2px solid var(--r-brand-2); outline-offset: 2px; }
.ptn-in {
  width: 64px; height: 38px; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--r-line-3);
  background: var(--r-surface-2); color: var(--r-text); font: inherit; font-size: 16px; font-weight: 800; text-align: center;
  -moz-appearance: textfield; appearance: textfield;
}
.ptn-in::-webkit-outer-spin-button, .ptn-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ptn-row-sum { font-size: 16px; font-weight: 800; text-align: end; white-space: nowrap; }
.ptn-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 14px 4px 4px; border-top: 1px solid var(--r-line-2); margin-top: 4px;
}
.ptn-total-t { font-size: 14px; font-weight: 700; color: var(--r-muted); }
.ptn-total-v { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--r-green); }
.ptn-calc-btn { align-self: stretch; }

/* ── Кому подходит ── */
.ptn-who { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ptn-who-i { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--r-block-shadow); }
.ptn-ico { display: flex; width: 48px; height: 48px; flex: none; align-items: center; justify-content: center; border-radius: 14px; background: var(--r-brand-tint); color: var(--r-link); }
.ptn-who-h { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.25; }
.ptn-who-d { margin: 0; font-size: 14px; color: var(--r-muted); line-height: 1.55; }

/* ── Риски ── */
.ptn-risks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ptn-risk { display: flex; gap: 14px; align-items: flex-start; padding: 22px 24px; min-width: 0; }
.ptn-risk:first-child { grid-column: 1 / -1; border-color: var(--r-red-line); }
.ptn-risk-ic { display: flex; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border-radius: 12px; background: var(--r-red-line); color: var(--r-red); }
.ptn-risk-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ptn-risk-h { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; }
.ptn-risk-d { font-size: 14px; color: var(--r-muted); line-height: 1.55; }

/* ── Вопросы ── */
.ptn-faq-sec { padding-top: 56px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
.ptn-qa { display: flex; flex-direction: column; min-width: 0; }
.ptn-qa-i { padding: 20px 0; border-top: 1px solid var(--r-line-2); }
.ptn-qa-i:last-child { border-bottom: 1px solid var(--r-line-2); }
.ptn-qa-i summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  font-size: 17px; font-weight: 800; line-height: 1.35;
}
.ptn-qa-i summary::-webkit-details-marker { display: none; }
.ptn-qa-i summary:focus-visible { outline: 2px solid var(--r-brand-2); outline-offset: 4px; border-radius: 6px; }
.ptn-qa-ic {
  width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--r-hover); color: var(--r-text);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800;
}
.ptn-qa-ic::before { content: "+"; }
.ptn-qa-i[open] .ptn-qa-ic { background: var(--r-brand); color: #FFFFFF; }
.ptn-qa-i[open] .ptn-qa-ic::before { content: "\2212"; }
.ptn-qa-i p { margin: 10px 0 0; font-size: 15px; color: var(--r-muted); line-height: 1.6; }

/* ── По теме ── */
.ptn-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ptn-lk {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; min-width: 0; text-decoration: none; color: var(--r-text);
  transition: border-color .16s ease, background .16s ease;
}
.ptn-lk:hover { border-color: var(--r-brand-2); color: var(--r-text); }
.ptn-lk .ptn-ico { width: 44px; height: 44px; border-radius: 12px; }
.ptn-lk-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ptn-lk-t b { font-size: 16px; font-weight: 800; }
.ptn-lk-t span { font-size: 13px; color: var(--r-muted); line-height: 1.45; }
.ptn-chev { flex: none; color: var(--r-faint); }
[dir="rtl"] .ptn-chev { transform: scaleX(-1); }
.ptn-blog { display: flex; flex-direction: column; gap: 12px; }
.ptn-blog-ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.ptn-blog-ul li { min-width: 0; }
.ptn-blog-ul a { color: var(--r-link); font-size: 15px; font-weight: 700; line-height: 1.45; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ptn-blog-ul a:hover { color: var(--r-link-hover); }

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

/* ── Планшет и телефон ── */
@media (max-width: 1199px) {
  .ptn-steps, .ptn-who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptn-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .ptn-terms-grid, .ptn-calc { grid-template-columns: 1fr; }
  .ptn-faq-sec { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 899px) {
  .ptn-hero { grid-template-columns: 1fr; padding: 32px 28px; gap: 28px; }
  .ptn-hero-art { padding-top: 24px; justify-content: flex-start; }
  .ptn-coins { width: 120px; height: 120px; top: -12px; inset-inline-end: 0; }
  .ptn-two { grid-template-columns: 1fr; }
  .ptn-calc { padding: 32px 28px; gap: 24px; }
}
@media (max-width: 719px) {
  .ptn-hero { padding: 26px 20px; gap: 22px; }
  .ptn-hero .r-lead { font-size: 16px; }
  .ptn-btns .r-btn { flex: 1 1 auto; }
  /* Длинные подписи кнопок (de, ru) на 320 px — в две строки, а не за край. */
  .ptn .r-btn { white-space: normal; text-align: center; height: auto; min-height: 52px; padding-block: 12px; line-height: 1.25; }
  .ptn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 4px; }
  .ptn-stat-n { font-size: 26px; }
  .ptn-stat-t { max-width: none; font-size: 12px; }
  .ptn-hero-art { justify-content: center; }
  .ptn-coins { width: 96px; height: 96px; top: -4px; inset-inline-end: -6px; }
  .ptn-panel { padding: 16px; border-radius: 24px; }
  .ptn-steps, .ptn-who, .ptn-links, .ptn-risks { grid-template-columns: 1fr; gap: 12px; }
  .ptn-step { padding: 20px; flex-direction: row; gap: 16px; }
  .ptn-step-n { font-size: 36px; min-width: 48px; }
  .ptn-tbl-box { padding: 22px 18px; border-radius: 24px; }
  .ptn-tbl { font-size: 14px; }
  .ptn-tbl th[scope="row"] { width: 42%; }
  .ptn-calc { padding: 26px 18px; }
  .ptn-calc-box { padding: 12px; border-radius: 20px; }
  .ptn-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px; }
  .ptn-row-sum { grid-column: 1 / -1; text-align: start; font-size: 14px; color: var(--r-muted); }
  .ptn-total-v { font-size: 30px; }
  .ptn-who-i { padding: 20px; }
  .ptn-risk { padding: 18px; }
  .ptn-faq-sec { padding-top: 40px; }
  .ptn-qa-i summary { font-size: 16px; }
  .ptn-blog-ul { grid-template-columns: 1fr; }
  .ptn-final { padding: 28px 20px; }
  .ptn-final .r-btn { flex: 1 1 auto; }
}
@media (max-width: 359px) {
  .ptn-hero { padding: 22px 16px; }
  .ptn-stat-n { font-size: 22px; }
  .ptn-stats { gap: 8px; }
  .ptn-tbl--cards { font-size: 13px; }
  .ptn-tbl--cards td, .ptn-tbl--cards thead th:not(:first-child) { padding-inline-start: 8px; }
  .ptn-tbl--cards thead th { font-size: 10px; letter-spacing: 0.04em; }
  .ptn-fun { grid-template-columns: 80px 1fr; }
  .ptn-tbl-box { padding: 18px 14px; }
  .ptn-tbl th[scope="row"] { width: 45%; padding-inline-end: 10px; }
  .ptn-calc { padding: 22px 14px; }
  .ptn-row { padding: 10px; }
  .ptn-in { width: 52px; }
  .ptn-pm { width: 34px; height: 34px; }
  .ptn-final { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ptn-lk { transition: none; }
}

/* 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; }
}
