/*
 * Зона tuition-destinations (SEO-волна 25.11.2026 (в)): /pay-tuition-uk/, /pay-tuition-us/, /pay-tuition-canada/,
 * /pay-tuition-australia/. Разметка — tools/r26/pages/_tud-kit.mjs, приставка tud-.
 * Только токены r26 (assets/r26.css): тёмная тема — без атрибута, светлая — html[data-theme="light"]
 * (токены меняются сами). Телефон: 1199 / 899 / 719 / 379 / 359 px, без боковой прокрутки на 320.
 * RTL — логические свойства.
 */

.tud .r-wrap :is(h1, h2) { text-wrap: balance; }
.tud-top { padding-top: 12px; }
.tud bdi { unicode-bidi: isolate; direction: ltr; white-space: nowrap; }
.tud .r-btn svg { flex: none; }
.tud-foot { margin: -8px 0 0; font-size: 13px; color: var(--r-faint); line-height: 1.55; max-width: 900px; }
.tud-src {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--r-link);
  text-decoration: none; overflow-wrap: anywhere;
}
.tud-src:hover { text-decoration: underline; }
.tud-ext { flex: none; }

/* ══ Первый экран: макет «Проверка и оплата» ══════════════════════════════ */
.tud-hero { grid-template-columns: 1.15fr 0.85fr; }
.tud-answer { max-width: 62ch; }
.tud-chips { padding-top: 4px; }
.tud-hero-art { min-width: 0; }
.tud-mock {
  width: 100%; max-width: 370px; 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: 11px;
}
.tud-mock-step { display: flex; flex-direction: column; gap: 2px; }
.tud-mock-step span { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--r-accent); }
.tud-mock-step b { font-size: 17px; font-weight: 800; color: var(--r-text); }
.tud-mock-gets {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 16px;
  background: var(--r-brand-tint); border: 1px solid var(--r-line-2);
}
.tud-mock-gets span { font-size: 12px; font-weight: 700; color: var(--r-muted); }
.tud-mock-gets b { font-size: 26px; font-weight: 800; color: var(--r-text); line-height: 1.15; }
.tud-mock-gets b i { font-style: normal; font-size: 15px; color: var(--r-link); }
.tud-mock-gets small { font-size: 11.5px; color: var(--r-faint); }
.tud-mock-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--r-muted); }
.tud-mock-row b { color: var(--r-text); font-weight: 800; }
.tud-mock-total { padding-top: 10px; border-top: 1px dashed var(--r-line-3); color: var(--r-text); font-weight: 700; }
.tud-mock-total b { font-size: 17px; color: var(--r-green); }
.tud-mock-to { display: flex; gap: 12px; align-items: center; padding-top: 4px; }
.tud-mock-ico {
  flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--r-fill-2); border: 1px solid var(--r-line-2); color: var(--r-link);
}
.tud-mock-to > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tud-mock-to b { font-size: 14.5px; font-weight: 800; color: var(--r-text); }
.tud-mock-to small { font-size: 12px; color: var(--r-muted); }
.tud-mock-ref {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--r-fill-2); border: 1px dashed var(--r-line-3); font-size: 11.5px; font-weight: 800; color: var(--r-faint);
  letter-spacing: .04em; text-transform: uppercase;
}
.tud-mock-ref b { font-size: 14px; color: var(--r-text); letter-spacing: 0; text-transform: none; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ══ Вузы страны ══════════════════════════════════════════════════════════ */
.tud-unis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tud-uni { padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tud-uni-t { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 18px; font-weight: 800; color: var(--r-text); line-height: 1.3; }
.tud-uni-t svg { flex: none; color: var(--r-link); margin-top: 1px; }
.tud-uni-dl { margin: 0; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.tud-uni-dl div { display: flex; flex-direction: column; gap: 3px; }
.tud-uni-dl dt { font-size: 12px; font-weight: 800; color: var(--r-faint); letter-spacing: .04em; text-transform: uppercase; }
.tud-uni-dl dd { margin: 0; font-size: 14.5px; color: var(--r-text-2); line-height: 1.55; }
.tud-uni-nx { padding: 12px 14px; border-radius: 14px; background: var(--r-brand-tint); }
.tud-uni-nx dd { color: var(--r-text); font-weight: 600; }

/* ══ Два пути ═════════════════════════════════════════════════════════════ */
.tud-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tud-path { padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tud-path-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.tud-path-t { margin: 0; font-size: 19px; font-weight: 800; color: var(--r-text); line-height: 1.3; }
.tud-path-d { margin: 0; font-size: 15px; color: var(--r-text-2); line-height: 1.6; }
.tud-path-n { margin: 0; padding-top: 12px; border-top: 1px solid var(--r-line); font-size: 13.5px; color: var(--r-muted); line-height: 1.55; }

/* ══ Таблицы ══════════════════════════════════════════════════════════════ */
.tud-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;
}
.tud-tbl-wrap:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }
.tud-tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.tud-tbl :is(th, td) { padding: 15px 22px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--r-line); }
.tud-tbl tbody tr:last-child :is(th, td) { border-bottom: 0; }
.tud-tbl th { font-weight: 800; color: var(--r-text); }
.tud-tbl td { color: var(--r-text-2); }
.tud-tbl--kv th { width: 30%; font-size: 14px; color: var(--r-muted); }
.tud-tbl--kv td { color: var(--r-text); font-weight: 600; }
.tud-tbl--ex thead th { font-size: 13.5px; color: var(--r-muted); background: var(--r-fill-1); }
.tud-tbl--ex td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tud-tbl--ex td.tud-net { color: var(--r-green); font-weight: 800; }

/* ══ Шаги ═════════════════════════════════════════════════════════════════ */
.tud-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tud-step {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: 24px;
  background: var(--r-surface); border: 1px solid var(--r-line); min-width: 0;
}
.tud-step-n { position: absolute; inset-inline-end: 18px; top: 16px; font-size: 13px; font-weight: 800; color: var(--r-accent); letter-spacing: 0.08em; }
.tud-step-ico {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--r-brand-tint); color: var(--r-link);
}
.tud-step-b { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-inline-end: 18px; }
.tud-step-t { font-size: 17px; font-weight: 800; color: var(--r-text); line-height: 1.3; }
.tud-step-d { font-size: 14px; color: var(--r-muted); line-height: 1.55; }

