/* ===== HOTFIX / UI PACK 2026-08-09 ===== */

.button,
.button-small,
.button-white {
  text-align: center;
  justify-content: center;
  white-space: normal;
  line-height: 1.22;
}

.button {
  padding: 13px 22px;
}

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

.result-card h3 {
  margin: 0;
  order: 1;
}

.result-card p {
  order: 2;
}

.result-card .score {
  order: 3;
  margin-top: 4px;
}

.result-card small {
  order: 4;
  margin-top: 4px;
}

.score {
  align-items: baseline;
}

.score span {
  font-size: 32px;
  font-weight: 700;
  color: #55677d;
}

.score strong {
  font-size: 46px;
  line-height: 1;
}

.reviews-intro {
  color: #40536b !important;
}

.reviews-slider {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.review-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.review-track::-webkit-scrollbar {
  display: none;
}

.review {
  flex: 0 0 min(360px, 84vw);
  scroll-snap-align: start;
  margin: 0;
}

.slider-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(25,56,90,.08);
  transition: transform .2s, box-shadow .2s, background .2s;
}

.slider-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(25,56,90,.12);
  background: #f9fbff;
}

.teacher-media,
.modal-gallery {
  position: relative;
  background: #07509e;
  overflow: hidden;
}

.teacher-media {
  cursor: zoom-in;
}

.teacher-photo,
.modal-photo {
  width: 100%;
  display: block;
  object-position: center;
}

.teacher-photo {
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #13243a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.gallery-prev {
  left: 12px;
}

.gallery-next {
  right: 12px;
}

.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
}

.gallery-dot.is-active {
  background: #fff;
}

.teacher-modal {
  width: min(820px, calc(100% - 24px));
  max-height: min(92vh, 940px);
  overflow: auto;
  padding: 0;
}

.teacher-modal .modal-inner {
  display: flex;
  flex-direction: column;
}

.teacher-modal .modal-gallery {
  flex: 0 0 auto;
}

.modal-photo {
  height: min(56vh, 560px);
  object-fit: contain;
  background: #07509e;
}

.modal-copy {
  padding: 28px 30px 34px;
}

.modal-copy p {
  white-space: pre-line;
  margin-bottom: 0;
}

.body-modal-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cta-actions .button {
  width: 100%;
}

.cta-messengers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.messenger-pill {
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.09);
  color: #fff;
  font-weight: 700;
  transition: transform .2s, background .2s, border-color .2s;
}

.messenger-pill:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.42);
}

.messenger-pill img {
  width: 20px;
  height: 20px;
}

.cta-phone {
  display: inline-flex;
  justify-content: center;
  text-align: center;
  color: #d8e6ff;
  font-weight: 650;
}

.footer {
  padding: 34px 0 42px;
}

.footer-shell {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 36px rgba(18, 52, 89, .06);
}

.footer-caption {
  color: var(--muted);
  font-size: 15px;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  transition: transform .2s, box-shadow .2s, color .2s;
}

.footer-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(25,56,90,.08);
  color: var(--blue);
}

.footer-icon img {
  width: 18px;
  height: 18px;
}

@media (max-width: 980px) {
  .footer-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .button {
    width: 100%;
    padding: 15px 18px;
  }

  .score span {
    font-size: 26px;
  }

  .score strong {
    font-size: 42px;
  }

  .reviews-slider {
    grid-template-columns: 1fr;
  }

  .slider-button {
    display: none;
  }

  .review {
    flex-basis: 86vw;
  }

  .teacher-modal {
    width: min(100% - 16px, 760px);
    max-height: 92vh;
    border-radius: 24px;
  }

  .modal-photo {
    height: min(42vh, 360px);
  }

  .modal-copy {
    padding: 22px 22px 28px;
  }

  .cta-messengers {
    grid-template-columns: 1fr 1fr;
  }

  .footer-caption {
    font-size: 14px;
  }
}

/* ===== Mobile / Safari hardening ===== */

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

body {
  min-width: 320px;
}

