/* ==========================================================================
   Форум частных клиник ВРТ
   Размеры, цвета и отступы сняты с экспорта Tilda один в один.
   Шрифт: Inter (Google Fonts), подключён в <head>.
   ========================================================================== */

:root {
  /* карточка «Программы»: 360 x 480, как в экспорте */
  --card-h: 480px;

  --accent: #ff8723;
  --accent-2: #ffc709;
  --dark: #23272f;
  --black: #000;
  --white: #fff;
  --soft: #f9f9fa;
  --line: #d4d4d4;
  --text: #000;
  --muted: #6b6b6b;

  --container: 1200px;
  --header-h: 80px;

  /* типографика Тильды: десктоп / ≤960 / ≤480 */
  --fs-section: 42px;   /* .t-section__title, .t-title_xs */
  --fs-hero: 36px;      /* .t-title_xxs */
  --fs-heading: 26px;   /* .t-heading_xs — заголовки докладов */
  --fs-name-xl: 24px;   /* .t-name_xl — время */
  --fs-name-md: 20px;   /* .t-name_md — заголовки карточек */
  --fs-descr-xl: 24px;  /* .t-descr_xl — подписи секций */
  --fs-text: 18px;      /* .t-text_sm */
  --fs-base: 16px;      /* .t-descr_xs, .t-name_xs */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 20px; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.accent  { color: var(--accent); }
.bold    { font-weight: 600; }
.inverse { background: var(--black); color: var(--white); padding: 2px 10px; }

/* ---------------------------------------------------------------- шапка
   В оригинале меню статичное: чёрная полоса над обложкой, уезжает со
   страницей. Фиксируется только на мобильных, где открывается бургер. */
.header {
  position: relative;
  z-index: 900;
  height: var(--header-h);
  background: var(--black);
}
.header__inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}
.header__logo img { width: 60px; height: auto; }

.header__nav { margin: 0 auto; }
.header__list { display: flex; }
.header__list a {
  display: block;
  padding: 0 15px;
  color: var(--white);
  font-size: var(--fs-base);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  transition: color .3s ease-in-out;
}
.header__list a:hover { color: var(--accent); }

.header__side { display: flex; align-items: center; gap: 12px; }
.header__phone { display: none; }

.ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  color: var(--white);
  transition: background .2s, color .2s, border-color .2s;
}
.ico svg { width: 15px; height: 15px; fill: currentColor; }
.ico:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.burger { display: none; }

.mobile-menu {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--black);
  padding: 20px 20px 30px;
}
.mobile-menu__list { display: grid; gap: 18px; }
.mobile-menu a {
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.mobile-menu__phone { display: inline-block; margin-top: 24px; color: var(--accent); }

/* -------------------------------------------------------------- обложка */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  color: var(--white);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .3));
}
.hero__inner { position: relative; z-index: 1; text-align: center; }
.hero__logo { max-width: 250px; margin: 0 auto 30px; }

