/* ---------------------------------------------------------------------------
   Дизайн-система редизайна 02.08.2026 (design/2026-08-02-site-redesign).
   Один файл на весь сайт: лендинг и все страницы SEO-слоя. Заменяет site.css
   и seo.css целиком — токены, шапка, интерактив, длинный текст, таблицы, подвал.

   Живёт в landing/css/, потому что landing/ копируется в dist ПЕРВЫМ
   (web: `build:site` → `cp -R ../landing/. dist/`), а слой Astro ложится
   поверх. Один файл, одна копия, оба потребителя.
   --------------------------------------------------------------------------- */

/* Шрифты подключены в <head> страниц (preconnect + css2). Здесь только токены. */

:root {
  /* Поверхности */
  --bg: #F3F6F4;
  --surface: #FFFFFF;
  --surface-muted: #F7F9F8;
  --inset: #E8EDEA;

  /* Текст */
  --ink: #14201C;
  --body: #47554F;
  --muted: #7B8B84;
  --disabled: #A9B5B0;

  /* Акцент и сигналы */
  --accent: #1E7A68;
  --amber: #C2761B;
  --amber-ink: #8A5310;
  --coral: #C0473A;

  /* На тёмном */
  --on-dark: #F3F6F4;
  --on-dark-2: #B9C7C1;
  --on-dark-3: #9FB6AE;
  --on-dark-accent: #8FB8AC;
  --on-dark-amber: #E0A94E;
  --on-dark-coral: #E07A6D;

  /* Волосяные линии */
  --line-07: rgba(20, 32, 28, .07);
  --line-08: rgba(20, 32, 28, .08);
  --line-10: rgba(20, 32, 28, .10);
  --line-12: rgba(20, 32, 28, .12);
  --line-16: rgba(20, 32, 28, .16);

  --tint-05: rgba(30, 122, 104, .05);
  --tint-06: rgba(30, 122, 104, .06);
  --tint-07: rgba(30, 122, 104, .07);
  --tint-09: rgba(30, 122, 104, .09);
  --tint-10: rgba(30, 122, 104, .10);
  --tint-22: rgba(30, 122, 104, .22);
  --tint-25: rgba(30, 122, 104, .25);
  --tint-45: rgba(30, 122, 104, .45);

  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-card: 0 22px 50px -30px rgba(20, 32, 28, .35);
  --shadow-panel: 0 22px 50px -34px rgba(20, 32, 28, .4);

  --container: 1180px;
  --pad: 28px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--ink); }

img { max-width: 100%; }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

@keyframes ibPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes ibRise  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ibSweep { from { transform: translateX(-100%); } to { transform: translateX(200%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Каркас ---------------------------------------------------------------- */

.ib-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.ib-mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ib-section { padding: 84px 0 0; }
.ib-section--tight { padding: 64px 0 0; }

/* --- Шапка ----------------------------------------------------------------- */

.ib-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 246, 244, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-08);
}
.ib-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ib-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.ib-brand:hover { color: var(--ink); }
.ib-brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.ib-brand__name {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.ib-brand__sub { display: block; font-size: 12.5px; color: var(--muted); }

.ib-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.ib-nav a:not(.ib-btn) { color: var(--body); }
.ib-nav a:not(.ib-btn):hover { color: var(--accent); }

/* --- Кнопки ---------------------------------------------------------------- */

.ib-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  text-align: center;
}
.ib-btn--pill {
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
}
.ib-btn--pill:hover { background: var(--accent); color: #fff; }

.ib-btn--primary {
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  padding: 15px 22px;
  border-radius: 12px;
}
.ib-btn--primary:hover { background: var(--accent); color: #fff; }
.ib-btn--block { display: flex; width: 100%; }

.ib-btn--light {
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 12px;
}
.ib-btn--light:hover { background: var(--accent); color: #fff; }

.ib-btn--ghost {
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 400;
  padding: 6px;
  width: 100%;
}
.ib-btn--ghost:hover { color: var(--ink); }

/* Кнопка с иконкой приложения и двумя строками подписи */
.ib-btn--app {
  gap: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  padding: 12px 22px 12px 12px;
  border-radius: 14px;
  text-align: left;
}
.ib-btn--app:hover { background: var(--accent); color: #fff; }
.ib-btn--app img { width: 38px; height: 38px; border-radius: 10px; display: block; flex: none; }
.ib-btn--app small {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: #A9C4BC;
}

/* --- Чипы (общие для лендинга и слоя) -------------------------------------- */

.ib-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-chip {
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid var(--line-16);
  background: var(--surface);
  color: var(--body);
  font-weight: 400;
}
.ib-chip:hover { border-color: var(--accent); color: var(--accent); }
.ib-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--tint-10);
  color: var(--accent);
  font-weight: 600;
}

/* --- Эйрбrow с точкой ------------------------------------------------------ */

.ib-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--tint-09);
  padding: 7px 12px;
  border-radius: 999px;
}
.ib-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  animation: ibPulse 1.8s ease-in-out infinite;
}

