/*
 * Раздел /insurance/ (страхование путешествий, 19.10.2026) — макет PgHedge / PgHedgeLight
 * (Trust/docs/insurance-1910/design/src). Зона site. Приставка ins-. Цвета — только токены
 * assets/r26.css; свои пары тем (тире в таблице, красная плашка) — переменными ниже.
 * Размеры — из макета один в один; телефонная раскладка — своя (FOUNDATION.md §4).
 */
.ins {
  --ins-dash: #4A4960;                       /* «—» в таблице: тёмная #4A4960 / светлая #B9B7C6 */
  --ins-note-bg: rgba(229, 72, 77, 0.07);    /* плашка «не покрывается»: .07 / .06 */
  --ins-note-line: rgba(229, 72, 77, 0.5);
  --ins-sos-bg: var(--r-fill-1);             /* врезка SOS: белый .03 / rgba(21,19,31,.03) */
  --ins-lim-bg: rgba(91, 63, 235, 0.14);     /* строка «Покрывает до» — одна на обе темы */
}
html[data-theme="light"] .ins { --ins-dash: #B9B7C6; --ins-note-bg: rgba(229, 72, 77, 0.06); --ins-sos-bg: var(--r-fill-2); }

.ins-top { padding-top: 12px; }
.ins-sec { padding-top: 40px; }
.ins-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }

/* ── Оглавление ─────────────────────────────────────────────────────────── */
.ins-toc {
  position: sticky; top: calc(var(--r-hdr-h) + 12px);
  max-height: calc(100vh - var(--r-hdr-h) - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  display: flex; flex-direction: column; padding: 16px; border-radius: 24px; box-sizing: border-box;
  background: var(--r-surface); border: 1px solid var(--r-line);
}
.ins-toc::-webkit-scrollbar { display: none; }
.ins-toc-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 6px 14px 10px; border: 0; background: none; cursor: default; text-align: start;
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-faint);
}
.ins-toc-ch { display: none; flex: none; transition: transform .2s ease; }
.ins-toc-list { display: flex; flex-direction: column; gap: 2px; }
.ins-toc-list > a {
  display: flex; gap: 10px; align-items: baseline; padding: 6px 12px; border-radius: 10px;
  color: var(--r-muted); font-size: 13px; font-weight: 700; text-decoration: none; line-height: normal;
  transition: background .15s ease, color .15s ease;
}
.ins-toc-list > a:hover { background: var(--r-hover); color: var(--r-text); }
.ins-toc-list > a.on { background: var(--r-brand-tint); color: var(--r-text); }
.ins-toc-list > a > span { font-size: 11px; color: var(--r-accent); font-variant-numeric: tabular-nums; flex: none; }
.ins-sos { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--ins-sos-bg); display: flex; flex-direction: column; gap: 8px; }
.ins-sos b { font-size: 13px; font-weight: 800; color: var(--r-text); }
.ins-sos span { font-size: 12px; color: var(--r-muted); line-height: 1.5; }

/* ── Текст ──────────────────────────────────────────────────────────────── */
.ins-body { display: flex; flex-direction: column; min-width: 0; }
.ins-s { display: flex; flex-direction: column; gap: 12px; padding: 20px 0; border-top: 1px solid var(--r-line-2); }
.ins-s:first-child { border-top: 0; }
.ins-h { display: flex; align-items: baseline; gap: 14px; }
.ins-h > span { font-size: 14px; font-weight: 800; color: var(--r-accent); flex: none; font-variant-numeric: tabular-nums; }
.ins-h h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: normal; color: var(--r-text); }

.ins-ul { margin: 0; padding: 0; list-style: none; }
.ins-ul--2 { columns: 2; column-gap: 36px; }
.ins-ul--1 { display: flex; flex-direction: column; gap: 7px; max-width: 760px; }
.ins-li { display: flex; gap: 10px; font-size: 14px; color: var(--r-text-2); line-height: 1.55; break-inside: avoid; margin-bottom: 8px; }
.ins-ul--1 .ins-li { font-size: 15px; line-height: 1.6; margin-bottom: 0; }
.ins-li b { font-weight: 700; color: var(--r-text-2); }
.ins-dot { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 8px; border-radius: 999px; background: var(--r-accent); }
.ins-li--15 .ins-dot { margin-top: 9px; }

.ins-p { margin: 0; font-size: 15px; color: var(--r-text-2); line-height: 1.65; max-width: 760px; }
.ins-note {
  margin: 0; max-width: 760px; padding: 12px 16px; border-radius: 14px; box-sizing: border-box;
  font-size: 14px; color: var(--r-muted); line-height: 1.6;
  background: var(--ins-note-bg); border-inline-start: 3px solid var(--ins-note-line);
}
.ins-foot { margin: -2px 0 0; font-size: 13px; color: var(--r-muted); line-height: 1.55; max-width: 820px; }