.teacher-modal {
  max-height: min(92vh, 940px);
  max-height: min(92dvh, 940px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.teacher-modal .modal-copy {
  overflow: visible;
}

.modal-inner {
  min-height: 0;
}

.modal-gallery {
  flex-shrink: 0;
}

.gallery-nav,
.slider-button,
.modal-close {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.teacher-media {
  -webkit-tap-highlight-color: transparent;
}

.review-track {
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.results-grid {
  -webkit-overflow-scrolling: touch;
}

.button,
.messenger-pill,
.footer-icon,
.text-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  -webkit-backdrop-filter: blur(18px);
}

.footer {
  padding-bottom: max(42px, env(safe-area-inset-bottom));
}

@supports (height: 100dvh) {
  .body-modal-lock {
    height: 100dvh;
  }
}

@media (max-width: 620px) {
  .teacher-modal {
    max-height: 92vh;
    max-height: 92dvh;
  }

  .modal-photo {
    height: min(42vh, 360px);
    height: min(42dvh, 360px);
  }

  .review-track {
    scroll-padding-inline: 0;
  }

  .cta-shell {
    overflow: hidden;
  }

  .cta-messengers > *,
  .cta-actions > * {
    min-width: 0;
  }
}

/* ===== Gallery performance polish ===== */

.teacher-media,
.modal-gallery {
  contain: layout paint;
}

.teacher-photo,
.modal-photo {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  transform: translateZ(0) scale(1);
  -webkit-transform: translateZ(0) scale(1);

  transition:
    opacity 160ms ease,
    transform 160ms ease;

  will-change: opacity, transform;

  user-select: none;
  -webkit-user-select: none;

  -webkit-user-drag: none;
}

.teacher-photo.is-switching,
.modal-photo.is-switching {
  opacity: .72;
  transform: translateZ(0) scale(.995);
}

.teacher-media,
.modal-gallery {
  touch-action: pan-y;
}

.gallery-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;

  will-change: transform;
}

.gallery-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(.96);
}

/* ===== CTA phone ===== */

.cta-phone {
  min-height: 58px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 2px;

  padding: 8px 14px;

  color: #fff;

  text-align: center;

  border-radius: 15px;

  transition:
    background 180ms ease,
    transform 180ms ease;
}

.cta-phone:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.cta-phone span {
  color: #cfe0ff;
  font-size: 12px;
  font-weight: 650;
}

.cta-phone strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: .01em;
}

@media (prefers-reduced-motion: reduce) {
  .teacher-photo,
  .modal-photo,
  .gallery-nav,
  .cta-phone {
    transition: none !important;
  }
}

/* =========================================================
   PERFORMANCE / MOTION FINAL PASS
   ========================================================= */

/*
 * Контент не должен быть невидимым до IntersectionObserver.
 * На быстром скролле это воспринималось как медленная загрузка.
 */
.reveal,
.reveal.visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/*
 * Старый mobile CSS скрывал отзывы начиная с четвёртого.
 * В slider-track показываем абсолютно все отзывы.
 */
.review-track .review,
.review-track .review:nth-child(n+4) {
  display: block !important;
}

/*
 * Компактная навигация галереи.
 * Жёстко задаём физические размеры, чтобы mobile CSS
 * или особенности Safari не растягивали button.
 */
.teacher-media .gallery-nav,
.modal-gallery .gallery-nav {
  width: 34px !important;
  height: 34px !important;

  min-width: 34px !important;
  min-height: 34px !important;

  max-width: 34px !important;
  max-height: 34px !important;

  inline-size: 34px !important;
  block-size: 34px !important;

  padding: 0 !important;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 23px;
  line-height: 1;

  color: #14243a;
  background: rgba(255,255,255,.92);

  border: 1px solid rgba(12,40,78,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);

  opacity: .9;

  contain: layout paint;
  will-change: auto;
}

.teacher-media .gallery-prev,
.modal-gallery .gallery-prev {
  left: 10px;
}

.teacher-media .gallery-next,
.modal-gallery .gallery-next {
  right: 10px;
}

.teacher-media .gallery-nav:hover,
.modal-gallery .gallery-nav:hover {
  transform: translateY(-50%);
  opacity: 1;
}

.teacher-media .gallery-nav:active,
.modal-gallery .gallery-nav:active {
  transform: translateY(-50%) scale(.94);
}

/*
 * Никакого синего flash при смене фотографии.
 */
