/* Каталог репетиторов и публичное «Резюме» (Slice T2).
   Только токены дизайн-системы (tokens.css) и компоненты .spotty-*; свои
   классы — с префиксом tc-. Текст ≥ 14px, тап-цели ≥ 44px, светлая и тёмная
   тема — через [data-theme] (переключает голова страницы). */

.tc-body {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html, body { max-width: 100%; overflow-x: clip; }
[hidden] { display: none !important; }
/* Кнопки дизайн-системы — не мельче 15px (у --text по умолчанию 13px). */
.tc-body .spotty-button { font-size: 15px; }

.tc-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .tc-wrap { padding-inline: 24px; } }

.tc-skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 10px 16px; border-radius: var(--md-sys-shape-corner-s); background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.tc-skip:focus { left: 16px; }
.tc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tc-link { color: var(--md-sys-color-primary); text-decoration: underline; text-underline-offset: 2px; }
.tc-muted { color: var(--md-sys-color-on-surface-variant); margin: 0; }
.tc-hint { font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); margin: 0; }

/* ---------- шапка и подвал ---------- */
.tc-header { border-bottom: 1px solid var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface); }
.tc-header__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.tc-logo { display: inline-flex; align-items: center; min-height: 44px; }
.tc-logo img { height: 34px; width: auto; display: block; }
.tc-logo__dark { display: none !important; }
[data-theme="dark"] .tc-logo__light { display: none !important; }
[data-theme="dark"] .tc-logo__dark { display: block !important; }
.tc-header__nav { display: flex; align-items: center; gap: 4px; }
.tc-header__link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--md-sys-color-on-surface); font-weight: 500; border-radius: var(--md-sys-shape-corner-full); }
.tc-header__link:hover { background: var(--md-sys-color-surface-container); }
.tc-header__cta { min-height: 44px; }
@media (max-width: 479px) {
  .tc-hide-sm { display: none; }
  .tc-logo img { height: 28px; }
  .tc-header__cta { padding-inline: 14px; }
}

.tc-footer { margin-top: auto; border-top: 1px solid var(--md-sys-color-outline-variant); color: var(--md-sys-color-on-surface-variant); font-size: 14px; }
.tc-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px; }
.tc-footer p { margin: 0; align-self: center; }
.tc-footer nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.tc-footer a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- заголовки ---------- */
.tc-main { padding-block: 24px 48px; display: flex; flex-direction: column; gap: 20px; }
.tc-h1 { font-family: var(--type-face-head); font-weight: 800; font-size: clamp(26px, 4.5vw, 36px); line-height: 1.15; margin: 0; text-wrap: balance; }
.tc-h2 { font-family: var(--type-face-head); font-weight: 700; font-size: 20px; line-height: 28px; margin: 0; }
.tc-h3 { font-family: var(--type-face-head); font-weight: 700; font-size: 18px; line-height: 24px; margin: 0; }
.tc-hero { display: flex; flex-direction: column; gap: 12px; }
.tc-lede { margin: 0; max-width: 72ch; color: var(--md-sys-color-on-surface-variant); font-size: 16px; line-height: 24px; }
.tc-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; max-width: 72ch; border-radius: var(--md-sys-shape-corner-m); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.tc-note .material-symbols-outlined { font-size: 20px; margin-top: 1px; }

/* ---------- раскладка каталога ---------- */
.tc-layout { display: grid; gap: 20px; }
@media (min-width: 960px) {
  .tc-layout { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .tc-filters { position: sticky; top: 16px; }
  .tc-filters__summary { pointer-events: none; }
  .tc-filters__chev { display: none; }
}

/* ---------- фильтры ---------- */
.tc-filters { border-radius: var(--md-sys-shape-corner-l); background: var(--md-sys-color-surface-container-low); }
.tc-filters__summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 16px; cursor: pointer; font-weight: 600; }
.tc-filters__summary::-webkit-details-marker { display: none; }
.tc-filters__chev { margin-left: auto; transition: transform .15s var(--md-sys-motion-easing-standard); }
.tc-filters[open] .tc-filters__chev { transform: rotate(180deg); }
.tc-filters__count { font-size: 14px; font-weight: 500; color: var(--md-sys-color-on-surface-variant); }
.tc-filters__form { display: flex; flex-direction: column; gap: 18px; padding: 4px 16px 16px; }
.tc-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tc-legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 2px; }
.tc-group-title { margin: 4px 0 0; font-size: 14px; color: var(--md-sys-color-on-surface-variant); }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.tc-check-chip { position: relative; display: inline-flex; }
.tc-check-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tc-check-chip span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-s); border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-on-surface); font-size: 14px; font-weight: 500; cursor: pointer;
}
.tc-check-chip input:checked + span { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; }
.tc-check-chip input:checked + span::before { content: "✓"; margin-right: 4px; }
.tc-check-chip input:focus-visible + span { outline: 2px solid var(--md-sys-color-focus-ring); outline-offset: 2px; }

