:root {
  /* Интерфейс намеренно монохромный: цветом на странице говорит только
     уровень доказательности метода. Это главное, ради чего сайт есть,
     и глаз должен находить его первым. */
  --bg: #f1f3f2;
  --surface: #ffffff;
  --text: #15212b;
  --muted: #5a6570;
  --line: #dde2e2;
  --accent: #22333f;
  --accent-dark: #15212b;

  /* Единственные цветные значения: метки доказательности и WhatsApp. */
  --green: #1f7a4d;
  --green-bg: #e6f4ec;
  --amber: #8a6108;
  --amber-bg: #fdf3dc;
  --red: #9b2c2c;
  --red-bg: #fbe9e9;

  /* Шрифты: сериф для заголовков — «справочник», а не лендинг. */
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-text: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Шкала кегля, шаг ≈1.25 */
  --step--1: 0.82rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 1.95rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

a { color: var(--accent); }

/* Полоса тестового стенда. Это служебное сообщение, а не содержание
   сайта, поэтому она набрана инверсно - тёмная плашка во всю ширину.
   Цвет не берём: на сайте он означает уровень доказательности метода. */
.test-banner {
  margin: 0;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}

.test-banner strong { font-weight: 600; }

/* --- Шапка и подвал --- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Знак и название стоят в строку: сначала рисунок, потом надпись. */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
  line-height: 1.25;
}

/* Размер задан по высоте: у знака своя пропорция, по ширине он
   подстраивается сам. flex: none - чтобы длинное название его не сжимало. */
.logo-mark {
  flex: none;
  width: auto;
  height: 46px;
}