/* --- Типографика ----------------------------------------------------------- */

.ib-h1 {
  font-size: 62px;
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 22px 0 0;
}
.ib-h1--page { font-size: 54px; line-height: 1; margin: 14px 0 0; }
.ib-h1 .ib-accent, .ib-accent { color: var(--accent); }

.ib-h2 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.025em;
  margin: 0;
}
.ib-h2--sm { font-size: 32px; }
.ib-h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin: 0; }

.ib-lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--body);
  margin: 20px 0 0;
  max-width: 34em;
  text-wrap: pretty;
}
.ib-lede--sm { font-size: 16.5px; margin: 10px 0 0; max-width: 46em; }

.ib-note { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* --- Карточка ------------------------------------------------------------- */

.ib-card {
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 18px;
  padding: 20px;
}
.ib-card--lg { border-radius: 24px; padding: 30px; box-shadow: var(--shadow-panel); }
.ib-card--check { border-radius: 22px; padding: 22px; box-shadow: var(--shadow-card); }
.ib-card--dark { background: var(--ink); color: var(--on-dark); border-color: transparent; }
/* :not(.ib-btn) обязателен. Без него это правило перекрывало
   .ib-btn--light — кнопку со СВЕТЛОЙ подложкой внутри тёмной карточки:
   светло-зелёный текст #8FB8AC на #F3F6F4, контраст 2.0:1 при норме 4.5:1.
   Кнопка в стор была практически невидима, а это главный CTA страницы. */
.ib-card--dark a:not(.ib-btn) { color: var(--on-dark-accent); }

/* --- Лендинг: герой -------------------------------------------------------- */

/* align-items: start, а не center. Правая колонка — виджет сужения, он
   заметно выше левой; при центрировании левая колонка съезжала вниз, и на
   десктопе заголовок «Find out what bit you» начинался на 538-м пикселе
   при высоте экрана 900 — то есть больше половины первого экрана занимала
   пустота, а главное обещание страницы уходило под сгиб.
   На страницах региона (.ib-hero--page) start стоял с самого начала —
   на главной его просто забыли. На телефоне колонка одна, и правило
   ни на что не влияет. */
.ib-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  padding: 64px 0 12px;
}
.ib-hero--page { grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: start; padding: 24px 0 0; }

.ib-checklist {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--body);
}
.ib-checklist li { display: flex; gap: 10px; align-items: flex-start; }
.ib-checklist li::before { content: "✓"; color: var(--accent); font-weight: 600; }

.ib-figures { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.ib-figures b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.ib-figures span { display: block; font-size: 13px; color: var(--muted); }

/* --- Интерактив: три вопроса и короткий список ----------------------------- */

.ib-check__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ib-check__head strong { font-size: 15px; font-weight: 600; }

.ib-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.ib-check .ib-steps { grid-template-columns: 1fr; gap: 18px; margin-top: 0; }
.ib-step__label { display: block; margin-bottom: 10px; }

.ib-result { margin-top: 28px; border-top: 1px solid var(--line-10); padding-top: 24px; }
.ib-check .ib-result { margin-top: 20px; padding-top: 18px; }
.ib-result__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ib-result__head h3 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: 0; }
.ib-result__head span { font-size: 13.5px; color: var(--muted); }