.tc-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.tc-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--md-sys-color-primary); flex: none; }

.tc-price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tc-field__label { font-size: 14px; color: var(--md-sys-color-on-surface-variant); }
.tc-input {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 15px;
  border-radius: var(--md-sys-shape-corner-s); border: 1px solid var(--md-sys-color-outline);
  background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface);
}
.tc-input:focus-visible { outline: 2px solid var(--md-sys-color-focus-ring); outline-offset: 1px; }
.tc-filters__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-filters__actions .spotty-button { min-height: 44px; }

/* ---------- выдача ---------- */
.tc-results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tc-count { margin: 0; color: var(--md-sys-color-on-surface-variant); font-size: 14px; min-height: 20px; }
.tc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .tc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tc-card { height: 100%; gap: 10px; }
.tc-card__head { display: flex; gap: 12px; align-items: flex-start; }
.tc-card__id { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-card__name { margin: 0; font-family: var(--type-face-head); font-size: 18px; line-height: 24px; font-weight: 700; }
.tc-card__link { color: var(--md-sys-color-on-surface); }
.tc-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tc-card__link:focus-visible { outline: none; }
.tc-card:has(.tc-card__link:focus-visible) { outline: 2px solid var(--md-sys-color-focus-ring); outline-offset: 2px; }
.tc-card__headline { margin: 0; color: var(--md-sys-color-on-surface-variant); overflow-wrap: anywhere; }
.tc-card__meta { margin: 0; font-size: 14px; color: var(--md-sys-color-on-surface-variant); }
.tc-card__meta:empty { display: none; }
.tc-card__price { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tc-card__reason { margin: 0; display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--md-sys-color-success); font-weight: 600; }
.tc-card__reason .material-symbols-outlined { font-size: 18px; }
.tc-card__badges { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.tc-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--md-sys-color-surface-container-high); }
.tc-photo--lg { width: 112px; height: 112px; }
.tc-photo--empty { display: inline-flex; align-items: center; justify-content: center; font-family: var(--type-face-head); font-weight: 800; font-size: 26px; color: var(--md-sys-color-on-primary-container); background: var(--md-sys-color-primary-container); }
.tc-photo--lg.tc-photo--empty { font-size: 40px; }

.tc-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tc-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); font-size: 14px; }
.tc-tag--more { background: transparent; border: 1px dashed var(--md-sys-color-outline); color: var(--md-sys-color-on-surface-variant); }
.tc-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 10px; border-radius: var(--md-sys-shape-corner-full); font-size: 14px; font-weight: 500; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.tc-badge .material-symbols-outlined { font-size: 16px; }
.tc-badge--ok { background: var(--md-sys-color-success-container); color: var(--md-sys-color-on-success-container); }
.tc-badge--muted { background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); }

.tc-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.tc-pager > :last-child { justify-self: end; }
.tc-pager .spotty-button { min-height: 44px; padding-inline: 16px; }
.tc-pager__info { font-size: 14px; color: var(--md-sys-color-on-surface-variant); text-align: center; }

.tc-empty, .tc-cta { gap: 10px; align-items: flex-start; }
.tc-empty p, .tc-cta p { margin: 0; }
.tc-empty .spotty-button, .tc-cta .spotty-button { min-height: 44px; }

/* ---------- страница «Резюме» ---------- */
.tc-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--md-sys-color-on-surface); font-weight: 500; align-self: flex-start; }
.tc-profile { display: flex; flex-direction: column; gap: 24px; }
.tc-profile__head { display: flex; gap: 16px; align-items: center; }
.tc-profile__id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tc-profile__headline { margin: 0; font-size: 17px; line-height: 24px; color: var(--md-sys-color-on-surface-variant); overflow-wrap: anywhere; }
@media (max-width: 479px) {
  .tc-profile__head { flex-direction: column; align-items: flex-start; }
  .tc-photo--lg { width: 88px; height: 88px; }
}
.tc-profile__grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .tc-profile__grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.tc-profile__main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.tc-profile__aside { display: flex; flex-direction: column; gap: 12px; }
.tc-section { display: flex; flex-direction: column; gap: 12px; }
.tc-bio p { margin: 0 0 10px; max-width: 72ch; font-size: 16px; line-height: 25px; overflow-wrap: anywhere; white-space: pre-line; }
.tc-bio p:last-child { margin-bottom: 0; }

.tc-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--md-sys-shape-corner-l); overflow: hidden; background: var(--md-sys-color-surface-container-high); }
.tc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tc-video__play { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 0; cursor: pointer; background: transparent; color: var(--md-sys-color-on-surface); font: inherit; font-weight: 600; font-size: 15px; }
.tc-video__icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.tc-video__icon .material-symbols-outlined { font-size: 36px; }
.tc-video__play:focus-visible { outline: 3px solid var(--md-sys-color-focus-ring); outline-offset: -3px; }