/* ══ Сроки ════════════════════════════════════════════════════════════════ */
.tud-time { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-width: 980px; }
.tud-time-i {
  position: relative; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; padding: 0 0 22px;
}
.tud-time-i::before {
  content: ''; position: absolute; inset-inline-start: 199px; top: 8px; bottom: 0; width: 2px; background: var(--r-line-2);
}
.tud-time-i:last-child::before { display: none; }
.tud-time-w { font-size: 14px; font-weight: 800; color: var(--r-link); line-height: 1.45; padding-top: 1px; position: relative; padding-inline-end: 18px; }
.tud-time-w::after {
  content: ''; position: absolute; inset-inline-end: -6px; top: 5px; width: 12px; height: 12px; border-radius: 99px;
  background: var(--r-accent); box-shadow: 0 0 0 4px var(--r-bg);
}
.tud-time-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tud-time-b b { font-size: 16.5px; font-weight: 800; color: var(--r-text); line-height: 1.35; }
.tud-time-b span { font-size: 14.5px; color: var(--r-muted); line-height: 1.6; }

/* ══ Назначение платежа ═══════════════════════════════════════════════════ */
.tud-refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tud-ref {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; border-radius: 20px;
  background: var(--r-surface); border: 1px solid var(--r-line); min-width: 0;
}
.tud-ref-ico { flex: none; color: var(--r-accent); margin-top: 1px; }
.tud-ref-b { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tud-ref-b b { font-size: 16px; font-weight: 800; color: var(--r-text); line-height: 1.35; }
.tud-ref-b > span { font-size: 14.5px; color: var(--r-muted); line-height: 1.55; }
.tud-ref-b code {
  align-self: flex-start; max-width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 10px;
  background: var(--r-fill-2); border: 1px dashed var(--r-line-3); color: var(--r-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere;
}
.tud-ref-b code bdi { white-space: normal; }

/* ══ Калькулятор ══════════════════════════════════════════════════════════ */
.tud-calc { display: grid; grid-template-columns: 1.05fr 0.95fr; }
.tud-form { padding: 32px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tud-f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tud-f-l { font-size: 13px; font-weight: 800; color: var(--r-text-2); line-height: 1.35; }
.tud-in-wrap { position: relative; display: block; }
.tud-in {
  width: 100%; box-sizing: border-box; height: 56px; padding-block: 0; padding-inline: 16px 78px; 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;
}
.tud-in:focus { outline: 2px solid var(--r-accent); outline-offset: 1px; border-color: transparent; }
.tud-in[aria-invalid="true"] { border-color: var(--r-red); }
.tud-in-cur {
  position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 800; color: var(--r-muted); pointer-events: none;
}
.tud-hint { font-size: 13px; line-height: 1.45; color: var(--r-muted); }
.tud-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.tud-q {
  min-height: 38px; padding: 6px 14px; border-radius: 999px; cursor: pointer; text-align: start;
  background: var(--r-fill-2); border: 1px solid var(--r-line-3); color: var(--r-text-2); font: inherit; font-size: 13.5px; font-weight: 800;
  line-height: 1.25;
}
.tud-q[aria-pressed="true"] { background: var(--r-brand-tint); border-color: var(--r-brand-2); color: var(--r-link); }
.tud-q:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }
.tud-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);
}
.tud-out-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--r-muted); }
.tud-out-row b { color: var(--r-text); font-size: 17px; font-weight: 800; }
.tud-out-total { padding-top: 14px; border-top: 1px solid var(--r-line-3); color: var(--r-text); font-weight: 700; }
.tud-out-total b { font-size: clamp(22px, 2vw + 10px, 30px); color: var(--r-green); }
.tud-msg { margin: 0; font-size: 13px; line-height: 1.5; color: var(--r-muted); min-height: 2.9em; }
.tud-msg.is-warn { color: var(--r-red); }
.tud-out-btn { align-self: flex-start; margin-top: 4px; }