.logo-text span {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Меню прижато вправо и стоит рядом с кнопкой «Разместиться в каталоге»:
   посередине шапки оно висело без опоры. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
  font-size: 0.95rem;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-link {
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.auth-link:hover { background: #eceeed; }

.auth-link-quiet { color: var(--muted); border-color: transparent; }

/* Выбор языка - одна плашка из двух половинок. Заливка показывает, на
   каком языке вы читаете; вторая половинка - ссылка. Скругление то же,
   что у кнопки «Разместиться в каталоге», но рамка тоньше и без акцентного
   цвета: громким в шапке остаётся одно действие, а не два. Флагов нет -
   язык и страна не одно и то же, а казахский и русский здесь живут
   в одной стране. */
.lang-switch {
  display: inline-flex;
  margin: 0;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch a,
.lang-switch .lang-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch a { color: var(--muted); }

.lang-switch a:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.lang-switch a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-switch .lang-current { background: var(--accent); color: #fff; }

.site-footer {
  margin-top: 48px;
  padding: 24px 0 32px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.disclaimer {
  margin: 0 0 6px;
  font-weight: 600;
}

.footer-note, .hint, .muted, .placeholder-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Общие блоки --- */

main.container { padding-top: 24px; }

h1, h2, h3, .logo {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--step-3); line-height: 1.15; margin: 0 0 14px; }
h2 { font-size: var(--step-2); line-height: 1.25; margin: 30px 0 12px; }
h3 { font-size: var(--step-1); margin: 22px 0 8px; }

.intro p { max-width: 70ch; color: var(--muted); }

.breadcrumbs { margin: 0 0 16px; font-size: 0.95rem; }

.empty {
  padding: 16px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 12px 0;
}

.notice-ok { background: var(--green-bg); color: var(--green); }
.notice-warn { background: var(--amber-bg); color: var(--amber); }

/* Предупреждение о сведениях о здоровье. Это правило заполнения, а не
   ошибка и не метка доказательности, поэтому цвета оно не занимает:
   отличается вертикальной линией и отступом. */
.data-warning {
  margin: 0 0 16px;
  padding: 10px 0 10px 14px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 0.93rem;
  max-width: 70ch;
}

.policy-meta { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }

/* --- Фильтры --- */

.filters-title {
  margin: 24px 0 0;
  font-size: 1.15rem;
}

/* Фильтры — одна панель, а не семь отдельных плиток. Внутри поля
   разделены волосяными линиями: рамка вокруг говорит «это один блок
   подбора», линии внутри — только где кончается одно поле и начинается
   другое. */
.filters {
  margin: 16px 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.filters .field {
  padding: 10px 16px;
  min-width: 0;
}

.filters .filters-search { padding: 12px 16px; }

/* Сетка сдвинута на пиксель влево: левая граница первой колонки уходит
   под рамку панели и не двоится. */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  width: calc(100% + 1px);
  margin-left: -1px;
}

.filters-grid .field {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.filters .field label {
  font-size: var(--step--1);
  font-weight: 500;
}

.filters .field input,
.filters .field select {
  padding: 2px 0;
  font-size: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.filters .field input:focus,
.filters .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Нижняя отбивка: переключатель слева, кнопки справа. */
.filters-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.filters-toggle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.filters-toggle .hint { margin: 0; font-size: 0.82rem; }
.filters-foot .filter-actions { margin-left: auto; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-check { justify-content: center; }

.field label,
.admin-form label,
.review-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

/* Перечислены все типы полей, которые встречаются в формах. Раньше
   tel и email в список не попали, и «Телефон», «WhatsApp» и «Почта»
   выходили уже и ниже соседей: у них оставались размеры от браузера. */
input[type="text"], input[type="search"], input[type="number"],
input[type="password"], input[type="tel"], input[type="email"],
input[type="url"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.4;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text);
}

.checkbox input { width: 18px; height: 18px; flex: none; }

/* --- Переключатель в стиле iOS --- */

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 400;
}

.switch { position: relative; flex: none; width: 51px; height: 31px; }

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: #e4e7ec;
  border-radius: 999px;
  transition: background 0.25s ease;
  pointer-events: none;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(16, 32, 56, 0.22);
  transition: transform 0.25s cubic-bezier(0.4, 0.1, 0.2, 1);
}

.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }

.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px rgba(34, 51, 63, 0.28);
}

.switch-label { font-size: 0.95rem; color: var(--text); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-track::after { transition: none; }
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.results-count { font-weight: 600; margin: 0 0 12px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  color: var(--accent);
  border-color: var(--line);
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
/* Одно и то же действие выглядит одинаково в списке и в карточке.
   Зелёный на сайте занят под «доказано», брать его под кнопку нельзя. */
.btn-whatsapp { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); border-color: #e9c7c7; background: var(--red-bg); }
.btn-small { padding: 7px 12px; font-size: 0.87rem; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }

/* --- Карточки провайдеров --- */

.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Карточка провайдера в списке --- */

.card.provider-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) 196px;
  gap: 18px;
  padding: 18px;
  border-radius: 16px;
  align-items: start;
}

.pc-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.pc-name { margin: 0 0 2px; font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.pc-name a { text-decoration: none; }
.pc-name a:hover { text-decoration: underline; }
.pc-media .rating { margin-left: 0; }

.pc-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.pc-line { margin: 0; font-size: 0.91rem; }
.pc-key { color: var(--muted); }
.pc-line-accent { font-weight: 600; }

.pc-description {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-main .badges .badge { font-size: 0.74rem; }

.pc-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.pc-city { margin: 0; font-size: 0.92rem; font-weight: 600; }
.pc-city span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); }

.pc-price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.btn-cta {
  width: 100%;
  padding: 11px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.btn-cta:hover { background: var(--accent-dark); }

.pc-hint { margin: 0; font-size: 0.8rem; color: var(--muted); }

.pc-more { margin-top: 2px; font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.pc-more:hover { text-decoration: underline; }

.card, .provider, .method-card, .login-box, .admin-form, .review-form, .placeholder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.card { display: flex; flex-direction: column; gap: 8px; }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* --- Фото и логотипы --- */

.logo-img {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  background: #eceeed;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  overflow: hidden;
}

.logo-xs { width: 34px; height: 34px; font-size: 0.75rem; border-radius: 9px; }
.logo-sm { width: 56px; height: 56px; font-size: 1.05rem; }
.logo-md { width: 72px; height: 72px; font-size: 1.3rem; }
.logo-lg { width: 92px; height: 92px; font-size: 1.7rem; border-radius: 16px; }
.logo-xl { width: 100%; max-width: 124px; aspect-ratio: 1; height: auto; font-size: 1.8rem; border-radius: 14px; }

.card-top { display: flex; gap: 12px; align-items: flex-start; }
.card-heading { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.provider-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.provider-head h1 { margin: 0 0 4px; }
.provider-head .provider-specialty { margin: 0; }

.table-name { display: flex; gap: 10px; align-items: flex-start; }

.logo-field-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.logo-field-controls { display: flex; flex-direction: column; gap: 8px; min-width: 240px; flex: 1; }
.logo-field-controls .hint { margin: 0; }

.card-title { font-size: 1.1rem; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }

.card-specialty { margin: 0; font-weight: 600; color: var(--muted); }
.card-meta { margin: 0; color: var(--muted); font-size: 0.93rem; }

.card-facts {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  font-size: 0.93rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fact-accent { color: var(--green); font-weight: 600; }

.card-link { margin-top: auto; font-weight: 600; text-decoration: none; }

.chip {
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: #e8ebea;
  color: var(--text);
}

.chip-test { background: #eceeed; color: var(--muted); }

.rating { margin-left: auto; font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.rating .star { color: #d08700; }
.rating-count { font-weight: 400; color: var(--muted); }
.rating-empty { font-weight: 400; color: var(--muted); font-size: 0.88rem; }

/* --- Метки доказательности --- */

.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
}

.ev-proven { background: var(--green-bg); color: var(--green); border-color: #bfe3cf; }
.ev-limited { background: var(--amber-bg); color: var(--amber); border-color: #f0dcae; }
.ev-none { background: var(--red-bg); color: var(--red); border-color: #eec4c4; }

/* Ключ к меткам стоит до списка, который он объясняет: без него
   цветные плашки в карточках — просто украшение. */
.evidence-key {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--text);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 28px 0 0;
}

.evidence-key h2 { margin: 0 0 14px; font-size: var(--step-1); }

.evidence-key dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 24px;
  margin: 0;
}

.evidence-key dt { margin-bottom: 5px; }

.evidence-key dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.evidence-key .hint { margin: 14px 0 0; }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Карточка провайдера --- */

.provider-specialty { margin: 0 0 8px; font-weight: 600; color: var(--muted); }
.provider-description { max-width: 70ch; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 20px;
  margin: 0;
}

.info-grid dt { font-size: 0.85rem; color: var(--muted); }
.info-grid dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }

.method-list { list-style: none; margin: 0; padding: 0; }

.method-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.method-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.method-note { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

/* --- Отзывы --- */

.reviews, .admin-reviews { list-style: none; margin: 0; padding: 0; }

.review {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-reviews .review {
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.review-rating { color: #d08700; letter-spacing: 1px; }
.review-date { color: var(--muted); font-size: 0.85rem; }
.review p { margin: 6px 0 0; overflow-wrap: anywhere; }

.review-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.review-form .hint { grid-column: 1 / -1; margin: 0; }

/* --- Методы помощи --- */

.level-block { margin-bottom: 28px; }
.level-note { color: var(--muted); margin-top: -4px; }

.method-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.method-card h3 { margin-top: 0; }
.method-card p { margin: 0 0 10px; }
.method-links { font-size: 0.92rem; }

.placeholder h2:first-child { margin-top: 0; }

/* --- Ранние признаки --- */

/* Возраст и наблюдения к нему - строками одной таблицы: линии между
   строками показывают, где кончается один возраст и начинается другой.
   Отдельными карточками это разваливалось бы на кучки, а тут важен
   порядок - от девяти месяцев к трём годам. */
.signs-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.signs-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4px 24px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.signs-row:first-child { border-top: none; }

.signs-age {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
}

.signs-items { margin: 0; padding-left: 20px; }
.signs-items li { margin-bottom: 4px; }
.signs-items li:last-child { margin-bottom: 0; }

.signs-behaviour { margin: 28px 0; }
.signs-behaviour .hint { margin: 10px 0 0; }

/* Регресс - единственное место страницы, набранное инверсно. Ждать тут
   нельзя, и блок не должен потеряться между списками. Цветную плашку
   не берём: цветом на сайте говорит только уровень доказательности. */
.regress {
  margin: 28px 0;
  padding: 22px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
}

.regress h2 { margin: 0 0 10px; color: #fff; font-size: var(--step-1); }
.regress p { margin: 0 0 10px; max-width: 62ch; color: #e6eaec; }
.regress .regress-action { margin-bottom: 0; color: #fff; font-weight: 600; }

.next-steps { margin: 28px 0; }
.next-steps p { max-width: 70ch; }
.next-steps h3 { margin-bottom: 6px; font-size: var(--step-1); }

.next-links {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.next-links a { font-weight: 500; }

.sources { margin: 28px 0 0; }
.sources ul { padding-left: 20px; color: var(--muted); }
.sources li { margin-bottom: 8px; max-width: 78ch; }

/* --- Админка --- */

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 16px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 600;
}

.admin-summary { color: var(--muted); }

.login-box { max-width: 420px; }
.login-box .field { margin-bottom: 14px; }

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

/* В ряду формы ячейки равны по высоте, а поля внутри стоят на одной
   линии: подпись сверху, поле снизу. Иначе поле с подсказкой тянуло ряд
   вверх, а соседи без подсказки висели посередине. */
/* Телефон: «+7» нарисован слева от поля и не редактируется - человек
   вводит только десять цифр. Приставка и поле выглядят одной деталью,
   поэтому рамка между ними убрана, а скругления - только по краям. */
.phone-input { display: flex; align-items: stretch; min-width: 0; }

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 500;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 10px 0 0 10px;
}

.phone-input input { border-radius: 0 10px 10px 0; min-width: 0; }
.phone-input:focus-within .phone-prefix { border-color: var(--accent); }
.admin-form > .field > .phone-input:last-child { margin-top: auto; }

/* Chrome считает высоту select по-своему и не смотрит на line-height,
   поэтому в ряду он выходил ниже соседних полей. Задаём ту же высоту, что
   получается у input: строка плюс отступы сверху и снизу плюс рамки. */
.admin-form select { height: calc(1.4em + 22px); }

.admin-form > .field > input:last-child,
.admin-form > .field > select:last-child,
.admin-form > .field > textarea:last-child {
  margin-top: auto;
}

/* Переключатель «Занятия бесплатные» - отдельной строкой под стоимостью.
   В общем ряду подпись уезжала вниз и отрывалась от переключателя. */
.pricing-free { gap: 6px; }
.pricing-free .hint { margin: 0; font-size: var(--step--1); }

/* Поле «Другой город» нужно, только когда в списке выбран этот пункт.
   Браузер без поддержки :has() правило пропустит и покажет поле всегда -
   форма останется рабочей, просто с лишним полем. */
@supports selector(:has(*)) {
  .admin-form .city-other { display: none; }
  .admin-form:has(#city_choice option[value="other"]:checked) .city-other {
    display: flex;
  }
}

.methods-picker {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}

.methods-picker legend { font-weight: 600; color: var(--muted); padding: 0 6px; }

.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.93rem;
}

.admin-table th, .admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th { background: #eceeed; font-size: 0.85rem; }

.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.row-actions form { margin: 0; }

/* --- Заявки на размещение --- */

.btn-outline {
  padding: 7px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  white-space: nowrap;
}

.btn-outline:hover { background: var(--accent); color: #fff; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.steps-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.step-num {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.form-errors ul { margin: 6px 0 0; padding-left: 20px; }

.kind-picker {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.kind-picker legend { font-weight: 600; color: var(--muted); padding: 0 6px; }

.radio, .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

/* Выбор «кто заполняет анкету» - главная развилка формы: от него зависит,
   какие поля покажутся дальше. Поэтому вариант это не строчка с мелкой
   точкой, а целая строка-кнопка: крупный кружок, большая область нажатия
   и ясно видно, что выбрано. Цвет здесь не нужен - на сайте он занят под
   уровень доказательности, поэтому выбранный вариант выделяется рамкой,
   заливкой и насыщенностью начертания. */
.kind-picker .radio {
  align-items: center;
  gap: 12px;
  /* Это текст выбора, а не подпись поля: правило для label в форме
     делало его мелким, полужирным и приглушённым. */
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.kind-picker .radio:last-of-type { margin-bottom: 0; }

.kind-picker .radio:hover { border-color: #c8cfce; }

.kind-picker .radio:has(input:checked) {
  border-color: var(--accent);
  background: rgba(34, 51, 63, 0.04);
  font-weight: 600;
}

.kind-picker input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #c2cac9;
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.kind-picker input[type="radio"]:checked {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px var(--accent);
}

.kind-picker input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .kind-picker input[type="radio"] { transition: none; }
}

/* Показываем только поля выбранного варианта. Правила написаны от
   обратного - что прятать при каждом выборе: браузер без поддержки :has()
   ни одно из них не применит и покажет все поля, и форма всё равно
   работает, потому что нужную ветку выбирает сервер. */
.application-form:has(input[name="applicant_kind"][value="organization"]:checked) .only-person,
.application-form:has(input[name="applicant_kind"][value="organization"]:checked) .only-specialist,
.application-form:has(input[name="applicant_kind"][value="organization"]:checked) .only-doctor,
.application-form:has(input[name="applicant_kind"][value="specialist"]:checked) .only-organization,
.application-form:has(input[name="applicant_kind"][value="specialist"]:checked) .only-doctor,
.application-form:has(input[name="applicant_kind"][value="doctor"]:checked) .only-organization,
.application-form:has(input[name="applicant_kind"][value="doctor"]:checked) .only-specialist,
.application-form:has(input[name="applicant_kind"][value="doctor"]:checked) .except-doctor {
  display: none;
}

/* Пока вариант не выбран, у парных подписей («Стоимость занятия» и
   «Стоимость приёма») показываем основную, иначе обе стояли бы рядом. */
.application-form:not(:has(input[name="applicant_kind"]:checked)) .only-doctor {
  display: none;
}

.consent-field {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

/* Ловушка для ботов: человек это поле не видит и не может в него попасть. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Модерация --- */

.moderation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin-bottom: 24px;
}

.moderation h2 { margin-top: 0; }
.moderation h3 { font-size: 0.98rem; color: var(--muted); }

.moderation-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 8px 24px;
}

.moderation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.moderation-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.moderation-list p { margin: 4px 0 8px; }

.moderation-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.moderation-text { font-size: 0.93rem; }

/* --- Персональные данные в админке --- */

.data-actions {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.data-actions .field { margin-bottom: 12px; }
.data-actions .hint { margin: 4px 0 0; }

.data-log { list-style: none; margin: 0; padding: 0; }

.data-log li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
}

.consent-text {
  max-width: 70ch;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 0.93rem;
}

.admin-nav-flag { color: var(--amber); }
.admin-nav-flag-clear { color: var(--muted); font-weight: 400; }

.status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-filter .chip { text-decoration: none; }
.chip-active { background: var(--accent); color: #fff; }

/* Запись, где встретились слова о здоровье. Метка живёт в админке рядом
   со статусами и подчиняется их логике: жёлтое - «нужно посмотреть». */
.chip-flag { background: var(--amber-bg); color: var(--amber); }

.status-new { background: var(--amber-bg); color: var(--amber); }
.status-in_progress { background: #e7eefb; color: var(--accent); }
.status-approved { background: var(--green-bg); color: var(--green); }
.status-rejected { background: var(--red-bg); color: var(--red); }

/* --- Телефоны --- */

@media (max-width: 900px) {
  .card.provider-card { grid-template-columns: 108px minmax(0, 1fr); gap: 14px; }
  .pc-side {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 16px;
    padding: 16px 0 0;
    border-left: none;
    border-top: 1px solid var(--line);
    text-align: left;
  }
  .pc-city span { display: inline; }
  .btn-cta { width: auto; flex: 1 1 220px; }
  .pc-more { margin: 0 0 0 auto; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 1.35rem; }
  .card, .provider, .admin-form { padding: 14px; }
  .filters-grid { grid-template-columns: 1fr; }
  .signs-row { grid-template-columns: 1fr; padding: 14px 16px; }
  .regress { padding: 18px 16px; }
  .filters-foot .filter-actions { margin-left: 0; width: 100%; }
  .method-cards, .admin-form, .review-form, .methods-picker,
  .info-grid { grid-template-columns: 1fr; }
  .card.provider-card { grid-template-columns: 1fr; padding: 16px; }
  .pc-media { flex-direction: row; align-items: center; text-align: left; gap: 12px; }
  .pc-media .logo-xl { max-width: 72px; font-size: 1.35rem; }
  .rating { margin-left: 0; }
  .actions .btn, .filter-actions .btn { flex: 1 1 auto; }
  .moderation-cols { grid-template-columns: 1fr; }
  .header-inner { gap: 10px; }
  .header-auth { width: 100%; }
  .btn-outline { width: 100%; text-align: center; }
  .btn-cta { width: 100%; }
  .pc-more { margin: 0; }
  .site-nav { font-size: 0.9rem; }
  .logo { gap: 9px; }
  .logo-mark { height: 40px; }
  /* Под палец: половинки по 38 пикселей, плашка целиком - 44. */
  .lang-switch a, .lang-switch .lang-current { min-height: 38px; padding: 6px 20px; }
}