.hero__title { font-weight: 600; line-height: 1.23; }
.hero__kicker { display: block; font-size: var(--fs-name-xl); }
.hero__lead {
  display: block;
  margin-top: 2em;
  font-size: var(--fs-hero);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero__date  { display: block; margin-top: 2em; font-size: 20px; font-weight: 700; }
.hero__place { display: block; font-size: 20px; font-weight: 300; }

/* -------------------------------------------------------- бегущая строка */
.ticker {
  background: var(--black);
  color: var(--white);
  height: 70px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker__group { display: flex; align-items: center; }
.ticker__item {
  padding: 0 20px;
  font-size: var(--fs-text);
  font-weight: 300;
  white-space: nowrap;
  transition: color .2s;
}
.ticker__item:hover { color: var(--accent); }
.ticker__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------- секции */
.section { padding: 60px 0; }
.section--gallery { padding: 60px 0 15px; }
.section--logos { padding: 135px 0; }

.section__title {
  font-size: var(--fs-section);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 40px;
  overflow-wrap: break-word;
}
.section__title--center { text-align: center; }
.section__sub { text-align: center; font-size: var(--fs-base); color: var(--muted); margin-top: -20px; }

.band { background: var(--accent); padding: 60px 0 40px; text-align: center; }
.band__title { font-size: var(--fs-section); font-weight: 500; color: var(--white); }

/* ------------------------------------------------------ карусели карточек */
.section--cards { padding: 30px 0; background: var(--white); }
.section--cards-dark { background: var(--dark); }
.section--cards-dark .section__title { color: var(--white); }

.carousel { position: relative; }
/* Слайдер сам по себе во всю ширину экрана, но стартует от края контейнера:
   отступ = (ширина экрана - 1160px) / 2, как считает Тильда.
   При прокрутке карточки уезжают под этот отступ и доходят до края. */
.carousel__track {
  --slider-container: min(calc(100% - 40px), 1160px);
  --slider-pad: calc((100% - var(--slider-container)) / 2);

  display: flex;
  align-items: stretch;
  gap: 40px;
  overflow: auto hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--slider-pad);
  scrollbar-width: none;
  padding: 1px var(--slider-pad);
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel__track.is-dragging .card { pointer-events: none; }

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 60px;
  height: 60px;
  padding: 12px;
  background: transparent;
  border: 3px solid var(--white);
  color: var(--white);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.carousel__btn--prev { left: 20px; }
.carousel__btn--next { right: 20px; }
.carousel__btn svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; }

.section--cards-dark .carousel__btn:hover { border-color: var(--accent); color: var(--accent); }
.section--cards:not(.section--cards-dark) .carousel__btn {
  border-color: var(--black);
  color: var(--black);
}
.section--cards:not(.section--cards-dark) .carousel__btn:hover {
  background: var(--accent);
  border-color: var(--white);
  color: var(--white);
}

.card {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  background: var(--soft);
  color: var(--text);
  overflow: hidden;
}

/* «Программа»: фото — фон всей карточки, текст поверх него сверху.
   Светлая заливка вверху уже впечатана в сами фотографии. */
.card--section {
  width: 360px;
  height: var(--card-h);
  border-radius: 8px;
}
.card--section .card__media { position: absolute; inset: 0; z-index: 1; }
.card--section .card__body { position: relative; z-index: 2; }

/* «Спикеры»: фото сверху, текст снизу */
.card--speaker { width: 300px; }
.card--speaker .card__media { height: 300px; flex: none; }

.card__media { position: relative; overflow: hidden; }
.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

/* ч/б по умолчанию, цветная при наведении */
.card__img--color {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s cubic-bezier(.45, 0, .55, 1), visibility .3s;
}
.card:hover .card__img--color,
.card:focus-within .card__img--color { opacity: 1; visibility: visible; }

.card__body { padding: 20px 30px; display: flex; flex-direction: column; gap: 12px; }
.card--speaker .card__body { flex: 1; }

.card__title { font-size: var(--fs-name-md); font-weight: 600; line-height: 1.35; color: var(--accent); }
.card__descr { font-size: var(--fs-base); font-weight: 300; line-height: 1.55; }
.card__descr p { margin: 0; }
.card__descr strong { font-weight: 600; }
.card__btn-wrap { margin-top: auto; padding-top: 4px; }

.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  background-image: linear-gradient(.904turn, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 5px 15px rgba(255, 148, 21, .5);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 148, 21, .6); }

/* ------------------------------------------------------------- программа */
.tl-section { padding: 15px 0; }

/* появление при прокрутке — как анимация fadeinup в Тильде */
.reveal > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible > * { opacity: 1; transform: none; }

/* внутри строки элементы проявляются по очереди */
.tl__row .tl__col-time { transition-delay: 0s; }
.tl__row .tl__col-body { transition-delay: .1s; }
.tl__head .tl__section-title { transition-delay: 0s; }
.tl__head .tl__label { transition-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  .reveal > * { opacity: 1; transform: none; transition: none; }
}

.tl__head { text-align: center; margin: 25px 0 30px; }
.tl__section-title {
  font-size: var(--fs-section);
  font-weight: 500;
  line-height: 1.25;
  color: var(--accent);
}
.tl__label { margin-top: 14px; font-size: var(--fs-descr-xl); font-weight: 300; }
.tl__label span { background: var(--black); color: var(--white); padding: 0 8px; }