.ib-shortlist {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 0;
}
.ib-check .ib-shortlist { grid-template-columns: 1fr; gap: 10px; }

.ib-hit {
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--line-10);
  background: var(--surface);
  animation: ibRise .3s ease both;
}
.ib-hit--top { border-color: var(--accent); background: var(--tint-06); }
.ib-hit__top { display: flex; gap: 12px; align-items: center; }
.ib-hit__top img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; display: block; flex: none; }
.ib-hit__swatch {
  width: 48px; height: 48px; border-radius: 10px; display: block; flex: none;
  background: var(--c, var(--inset));
}
.ib-hit__name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; display: block; color: var(--ink); }
.ib-hit__conf { font-size: 12.5px; color: var(--muted); display: block; }
.ib-hit__track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--inset);
  margin-top: 12px;
  overflow: hidden;
}
.ib-hit__fill { display: block; height: 100%; border-radius: 999px; background: #9BB8AE; transition: width .25s ease; }
.ib-hit--top .ib-hit__fill { background: var(--accent); }
.ib-hit__note { font-size: 13.5px; color: var(--body); line-height: 1.5; margin: 10px 0 0; }
.ib-hit__link { font-size: 13px; font-weight: 600; display: inline-block; margin-top: 10px; }

.ib-convert {
  margin-top: 20px;
  border-radius: 18px;
  background: var(--tint-07);
  border: 1px solid var(--tint-22);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.ib-convert__copy { max-width: 34em; }
.ib-convert__copy b { font-size: 19px; font-weight: 600; letter-spacing: -.015em; display: block; }
.ib-convert__copy p { font-size: 15px; color: var(--body); margin: 6px 0 0; line-height: 1.5; }

/* --- Полоса статистики ----------------------------------------------------- */

.ib-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-10);
  border: 1px solid var(--line-10);
  border-radius: 16px;
  overflow: hidden;
  margin: 56px 0 0;
}
.ib-stats > div { background: var(--bg); padding: 20px 22px; }
.ib-stats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.ib-stats span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* --- Сетки карточек -------------------------------------------------------- */

.ib-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ib-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ib-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.ib-vis { height: 96px; border-radius: 11px; display: block; width: 100%; object-fit: cover; }
.ib-card h3 { font-size: 16px; font-weight: 600; margin: 14px 0 0; letter-spacing: 0; }
.ib-card p { font-size: 14px; color: var(--body); line-height: 1.5; margin: 5px 0 0; }
/* Тёмную карточку перекрывали правила светлой темы: .ib-card p (два класса)
   красил её заголовок в #47554F на #14201C — контраст 2.1:1, а .ib-prose li
   делал то же самое со списком «когда обращаться к врачу». Оба селектора
   специфичнее, чем цвет, унаследованный от .ib-card--dark, поэтому светлую
   тему на тёмной поверхности приходится перебивать явно и не слабее их:
   .ib-card.ib-card--dark — два класса плюс тип. Точечные оттенки внутри
   (--on-dark-2 и --on-dark-3) задаются инлайном и остаются в силе. */
.ib-card.ib-card--dark p,
.ib-card.ib-card--dark li,
.ib-card.ib-card--dark ul,
.ib-card.ib-card--dark ol { color: var(--on-dark); }

.ib-link-card {
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  transition: border-color .18s;
}
.ib-link-card:hover { border-color: var(--accent); color: var(--ink); }
.ib-link-card img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; display: block; flex: none; }
.ib-link-card b { display: block; font-size: 15.5px; font-weight: 600; }
.ib-link-card span { display: block; font-size: 13px; color: var(--muted); }

/* --- Тёмная панель красных флагов ------------------------------------------ */

.ib-flags { background: var(--ink); color: var(--on-dark); border-radius: 24px; padding: 44px; }
.ib-flags .ib-mono { color: var(--on-dark-accent); }
.ib-flags h2 { font-size: 32px; font-weight: 600; letter-spacing: -.025em; margin: 12px 0 28px; max-width: 22em; }
.ib-flags__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ib-flags__col { border-top: 3px solid var(--amber); padding-top: 16px; }
.ib-flags__col--urgent { border-top-color: var(--coral); }
.ib-flags__col b { font-size: 17px; font-weight: 600; }
.ib-flags__col p { font-size: 14.5px; color: var(--on-dark-2); line-height: 1.5; margin: 6px 0 0; }

