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

.cl-top { padding-top: 12px; }
.cl-hero { grid-template-columns: 1.25fr 0.75fr; }
.cl-h1 { font-size: clamp(32px, 3.6vw + 6px, 52px); }
.cl-chips { margin-top: 4px; }
.cl-hero .r-btn svg, .cl-go svg, .cl-final-btn svg { flex: none; }
.cl-hero .r-btns .r-btn { gap: 10px; }
.cl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cl-bad { color: var(--r-red); }

/* ── Карточка займа (первый экран) ───────────────────────────────────── */
.cl-art { flex-direction: column; align-items: center; }
.cl-art-img { position: absolute; top: -34px; inset-inline-end: -10px; width: 150px !important; height: 150px !important; opacity: 0.9; }
.cl-loan {
  position: relative; width: 100%; max-width: 330px; box-sizing: border-box; margin-top: 56px;
  display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 16px;
  background: var(--r-surface-3); border: 1px solid var(--r-line-3); border-radius: 24px; box-shadow: var(--r-pop-shadow);
}
.cl-loan-k { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r-accent); }
.cl-loan-v { display: flex; flex-direction: column; gap: 2px; }
.cl-loan-v b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--r-text); }
.cl-loan-v > span { font-size: 13px; color: var(--r-muted); font-weight: 600; }
/* Мини-шкала LTV: заполнено до 30 %, отметки 70 и 83 %. */
.cl-loan-meter { position: relative; height: 8px; border-radius: 999px; background: var(--r-fill-3); }
.cl-loan-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 30%; border-radius: 999px; background: var(--r-green); }
.cl-loan-w, .cl-loan-l { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 2px; }
.cl-loan-w { inset-inline-start: 70%; background: var(--r-accent); }
.cl-loan-l { inset-inline-start: 83%; background: var(--r-red); }
.cl-loan-rows { margin: 0; display: flex; flex-direction: column; }
.cl-loan-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--r-line-2); font-size: 13px; }
.cl-loan-rows dt { color: var(--r-muted); font-weight: 600; }
.cl-loan-rows dd { margin: 0; color: var(--r-text); font-weight: 800; text-align: end; font-variant-numeric: tabular-nums; }
.cl-loan-rows dd.cl-bad { color: var(--r-red); }

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

/* ── Калькулятор ─────────────────────────────────────────────────────── */
.cl-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.cl-form { padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 16px; align-content: start; }
.cl-f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cl-f--wide { grid-column: 1 / -1; }
.cl-f label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 800; color: var(--r-text-2); }
.cl-f input[type="text"], .cl-f select {
  width: 100%; box-sizing: border-box; height: 52px; 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: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.cl-f select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: 44px; }
/* Стрелка списка — рамкой, без картинки: цвет из токена, в RTL сама встаёт слева. */
.cl-sel { position: relative; display: block; }
.cl-sel::after {
  content: ''; position: absolute; top: 50%; inset-inline-end: 20px; width: 7px; height: 7px; margin-top: -6px;
  border-right: 2px solid var(--r-muted); border-bottom: 2px solid var(--r-muted); transform: rotate(45deg); pointer-events: none;
}
.cl-f select option { background: var(--r-surface); color: var(--r-text); }
.cl-f input[type="text"]:focus-visible, .cl-f select:focus-visible { outline: 2px solid var(--r-brand-2); outline-offset: 1px; border-color: transparent; }
.cl-hint { font-size: 12.5px; color: var(--r-muted); line-height: 1.45; }
.cl-f output { font-size: 20px; font-weight: 800; color: var(--r-text); font-variant-numeric: tabular-nums; }
.cl-f input[type="range"] { width: 100%; margin: 6px 0 0; accent-color: var(--r-brand); height: 28px; cursor: pointer; }
.cl-ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--r-faint); font-variant-numeric: tabular-nums; }