/* ══ Если вы платите из … ═════════════════════════════════════════════════ */
.tud-payers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tud-payer { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tud-payer-t { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 800; color: var(--r-text); }
.tud-payer-t svg { flex: none; color: var(--r-link); }
.tud-payer p { margin: 0; font-size: 14.5px; color: var(--r-text-2); line-height: 1.6; }

/* ══ Ограничения ══════════════════════════════════════════════════════════ */
.tud-risk { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tud-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;
}
.tud-risk-ic { flex: none; color: var(--r-red); margin-top: 2px; }
.tud-risk-i p { margin: 0; font-size: 14.5px; color: var(--r-muted); line-height: 1.55; }
.tud-risk-i b { color: var(--r-text); }

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

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

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

/* ══ Планшет и телефон ════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .tud-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tud-unis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .tud-hero { grid-template-columns: 1fr; }
  .tud-hero-art { justify-content: flex-start; }
  .tud-calc { grid-template-columns: 1fr; }
  .tud-out { border-inline-start: 0; border-top: 1px solid var(--r-line-2); }
  .tud-risk, .tud-refs, .tud-payers, .tud-paths, .tud-unis { grid-template-columns: 1fr; }
  .tud-links { grid-template-columns: 1fr; }
  .tud-final { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
  .tud-time-i { grid-template-columns: 1fr; gap: 6px; padding-inline-start: 26px; }
  .tud-time-i::before { inset-inline-start: 5px; top: 10px; }
  .tud-time-w { padding-inline-end: 0; }
  .tud-time-w::after { inset-inline-end: auto; inset-inline-start: -26px; top: 4px; }
}
@media (max-width: 719px) {
  .tud-mock { max-width: none; }
  .tud-mock.r-float { animation: none; }
  .tud-steps { grid-template-columns: 1fr; }
  .tud-step, .tud-uni, .tud-path { padding: 20px; }
  .tud-form, .tud-out { padding: 22px 20px; }
  .tud-out-btn, .tud-final .r-btns, .tud-final .r-btn { align-self: stretch; width: 100%; }
  .tud .r-hero-txt .r-btns .r-btn { flex: 1 1 100%; }
  .tud-tbl :is(th, td) { padding: 13px 16px; font-size: 14px; }
  .tud-tbl--kv, .tud-tbl--kv tbody, .tud-tbl--kv tr, .tud-tbl--kv th, .tud-tbl--kv td { display: block; width: auto; }
  .tud-tbl--kv th { padding-bottom: 2px; border-bottom: 0; font-size: 13px; }
  .tud-tbl--kv td { padding-top: 0; }
  /* Пример расчёта: строка — карточка (первая ячейка — заголовок, четыре суммы ниже сеткой 2 × 2). */
  .tud-tbl--ex thead { display: none; }
  .tud-tbl--ex, .tud-tbl--ex tbody { display: block; }
  .tud-tbl--ex tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--r-line); padding-bottom: 6px; }
  .tud-tbl--ex tbody tr:last-child { border-bottom: 0; }
  .tud-tbl--ex tr th { grid-column: 1 / -1; border-bottom: 0; padding-bottom: 4px; }
  .tud-tbl--ex tr :is(th, td) { border-bottom: 0; }
  .tud-tbl--ex td { padding-top: 4px; padding-bottom: 6px; font-size: 13.5px; white-space: normal; display: flex; flex-direction: column; gap: 2px; }
  .tud-tbl--ex td::before { content: attr(data-t-l); font-size: 11.5px; font-weight: 700; color: var(--r-faint); }
  .tud-tbl--ex td bdi { white-space: normal; }
  .tud-final { padding: 28px 20px; }
  .tud-qa-i summary { padding: 16px 18px; font-size: 15px; }
  .tud-qa-i p { padding: 0 18px 18px; }
  .tud-risk-i, .tud-ref { padding: 18px; }
  .tud-payer { padding: 20px; }
}
@media (max-width: 379px) {
  .tud .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) {
  .tud-mock { padding: 16px; }
  .tud-mock-gets b { font-size: 22px; }
  .tud-mock-row { font-size: 12.5px; }
  .tud-form, .tud-out { padding: 18px 16px; }
  .tud-in { font-size: 16px; }
  .tud .r-chip { white-space: normal; height: auto; min-height: 34px; padding: 6px 12px; }
}