.ib-care-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 11px; font-size: 15px; line-height: 1.45; }
.ib-care-list li { display: flex; gap: 10px; }
.ib-care-list li::before { content: "●"; color: var(--on-dark-amber); }
.ib-care-list li.is-urgent::before { color: var(--on-dark-coral); }

/* --- График по месяцам ----------------------------------------------------- */

.ib-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: end;
  height: 210px;
  margin-top: 28px;
}
.ib-chart__col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.ib-chart__pct { font-family: var(--mono); font-size: 11px; text-align: center; color: var(--muted); margin-bottom: 6px; }
.ib-chart__bar {
  border-radius: 8px 8px 0 0;
  background: rgba(30, 122, 104, .28);
  transition: all .2s;
  min-height: 2px;
}
.ib-chart__col[aria-pressed="true"] .ib-chart__bar { background: var(--accent); }
.ib-chart__lab { text-align: center; font-size: 12.5px; margin-top: 8px; color: var(--muted); }
.ib-chart__col[aria-pressed="true"] .ib-chart__lab { color: var(--ink); font-weight: 600; }

/* --- Таблица видов --------------------------------------------------------- */

.ib-table {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 20px;
  overflow: hidden;
}
.ib-table__row {
  display: grid;
  grid-template-columns: 2fr 2.4fr 1.4fr 1.3fr;
  gap: 16px;
  padding: 14px 22px;
  align-items: center;
  font-size: 14.5px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-07);
}
.ib-table__row:last-child { border-bottom: none; }
a.ib-table__row:hover { background: var(--surface-muted); color: var(--ink); }
.ib-table__head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-10);
}
.ib-table__sp { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.ib-table__sp img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; display: block; flex: none; }
.ib-table__row > div:not(.ib-table__sp) { color: var(--body); }

/* --- Пилюли штатов --------------------------------------------------------- */

.ib-pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.ib-pills a {
  display: inline-block;
  font-size: 13.5px;
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--line-10);
  padding: 8px 13px;
  border-radius: 999px;
  transition: border-color .15s, color .15s;
}
.ib-pills a:hover { border-color: var(--accent); color: var(--accent); }

/* --- FAQ ------------------------------------------------------------------- */

.ib-faq { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.ib-faq > h2 { position: sticky; top: 92px; }
.ib-faq__list { display: flex; flex-direction: column; }
.ib-faq details { border-top: 1px solid var(--line-12); padding: 18px 0; }
.ib-faq details:last-child { border-bottom: 1px solid var(--line-12); }
.ib-faq summary {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}
.ib-faq summary::-webkit-details-marker { display: none; }
.ib-faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.ib-faq details[open] summary::after { content: "−"; }
.ib-faq p { font-size: 15.5px; color: var(--body); line-height: 1.6; margin: 10px 0 0; max-width: 46em; }

/* --- Закрывающий CTA ------------------------------------------------------- */

.ib-close {
  border-radius: 24px;
  border: 1px solid var(--tint-25);
  background: var(--tint-07);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.ib-close h2 { font-size: 32px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.ib-close p { font-size: 16.5px; color: var(--body); margin: 10px 0 0; max-width: 34em; }
.ib-close__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* --- Липкая нижняя панель -------------------------------------------------- */

body.ib-has-sticky { padding-bottom: 96px; }

.ib-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(20, 32, 28, .96);
  backdrop-filter: blur(8px);
  color: var(--on-dark);
}
.ib-sticky__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ib-sticky__copy { display: flex; align-items: center; gap: 12px; }
.ib-sticky__copy img { width: 36px; height: 36px; border-radius: 9px; display: block; }
.ib-sticky__copy b { display: block; font-size: 14.5px; font-weight: 400; line-height: 1.3; }
.ib-sticky__copy span { display: block; font-size: 12.5px; color: var(--on-dark-3); }
.ib-sticky a.ib-btn {
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  padding: 11px 22px;
  border-radius: 999px;
  flex: none;
}
.ib-sticky a.ib-btn:hover { background: var(--accent); color: #fff; }

/* --- Подвал ---------------------------------------------------------------- */

.ib-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line-10);
  padding: 28px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--muted);
}
.ib-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ib-footer nav a { color: var(--body); }
.ib-footer nav a:hover { color: var(--accent); }
.ib-footer__legal { max-width: 44em; line-height: 1.55; }

