/* Лендинг v1. Mobile-first: базовые стили для 360–414px, дальше min-width. */

@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Marck Script";
  src: url("../fonts/marck-script.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Палитра: бумага, чернила, маркер, красная ручка, линейка */
  --paper: #f3f1fa;
  --paper-2: #e9e5f6;
  --sheet: #ffffff;
  --ink: #24206e;
  --ink-2: #3b3866;
  --ink-3: #5d5a85;
  --marker: #ffd447;
  --marker-2: #ffe58a;
  --pen: #c8323f;
  --rule: #d6d2ee;
  --on-ink: #f3f1fa;
  --on-ink-2: #c9c5ea;

  --font: "Alegreya", Georgia, "Times New Roman", serif;
  --hand: "Marck Script", "Segoe Script", cursive;

  /* Шкала 1.25 на мобильном */
  --fs-s: 0.9375rem;
  --fs-base: 1.125rem;
  --fs-m: 1.3125rem;
  --fs-l: 1.75rem;
  --fs-xl: 2.375rem;

  --gap: 1.25rem;
  --section: 4rem;
  --radius-field: 10px;
  --wrap: 72rem;
  --sticky-h: 4.75rem;
}

@media (min-width: 768px) {
  :root {
    --fs-m: 1.4375rem;
    --fs-l: 2.375rem;
    --fs-xl: 3.5rem;
    --gap: 2rem;
    --section: 6rem;
  }
}
@media (min-width: 1100px) {
  :root { --fs-xl: 4.25rem; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--marker);
  border-radius: 4px;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  box-shadow: none;
  background: var(--marker);
  color: var(--ink);
  border-radius: 2px;
}
.btn:focus-visible { background: var(--marker); outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--marker-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 50;
  background: var(--marker); color: var(--ink);
  padding: 0.75rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 0.5rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) { .wrap { padding: 0 2.5rem; } }

.hand { font-family: var(--hand); font-weight: 400; line-height: 1.2; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  min-height: 3.5rem;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn--marker {
  background: var(--marker);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}
.btn--marker:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn--marker:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  min-height: 2.75rem;
  font-size: var(--fs-base);
  padding: 0.5rem 1.25rem;
}
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Шапка ---------- */
.site-header { padding: 0.875rem 0; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  font-family: var(--hand);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
}
.site-nav { display: none; }
@media (min-width: 900px) {
  .site-nav { display: flex; gap: 1.75rem; }
  .site-nav a { color: var(--ink-2); text-decoration: none; padding: 0.5rem 0; }
  .site-nav a:hover { color: var(--ink); text-decoration: underline; }
}

/* ---------- Первый экран ---------- */
.hero { padding: 1rem 0 3.5rem; }
.hero__grid { display: grid; gap: 2.5rem; }
.hero__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 14ch;
  text-wrap: balance;
}
.hero__lead {
  margin-top: 1.25rem;
  font-size: var(--fs-m);
  line-height: 1.5;
  max-width: 34rem;
}
.hero__cta { margin-top: 1.75rem; }
.hero__cta .btn { width: 100%; }
.hero__terms { margin-top: 1rem; font-size: var(--fs-s); line-height: 1.5; color: var(--ink-3); max-width: 30rem; }
.hero__terms [data-price] { color: var(--ink); font-weight: 700; white-space: nowrap; }

@media (min-width: 560px) {
  .hero__cta .btn { width: auto; }
}
@media (min-width: 960px) {
  .hero { padding: 2.5rem 0 3rem; }
  .hero__grid { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 4rem; }
}