.tc-spec { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tc-spec__row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; align-items: center; }
.tc-spec dt { font-weight: 600; }
.tc-spec dd { margin: 0; }
@media (max-width: 479px) { .tc-spec__row { grid-template-columns: 1fr; gap: 6px; } }

.tc-side { gap: 10px; }
.tc-side p { margin: 0; }
.tc-side__row { display: flex; gap: 8px; align-items: center; }
.tc-side__row .material-symbols-outlined { font-size: 20px; color: var(--md-sys-color-on-surface-variant); }
.tc-side__cta { width: 100%; min-height: 44px; margin-top: 4px; }
.tc-side .spotty-button { min-height: 44px; }

.tc-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tc-links__a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 8px; margin-inline: -8px; border-radius: var(--md-sys-shape-corner-m); color: var(--md-sys-color-on-surface); }
.tc-links__a:hover { background: var(--md-sys-color-surface-container-high); }
.tc-links__a:focus-visible { outline: 2px solid var(--md-sys-color-focus-ring); }
.tc-links__text { display: flex; flex-direction: column; min-width: 0; }
.tc-links__label { font-weight: 600; }
.tc-links__host { font-size: 14px; color: var(--md-sys-color-on-surface-variant); overflow-wrap: anywhere; }
.tc-links__ext { color: var(--md-sys-color-warning); font-weight: 600; }



/* --- Формы T3: «Помогите найти эксперта», «Пробный урок» --- */
.tc-narrow { max-width: 760px; }
.tc-form-card { padding: 20px; }
.tc-form { display: flex; flex-direction: column; gap: 18px; }
.tc-form__row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tc-form__btn { min-height: 48px; align-self: flex-start; }
.tc-form__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-form p { margin: 0; }
.tc-textarea { min-height: 96px; resize: vertical; padding-block: 10px; }
.tc-errors { padding: 12px 16px; border-radius: var(--md-sys-shape-corner-m); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); font-size: 15px; }
.tc-errors ul { margin: 4px 0 0; padding-left: 20px; }
.tc-errors:focus { outline: 2px solid var(--md-sys-color-focus-ring); outline-offset: 2px; }
.tc-success { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tc-success p { margin: 0; }
.tc-success__icon { font-size: 40px; color: var(--md-sys-color-success); }
.tc-consent { align-items: flex-start; font-size: 14px; line-height: 20px; }
.tc-consent input { margin-top: 2px; }
.tc-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tc-phone { display: flex; align-items: stretch; }
.tc-phone__prefix { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--md-sys-color-outline-variant); border-right: 0; border-radius: var(--md-sys-shape-corner-s) 0 0 var(--md-sys-shape-corner-s); background: var(--md-sys-color-surface-container); color: var(--md-sys-color-on-surface-variant); }
.tc-phone .tc-input { border-top-left-radius: 0; border-bottom-left-radius: 0; flex: 1; min-width: 0; }
.tc-trial-head { display: flex; gap: 14px; align-items: center; }
.tc-trial-head .tc-lede { margin-top: 4px; }
.tc-side__cta { text-align: center; justify-content: center; }

/* ---------- рекомендации (Slice T4, спека Р4/Р4a) ----------
   Без звёзд и оценок: «Рекомендуют N», теги с числами, факты, блок Spotty. */
.tc-recommend { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--md-sys-color-success); }
.tc-recommend .material-symbols-outlined { font-size: 20px; }
.tc-badge--verified { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.tc-card__recs { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--md-sys-color-success); }
.tc-card__recs .material-symbols-outlined { font-size: 18px; }
.tc-card__recs .tc-muted { font-weight: 400; }
.tc-tag--count { background: var(--md-sys-color-success-container); color: var(--md-sys-color-on-success-container); }
.tc-facts { gap: 8px; }
.tc-facts .tc-h3 { display: flex; align-items: center; gap: 8px; }
.tc-facts__list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 22px; }
.tc-endorse { gap: 8px; }
.tc-endorse__title { display: flex; align-items: center; gap: 8px; }
.tc-reviews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tc-review { gap: 8px; }
.tc-review__head { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 15px; }
.tc-review__head .tc-muted { font-size: 14px; }
.tc-review__text { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.tc-review__text p { margin: 0; }
.tc-review__sign { margin: 0; font-size: 14px; color: var(--md-sys-color-on-surface-variant); overflow-wrap: anywhere; }
.tc-review__sign .tc-link { display: inline-flex; align-items: center; min-height: 44px; }
.tc-review__reply { margin-top: 4px; padding: 10px 12px; border-left: 3px solid var(--md-sys-color-primary); border-radius: var(--md-sys-shape-corner-s); background: var(--md-sys-color-surface-container); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 6px; }
.tc-review__reply p { margin: 0; }
.tc-review__reply-title { font-weight: 600; }