/* ── Таблицы тарифов ────────────────────────────────────────────────────── */
.ins-tbl-wrap {
  overflow-x: auto; border-radius: 20px; border: 1px solid var(--r-line-2); background: var(--r-surface);
  max-width: 820px; overscroll-behavior-x: contain;
}
.ins-tbl-wrap:focus-visible { outline: 2px solid var(--r-brand-2); outline-offset: 2px; }
.ins-tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; color: var(--r-text); }
.ins-tbl th, .ins-tbl td { line-height: normal; }
.ins-tr-h { background: var(--r-surface-3); }
.ins-tr-h th { padding: 14px 10px; font-size: 14px; font-weight: 700; text-align: center; vertical-align: middle; }
.ins-tr-h th.ins-th-l { padding: 14px; text-align: start; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-muted); }
.ins-th-n { display: block; }
.ins-th-p { display: block; font-size: 12px; color: var(--r-muted); font-weight: 700; }
.ins-tr-h th.ins-th-full { background: var(--r-brand); color: #FFFFFF; }
.ins-th-full .ins-th-p { color: #FFFFFF; opacity: 0.8; }
.ins-tr-lim { background: var(--ins-lim-bg); }
.ins-tr-lim td { padding: 14px 10px; text-align: center; font-weight: 800; font-size: 16px; }
.ins-tr-lim td:first-child { padding: 14px; text-align: start; font-size: 14px; }
.ins-tr-lim td.ins-lim-full { font-size: 18px; color: var(--r-link); }
.ins-tbl tbody tr { border-top: 1px solid var(--r-line); }
.ins-tbl tbody th { padding: 8px 14px; text-align: start; color: var(--r-text-2); font-weight: 600; }
.ins-tbl tbody td { padding: 8px 10px; text-align: center; }
.ins-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.ins-v--full { color: var(--r-link); }
.ins-na { color: var(--ins-dash); font-weight: 700; }
.ins-ok {
  display: inline-flex; width: 22px; height: 22px; border-radius: 999px; align-items: center; justify-content: center;
  background: var(--r-green-tint); color: var(--r-green); font-size: 12px; font-weight: 800; vertical-align: middle;
}
.ins-tbl--prices { min-width: 480px; }
.ins-tbl-wrap--prices { max-width: 620px; }
.ins-tbl--prices tbody td, .ins-tbl--prices tbody th { padding-top: 10px; padding-bottom: 10px; }
.ins-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Планшет и телефон ──────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .ins-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 899px) {
  /* Одна колонка: оглавление — карточкой над текстом, сворачивается (r26-insurance.js). */
  .ins-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ins-toc { position: static; max-height: none; overflow: visible; }
  .ins-toc-list > a.on { background: none; color: var(--r-muted); }
  .ins-js .ins-toc-h { cursor: pointer; padding: 10px 14px; min-height: 44px; box-sizing: border-box; }
  .ins-js .ins-toc-ch { display: block; }
  .ins-js .ins-toc--shut .ins-toc-list { display: none; }
  .ins-js .ins-toc:not(.ins-toc--shut) .ins-toc-ch { transform: rotate(180deg); }
  .ins-js .ins-toc:not(.ins-toc--shut) .ins-toc-h { padding-bottom: 10px; }
  .ins-toc-list > a { padding: 9px 12px; font-size: 14px; }
}
@media (max-width: 719px) {
  .ins-sec { padding-top: 24px; }
  .ins-toc { padding: 8px; border-radius: 22px; }
  .ins-ul--2 { columns: 1; }
  .ins-h { gap: 10px; }
  .ins-h h2 { font-size: 21px; line-height: 1.2; }
  /* Три тарифа помещаются в экран телефона без боковой прокрутки таблицы: подписи строк
     переносятся, суммы — нет; прокрутка внутри рамки остаётся запасом для 320 px. */
  .ins-tbl-wrap { border-radius: 16px; }
  .ins-tbl { font-size: 12px; min-width: 0; }
  .ins-tr-h th { padding: 12px 4px; font-size: 13px; }
  .ins-tr-h th.ins-th-l { padding: 12px 10px; font-size: 10px; letter-spacing: 0.06em; }
  .ins-th-p { font-size: 11px; }
  .ins-tr-lim td { padding: 12px 4px; font-size: 13px; }
  .ins-tr-lim td:first-child { padding: 12px 10px; font-size: 12px; }
  .ins-tr-lim td.ins-lim-full { font-size: 14px; }
  .ins-tbl tbody th { padding: 8px 10px; }
  .ins-tbl tbody td { padding: 8px 4px; }
  .ins-v { white-space: nowrap; }
  .ins-v--wrap { white-space: normal; }
  .ins-th-p bdi, .ins-th-p > span { display: block; }
  .ins-ok { width: 20px; height: 20px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .ins-toc-ch, .ins-toc-list > a { transition: none; } }
