/* Шаблон 10 (BD-1). Цвета и шрифт — только из переменных схемы (schemes/*.css).
   Вёрстка от телефона: базовые стили под 360 px, шире — через min-width 600, 900, 1200.
   Светлые полосы и карточки, тёмные полосы (--band) у первого экрана, шапки страницы, раздела с
   таблицей, призыва и футера; скругления 20, кнопки-пилюли не ниже 48 px. */
*, *::before, *::after { box-sizing: border-box; }
/* Шапка прилипает к верху (около 72 px): переход по якорю отступает от неё. */
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.5; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.tg-icon { width: 1.15em; height: 1.15em; flex: none; }
h1, h2, h3 { line-height: 1.2; margin: 0; color: inherit; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* Кнопки-пилюли: палитры (--go), первого экрана (--hero-go), контурные. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.5rem 1.5rem; border: 2px solid transparent; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; transition: filter 0.2s ease, transform 0.2s ease; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--go { background: linear-gradient(135deg, var(--go), var(--go-2)); color: var(--on-go); }
.btn--hero { background: var(--hero-go); color: var(--on-hero-go); }
.btn--line, .btn--outline { background: transparent; color: var(--text); border-color: currentColor; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* Тёмные места: текст и контурные кнопки цветом полосы; сплошная кнопка палитры — кнопкой первого
   экрана (у части палитр --go совпадает с --band). */
.hero, .page-head, .band--dark, .join__card, .footer { background: var(--band); color: var(--on-band); }
:is(.hero, .page-head, .band--dark, .join__card, .footer) :is(.btn--line, .btn--outline) { color: var(--on-band); }
:is(.hero, .page-head, .band--dark) .btn--go { background: var(--hero-go); color: var(--on-hero-go); }
:is(.hero, .page-head, .band--dark, .footer) a:not(.btn) { color: var(--on-band); }

/* Пилюли: над h1 и над h2. */
.pill { display: inline-block; margin: 0 0 12px; padding: 4px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
:is(.hero, .page-head, .band--dark) .pill { background: color-mix(in srgb, var(--on-band) 12%, transparent); border-color: color-mix(in srgb, var(--on-band) 35%, transparent); }

/* Шапка: белая, прилипает. Меню открывает скрытый чекбокс; он закреплён вверху экрана, иначе клик по
   бургеру прокручивает страницу к нему. */
.header { position: sticky; top: 0; z-index: 50; background: var(--surface); color: var(--text); box-shadow: 0 2px 12px color-mix(in srgb, var(--text) 10%, transparent); }
.header__bar { display: flex; align-items: center; gap: 12px; min-height: 72px; position: relative; }
.header__logo { margin-right: auto; display: flex; align-items: center; color: var(--text); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.header__logo-img { height: 48px; width: auto; max-width: none; }
.header__contact { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--telegram); color: var(--on-telegram); flex: none; }
.nav__check { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; cursor: pointer; color: var(--text); flex: none; }
.nav__toggle .ic { width: 28px; height: 28px; }
.nav__check:focus-visible + .nav__toggle { outline: 2px solid var(--accent); }
.nav__menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 12px; background: var(--surface); max-height: calc(100vh - 72px); overflow-y: auto; border-radius: 0 0 20px 20px; box-shadow: 0 12px 24px color-mix(in srgb, var(--text) 15%, transparent); }
.nav__check:checked ~ .nav__menu { display: flex; }
.nav__link { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; color: var(--text); font-weight: 600; text-decoration: none; }
.nav__link:hover, .nav__link.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav__menu .btn { margin-top: 8px; }

/* Первый экран главной: на телефоне картинка под текстом, кнопки во всю ширину. */
.hero { padding: 40px 0 48px; }
.hero__grid { display: grid; gap: 32px; align-items: center; }
.hero__title { font-size: clamp(1.75rem, 6vw, 3rem); margin-bottom: 16px; }
.hero__lead, .page-head__lead { font-size: 1rem; }
.hero__buttons { display: grid; gap: 12px; margin-top: 24px; }
.hero__media { display: block; }
.hero__img, .figure__img { width: 100%; border-radius: 20px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 18px 48px -16px color-mix(in srgb, var(--accent) 60%, transparent); }

/* Шапка внутренней страницы: крошки, пилюля, h1, вступление, кнопки; снизу волна цвета страницы. */
.page-head { padding-top: 28px; }
.page-head__inner { padding-bottom: 12px; }
.crumbs__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 0.9375rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.wave { display: block; width: 100%; height: 40px; fill: var(--bg); }

/* Значки доверия: 3 колонки на телефоне, 6 в строку от 900 px. */
.badges { background: var(--surface); padding: 24px 0; }
.badges__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 12px; margin-block: 0; padding: 0; list-style: none; }
.badges__item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 600; line-height: 1.3; }
.badges__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.badges__icon .ic { width: 26px; height: 26px; }