.cl-res { padding: 32px; display: flex; flex-direction: column; gap: 16px; background: var(--r-fill-1); border-inline-start: 1px solid var(--r-line); min-width: 0; }
.cl-get { display: flex; flex-direction: column; gap: 4px; }
.cl-get-k { font-size: 13px; font-weight: 800; color: var(--r-muted); }
.cl-get b { font-size: clamp(30px, 2.4vw + 10px, 40px); font-weight: 800; letter-spacing: -0.03em; color: var(--r-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cl-dl { margin: 0; display: flex; flex-direction: column; }
.cl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--r-line-2); }
.cl-row dt { font-size: 14px; color: var(--r-muted); font-weight: 600; min-width: 0; }
.cl-row dd { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--r-text); text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-zones { display: flex; flex-direction: column; gap: 8px; }
.cl-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--r-fill-3); }
.cl-z { display: block; height: 100%; transition: width .2s ease; }
.cl-z--liq { background: var(--r-red); }
.cl-z--warn { background: var(--r-accent); }
.cl-z--safe { background: var(--r-green); }
.cl-legend { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--r-muted); }
.cl-lg { display: inline-flex; align-items: center; gap: 6px; }
.cl-lg::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.cl-lg--liq::before { background: var(--r-red); }
.cl-lg--warn::before { background: var(--r-accent); }
.cl-lg--safe::before { background: var(--r-green); }
.cl-plan { margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--r-red-line); font-size: 14px; line-height: 1.5; color: var(--r-text-2); }
.cl-plan b { color: var(--r-red); margin-inline-end: 4px; }
.cl-msg { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--r-brand-tint); font-size: 14px; font-weight: 700; color: var(--r-text); }
.cl-msg[hidden] { display: none; }
.cl-go { align-self: flex-start; gap: 10px; }
.cl-foot { margin: 0; font-size: 12.5px; color: var(--r-faint); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { .cl-z { transition: none; } }

/* ── Условия ─────────────────────────────────────────────────────────── */
.cl-terms { overflow: hidden; }
.cl-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.cl-tbl th, .cl-tbl td { padding: 15px 22px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--r-line); }
.cl-tbl tr:last-child > * { border-bottom: 0; }
.cl-tbl th { width: 34%; font-weight: 800; color: var(--r-text); }
.cl-tbl td { color: var(--r-text-2); line-height: 1.5; }
.cl-tbl tr:nth-child(even) > * { background: var(--r-fill-1); }

/* ── Два столбца: текст + карточка ───────────────────────────────────── */
.cl-two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.cl-prose p:last-child { margin-bottom: 0; }
.cl-h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--r-text); line-height: 1.25; }

/* Шкала LTV */
.cl-scale-card { padding: 26px; display: flex; flex-direction: column; gap: 20px; }
.cl-scale-h { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r-accent); }
.cl-scale { position: relative; padding-bottom: 30px; }
.cl-track { position: relative; height: 12px; border-radius: 999px; background: var(--r-fill-3); overflow: hidden; }
.cl-seg { position: absolute; inset-block: 0; display: block; }
.cl-seg--start { background: var(--r-green); }
.cl-seg--warn { background: var(--r-accent); }
.cl-seg--liq { background: var(--r-red); }
.cl-mks { position: absolute; inset-inline: 0; top: 16px; height: 22px; }
.cl-mk { position: absolute; top: 0; display: flex; padding: 4px 0 0; padding-inline-start: 6px; border-inline-start: 2px solid currentColor; line-height: 1.2; white-space: nowrap; }
.cl-mk b { font-size: 13px; font-weight: 800; color: var(--r-text); font-variant-numeric: tabular-nums; }
.cl-mk--start { color: var(--r-green); }
.cl-mk--warn { color: var(--r-accent); transform: translateX(-100%); padding-inline-start: 0; padding-inline-end: 6px; border-inline-start: 0; border-inline-end: 2px solid currentColor; }
[dir="rtl"] .cl-mk--warn { transform: translateX(100%); }
.cl-mk--liq { color: var(--r-red); }
.cl-scale-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--r-muted); }
.cl-sl { position: relative; padding-inline-start: 18px; }
.cl-sl::before { content: ''; position: absolute; inset-inline-start: 0; top: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--r-faint); }
.cl-sl--start::before, .cl-sl--ok::before { background: var(--r-green); }
.cl-sl--warn::before { background: var(--r-accent); }
.cl-sl--liq::before { background: var(--r-red); }
.cl-scale-list b { color: var(--r-text); font-weight: 800; margin-inline-end: 4px; }