.teacher-photo,
.modal-photo {
  opacity: 1 !important;
  transform: none !important;

  transition: none !important;
  will-change: auto !important;

  background: #f3f6fa;
}

.teacher-photo.is-switching,
.modal-photo.is-switching {
  opacity: 1 !important;
  transform: none !important;
}

/*
 * Контейнер всегда имеет заполненный фон,
 * даже если сеть реально медленная.
 */
.teacher-media,
.modal-gallery {
  background: #f3f6fa;
}

/*
 * Отзывы: нативная горизонтальная прокрутка.
 */
.review-track {
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

/*
 * Не даём Safari подсвечивать элементы при tap.
 */
.gallery-nav,
.teacher-media,
.review-track,
.slider-button {
  -webkit-tap-highlight-color: transparent;
}

/*
 * Модалка должна скроллиться как единый документ.
 */
.teacher-modal {
  overflow-y: auto !important;
  overflow-x: hidden !important;

  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.teacher-modal .modal-inner,
.teacher-modal .modal-copy {
  overflow: visible !important;
}

@media (max-width: 620px) {
  .teacher-media .gallery-nav,
  .modal-gallery .gallery-nav {
    width: 32px !important;
    height: 32px !important;

    min-width: 32px !important;
    min-height: 32px !important;

    max-width: 32px !important;
    max-height: 32px !important;

    inline-size: 32px !important;
    block-size: 32px !important;

    font-size: 21px;
  }

  .teacher-media .gallery-prev,
  .modal-gallery .gallery-prev {
    left: 7px;
  }

  .teacher-media .gallery-next,
  .modal-gallery .gallery-next {
    right: 7px;
  }

  .review-track .review,
  .review-track .review:nth-child(n+4) {
    display: block !important;
    flex: 0 0 86vw;
  }
}

/* =========================================================
   COMPACT REVIEWS
   ========================================================= */

.review {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}

.review-copy {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.review-text {
  margin: 0;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;

  overflow: hidden;
}

.review.is-expanded .review-text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.review-toggle {
  align-self: flex-start;

  margin-top: 12px;
  padding: 0;

  border: 0;
  background: transparent;

  color: var(--blue);
  font: inherit;
  font-size: 14px;
  font-weight: 750;

  cursor: pointer;

  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.review-toggle:hover {
  text-decoration: underline;
}

.review footer {
  margin-top: 18px;
}

@media (max-width: 620px) {
  .review-text {
    -webkit-line-clamp: 7;
  }
}

/* =========================================================
   FINAL MOBILE TEACHER GALLERY
   ========================================================= */

@media (max-width: 620px) {
  /*
   * В preview на телефоне всё фото — touch-зона.
   * Стрелки здесь только закрывали лицо.
   *
   * В modal-gallery стрелки остаются.
   */
  .teacher-card .teacher-media .gallery-nav {
    display: none !important;
  }

  .teacher-card .teacher-media {
    cursor: pointer;
  }

  /*
   * Точки делаем заметными, но не навязчивыми:
   * они объясняют, что фотографий несколько.
   */
  .teacher-card .teacher-media .gallery-dots {
    bottom: 9px;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(6, 25, 51, .22);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .teacher-card .teacher-media .gallery-dot {
    width: 6px;
    height: 6px;
  }

  .teacher-card .teacher-media .gallery-dot.is-active {
    transform: scale(1.25);
  }
}

/* =========================================================
   ACCEPTANCE PACK
   ========================================================= */

/* ----- Results ----- */

.result-extra {
  display: none;
}

.result-extra.is-visible {
  display: flex;
}

.results-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.results-more-button {
  min-height: 50px;
  padding: 0 24px;

  border: 1px solid rgba(255,255,255,.42);
  border-radius: 15px;

  background: rgba(255,255,255,.10);
  color: #fff;

  font: inherit;
  font-weight: 750;

  cursor: pointer;

  transition:
    background .18s ease,
    transform .18s ease;
}

.results-more-button:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}


/* ----- Header mobile ----- */

@media (max-width: 620px) {
  .site-header .button-small {
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.15;

    padding-inline: 19px;
  }
}


/* ----- Clean footer ----- */

.footer-clean {
  min-height: 118px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;

  gap: 28px;

  padding: 25px 30px;

  border: 1px solid var(--line);
  border-radius: 25px;

  background: #fff;

  box-shadow:
    0 12px 38px rgba(18,52,89,.055);
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo img {
  width: 118px;
  height: auto;
}

.footer-disciplines {
  margin: 0;

  color: var(--muted);
  font-size: 15px;
}

.footer-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;

  font-size: 13px;
  color: var(--muted);
}

.footer-meta a {
  color: var(--ink);
  font-weight: 650;
}

.footer-meta a:hover {
  color: var(--blue);
}


/* ----- Privacy ----- */

.privacy-main {
  padding: 72px 0 100px;
}

.privacy-document {
  max-width: 920px;
}

.privacy-heading {
  margin-bottom: 42px;
}

.privacy-heading h1 {
  margin: 0;

  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.privacy-text {
  padding: 38px 42px;

  border: 1px solid var(--line);
  border-radius: 26px;

  background: #fff;

  color: #42536a;

  font-size: 16px;
  line-height: 1.78;

  box-shadow:
    0 14px 44px rgba(25,56,90,.055);
}


/* ----- Cookie banner ----- */

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  z-index: 1000;

  left: 0;
  right: 0;
  bottom: 0;

  padding:
    14px
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));

  pointer-events: none;

  opacity: 0;
  transform: translateY(12px);

  transition:
    opacity .18s ease,
    transform .18s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner-inner {
  width: min(100%, 1040px);
  margin: auto;

  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;

  gap: 24px;

  padding: 18px 20px;

  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;

  background: rgba(13,29,53,.96);
  color: #fff;

  box-shadow:
    0 20px 60px rgba(0,0,0,.24);

  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);

  pointer-events: auto;
}

.cookie-banner p {
  margin: 0;

  font-size: 14px;
  line-height: 1.55;

  color: #dfe8f7;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-accept {
  min-width: 110px;
  min-height: 46px;

  padding: 0 20px;

  border: 0;
  border-radius: 13px;

  background: var(--blue);
  color: #fff;

  font: inherit;
  font-weight: 800;

  cursor: pointer;
}


/* ----- Mobile ----- */

@media (max-width: 720px) {
  .footer-clean {
    min-height: 0;

    grid-template-columns: 1fr;
    justify-items: center;

    gap: 16px;

    padding: 26px 20px;

    text-align: center;
  }

  .footer-disciplines {
    max-width: 330px;
  }

  .footer-meta {
    align-items: center;
  }

  .cookie-banner-inner {
    grid-template-columns: 1fr;
    gap: 14px;

    padding: 16px;
  }

  .cookie-accept {
    width: 100%;
  }

  .privacy-main {
    padding: 48px 0 72px;
  }

  .privacy-text {
    padding: 24px 20px;

    font-size: 15px;
    line-height: 1.7;
  }
}

/* =========================================================
   PRODUCT POLISH V2
   ========================================================= */

/* ---------- Results pagination ---------- */

.result-card[hidden] {
  display: none !important;
}

.result-card.is-page-visible {
  animation: resultPageIn 180ms ease both;
}

@keyframes resultPageIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.results-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

  margin-top: 28px;
}

.results-page-arrow {
  width: 48px;
  height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;

  background: rgba(255,255,255,.12);
  color: #fff;

  font-size: 22px;
  line-height: 1;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.results-page-arrow:hover:not(:disabled) {
  background: rgba(255,255,255,.22);
  transform: translateY(-1px);
}

.results-page-arrow:active:not(:disabled) {
  transform: scale(.94);
}

.results-page-arrow:disabled {
  opacity: .22;
  cursor: default;
}

.results-page-status {
  min-width: 48px;

  color: rgba(255,255,255,.82);

  text-align: center;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .04em;
}


/* ---------- Review rating ---------- */

.review-stars {
  display: flex;
  align-items: center;
  gap: 3px;

  margin-bottom: 14px;

  color: #111827;
}

.review-stars svg {
  display: block;

  width: 16px;
  height: 16px;

  fill: currentColor;
}


/* ---------- Privacy: structural mobile fix ---------- */

.privacy-page,
.privacy-page * {
  box-sizing: border-box;
}

html:has(.privacy-page),
.privacy-page {
  width: 100%;
  max-width: 100%;

  overflow-x: hidden;
}

@supports (overflow: clip) {
  html:has(.privacy-page),
  .privacy-page {
    overflow-x: clip;
  }
}

.privacy-main,
.privacy-document,
.privacy-heading,
.privacy-text {
  min-width: 0;
  max-width: 100%;
}

.privacy-heading h1 {
  max-width: 100%;

  overflow-wrap: anywhere;
  word-break: normal;
}

.privacy-text {
  overflow-wrap: break-word;
  word-break: normal;
}

.privacy-text a,
.privacy-text pre,
.privacy-text code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 620px) {
  .privacy-page .site-header {
    max-width: 100%;
    overflow: hidden;
  }

  .privacy-page .nav-shell {
    width: 100%;
    max-width: 100%;

    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  .privacy-main {
    width: 100%;

    padding:
      38px
      max(16px, env(safe-area-inset-right))
      64px
      max(16px, env(safe-area-inset-left));
  }

  .privacy-document.container {
    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 0;
  }

  .privacy-heading {
    margin-bottom: 26px;
  }

  .privacy-heading .eyebrow {
    display: block;
    margin-bottom: 10px;
  }

  .privacy-heading h1 {
    font-size: clamp(29px, 8.6vw, 42px);
    line-height: 1.03;
    letter-spacing: -.035em;

    hyphens: auto;
    -webkit-hyphens: auto;
  }

  .privacy-text {
    width: 100%;

    padding: 22px 18px;

    border-radius: 20px;

    font-size: 14px;
    line-height: 1.68;
  }

  .privacy-back {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-card.is-page-visible {
    animation: none;
  }
}

/* =========================================================
   MOBILE RESULTS — NATIVE CAROUSEL
   ========================================================= */

@media (max-width: 620px) {
  #results .results-grid {
    display: flex;

    gap: 14px;

    overflow-x: auto;
    overflow-y: hidden;

    margin-left: -16px;
    margin-right: -16px;

    padding:
      2px
      16px
      13px;

    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;

    overscroll-behavior-inline: contain;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
  }

  #results .results-grid::-webkit-scrollbar {
    display: none;
  }

  #results .result-card {
    flex:
      0
      0
      min(82vw, 350px);

    min-width: 0;

    scroll-snap-align: start;
    scroll-snap-stop: normal;
  }

  #results .results-pagination {
    display: none !important;
  }
}