/* Черновик — главный образ страницы */
.draft { position: relative; }
.draft__sheet {
  position: relative;
  background-color: var(--sheet);
  /* тетрадная линейка и красное поле */
  background-image:
    linear-gradient(90deg, transparent 2.25rem, rgba(200, 50, 63, 0.75) 2.25rem, rgba(200, 50, 63, 0.75) calc(2.25rem + 1.5px), transparent calc(2.25rem + 1.5px)),
    repeating-linear-gradient(180deg, transparent 0, transparent calc(2.5rem - 1px), var(--rule) calc(2.5rem - 1px), var(--rule) 2.5rem);
  background-position: 0 0, 0 1.25rem;
  padding: 1.25rem 1rem 2.5rem 3rem;
  border-radius: 4px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule), 8px 10px 0 -2px var(--paper-2), 8px 10px 0 -1px var(--rule);
  transform: rotate(-1.2deg);
  color: var(--ink);
}
.draft__head { font-size: 1.5rem; line-height: 2.5rem; height: 2.5rem; color: var(--ink-3); }
.draft__line {
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 2.5rem;
  min-height: 2.5rem;
}
.draft__fix { position: relative; display: inline; }
.draft__old {
  text-decoration: none;
  position: relative;
  color: var(--ink-3);
}
.draft__old::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; top: 54%;
  height: 2px;
  background: var(--pen);
  transform-origin: left center;
  transform: rotate(-2deg);
}
.draft__new {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: -0.3rem 0 0.15rem;
  color: var(--pen);
}
.draft__mark {
  color: inherit;
  background: linear-gradient(transparent 18%, var(--marker) 18%, var(--marker) 88%, transparent 88%) no-repeat;
  background-size: 100% 100%;
  padding: 0 0.15em;
  margin: 0 -0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.draft__note {
  position: absolute;
  right: 0.75rem;
  bottom: 0.35rem;
  font-size: 1.3rem;
  color: var(--pen);
  transform: rotate(-4deg);
}
.draft__caption {
  margin-top: 1.5rem;
  font-size: var(--fs-s);
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 28rem;
}
@media (min-width: 768px) {
  .draft__sheet { padding: 1.25rem 2rem 3rem 3.75rem; background-image:
    linear-gradient(90deg, transparent 2.75rem, rgba(200, 50, 63, 0.75) 2.75rem, rgba(200, 50, 63, 0.75) calc(2.75rem + 1.5px), transparent calc(2.75rem + 1.5px)),
    repeating-linear-gradient(180deg, transparent 0, transparent calc(2.5rem - 1px), var(--rule) calc(2.5rem - 1px), var(--rule) 2.5rem); }
  .draft__line { font-size: 1.375rem; }
  .draft__new { font-size: 1.75rem; }
}

/* Единственная анимация страницы: автор правит строку */
@media (prefers-reduced-motion: no-preference) {
  .draft__old::after { animation: strike 0.5s 0.6s cubic-bezier(.6,.1,.3,1) both; }
  .draft__new { animation: write 0.9s 1.15s steps(18, end) both; }
  .draft__mark { animation: highlight 0.6s 2.1s ease-out both; }
  .draft__note { animation: fade 0.4s 2.6s ease-out both; }
}
@keyframes strike { from { transform: rotate(-2deg) scaleX(0); } to { transform: rotate(-2deg) scaleX(1); } }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes highlight { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Секции ---------- */
.section { padding: var(--section) 0; }
.section__title {
  font-size: var(--fs-l);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.section__lead { margin-top: 1rem; max-width: 36rem; font-size: var(--fs-base); }
.section__cta { margin-top: 2.5rem; }
.section__cta .btn { width: 100%; }
@media (min-width: 560px) { .section__cta .btn { width: auto; } }

/* Как это работает: тетрадь с полями, сроки записаны на полях */
.steps {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
  counter-reset: step;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  border-bottom: 1px solid var(--rule);
}
.step__when {
  padding: 1.35rem 0.75rem 1.25rem 0;
  border-right: 1.5px solid rgba(200, 50, 63, 0.75);
  color: var(--pen);
  font-size: 1.3rem;
  text-align: right;
}
.step__body { padding: 1.25rem 0 1.5rem 1rem; }
.step__title {
  font-size: var(--fs-m);
  line-height: 1.25;
  color: var(--ink);
  font-weight: 700;
}
.step__title::before {
  content: counter(step) ". ";
  color: var(--ink-3);
  font-weight: 500;
}
.step__body p { margin-top: 0.4rem; max-width: 34rem; }
@media (min-width: 768px) {
  .step { grid-template-columns: 11rem 1fr; }
  .step__when { font-size: 1.6rem; padding-right: 1.25rem; }
  .step__body { padding-left: 2rem; }
}

/* Примеры: трек-лист на тёмном */
.examples { background: var(--ink); color: var(--on-ink); }
.examples .section__title { color: #fff; }
.examples .section__lead { color: var(--on-ink-2); }
.tracks { margin-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.track {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  column-gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.track__play {
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  border: 2px solid var(--marker);
  background: transparent;
  color: var(--marker);
  display: grid; place-items: center;
  cursor: pointer;
  align-self: start;
}
.track__play:hover { background: rgba(255, 212, 71, 0.12); }
.track__icon {
  width: 0; height: 0;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.9rem;
  border-color: transparent transparent transparent currentColor;
  margin-left: 0.2rem;
}
.track.is-playing .track__play { background: var(--marker); color: var(--ink); }
.track.is-playing .track__icon {
  width: 0.85rem; height: 1rem;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%);
}
.track.is-loading .track__icon { opacity: 0.6; }
.track__info { min-width: 0; }
.track__bar { display: flex; align-items: center; gap: 0.75rem; }
.track__title { font-size: var(--fs-m); font-weight: 700; line-height: 1.25; color: #fff; }
.track__meta { color: var(--on-ink-2); font-size: var(--fs-s); }
.track__time {
  flex: none;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--on-ink-2);
  font-variant-numeric: tabular-nums;
}
.track__seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.75rem;
  margin: 0.25rem 0 0;
  background: transparent;
  cursor: pointer;
  --p: 0%;
}
.track__seek:disabled { cursor: default; opacity: 0.5; }
.track__seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--marker) var(--p), rgba(255,255,255,0.25) var(--p));
}
.track__seek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); }
.track__seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--marker); }
.track__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--marker); border: 0;
}
.track__seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--marker); border: 0; }
.track__seek:focus-visible { box-shadow: none; outline-color: var(--marker); }
.examples :focus-visible { outline-color: var(--marker); box-shadow: none; }
.examples .btn--marker { box-shadow: 0 4px 0 #0e0c3a; border-color: var(--marker); }

@media (min-width: 768px) {
  .track { grid-template-columns: 3.5rem minmax(0, 44rem); column-gap: 1.25rem; padding: 1.25rem 0; }
  .track__play { width: 3.5rem; height: 3.5rem; align-self: center; }
}

/* Автор против генератора */
.compare {
  margin-top: 2.5rem;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.compare th {
  text-align: left;
  font-size: var(--fs-m);
  padding: 0 0.75rem 0.75rem 0;
  color: var(--ink);
  vertical-align: bottom;
}
.compare th + th { color: var(--ink-3); font-weight: 500; }
.compare td {
  padding: 1rem 0.75rem 1rem 0;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.45;
}
.compare td:first-child { color: var(--ink); font-weight: 500; }
.compare td + td { color: var(--ink-3); font-size: var(--fs-s); }
.compare td:first-child,
.compare th:first-child { padding-right: 1.25rem; }
@media (min-width: 768px) {
  .compare { max-width: 56rem; }
  .compare td { padding: 1.25rem 2rem 1.25rem 0; font-size: var(--fs-base); }
  .compare td + td { font-size: var(--fs-base); }
}

/* Отзывы: на мобильном листаются вбок */
.reviews { background: var(--paper-2); }
.reviews__list {
  margin: 2rem -1.25rem 0;
  padding: 0 1.25rem 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 18rem);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 1.25rem;
  overscroll-behavior-x: contain;
}
.review {
  scroll-snap-align: start;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
}
.review__photo {
  width: 5rem; height: 5rem;
  border-radius: 50%;
  object-fit: cover;
}
.review__who { margin-top: 0.875rem; line-height: 1.35; }
.review__name { display: block; font-weight: 700; color: var(--ink); }
.review__occasion { display: block; font-size: var(--fs-s); color: var(--ink-3); }
.review__text { margin-top: 0.75rem; font-style: italic; }
@media (min-width: 900px) {
  .reviews__list {
    margin: 2.5rem 0 0;
    padding: 0;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
  }
}

/* Дистрибуция */
.distribution__inner { display: grid; gap: 1.25rem; }
.distribution__text p + p { margin-top: 1rem; }
.distribution__text { max-width: 36rem; }
.distribution__price [data-option-price] { font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (min-width: 900px) {
  .distribution__inner { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
}

/* Сомнения (аккордеон) */
.doubts { padding-top: 0; }
.doubts__list { margin-top: 2rem; border-top: 1px solid var(--rule); max-width: 48rem; }
.doubt { border-bottom: 1px solid var(--rule); }
.doubt summary {
  list-style: none;
  cursor: pointer;
  min-height: 3.5rem;
  padding: 1rem 2.75rem 1rem 0;
  position: relative;
  font-size: var(--fs-m);
  font-style: italic;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.doubt summary::-webkit-details-marker { display: none; }
.doubt summary::after {
  content: "";
  position: absolute;
  right: 0.5rem; top: 50%;
  width: 0.75rem; height: 0.75rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.doubt[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.doubt__answer { padding: 0 0 1.25rem; max-width: 40rem; }
.doubt__answer p + p { margin-top: 0.75rem; }

/* Финал */
.final {
  background: var(--ink);
  color: var(--on-ink);
  padding: var(--section) 0;
}
.final__grid { display: grid; gap: 2rem; }
.final__title {
  font-size: var(--fs-l);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  max-width: 20ch;
  text-wrap: balance;
}
.final__lead { margin-top: 1rem; color: var(--on-ink-2); max-width: 30rem; }
.final .btn { width: 100%; border-color: var(--marker); box-shadow: 0 4px 0 #0e0c3a; }
.final :focus-visible { outline-color: var(--marker); box-shadow: none; }
.final__price {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
}
.final__sum { font-size: var(--fs-l); font-weight: 800; color: var(--marker); line-height: 1.1; }
.final__sum-note { color: var(--on-ink-2); margin-top: 0.25rem; }
.final .checklist { margin-top: 1rem; }
.final .checklist li { color: var(--on-ink); }
.final .checklist li::before { border-color: var(--marker); }
@media (min-width: 560px) { .final .btn { width: auto; } }
@media (min-width: 900px) {
  .final__grid {
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas: "text price" "action price";
    grid-template-rows: auto 1fr;
    column-gap: 5rem; row-gap: 2rem;
    align-items: start;
  }
  .final__text { grid-area: text; }
  .final__action { grid-area: action; }
  .final__price { grid-area: price; border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.2); padding: 0 0 0 3rem; }
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.45;
}
.checklist li + li { margin-top: 0.6rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.3em;
  width: 0.45rem; height: 0.8rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(40deg);
}

/* Футер */
.site-footer {
  padding: 2.5rem 0 calc(2.5rem + var(--sticky-h));
  font-size: var(--fs-s);
  color: var(--ink-3);
}
.site-footer__inner { display: grid; gap: 0.75rem; }
.brand--footer { font-size: 1.5rem; }
.contacts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.contacts a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.site-footer a { color: var(--ink-2); }
.site-footer p a { display: inline-flex; align-items: center; min-height: 2.75rem; }
@media (min-width: 900px) {
  .site-footer { padding-bottom: 2.5rem; }
  .site-footer__inner { grid-template-columns: auto 1fr auto; align-items: center; column-gap: 3rem; }
  .site-footer__legal { grid-column: 1 / -1; }
}

/* Липкая кнопка на мобильном лендинге */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(243, 241, 250, 0.96);
  border-top: 1px solid var(--rule);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.sticky-cta.is-visible {
  transform: none;
  visibility: visible;
  transition: transform 0.25s ease, visibility 0s;
}
.sticky-cta .btn { min-height: 3.25rem; box-shadow: 0 3px 0 var(--ink); }
@media (min-width: 900px) { .sticky-cta { display: none; } }

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

/* =================== Страница брифа =================== */
.order-head { padding: 0.5rem 0 2rem; }
.back-link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--ink-3); font-size: var(--fs-s);
}
.order-title {
  margin-top: 0.5rem;
  font-size: var(--fs-l);
  font-weight: 800;
  line-height: 1.12;
  color: var(--ink);
  max-width: 20ch;
  text-wrap: balance;
}
.order-lead { margin-top: 0.75rem; max-width: 34rem; }

.order-layout { display: grid; gap: 3rem; padding-bottom: 3rem; }
@media (min-width: 1024px) {
  .order-layout {
    grid-template-columns: minmax(0, 1fr) 24rem;
    grid-template-areas: "brief calc" "faq calc";
    column-gap: 4rem;
    align-items: start;
  }
  .order-layout > .brief { grid-area: brief; }
  .order-layout > .calc { grid-area: calc; }
  .order-layout > .faq { grid-area: faq; }
}

.brief { display: grid; gap: 2.5rem; }
.group { border: 0; margin: 0; padding: 0; min-width: 0; }
.group__title {
  padding: 0;
  font-size: var(--fs-m);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.group__fields { display: grid; gap: 1.5rem; margin-top: 1rem; }

.field { display: grid; gap: 0.4rem; min-width: 0; }
.field__label { font-weight: 700; color: var(--ink); line-height: 1.3; }
legend.field__label { padding: 0; margin-bottom: 0.6rem; }
.field__req { color: var(--pen); }
.field__hint { font-size: var(--fs-s); color: var(--ink-3); line-height: 1.45; }
.field__error { font-size: var(--fs-s); color: var(--pen); font-weight: 700; }
.field__error:empty { display: none; }

.input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1.125rem; /* не меньше 16px, чтобы iOS не зумил */
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid #8f8bb8;
  border-radius: var(--radius-field);
}
.input::placeholder { color: #77739c; opacity: 1; }
.input:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; box-shadow: none; border-color: var(--ink); }
.input[aria-invalid="true"] { border-color: var(--pen); }
textarea.input {
  min-height: 12rem;
  resize: vertical;
  line-height: 2rem;
  padding-top: 0.5rem;
  background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(2rem - 1px), var(--paper-2) calc(2rem - 1px), var(--paper-2) 2rem);
  background-position: 0 0.5rem;
  background-attachment: local;
}

/* Чипы: radio / checkbox */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input {
  position: absolute; opacity: 0;
  width: 1px; height: 1px;
}
.chip span {
  display: inline-flex; align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  border: 1.5px solid #8f8bb8;
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.2;
  user-select: none;
}
.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--marker); }
.chips[aria-invalid="true"] .chip span { border-color: var(--pen); }
.chips ~ .input { margin-top: 0.5rem; }

/* Калькулятор */
.calc {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem;
}
.calc__title { font-size: var(--fs-m); font-weight: 700; color: var(--ink); line-height: 1.25; }
.calc__base {
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.calc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.calc__row strong { color: var(--ink); }
.calc__price { white-space: nowrap; font-weight: 700; color: var(--ink); }
.calc__base .checklist { margin-top: 0.75rem; font-size: var(--fs-s); }
.calc__options { margin-top: 0.5rem; }
.opt {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  min-height: 2.75rem;
}
.opt input {
  width: 1.375rem; height: 1.375rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.opt__title { display: block; color: var(--ink); font-weight: 600; line-height: 1.3; }
.opt__note { display: block; font-size: var(--fs-s); color: var(--ink-3); line-height: 1.4; margin-top: 0.15rem; }
.opt__price { white-space: nowrap; color: var(--ink); font-weight: 600; }
.calc__total { margin-top: 1rem; font-size: var(--fs-m); }
.calc__total .calc__price { font-size: var(--fs-l); line-height: 1; }
.calc__prepay { margin-top: 0.5rem; font-size: var(--fs-s); color: var(--ink-3); }
.calc__prepay:empty { display: none; }
.calc .btn { margin-top: 1.25rem; }
.pay-note { margin-top: 0.75rem; font-size: var(--fs-s); color: var(--ink-3); }

.faq__title { font-size: var(--fs-l); font-weight: 800; line-height: 1.12; color: var(--ink); }
.faq .doubts__list { margin-top: 1.25rem; }
.faq .doubt summary { font-style: normal; font-size: var(--fs-base); font-weight: 700; }
.faq__cta { margin-top: 2rem; }

/* Липкая плашка с суммой */
.paybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 1.25rem calc(0.625rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #fff;
  transition: transform 0.25s ease, visibility 0s;
}
.paybar.is-hidden { transform: translateY(110%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; }
.paybar__sum { line-height: 1.15; }
.paybar__label { display: block; font-size: 0.875rem; color: var(--on-ink-2); }
.paybar__value { font-size: 1.375rem; font-weight: 800; white-space: nowrap; }
.paybar .btn { min-height: 3rem; padding: 0.5rem 1.25rem; font-size: 1.0625rem; border-color: var(--marker); box-shadow: none; }
.paybar :focus-visible { outline-color: var(--marker); box-shadow: none; }
@media (min-width: 1024px) {
  .paybar {
    justify-content: flex-end;
    gap: 2rem;
    padding-left: max(2.5rem, calc((100% - var(--wrap)) / 2 + 2.5rem));
    padding-right: max(2.5rem, calc((100% - var(--wrap)) / 2 + 2.5rem));
  }
}
.page-order .site-footer { padding-bottom: calc(2.5rem + var(--sticky-h)); }

/* Окно оплаты: bottom sheet на мобильном */
.sheet-dialog {
  width: 100%;
  max-width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: var(--paper);
  color: var(--ink-2);
  overflow: auto;
  overscroll-behavior: contain;
}
.sheet-dialog::backdrop { background: rgba(20, 18, 60, 0.55); }
.sheet-dialog__inner { padding: 0.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); position: relative; }
.sheet-dialog__grip {
  width: 2.75rem; height: 4px; border-radius: 2px;
  background: var(--rule);
  margin: 0 auto 1rem;
}
.sheet-dialog__close {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 1.75rem; line-height: 1;
  cursor: pointer;
}
.sheet-dialog__close:hover { background: var(--paper-2); }
.sheet-dialog__title {
  font-size: var(--fs-m);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  padding-right: 2.5rem;
}
.sheet-dialog__text { margin-top: 0.5rem; }
.sheet-dialog form { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.sheet-dialog .chips { gap: 0.4rem; }
.consent { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.75rem; align-items: start; font-size: var(--fs-s); line-height: 1.45; cursor: pointer; }
.consent input { width: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--ink); cursor: pointer; }
.consent[data-invalid="true"] { color: var(--pen); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: var(--fs-s); }
.form-status--error {
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--pen);
  background: #fbe9eb;
  color: #8f1d29;
}
.form-status--error a { color: #8f1d29; font-weight: 700; }
.sheet-dialog__done { padding: 1rem 0 0.5rem; }
.sheet-dialog__done .btn { margin-top: 1.5rem; }
@media (min-width: 640px) {
  .sheet-dialog {
    max-width: 32rem;
    margin: auto;
    border-radius: 12px;
  }
  .sheet-dialog__grip { display: none; }
  .sheet-dialog__inner { padding: 2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet-dialog[open] { animation: sheet-up 0.25s ease-out; }
  @media (min-width: 640px) { .sheet-dialog[open] { animation: fade 0.2s ease-out; } }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* =================== Политика =================== */
.doc { padding: 1rem 0 4rem; max-width: 46rem; }
.doc h1 { font-size: var(--fs-l); line-height: 1.15; color: var(--ink); }
.doc h2 { margin-top: 2rem; font-size: var(--fs-m); color: var(--ink); line-height: 1.3; }
.doc p, .doc ul { margin-top: 0.75rem; }
.doc ul { list-style: disc; padding-left: 1.25rem; }
.doc li + li { margin-top: 0.35rem; }
.doc .placeholder { background: var(--marker-2); padding: 0 0.2em; }