/* --- Длинный текст SEO-страниц --------------------------------------------- */

.ib-prose { max-width: 46em; }
.ib-prose h2 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; margin: 48px 0 0; text-wrap: balance; }
.ib-prose h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 32px 0 0; text-wrap: balance; }
.ib-prose p { font-size: 16.5px; line-height: 1.65; color: var(--body); margin: 12px 0 0; }
.ib-prose ul, .ib-prose ol { padding-left: 1.2rem; margin: 12px 0 0; }
.ib-prose li { font-size: 16.5px; line-height: 1.65; color: var(--body); margin: .35em 0; }
.ib-prose .ib-lede { color: var(--body); }
.ib-prose strong { color: var(--ink); }
.ib-prose--wide { max-width: none; }

.ib-crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ib-crumbs a { color: var(--muted); }
.ib-crumbs a:hover { color: var(--accent); }

.ib-datatable {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 0;
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--line-10);
  border-radius: 16px;
  overflow: hidden;
}
.ib-datatable th, .ib-datatable td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-07);
  vertical-align: top;
  color: var(--body);
}
.ib-datatable thead th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.ib-datatable tbody tr:last-child td { border-bottom: none; }
.ib-datatable caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 8px; }
.ib-datatable .num { text-align: right; font-variant-numeric: tabular-nums; }
.ib-datatable .bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .35;
  width: var(--w, 0);
  min-width: 2px;
}
.ib-scroll { overflow-x: auto; }

.ib-redflags {
  border-radius: 20px;
  background: var(--ink);
  color: var(--on-dark);
  padding: 26px;
  margin: 32px 0 0;
}
.ib-redflags h2 { font-size: 21px; margin: 12px 0 0; color: var(--on-dark); }
.ib-redflags .ib-mono { color: var(--on-dark-accent); }
.ib-redflags p { color: var(--on-dark-3); font-size: 13.5px; line-height: 1.5; margin-top: 16px; }

.ib-disclaimer {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.6;
  max-width: 60em;
}
.ib-disclaimer strong { color: var(--ink); }

.ib-related { margin: 40px 0 0; }
.ib-related h2 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 12px; }

.ib-muted { color: var(--muted); }
.ib-small { font-size: 13px; }

/* --- Кризисный блок и языковой переключатель ------------------------------
   Используются на openstep.uk: YMYL-страницы про ОКР обязаны нести кризисный
   контакт, а слой трёхъязычный. Правила общие, чтобы обе копии дизайн-системы
   не расходились. */

.ib-crisis {
  border: 1px solid rgba(192, 71, 58, .35);
  border-left-width: 3px;
  border-radius: 14px;
  background: rgba(192, 71, 58, .06);
  padding: 18px 20px;
  margin: 40px 0 0;
}
.ib-crisis strong { display: block; font-size: 16px; color: var(--coral); }
.ib-crisis p { font-size: 15px; line-height: 1.6; color: var(--body); margin: 6px 0 0; }

.ib-langs { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }

/* --- Адаптив --------------------------------------------------------------- */

