/*
 * Зона stocks-countries (волна SEO 25.11 «б»): /us-stocks-nigeria/, /us-stocks-india/, /us-stocks-pakistan/,
 * /us-stocks-philippines/. Разметка — tools/r26/pages/_stc-kit.mjs, расчёт — assets/r26-stocks-countries.js.
 * Только токены r26 (assets/r26.css): тёмная тема — без атрибута, светлая — html[data-theme="light"].
 * Приставка stc-. Телефон: 1199 / 899 / 719 / 379 / 359 px, без боковой прокрутки на 320. RTL — логические свойства.
 */

.stc .r-wrap :is(h1, h2) { text-wrap: balance; }
.stc-top { padding-top: 12px; }
.stc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stc bdi { unicode-bidi: isolate; direction: ltr; white-space: nowrap; }
.stc .r-btn svg { flex: none; }
.stc-h3 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--r-text); letter-spacing: -0.005em; }

/* ══ Первый экран: маршрут денег ══════════════════════════════════════════ */
.stc-hero { grid-template-columns: 1.15fr 0.85fr; }
.stc-answer { max-width: 680px; }
.stc-hero-art { min-width: 0; }
.stc-route {
  width: 100%; max-width: 350px; box-sizing: border-box; padding: 22px; 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: 14px;
}
.stc-route-k { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-accent); }
.stc-route-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.stc-route-i { position: relative; display: flex; gap: 12px; align-items: flex-start; padding-bottom: 16px; }
.stc-route-i::before {
  content: ""; position: absolute; inset-inline-start: 19px; top: 42px; bottom: 2px; width: 2px;
  background: var(--r-line-3); border-radius: 2px;
}
.stc-route-i--end { padding-bottom: 0; }
.stc-route-i--end::before { display: none; }
.stc-route-ic {
  flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.stc-route-i--end .stc-route-ic { background: var(--r-green-tint); color: var(--r-green); }
.stc-route-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.stc-route-t b { font-size: 15px; font-weight: 800; color: var(--r-text); }
.stc-route-t span { font-size: 12.5px; color: var(--r-muted); line-height: 1.4; }

/* ══ Таблицы ══════════════════════════════════════════════════════════════ */
.stc-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;
}
.stc-tbl-wrap:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }
.stc-tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.stc-tbl :is(th, td) { padding: 15px 22px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--r-line); }
.stc-tbl tbody tr:last-child :is(th, td) { border-bottom: 0; }
.stc-tbl thead th { font-size: 14px; font-weight: 800; color: var(--r-muted); background: var(--r-fill-1); }
.stc-tbl tbody th { font-size: 14px; font-weight: 800; color: var(--r-muted); }
.stc-tbl td { color: var(--r-text-2); }
.stc-tbl--kv tbody th { width: 32%; }
.stc-tbl--kv td { color: var(--r-text); }
.stc-tbl--cmp { min-width: 640px; }
.stc-tbl--cmp tbody th { width: 22%; }
.stc-tbl--cmp thead .stc-on { color: var(--r-green); background: var(--r-green-tint); }
.stc-tbl--cmp td.stc-on { color: var(--r-text); font-weight: 700; background: var(--r-green-tint); }
.stc-foot { margin: 10px 0 0; font-size: 13.5px; color: var(--r-faint); line-height: 1.6; }
.stc-foot a { color: var(--r-link); font-weight: 700; text-decoration: none; }
.stc-foot a:hover { color: var(--r-link-hover); text-decoration: underline; }