/* сетка как в Тильде: колонка времени 160px + отступ 100px, контент 760px */
.tl__row { display: flex; }
.tl__col-time {
  flex: 0 0 160px;
  margin-left: 100px;
  padding-right: 20px;
  text-align: right;
}
.tl__col-body {
  flex: 0 1 760px;
  display: flex;
  position: relative;
  padding-left: 20px;
}
.tl__col-body::before {
  content: '';
  position: absolute;
  left: 61px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.tl__row:last-child .tl__col-body::before { display: none; }

.tl__marker { flex: 0 0 84px; position: relative; z-index: 1; }
.tl__dot {
  display: block;
  width: 12px;
  height: 12px;
  margin: 22px auto 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
}
.tl-section[style*="ffffff"] .tl__dot { background: var(--white); }
.tl__photo {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
}
.tl__photo img { width: 100%; height: 100%; object-fit: cover; }

.tl__content { padding: 0 0 40px 40px; }
.tl__time {
  font-size: var(--fs-name-xl);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.tl__time--mobile { display: none; margin-bottom: 8px; white-space: normal; }
.tl__title {
  font-size: var(--fs-heading);
  font-weight: 600;
  line-height: 1.23;
  overflow-wrap: anywhere;
}
.tl__pers { margin-top: 10px; font-size: var(--fs-base); font-weight: 600; line-height: 1.35; }
.tl__text { margin-top: 12px; font-size: var(--fs-text); font-weight: 300; }
.tl__text ul { margin: 8px 0; display: grid; gap: 4px; }
.tl__text li { padding-left: 16px; position: relative; }
.tl__text li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* раскрывающиеся регалии («undercut» в Тильде) */
.undercut__toggle {
  background: none;
  border: 0;
  padding: 0 4px;
  cursor: pointer;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  border-bottom: 1px dotted var(--accent);
}
.undercut__body {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 300;
}

/* --------------------------------------------------------------- галерея
   Ряды одинаковой высоты во всю ширину экрана, как в оригинале. */
.gallery { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 40px; }
.gallery::after { content: ''; flex-grow: 999999; }
.gallery__item {
  height: 235px;
  flex-shrink: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.gallery__item:hover img { opacity: .85; }

/* ------------------------------------------------------------- параллакс */
.parallax {
  height: 60vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* -------------------------------------------------------------- партнёры */
.logos { display: flex; flex-wrap: wrap; justify-content: center; }
.logos li {
  display: grid;
  place-items: center;
  padding: 30px 60px;
  border-left: 1px solid #ececec;
}
.logos li:first-child { border-left: 0; }
.logos img { max-height: 46px; width: auto; }
.logos--lg img { max-height: 56px; }

.infopartners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: start;
}
.infopartner { text-align: center; }
.infopartner img { width: 160px; margin: 0 auto; }
.infopartner__descr { margin-top: 16px; font-size: var(--fs-base); font-weight: 300; }

.cta-partner { margin-top: 80px; text-align: center; font-size: var(--fs-descr-xl); font-weight: 300; }
.cta-partner a { color: var(--accent); text-decoration: underline; }

/* --------------------------------------------------------- место + карта */
.venue { position: relative; }
.venue__wrap {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  pointer-events: none;
}
.venue__card {
  width: 460px;
  max-width: 100%;
  min-height: 300px;
  margin-top: 120px;
  padding: 60px;
  background: var(--accent);
  color: var(--white);
  pointer-events: auto;
}
.venue__title { font-size: 28px; font-weight: 600; line-height: 1.17; margin-bottom: 20px; }
.venue__text { font-size: var(--fs-text); font-weight: 300; line-height: 1.55; }
.venue__text b { font-weight: 600; }
.venue__phone { margin-top: 40px; font-size: var(--fs-text); font-weight: 600; }
.venue__social { display: flex; gap: 12px; margin-top: 24px; }
.venue__social a {
  display: inline-flex;
  color: var(--black);
  transition: color .2s;
}
.venue__social svg { width: 25px; height: 25px; fill: currentColor; }
.venue__social a:hover { color: var(--white); }

.venue__map { height: 600px; background: var(--soft); }
.venue__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  /* обесцвечиваем карту — в Тильде для неё был стиль bw_light.
     Значения подобраны под тот же светлый серый; убрать фильтр — вернётся цвет. */
  filter: grayscale(1) contrast(.92) brightness(1.06);
}

/* ---------------------------------------------------------------- футер */
.footer { background: var(--black); color: var(--white); padding: 40px 0 60px; }
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: var(--fs-base);
  font-weight: 600;
}
.footer__copy { font-weight: 600; line-height: 1.35; }
.footer__nav { flex: 1; }
.footer__nav ul { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.footer a { transition: color .2s; }
.footer a:hover { color: var(--accent); }

/* --------------------------------------------------------------- наверх */
.scrolltop {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 800;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--black);
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, background .2s, color .2s;
}
.scrolltop.is-visible { opacity: 1; visibility: visible; }
.scrolltop:hover { background: var(--accent); color: var(--white); }
.scrolltop svg { width: 100%; height: 100%; }

/* -------------------------------------------------------------- лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 0;
  color: var(--white);
  cursor: pointer;
  line-height: 1;
}
.lightbox__close { top: 20px; right: 26px; font-size: 44px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 60px; padding: 20px; }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }

/* ================================================================ адаптив
   Брейкпоинты Тильды: 1200 / 960 / 640 / 480 */

@media (max-width: 1240px) {
  .tl__col-time { margin-left: 0; flex-basis: 170px; }
  .venue__wrap { padding: 0 20px; }
}

@media (max-width: 1200px) {
  :root { --container: 960px; }
}

@media (max-width: 960px) {
  :root {
    --fs-section: 38px;
    --fs-hero: 32px;
    --fs-heading: 24px;
    --fs-name-xl: 22px;
    --fs-name-md: 18px;
    --fs-descr-xl: 22px;
    --fs-text: 16px;
    --fs-base: 14px;
    --container: 640px;
  }

  .header { position: fixed; inset: 0 0 auto 0; }
  .hero { margin-top: var(--header-h); height: auto; min-height: 0; padding: 60px 0 80px; }
  .header__nav { display: none; }
  .header__side { margin-left: auto; }
  .header__phone { display: block; color: var(--white); font-size: 14px; white-space: nowrap; }
  .burger {
    display: grid;
    gap: 5px;
    width: 28px;
    padding: 0;
    margin-left: 6px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .burger span { display: block; height: 2px; background: var(--white); transition: .25s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero__logo { max-width: 180px; }
  .hero__lead { margin-top: 1.2em; }
  .hero__date { margin-top: 1.2em; }

  .section--logos { padding: 80px 0; }
  .carousel__btn { width: 44px; height: 44px; border-width: 2px; padding: 8px; }
  .carousel__track { gap: 20px; }

  .tl__col-time { display: none; }
  .tl__time--mobile { display: block; }
  .tl__col-body { flex: 1 1 auto; padding-left: 0; }
  .tl__col-body::before { left: 20px; top: 20px; }
  .tl__marker { flex-basis: 42px; }
  .tl__photo { width: 42px; height: 42px; }
  .tl__dot { margin-top: 14px; }
  .tl__content { padding: 0 0 30px 20px; }

  .gallery__item { height: 160px; }
  .parallax { background-attachment: scroll; height: 40vh; }
  .infopartners { grid-template-columns: 1fr; }
  .logos li { padding: 20px 30px; }

  .venue__wrap { position: static; padding: 0; }
  .venue__card { width: 100%; margin: 0; padding: 40px 20px; min-height: 0; }
  .venue__map { height: 420px; }

  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  :root { --container: 100%; }
}

@media (max-width: 480px) {
  :root {
    --fs-section: 30px;
    --fs-hero: 28px;
    --fs-heading: 22px;
    --fs-name-xl: 20px;
    --fs-name-md: 16px;
    --fs-descr-xl: 20px;
    --fs-text: 14px;
    --fs-base: 12px;
  }
  .card--section, .card--speaker { width: 280px; }
  .card--section { --card-h: 373px; }
  .card--speaker .card__media { height: 260px; }
  .card__body { padding: 20px; }
  .carousel__track { gap: 20px; }
  .gallery__item { height: 120px; }
  .section { padding: 40px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================ регистрация
   Цены задаются в разметке атрибутом data-price у радиокнопки тарифа,
   сумма пересчитывается в js/main.js. */
.section--reg { background: var(--soft); }

.reg__lead {
  max-width: 720px;
  margin: -20px auto 40px;
  text-align: center;
  font-size: var(--fs-text);
  font-weight: 300;
}

.reg {
  max-width: 860px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
}

.reg__fieldset { border: 0; padding: 0; margin: 0 0 36px; }
.reg__legend {
  padding: 0;
  margin-bottom: 18px;
  font-size: var(--fs-name-md);
  font-weight: 600;
}

/* ---- тарифы */
.tariffs { display: grid; gap: 12px; }
.tariff { display: block; cursor: pointer; }
.tariff input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.tariff__box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 20px;
  padding: 20px 24px;
  border: 2px solid #e6e6e6;
  border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.tariff:hover .tariff__box { border-color: #cfcfcf; }
.tariff input:checked + .tariff__box { border-color: var(--accent); background: #fffaf5; }
.tariff input:focus-visible + .tariff__box { outline: 2px solid var(--accent); outline-offset: 2px; }

.tariff__name { font-size: var(--fs-name-md); font-weight: 600; }
.tariff__price { font-size: var(--fs-name-md); font-weight: 700; color: var(--accent); white-space: nowrap; }
.tariff__note { grid-column: 1 / -1; font-size: var(--fs-base); font-weight: 300; color: var(--muted); }

/* ---- количество */
.reg__qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.reg__qty-label { font-size: var(--fs-base); font-weight: 600; }

.stepper { display: flex; align-items: center; border: 2px solid #e6e6e6; border-radius: 8px; }
.stepper__btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  transition: color .2s;
}
.stepper__btn:hover { color: var(--accent); }
.stepper__value {
  width: 56px;
  height: 44px;
  border: 0;
  border-left: 2px solid #e6e6e6;
  border-right: 2px solid #e6e6e6;
  text-align: center;
  font: inherit;
  font-weight: 600;
  -moz-appearance: textfield;
}
.stepper__value::-webkit-outer-spin-button,
.stepper__value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- участники */
.attendees { display: grid; gap: 16px; }
.attendee {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: center;
}
.attendee__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

/* ---- поля */
.reg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field--wide { grid-column: 1 / -1; }
.field { display: block; }
.field__label { display: block; margin-bottom: 6px; font-size: var(--fs-base); font-weight: 600; }
.field__opt { font-weight: 300; color: var(--muted); }
.field__input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 2px solid #e6e6e6;
  border-radius: 8px;
  background: var(--white);
  font: inherit;
  color: var(--text);
  transition: border-color .2s;
}
.field__input::placeholder { color: #b5b5b5; }
.field__input:focus { outline: 0; border-color: var(--accent); }
.field__input[aria-invalid="true"] { border-color: #d64545; }

/* ---- согласия */
.reg__consents { display: grid; gap: 12px; margin-bottom: 30px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-base); font-weight: 300; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.check a { color: var(--accent); text-decoration: underline; }

/* ---- итог */
.reg__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 2px solid #eee;
}
.reg__total-label { display: block; font-size: var(--fs-base); font-weight: 300; color: var(--muted); }
.reg__total-sum { font-size: 30px; font-weight: 700; }
.btn--lg { padding: 15px 34px; font-size: var(--fs-text); }

.reg__note { margin-top: 16px; font-size: var(--fs-base); font-weight: 600; }
.reg__note.is-error { color: #d64545; }
.reg__hint { margin-top: 16px; font-size: var(--fs-base); font-weight: 300; color: var(--muted); }

@media (max-width: 640px) {
  .reg { padding: 24px 16px; }
  .reg__grid { grid-template-columns: 1fr; }
  .tariff__box { grid-template-columns: 1fr; padding: 16px 18px; }
  .reg__footer { flex-direction: column; align-items: stretch; }
  .reg__footer .btn { text-align: center; }
}

/* ---- код приглашения */
.promo { margin-top: 18px; }
.promo__toggle {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px dotted var(--accent);
}
.promo__row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.promo__row .field__input { flex: 1 1 240px; }
.btn--ghost {
  background: none;
  box-shadow: none;
  border: 2px solid var(--accent);
  color: var(--text);
  padding: 11px 22px;
}
.btn--ghost:hover { background: var(--accent); color: var(--white); transform: none; }
.promo__msg { margin-top: 10px; font-size: var(--fs-base); font-weight: 600; }
.promo__msg.is-ok { color: #2e7d4f; }
.promo__msg.is-error { color: #d64545; }

/* ========================================================= юридические страницы */
.page-legal .header { position: sticky; top: 0; }

.legal { padding: 60px 0 100px; background: var(--white); }
.legal__container { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.legal__back {
  display: inline-block;
  margin-bottom: 30px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--accent);
  transition: opacity .2s;
}
.legal__back:hover { opacity: .7; }

.legal__title {
  font-size: var(--fs-section);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 50px;
}
.legal__sub {
  display: block;
  margin-top: 14px;
  font-size: var(--fs-text);
  font-weight: 300;
  color: var(--muted);
}

.legal__h2 {
  margin: 44px 0 16px;
  padding-top: 24px;
  border-top: 2px solid #eee;
  font-size: var(--fs-heading);
  font-weight: 600;
  line-height: 1.25;
}
.legal__h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.legal p { margin-bottom: 14px; font-size: var(--fs-text); font-weight: 300; }
.legal strong { font-weight: 600; }

.legal__list { margin: 14px 0 20px; display: grid; gap: 8px; }
.legal__list li {
  position: relative;
  padding-left: 20px;
  font-size: var(--fs-text);
  font-weight: 300;
}
.legal__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* реквизиты */
.req { margin: 20px 0 0; display: grid; gap: 14px; }
.req > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 6px 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.req dt { font-size: var(--fs-base); font-weight: 600; }
.req dd { margin: 0; font-size: var(--fs-text); font-weight: 300; }
.req a { color: var(--accent); }

@media (max-width: 640px) {
  .legal { padding: 40px 0 70px; }
  .legal__title { margin-bottom: 34px; }
  .req > div { grid-template-columns: 1fr; }
}

/* ================================================ страница билета и сканер */
.page-ticket .header,
.page-scan .header { position: static; }

.tk { padding: 40px 20px 80px; max-width: 520px; margin: 0 auto; }

.tk__card {
  padding: 32px 28px;
  border-radius: 12px;
  border: 2px solid #e6e6e6;
  background: var(--white);
  text-align: center;
}
.tk__card--ok { border-color: #2f9e44; }
.tk__card--used { border-color: #e8a13a; background: #fffaf0; }
.tk__card--bad { border-color: #d64545; }

.tk__status { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.tk__card--ok .tk__status { color: #2f9e44; }
.tk__card--used .tk__status { color: #b8730f; }
.tk__card--bad .tk__status { color: #d64545; }

.tk__name { font-size: 26px; font-weight: 600; line-height: 1.25; }
.tk__meta { margin-top: 8px; font-size: 15px; font-weight: 300; color: var(--muted); }
.tk__code {
  margin: 22px 0 4px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
}
.tk__hint { margin-top: 16px; font-size: 14px; font-weight: 300; color: var(--muted); }
.tk__hint a { color: var(--accent); }
.tk__error {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fdecec;
  color: #d64545;
  font-size: 14px;
}

.tk__event { margin-top: 28px; text-align: center; font-weight: 300; line-height: 1.6; }
.tk__event a { color: var(--accent); }

/* ---- сканер: крупные элементы, читается на бегу и при плохом свете */
.sc { max-width: 520px; margin: 0 auto; padding: 16px 16px 60px; }

.sc__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.sc__who { font-weight: 600; }
.sc__count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc__exit {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.sc__result {
  margin: 16px 0;
  padding: 28px 20px;
  border-radius: 12px;
  background: var(--soft);
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background .15s;
}
.sc__result--ok { background: #2f9e44; color: var(--white); }
.sc__result--used { background: #e8a13a; color: var(--white); }
.sc__result--bad { background: #d64545; color: var(--white); }
.sc__result--wait { background: #e9e9ec; }

.sc__title { font-size: 26px; font-weight: 700; line-height: 1.2; }
.sc__body { margin-top: 12px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.sc__body span { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 300; }
.sc__idle { font-size: 16px; font-weight: 300; color: var(--muted); line-height: 1.5; }

.sc__camera { position: relative; text-align: center; }
.sc__camera video {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  background: #000;
}
.sc__camera video:not([srcobject]) { min-height: 0; }
.sc__start { width: 100%; }
.sc__note { margin-top: 10px; font-size: 14px; font-weight: 300; color: var(--muted); }

.sc__manual { display: flex; gap: 10px; margin-top: 18px; }
.sc__manual .field__input { flex: 1; text-transform: uppercase; font-weight: 600; }
.sc__manual .btn { flex: none; }

/* ==================================================================== админка */
.page-admin .header { position: static; }

.adm { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; }

.adm__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid #eee;
}
.adm__nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s;
}
.adm__nav a:hover { background: var(--soft); }
.adm__nav a.is-active { background: var(--accent); color: var(--white); }
.adm__logout { margin-left: auto; }
.adm__logout button {
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--muted); font: inherit; text-decoration: underline;
}

.adm__h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; }
.adm__h2 { font-size: 20px; font-weight: 600; margin: 34px 0 14px; }
.adm__lead { font-weight: 300; color: var(--muted); margin-bottom: 24px; max-width: 640px; }
.adm__back { display: inline-block; margin-bottom: 16px; color: var(--accent); font-weight: 600; }
.adm__muted { color: var(--muted); font-size: 13px; font-weight: 300; }
.adm__nowrap { white-space: nowrap; }
.adm__count { margin: 14px 0; font-size: 14px; color: var(--muted); }
.adm__empty { text-align: center; padding: 30px; color: var(--muted); font-weight: 300; }

.adm__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.adm__stats > div {
  padding: 18px 20px;
  background: var(--soft);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
}
.adm__stats span {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.adm__filter { display: flex; gap: 10px; flex-wrap: wrap; }
.adm__filter .field__input { flex: 1; min-width: 200px; height: 44px; }
.adm__filter select.field__input { flex: 0 0 190px; }

.adm__form { max-width: 520px; margin-bottom: 20px; }
.adm__form .field { margin-bottom: 14px; }
.adm__textarea { height: auto; padding: 12px 16px; resize: vertical; line-height: 1.5; }

.adm__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm__table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #eee;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  font-weight: 600;
}
.adm__table td { padding: 12px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.adm__table tr:hover td { background: #fcfcfd; }
.adm__table a { color: var(--accent); font-weight: 600; }
.adm__table code { font-size: 14px; letter-spacing: .5px; }

.adm__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #eee;
}
.adm__badge--paid, .adm__badge--ok { background: #e3f5e7; color: #2f7a3f; }
.adm__badge--new, .adm__badge--used { background: #fdf0dc; color: #9a6612; }
.adm__badge--failed, .adm__badge--not_found { background: #fdecec; color: #c23b3b; }

.adm__props { display: grid; gap: 0; margin: 20px 0; max-width: 560px; }
.adm__props > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.adm__props dt { font-size: 13px; color: var(--muted); font-weight: 400; }
.adm__props dd { margin: 0; font-weight: 600; }

.adm__flash {
  padding: 12px 16px;
  border-radius: 8px;
  background: #e3f5e7;
  color: #2f7a3f;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.adm__flash--bad { background: #fdecec; color: #c23b3b; }

.adm__link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
}

.adm__pages { display: flex; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.adm__pages a { padding: 6px 12px; border-radius: 6px; background: var(--soft); font-weight: 600; }
.adm__pages a.is-active { background: var(--accent); color: var(--white); }

@media (max-width: 760px) {
  .adm__table { font-size: 13px; }
  .adm__table th, .adm__table td { padding: 8px 6px; }
  .adm__props > div { grid-template-columns: 1fr; gap: 2px; }
  .adm__nav { font-size: 14px; }
}

/* заявка на счёт: реквизиты организации и экран после отправки */
.reg__note-static {
  margin: -8px 0 16px;
  font-size: var(--fs-base);
  font-weight: 300;
  color: var(--muted);
}
.reg__done {
  font-size: var(--fs-h3, 20px);
  font-weight: 600;
  line-height: 1.4;
}
.reg__done-note {
  margin-top: 14px;
  font-weight: 300;
  color: var(--muted);
}

/* замена участника в карточке заказа */
.adm__rename { display: grid; gap: 6px; max-width: 320px; }
.adm__rename .field__input { height: 38px; font-size: 14px; }
.adm__rename-send {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
}
.adm__rename-send input { width: 14px; height: 14px; accent-color: var(--accent); }
.adm__badge--invoice { background: #e7eefd; color: #2c5aa8; }