@media (max-width: 1040px) {
  .ib-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --pad: 20px; }

  .ib-hero, .ib-hero--page { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .ib-h1 { font-size: 40px; }
  .ib-h1--page { font-size: 36px; }
  .ib-h2, .ib-h2--sm { font-size: 26px; }
  .ib-lede { font-size: 17px; }

  .ib-section { padding: 56px 0 0; }
  .ib-steps { grid-template-columns: 1fr; gap: 18px; }
  .ib-shortlist { grid-template-columns: 1fr; }
  .ib-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ib-grid-2 { grid-template-columns: 1fr; }
  .ib-flags { padding: 28px; }
  .ib-flags__cols { grid-template-columns: 1fr; }
  .ib-close { padding: 28px; }
  .ib-faq { grid-template-columns: 1fr; gap: 20px; }
  .ib-faq > h2 { position: static; }

  /* Шапка: остаётся иконка и кнопка загрузки, разделы уходят в подвал */
  .ib-nav a:not(.ib-btn) { display: none; }
  .ib-brand__sub { display: none; }

  /* График: шесть на два ряда, чтобы подписи месяцев остались читаемыми */
  .ib-chart { grid-template-columns: repeat(6, 1fr); height: auto; row-gap: 18px; }
  .ib-chart__col { height: 130px; }

  .ib-table__head { display: none; }
  .ib-table__row { grid-template-columns: 1fr; gap: 4px; }
  .ib-table__row > div:not(.ib-table__sp)::before {
    content: attr(data-lab) ": ";
    color: var(--muted);
    font-size: 12.5px;
  }
}

@media (max-width: 640px) {
  .ib-grid-4, .ib-grid-3 { grid-template-columns: 1fr; }
  .ib-stats { grid-template-columns: 1fr; }
  .ib-h1 { font-size: 34px; }
  .ib-sticky__copy span { display: none; }
  .ib-convert { padding: 18px; }
  .ib-card--lg { padding: 20px; }
}

/* Фотография вида — появилась 08.08.2026.
   До неё страницы /bites/<вид> обещали в заголовке выдачи «Pictures» и не
   показывали ни одного снимка. Кадры взяты из GBIF под CC0 и CC BY, подпись
   с автором и лицензией обязательна и потому размечена как часть фигуры,
   а не как «мелкий текст под картинкой».
   Цвет подписи — --body, а не --muted: --muted даёт 3.29:1 и для нового
   текста не годится. */
.ib-photo {
  margin: 22px 0 26px;
  padding: 0;
}
.ib-photo img {
  display: block;              /* урок 02.08: без этого высота и overflow не действуют */
  /* Потолок по ОБЕИМ сторонам, ширина и высота auto — иначе квадратный кадр
     900x900 разворачивается в 520px высоты и утаскивает таблицу «at a glance»
     за первый экран. Пропорции при этом не трогаем: object-fit обрезал бы
     комару ноги, а по ним его и узнают. */
  max-width: min(100%, 460px);
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 12px;
  background: var(--inset);    /* пока кадр грузится — плашка, а не прыжок вёрстки */
  border: 1px solid rgba(20, 32, 28, .08);
}
.ib-photo figcaption {
  max-width: 520px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--body);
}
.ib-photo figcaption strong { color: var(--ink); font-weight: 600; }
.ib-photo figcaption a { color: var(--accent); }

/* --- Галерея видов на /pictures/identify-by-picture ------------------------
   Сетка карточек «снимок + что он оставляет». Три вещи закрыты намеренно:

   1. `display: block` у картинки — урок 02.08: без него height и overflow
      игнорируются, и в тот раз полоса в 6px выросла в кляксу 174.9px.
   2. Фиксированная высота кадра плюс object-fit: cover. Снимки GBIF приходят
      разного формата (675x900 и 799x900 рядом), и без общей высоты сетка
      идёт лесенкой. Здесь обрезка допустима, в отличие от страницы вида:
      там кадр единственный и по ногам комара его и узнают, здесь он —
      миниатюра-указатель, а полный снимок лежит на странице вида.
   3. Цвет подписей — --body, а не --muted (3.29:1, ниже нормы 4.5:1).
   --------------------------------------------------------------------------- */