/* =========================================================
   PRIVACY MOBILE HEADER
   ========================================================= */

@media (max-width: 620px) {
  .privacy-page .nav-shell {
    display: flex !important;
    align-items: center;
    justify-content: space-between;

    gap: 14px;
  }

  .privacy-page .brand {
    flex: 0 0 auto;
  }

  .privacy-page .privacy-back {
    width: auto !important;
    min-width: 0 !important;

    flex: 0 0 auto;

    margin: 0 0 0 auto !important;
    padding: 11px 15px !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;

    font-size: 13px !important;
  }
}

/* =========================================================
   PRECISE GALLERY CHEVRONS
   ========================================================= */

.gallery-nav {
  font-size: 0 !important;
}

.gallery-nav::before {
  content: "";

  width: 8px;
  height: 8px;

  display: block;

  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;

  position: absolute;
  top: 50%;
  left: 50%;

  transform-origin: center;
}

.gallery-next::before {
  transform:
    translate(-65%, -50%)
    rotate(45deg);
}

.gallery-prev::before {
  transform:
    translate(-35%, -50%)
    rotate(-135deg);
}

@media (max-width: 620px) {
  .modal-gallery .gallery-nav::before {
    width: 7px;
    height: 7px;
  }
}

/* =========================================================
   FINAL MOBILE HEADER CTA
   ========================================================= */

@media (max-width: 620px) {
  body:not(.privacy-page) .site-header .button-small {
    min-height: 48px;
    padding: 0 22px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px !important;
    line-height: 1 !important;
    font-weight: 800;
    white-space: nowrap;
  }
}

@media (max-width: 370px) {
  body:not(.privacy-page) .site-header .button-small {
    min-height: 46px;
    padding-inline: 18px !important;
    font-size: 16px !important;
  }
}