/* Пример ликвидации */
.cl-case { padding: 26px; display: flex; flex-direction: column; gap: 16px; border-color: var(--r-red-line); }
.cl-case-h { font-size: 15px; font-weight: 800; color: var(--r-text); line-height: 1.35; }
.cl-case-list { margin: 0; padding: 0; list-style: none; counter-reset: cl; display: flex; flex-direction: column; gap: 14px; }
.cl-case-list li { counter-increment: cl; position: relative; padding-inline-start: 40px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; line-height: 1.45; color: var(--r-muted); }
.cl-case-list li::before {
  content: counter(cl); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px; background: var(--r-red-line); color: var(--r-red); font-size: 13px; font-weight: 800;
}
.cl-case-list b { color: var(--r-text); font-size: 15px; font-weight: 800; }

/* Списки с отметками */
.cl-avoid, .cl-not { display: flex; flex-direction: column; gap: 18px; }
.cl-not { padding: 28px; }
.cl-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.cl-checks li, .cl-risk { display: flex; gap: 14px; align-items: flex-start; }
.cl-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; margin-top: 1px; }
.cl-ok .cl-mark { background: var(--r-green-tint); color: var(--r-green); }
.cl-no .cl-mark { background: var(--r-red-line); color: var(--r-red); }
.cl-li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cl-li b { font-size: 16px; font-weight: 800; color: var(--r-text); }
.cl-li span { font-size: 14.5px; color: var(--r-muted); line-height: 1.5; }
.cl-more { margin: 0; font-size: 15px; font-weight: 700; }
.cl-more a { color: var(--r-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cl-more a:hover { color: var(--r-link-hover); }

/* ── Сценарии ────────────────────────────────────────────────────────── */
.cl-uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cl-use { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.cl-use-t { font-size: 17px; font-weight: 800; color: var(--r-text); line-height: 1.25; }
.cl-use-d { font-size: 14.5px; color: var(--r-muted); line-height: 1.5; }
.cl-use-a { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--r-link); text-decoration: none; }
.cl-use-a:hover { color: var(--r-link-hover); }
.cl-arr { flex: none; }
[dir="rtl"] .cl-arr { transform: scaleX(-1); }

/* ── Займ или продажа ────────────────────────────────────────────────── */
.cl-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cl-vs-c { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.cl-vs-c--loan { border-color: var(--r-brand-2); }
.cl-vs-h { font-size: 19px; font-weight: 800; color: var(--r-text); }
.cl-vs-list { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--r-text-2); }
.cl-vs-list li::marker { color: var(--r-accent); }

/* ── Риски ───────────────────────────────────────────────────────────── */
.cl-risks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cl-risk { padding: 22px 24px; }
.cl-risk .cl-mark { background: var(--r-red-line); color: var(--r-red); width: 36px; height: 36px; border-radius: 12px; }
.cl-risk:nth-child(n+5) .cl-mark { background: var(--r-brand-tint); color: var(--r-link); }

/* ── Вопросы (общая вёрстка .qa из site.css) ─────────────────────────── */
.cl-faq { max-width: 900px; background: var(--r-surface); border-color: var(--r-line); border-radius: 24px; }
.cl-faq .qa-item + .qa-item { border-top: 1px solid var(--r-line); }
.cl-faq summary { color: var(--r-text); }
.cl-faq summary::after { content: '+'; font-size: 22px; font-weight: 500; color: var(--r-muted); flex: 0 0 auto; transition: transform .2s ease; }
.cl-faq details[open] > summary::after { transform: rotate(45deg); }
.cl-faq .qa-body { color: var(--r-text-2); line-height: 1.6; }

/* ── По теме ─────────────────────────────────────────────────────────── */
.cl-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cl-link { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.cl-link:hover { background: var(--r-surface-3); border-color: var(--r-line-3); }
.cl-link-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; font-weight: 800; color: var(--r-text); }
.cl-link-d { font-size: 14px; color: var(--r-muted); line-height: 1.45; }
.cl-link .cl-arr { color: var(--r-link); }
.cl-posts { display: flex; flex-direction: column; border-top: 1px solid var(--r-line); }
.cl-posts-h { padding: 18px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r-accent); }
.cl-post { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--r-line); font-size: 15.5px; font-weight: 700; color: var(--r-text-2); text-decoration: none; }
.cl-post:hover { color: var(--r-link); }
.cl-post .cl-arr { color: var(--r-link); }