/* Оглавление: свёрнуто на телефоне (подпись скрытого чекбокса), открыто сбоку на внутренних от 900 px. */
.strip { width: min(1140px, 100% - 32px); margin: 24px auto; }
.toc { position: relative; padding: 4px 16px; border-radius: 20px; background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.toc__check { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.toc__title { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; cursor: pointer; }
.toc__chevron { margin-left: auto; transition: transform 0.2s ease; }
.toc__check:checked ~ .toc__title .toc__chevron { transform: rotate(180deg); }
.toc__check:focus-visible ~ .toc__title { outline: 2px solid var(--accent); border-radius: 8px; }
.toc__list { display: none; margin: 0 0 12px; padding-left: 1.5rem; }
.toc__check:checked ~ .toc__list { display: block; }
.toc__list li { padding: 6px 0; }
.toc__list a { color: var(--text); text-decoration: none; }
.toc__list a:hover { color: var(--link); text-decoration: underline; }
.toc .buttons { margin: 0 0 12px; }

/* Внутренняя страница: оглавление над карточками, от 900 px — слева, прилипает. */
.layout { display: grid; gap: 20px; padding: 8px 0 40px; }
.layout__main { min-width: 0; }
.card-box { background: var(--surface); color: var(--text); border-radius: 20px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 20px color-mix(in srgb, var(--text) 8%, transparent); }
.card-box--shot .figure { margin: 0; }

/* Разделы главной: полосы во всю ширину; шапка раздела по центру. */
.band { padding: 48px 0; }
.band--plain { background: var(--bg); }
.band--alt { background: var(--surface); }
.band .sec__head { text-align: center; max-width: 760px; margin-inline: auto; }
.band .buttons { justify-content: center; }
.sec__head { margin-bottom: 20px; }
.sec__title { font-size: clamp(1.5rem, 4.5vw, 2.25rem); margin-bottom: 12px; }
.sec__lead { font-size: 1rem; font-weight: 600; margin: 0; }
.sec__sub { font-size: 1.25rem; margin: 24px 0 10px; }
.figure { margin: 0 0 24px; }
/* На главной картинка раздела не шире 760 px: во всю ширину контейнера она заслоняет текст. */
.band .figure { max-width: 760px; margin-inline: auto; }
.figure__link { display: block; }

/* Списки, шаги, сноска. */
.dots { margin: 0 0 1em; padding: 0; list-style: none; }
.dots li { position: relative; padding-left: 1.5rem; margin-bottom: 8px; }
.dots li::before { content: ''; position: absolute; left: 4px; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.steps { margin: 0 0 1em; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps__item { position: relative; counter-increment: step; padding-left: 52px; min-height: 40px; }
.steps__item::before { content: counter(step); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.footnote { padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* Таблица: шапка цветом полосы, строки через одну; уже 600 px строка — карточка. */
.table-wrap { margin: 0 0 1em; border-radius: 16px; overflow-x: auto; background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; }
.table thead { background: var(--band); color: var(--on-band); }
.table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.table a { color: var(--link); }

/* Карточки: 1 / 2 / 4 колонки. Свой фон и цвет текста — читаются и на тёмной полосе. */
.cards, .links__grid { display: grid; gap: 16px; margin: 0 0 1em; }
.card, .link-card { padding: 20px; border-radius: 20px; background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.card a { color: var(--link); }
.tile { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.card__title { font-size: 1.125rem; margin-bottom: 8px; }
.card__text { margin: 0; }
.link-card { display: grid; grid-template-columns: auto 1fr auto; column-gap: 14px; align-items: center; text-decoration: none; }
.link-card .tile { grid-row: span 2; margin: 0; }
.link-card__label { font-weight: 700; font-size: 1.0625rem; }
.link-card__desc { grid-column: 2; color: var(--muted); }
.link-card__arrow { grid-column: 3; grid-row: 1 / span 2; color: var(--link); }
.link-card:hover { border-color: var(--accent); }

/* FAQ гармошкой: вопрос с галочкой, открытый — галочка вверх. */
.faq__list { display: grid; gap: 12px; }
.faq__item { border-radius: 16px; background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__chevron { display: inline-flex; color: var(--link); transition: transform 0.2s ease; }
.faq__item[open] .faq__chevron { transform: rotate(180deg); }
.faq__answer { padding: 0 16px 4px; }
.card-box .faq__item { background: var(--bg); }

.picture { display: block; margin: 0 0 1em; }
.picture__img { border-radius: 16px; }

/* Призыв перед футером: тёмная карточка по центру. */
.join { padding: 40px 0; }
.join__card { padding: 32px 20px; border-radius: 20px; text-align: center; }
.join__title { font-size: clamp(1.375rem, 4vw, 2rem); font-weight: 700; line-height: 1.25; }
.join__buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.join__note { margin: 16px 0 0; }
.age { display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; padding: 2px 8px; border: 2px solid currentColor; border-radius: 999px; font-weight: 700; font-size: 0.875rem; }

/* Футер: столбиком, от 900 px колонками; снизу запас под закреплённые кнопки. */
.footer { padding: 40px 0 112px; }
.footer__top { display: grid; gap: 28px; }
.footer__logo { display: inline-block; margin-bottom: 14px; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.footer__logo-img { height: 48px; width: auto; max-width: none; }
.footer__title { font-weight: 700; font-size: 1.125rem; margin-bottom: 12px; }
.footer__links { margin: 0; padding: 0; list-style: none; }
.footer__links a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__copy { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--on-band) 20%, transparent); font-size: 0.9375rem; }

/* Закреплённые внизу «Register / Login» и кнопка «наверх». */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 0 12px 12px; pointer-events: none; }
.dock__inner { display: flex; gap: 8px; max-width: 520px; margin-inline: auto; padding: 8px; border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: 0 8px 28px color-mix(in srgb, var(--text) 25%, transparent); pointer-events: auto; }
.dock__btn { flex: 1; }
.to-top { position: fixed; right: 16px; bottom: 88px; z-index: 40; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 25%, transparent); }

@media (max-width: 599px) {
  /* Картинки на телефоне во всю ширину экрана (ТЗ SEO): из контейнера и карточки — до краёв экрана. */
  body { overflow-x: clip; }
  .figure, .band .figure, .card-box--shot .figure, .hero__media { max-width: none; margin-inline: calc(50% - 50vw); }
  .card-box--shot { padding: 0; background: none; box-shadow: none; }
  .hero__img, .figure__img { border-radius: 0; box-shadow: none; }
  /* Строка таблицы — карточка: название столбца перед значением. */
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 6px 14px; }
  .table td::before { content: attr(data-label); display: block; font-weight: 700; }
}

@media (min-width: 600px) {
  .hero__buttons { display: flex; flex-wrap: wrap; }
  .cards, .links__grid { grid-template-columns: repeat(2, 1fr); }
  .card-box { padding: 28px; }
  .join__card { padding: 40px 32px; }
}

@media (min-width: 900px) {
  .hero { padding: 64px 0; }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .hero__grid--single { grid-template-columns: 1fr; }
  .badges__list { grid-template-columns: repeat(6, 1fr); }
  .band { padding: 64px 0; }
  .layout { grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
  .layout__side .toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
  .layout__side .toc__title { cursor: default; }
  .layout__side .toc__chevron { display: none; }
  .layout__side .toc__list { display: block; }
  .footer__top { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; }
}

@media (min-width: 1200px) {
  .nav__toggle { display: none; }
  .nav__menu { display: flex; position: static; flex-direction: row; align-items: center; gap: 4px; max-height: none; overflow: visible; padding: 0; background: none; box-shadow: none; }
  .nav__menu .btn { margin: 0 0 0 8px; }
  .header__contact { order: 2; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .links__grid { grid-template-columns: repeat(4, 1fr); }
  .link-card { grid-template-columns: 1fr; row-gap: 8px; }
  .link-card .tile, .link-card__desc, .link-card__arrow { grid-row: auto; grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