.ib-gallery {
  list-style: none;
  margin: 14px 0 30px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));  /* 3 в ряд в колонке 710px, замерено отрисовкой 09.08 */
  gap: 20px;
}
.ib-gallery__item {
  margin: 0;
  padding: 0;
}
.ib-gallery__item a {
  display: block;
  text-decoration: none;
}
.ib-gallery__item img {
  display: block;              /* урок 02.08 */
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--inset);    /* плашка вместо прыжка вёрстки, пока кадр грузится */
  border: 1px solid rgba(20, 32, 28, .08);
}
.ib-gallery__item a strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}
.ib-gallery__item a:hover strong { text-decoration: underline; }
.ib-gallery__mark {
  display: block;
  margin-top: 4px;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.5;
}
.ib-gallery__meta {
  display: block;
  margin-top: 4px;
  color: var(--body);
  font-size: 12.5px;
  line-height: 1.45;
}

/* Врезка «что здесь на самом деле». Не .ib-note: тот красит текст в --muted
   (3.29:1 при норме 4.5:1), а решение 06.08 «--muted оставить» касается уже
   стоявшего текста, а не нового. Здесь стоит самая важная фраза страницы —
   что снимки показывают насекомых, а не укусы, — и прятать её в серый значит
   повторить ошибку 08.08 другим способом. */
.ib-callout {
  margin: 18px 0 22px;
  padding: 14px 16px;
  background: var(--surface-muted);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}
.ib-callout strong { color: var(--ink); font-weight: 600; }

/* Вторичная строка нового текста: подпись под заголовком группы, описание
   карточки в списке. Тоже --body, по той же причине, что и .ib-callout. */
.ib-hint {
  display: block;              /* используется и как <p>, и как <span> в списке */
  margin: 2px 0 0;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.5;
}

/* --- Ответы FAQ, найдено отрисовкой 09.08 ----------------------------------
   `site.css` красит `.faq details p` своим токеном --muted, и на живом проде
   это даёт 3.58:1 при норме 4.5:1 — на КАЖДОЙ странице вида, гайда и сравнения.
   Проверено на проде отрисовкой, а не рассуждением: страница
   /guides/how-long-do-insect-bites-last, три ответа из трёх ниже нормы.

   Это не тот приглушённый серый, который решено оставить 06.08: там речь про
   токен --muted редизайна (3.29:1) на подписях и метках. Здесь ниже нормы идёт
   САМ ОТВЕТ — то, ради чего человек открыл вопрос. В редизайне для этого
   случая уже объявлено правильное: `.ib-faq p { color: var(--body) }`,
   и расхождение возникло только потому, что SEO-слой пользуется старым
   классом `.faq`. Приводим к одному. */
.faq details p { color: var(--body); }

/* --- Галерея снимков САМОГО УКУСА — 10.08.2026 -----------------------------
   /pictures/spider-bites, /bed-bug-bites, /tick-bites. Отличие от галереи
   видов принципиальное: там сетка карточек «кто кусает», здесь колонка
   крупных кадров, каждый со своей подписью — читатель разглядывает край
   пятна и его цвет, а не опознаёт жука по силуэту.

   Поэтому:
   1. один столбец до 760px и два выше — кадр обязан быть крупным, иначе
      разница между кольцевой и сплошной эритемой на нём просто не видна;
   2. потолок высоты 380px, одинаковый для всех: кадры приходят и квадратные,
      и вертикальными (рука, шея, бедро), и без общего потолка строка сетки
      тянется по самому высокому — под низким кадром зияет полэкрана пустоты.
      Проверено отрисовкой превью до выкатки, а не рассуждением;
   3. `display: block` у картинки — то же правило, что и везде с 02.08;
   4. подпись цветом --body, ссылки лицензии --accent. Подпись здесь не
      украшение: CC BY требует имени автора и ссылки на лицензию рядом
      с работой, и приглушить её нельзя даже из соображений вкуса. */
.ib-bitegallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px 24px;
  align-items: start;
  margin: 22px 0 28px;
}
.ib-bitegallery .ib-photo { margin: 0; }
.ib-bitegallery .ib-photo img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
}
.ib-bitegallery .ib-photo figcaption { max-width: 100%; }
/* Автор и лицензия — отдельной строкой: это юридическая часть подписи,
   и слипшись с описанием кадра она читается как продолжение текста. */
.ib-photo__credit { display: block; margin-top: 4px; color: var(--body); }

@media (min-width: 760px) {
  .ib-bitegallery { grid-template-columns: 1fr 1fr; }
}