/* ══ Официальные правила ══════════════════════════════════════════════════ */
.stc-law { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-law:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.stc-law-i { padding: 26px; display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.stc-law-ic {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.stc-law-b { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stc-law-b p { margin: 0; font-size: 15px; color: var(--r-text-2); line-height: 1.6; }
.stc-law-src { font-size: 13.5px !important; color: var(--r-muted) !important; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.stc-law-src a { color: var(--r-link); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.stc-law-src a:hover { color: var(--r-link-hover); text-decoration: underline; }
.stc-law-src svg { color: var(--r-faint); }
.stc-note { margin-top: 14px; }

/* ══ Шаги ═════════════════════════════════════════════════════════════════ */
.stc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stc-step { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stc-step p { margin: 0; font-size: 14.5px; color: var(--r-text-2); line-height: 1.6; }
.stc-step-top { display: flex; justify-content: space-between; align-items: center; }
.stc-step-n { font-size: 28px; font-weight: 800; line-height: 1; color: var(--r-faint); }
.stc-step-a { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--r-link); text-decoration: none; }
.stc-step-a:hover { color: var(--r-link-hover); }
.stc-ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
[dir="rtl"] .stc-arr { transform: scaleX(-1); }

/* ══ Калькулятор ══════════════════════════════════════════════════════════ */
.stc-calc { display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; }
.stc-form { padding: 32px; display: flex; flex-direction: column; gap: 20px; justify-content: center; min-width: 0; }
.stc-f { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.stc-f-l { font-size: 13px; font-weight: 800; color: var(--r-text-2); line-height: 1.35; }
.stc-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; direction: ltr;
}
[dir="rtl"] .stc-in { text-align: end; }
.stc-in--big { height: 58px; font-size: 22px; }
.stc-in::placeholder { color: var(--r-faint); font-weight: 600; font-size: 15px; }
.stc-in:focus { outline: 2px solid var(--r-accent); outline-offset: 1px; border-color: transparent; }
.stc-in[aria-invalid="true"] { border-color: var(--r-red); }
.stc-range { display: flex; align-items: center; gap: 14px; }
.stc-range input { flex: 1; min-width: 0; accent-color: var(--r-accent); }
.stc-range output { flex: none; min-width: 58px; text-align: end; font-size: 18px; font-weight: 800; color: var(--r-text); direction: ltr; }
.stc-calc-note { margin: 0; font-size: 13px; color: var(--r-faint); line-height: 1.55; }
.stc-out {
  padding: 32px; display: flex; flex-direction: column; gap: 12px; justify-content: center; min-width: 0;
  background: var(--r-fill-1); border-inline-start: 1px solid var(--r-line-2);
}
.stc-out-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; color: var(--r-muted); }
.stc-out-row > span { min-width: 0; }
.stc-out-row b { color: var(--r-text); font-size: 16px; font-weight: 800; text-align: end; }
.stc-out-mid { padding: 10px 0; border-top: 1px dashed var(--r-line-3); border-bottom: 1px dashed var(--r-line-3); color: var(--r-text); font-weight: 700; }
.stc-out-total { padding-top: 12px; border-top: 1px solid var(--r-line-3); color: var(--r-text); font-weight: 700; }
.stc-out-total b { font-size: clamp(20px, 2vw + 8px, 26px); color: var(--r-green); }
.stc-out-loc b { color: var(--r-accent); }
.stc-msg { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--r-muted); min-height: 2.9em; }
.stc-msg.is-warn { color: var(--r-red); }
.stc-out-btn { align-self: flex-start; margin-top: 4px; }

/* ══ Карточки ═════════════════════════════════════════════════════════════ */
.stc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stc-cards--2 .stc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stc-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stc-card p { margin: 0; font-size: 15px; color: var(--r-text-2); line-height: 1.6; }

/* ══ Риски ════════════════════════════════════════════════════════════════ */
.stc-risk { padding: 36px; }
.stc-risks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-risk-i { display: flex; gap: 12px; align-items: flex-start; padding: 20px; border-radius: 20px; background: var(--r-surface); border: 1px solid var(--r-red-line); min-width: 0; }
.stc-risk-ic { flex: none; color: var(--r-red); margin-top: 2px; }
.stc-risk-i > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stc-risk-i .stc-h3 { font-size: 16px; }
.stc-risk-i p { margin: 0; font-size: 14.5px; color: var(--r-muted); line-height: 1.55; }
.stc-legal { margin: 18px 0 0; font-size: 13.5px; color: var(--r-faint); line-height: 1.6; max-width: 900px; }

/* ══ Вопросы ══════════════════════════════════════════════════════════════ */
.stc-qa { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.stc-qa-i { border-radius: 20px; background: var(--r-surface); border: 1px solid var(--r-line); }
.stc-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;
}
.stc-qa-i summary::-webkit-details-marker { display: none; }
.stc-qa-i summary:focus-visible { outline: 2px solid var(--r-accent); outline-offset: -2px; border-radius: 20px; }
.stc-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; }
.stc-qa-i[open] .stc-qa-ic { transform: rotate(45deg); }
.stc-qa-i p { margin: 0; padding: 0 22px 20px; font-size: 15px; color: var(--r-text-2); line-height: 1.65; max-width: 75ch; }

/* ══ Ссылки и финал ═══════════════════════════════════════════════════════ */
.stc-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-link { position: relative; padding: 22px; padding-inline-end: 52px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--r-text); min-width: 0; transition: border-color .16s ease; }
.stc-link:hover { border-color: var(--r-brand-2); }
.stc-link b { font-size: 16px; font-weight: 800; line-height: 1.35; }
.stc-link span { font-size: 14px; color: var(--r-muted); line-height: 1.5; }
.stc-link .stc-arr { position: absolute; inset-inline-end: 22px; top: 24px; color: var(--r-link); }
.stc-final { padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.stc-final-txt { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 640px; min-width: 0; }
.stc-final .r-btns { position: relative; flex: none; }

/* ══ Планшет и телефон ════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .stc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .stc-hero { grid-template-columns: 1fr; }
  .stc-hero-art { justify-content: flex-start; }
  .stc-calc { grid-template-columns: 1fr; }
  .stc-out { border-inline-start: 0; border-top: 1px solid var(--r-line-2); }
  .stc-law, .stc-links, .stc-risks { grid-template-columns: 1fr; }
  .stc-final { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
  .stc-cards--2 .stc-cards { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .stc-route { max-width: none; }
  .stc-route.r-float { animation: none; }
  .stc-steps, .stc-cards { grid-template-columns: 1fr; }
  .stc-step, .stc-card, .stc-law-i { padding: 22px 20px; }
  .stc-law-i { flex-direction: column; }
  .stc-form, .stc-out { padding: 22px 20px; }
  .stc-risk { padding: 26px 18px; }
  .stc-out-btn, .stc-final .r-btns, .stc-final .r-btn { align-self: stretch; width: 100%; }
  .stc .r-hero-txt .r-btns .r-btn { flex: 1 1 100%; }
  .stc-tbl :is(th, td) { padding: 13px 15px; font-size: 14px; }
  .stc-tbl--kv tbody th { width: 38%; }
  /* Сравнение на телефоне — карточками: строка = заголовок + значения с подписью колонки (data-t-col переводится). */
  .stc-tbl--cmp { min-width: 0; }
  .stc-tbl--cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stc-tbl--cmp tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--r-line); }
  .stc-tbl--cmp tbody tr:last-child { border-bottom: 0; }
  .stc-tbl--cmp :is(th, td) { display: block; width: auto !important; padding: 0; border: 0; }
  .stc-tbl--cmp tbody th { margin-bottom: 8px; color: var(--r-text); font-size: 15px; }
  .stc-tbl--cmp td { padding: 8px 10px; border-radius: 12px; background: var(--r-fill-1); }
  .stc-tbl--cmp td + td { margin-top: 6px; }
  .stc-tbl--cmp td::before { content: attr(data-t-col); display: block; font-size: 12px; font-weight: 800; color: var(--r-muted); margin-bottom: 2px; }
  .stc-tbl--cmp td.stc-on::before { color: var(--r-green); }
  .stc-final { padding: 28px 20px; }
  .stc-qa-i summary { padding: 16px 18px; font-size: 15px; }
  .stc-qa-i p { padding: 0 18px 18px; }
}
@media (max-width: 379px) {
  main .stc .r-btn { white-space: normal; height: auto; min-height: 52px; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; text-align: center; }
}
@media (max-width: 359px) {
  .stc-route { padding: 16px; }
  .stc-form, .stc-out { padding: 18px 16px; }
  .stc-in, .stc-in--big { font-size: 17px; }
  .stc-tbl--kv :is(th, td) { display: block; width: auto; }
  .stc-tbl--kv tbody th { padding-bottom: 2px; border-bottom: 0; }
  .stc .r-chip { white-space: normal; height: auto; min-height: 34px; padding: 6px 12px; }
}