/* ── Финальный призыв ────────────────────────────────────────────────── */
.cl-final { padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cl-final-txt { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.cl-final-btn { position: relative; flex: none; gap: 10px; }

/* ── Планшет и телефон ───────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .cl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-two { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
}
@media (max-width: 1023px) {
  .cl-calc { grid-template-columns: 1fr; }
  .cl-res { border-inline-start: 0; border-top: 1px solid var(--r-line); }
  .cl-uses, .cl-links, .cl-risks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-two { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .cl-hero { grid-template-columns: 1fr; }
  .cl-art { align-items: flex-start; }
  .cl-loan { margin-top: 0; }
  .cl-art-img { display: none; }
  .cl-final { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
}
@media (max-width: 719px) {
  .cl-steps, .cl-uses, .cl-links, .cl-vs, .cl-risks, .cl-checks { grid-template-columns: 1fr; }
  .cl-form, .cl-res { padding: 22px 20px; }
  .cl-form { grid-template-columns: 1fr; }
  .cl-step, .cl-use { padding: 20px; }
  .cl-tbl, .cl-tbl tbody, .cl-tbl tr, .cl-tbl th, .cl-tbl td { display: block; width: auto; }
  .cl-tbl th { padding: 14px 18px 2px; border-bottom: 0; }
  .cl-tbl td { padding: 0 18px 14px; }
  .cl-tbl tr { border-bottom: 1px solid var(--r-line); }
  .cl-tbl tr:last-child { border-bottom: 0; }
  .cl-scale-card, .cl-case, .cl-not, .cl-vs-c { padding: 22px 20px; }
  .cl-row { flex-wrap: wrap; gap: 2px 12px; }
  .cl-row dd { white-space: normal; }
  .cl-go, .cl-final-btn { align-self: stretch; }
  .cl-final { padding: 28px 20px; }
  .cl-loan { max-width: none; }
}
@media (max-width: 359px) {
  .cl-form, .cl-res { padding: 20px 16px; }
  .cl-mk { font-size: 10.5px; }
  .cl-mk b { font-size: 12px; }
}

/* «Читать дальше»: шесть карточек — 3 + 3, без одинокой в последнем ряду. */
.sx-next.cl-next { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) { .sx-next.cl-next { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) { .sx-next.cl-next { grid-template-columns: 1fr; } }

/* RTL: числа с валютой и диапазоны («3 000 USDT», «30–35%», «$36 144,58») — изолированно слева
   направо, иначе в арабском тексте знаки переставляются («35%–30», «USDT 3 000»). */
.cl-mk b, .cl-scale-list b, .cl-ends span, .cl-row dd > span, .cl-loan-rows dd, .cl-loan-v b, .cl-f output { unicode-bidi: isolate; direction: ltr; }
[dir="rtl"] .cl-get b { direction: ltr; unicode-bidi: isolate; text-align: right; }
[dir="rtl"] .cl-loan-rows dd { text-align: left; }
[dir="rtl"] .cl-loan-v b { text-align: right; }

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