/* Протокол — «этикетка и бланк заявки».
   Страница — стопка листов на синем столе: первый экран — стол, дальше листы
   цвета копий бланка (белый, голубой, розовый, зелёный, жёлтый) наезжают друг
   на друга. Одна краска — синие чернила; красный — только штамп и ошибки.
   Шрифты свои (fonts/, лицензия SIL OFL): Sofia Sans Extra Condensed —
   крупные заглавные надписи и кнопки, IBM Plex Mono — весь текст, как на бланке,
   заполненном на машинке. У Sofia Sans строчная кириллица болгарского
   начертания (другое включается только для lang="ru"), поэтому строчными она
   здесь не набирается. */

@font-face {
  font-family: "Sofia X";
  font-weight: 400 900;
  font-display: block;
  src: url("fonts/sofia-xcond-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Sofia X";
  font-weight: 400 900;
  font-display: block;
  src: url("fonts/sofia-xcond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-mono-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-mono-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1f1d8f;
  --ink-deep: #15136b;
  --paper: #f2f1ec;
  --sky: #c9dcf4;
  --pink: #f5c9d2;
  --mint: #cbe7d8;
  --canary: #f3e88f;
  --stamp: #b9231a;
  --paper-line: rgba(242, 241, 236, 0.36);

  --f-x: "Sofia X", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --thud: cubic-bezier(0.3, 1.5, 0.5, 1);

  --pad: 16px;
  --hero-fs: min(26.2cqi, 17svh);
  --cat-fs: 15vw;
  --tag-fs: 24px;
}

@media (min-width: 600px) {
  :root {
    --pad: 32px;
    --cat-fs: 13vw;
    --tag-fs: 30px;
  }
}

@media (min-width: 900px) {
  :root {
    --pad: 48px;
    --hero-fs: min(26.2cqi, 22svh);
    --cat-fs: clamp(96px, 12vw, 200px);
    --tag-fs: clamp(36px, 3.3vw, 48px);
  }
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font: 400 14px/22px var(--f-mono);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--canary);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--canary);
  color: var(--ink);
  font: 500 14px/20px var(--f-mono);
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}

/* Подпись поля: мелкий моноширинный набор, как на бланке. */
.lbl,
.run,
.cols,
.bar__meta,
.bar__nav,
.row__maker,
.row__vol,
.step__n,
.ticker__c,
.foot__row,
.lnk {
  font: 500 12px/16px var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lbl {
  margin: 0;
  display: block;
}

.anchor {
  display: block;
  height: 0;
}

/* ---------- Кнопки и ссылки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 14px 22px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  font: 700 24px/28px var(--f-x);
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn--paper {
  background: var(--paper);
  color: var(--ink);
}
.btn--ink {
  background: var(--ink);
  color: var(--paper);
}
.btn--line {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--sm {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 20px;
  line-height: 24px;
}
.btn[disabled] {
  cursor: progress;
  opacity: 0.62;
}
@media (hover: hover) {
  .btn--paper:hover {
    background: var(--canary);
  }
  .btn--ink:hover {
    background: var(--ink-deep);
  }
  .btn--line:hover {
    background: var(--ink);
    color: var(--paper);
  }
  .btn:hover .btn__arr {
    transform: translateX(5px);
  }
}

/* Стрелка нарисована, а не набрана: в шрифтах сайта её нет. */
.btn__arr {
  position: relative;
  flex: none;
  width: 18px;
  height: 12px;
  transition: transform 0.5s var(--ease);
}
.btn__arr::before {
  content: "";
  position: absolute;
  left: 0;
  right: 1px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
}
.btn__arr::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-top: 2px solid;
  border-right: 2px solid;
  transform: rotate(45deg);
}

.lnk {
  display: inline-block;
  padding-block: 14px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
  transition: text-underline-offset 0.3s var(--ease);
}
@media (hover: hover) {
  .lnk:hover {
    text-underline-offset: 3px;
  }
}

/* ---------- Слои: листы наезжают друг на друга ---------- */

.layer {
  position: relative;
  /* Лист во всю ширину окна: что бы в нём ни двигалось (штамп, карточка),
     страницу вбок оно не раздвигает. По вертикали не режем — зубчатый край. */
  overflow-x: clip;
}

/* Лист доезжает до низа экрана и замирает, следующий наезжает сверху.
   --h (высоту листа) ставит скрипт; без неё лист просто прокручивается. */
@media (prefers-reduced-motion: no-preference) {
  .layer {
    position: sticky;
    top: min(0px, calc(100svh - var(--h, 99999px)));
  }
}

/* ---------- Первый экран: стол ---------- */

.hero {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
}
.hero.is-covered {
  visibility: hidden;
}
.hero__in {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
  border-bottom: 1px solid var(--paper-line);
}
.mark {
  font: 800 30px/1 var(--f-x);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 10px;
}
.bar__meta {
  display: none;
  margin: 0;
}
.bar__nav {
  display: flex;
  gap: 16px;
}
/* Самые узкие телефоны: имя и три ссылки в одну строку. */
@media (max-width: 359px) {
  .bar {
    gap: 8px;
  }
  .mark {
    font-size: 26px;
  }
  .bar__nav {
    gap: 10px;
  }
}
.bar__nav a {
  padding-block: 14px;
  text-decoration: none;
}
@media (hover: hover) {
  .bar__nav a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
  }
}

.hero__grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 20px;
  padding-block: 20px 28px;
}

/* Размер заголовка считается от ширины его колонки: самая длинная строка
   занимает её целиком. */
.hero__hw {
  container-type: inline-size;
  min-width: 0;
}
.hero__h {
  margin: 0;
  white-space: nowrap;
  font: 800 var(--hero-fs) / 0.84 var(--f-x);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
/* Строка заголовка выезжает из-под маски. */
.hero__h .ln {
  display: block;
  overflow-y: clip;
  padding-top: 0.08em;
  margin-top: -0.08em;
}
.hero__h .ln > span {
  display: block;
  animation: line-up 1s var(--ease) backwards;
}
.hero__h .ln:nth-child(2) > span {
  animation-delay: 0.09s;
}
.hero__h .ln:nth-child(3) > span {
  animation-delay: 0.18s;
}
@keyframes line-up {
  from {
    transform: translateY(108%);
  }
}

.hero__lead {
  margin: 0;
  max-width: 34em;
  font: 400 14px/22px var(--f-mono);
  text-wrap: pretty;
  animation: rise-in 0.9s var(--ease) 0.34s backwards;
}
.hero__cta {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  animation: rise-in 0.9s var(--ease) 0.44s backwards;
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

.hero__art {
  position: relative;
  justify-self: center;
  width: min(66vw, 300px);
  margin-block: 20px 12px;
}

/* Колода карточек с настоящими фото: верхняя уходит вбок и ложится вниз. */
.deck {
  position: relative;
  aspect-ratio: 1 / 1.16;
  cursor: pointer;
}
.card {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 5px 6px 0 rgba(8, 6, 52, 0.38);
  transition: transform 0.7s var(--ease);
  animation: deal 1s var(--ease) backwards;
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0f0f0;
}
.card figcaption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 0;
  font: 500 12px/16px var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card figcaption span:last-child {
  flex: none;
}
.card[data-pos="0"] {
  z-index: 4;
  transform: rotate(-3deg);
  animation-delay: 0.62s;
}
.card[data-pos="1"] {
  z-index: 3;
  transform: translate(5%, 2%) rotate(3deg);
  animation-delay: 0.52s;
}
.card[data-pos="2"] {
  z-index: 2;
  transform: translate(-5%, 3%) rotate(-8deg);
  animation-delay: 0.42s;
}
.card[data-pos="3"] {
  z-index: 1;
  transform: translate(8%, 5%) rotate(7deg);
  animation-delay: 0.32s;
}
.card.is-out {
  transform: translate(104%, -8%) rotate(16deg);
  transition-duration: 0.42s;
}
.deck.is-live .card {
  animation: none;
}
@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(70%) rotate(0deg);
  }
}

/* Наклейка-печать: ведёт к бланку заявки. */
.seal {
  position: absolute;
  z-index: 6;
  left: -15%;
  top: -9%;
  width: 41%;
  border-radius: 50%;
  background: var(--canary);
  color: var(--ink);
  rotate: -12deg;
  transition: scale 0.5s var(--ease);
  animation: stamp-in 0.5s var(--thud) 1.05s backwards;
}
.seal:focus-visible {
  outline-color: var(--paper);
}
.seal svg {
  display: block;
  width: 100%;
  height: auto;
}
.seal__ring {
  transform-box: view-box;
  transform-origin: 100px 100px;
  animation: spin 28s linear infinite;
}
.seal__ring text {
  font: 500 16px var(--f-mono);
  text-transform: uppercase;
  fill: currentColor;
}
.seal__arr {
  fill: none;
  stroke: currentColor;
  stroke-width: 9;
}
@media (hover: hover) {
  .seal:hover {
    scale: 1.07;
  }
}
@keyframes stamp-in {
  from {
    opacity: 0;
    transform: scale(2) rotate(22deg);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Лента производителей. */
.ticker {
  border-top: 1px solid var(--paper-line);
  overflow: clip;
}
.ticker__run {
  display: flex;
  width: max-content;
  animation: tick 44s linear infinite;
}
.ticker__set {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticker__set li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 22px;
  white-space: nowrap;
}
.ticker__b {
  font: 700 24px/1 var(--f-x);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
@keyframes tick {
  to {
    transform: translateX(-50%);
  }
}
@media (hover: hover) {
  .ticker:hover .ticker__run {
    animation-play-state: paused;
  }
}
/* Первый экран закрыт листом — движение за ним останавливается. */
.hero.is-covered .ticker__run,
.hero.is-covered .seal__ring {
  animation-play-state: paused;
}

@media (min-width: 900px) {
  .bar {
    padding-block: 12px;
  }
  .bar__meta {
    display: block;
  }
  .bar__nav {
    gap: 28px;
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "h art"
      "text art";
    column-gap: 48px;
    row-gap: 28px;
    padding-block: 28px 36px;
  }
  .hero__hw {
    grid-area: h;
  }
  .hero__text {
    grid-area: text;
  }
  .hero__lead {
    font-size: 16px;
    line-height: 26px;
  }
  .hero__cta {
    margin-top: 28px;
  }
  .hero__art {
    grid-area: art;
    align-self: center;
    justify-self: center;
    width: min(88%, 52svh, 440px);
    margin: 0;
  }
  .card {
    padding: 12px;
  }
  .card figcaption {
    padding-top: 10px;
  }
  .ticker__set li {
    padding: 16px 30px;
  }
  .ticker__b {
    font-size: 30px;
  }
}

/* ---------- Лист ---------- */

.sheet {
  --sheet: var(--paper);
  background: var(--sheet);
  color: var(--ink);
  padding-bottom: 80px;
}
.sheet--sky {
  --sheet: var(--sky);
}
.sheet--pink {
  --sheet: var(--pink);
}
.sheet--mint {
  --sheet: var(--mint);
}
.sheet--canary {
  --sheet: var(--canary);
}
/* Зубчатый край, как у оторванного бланка. */
.sheet::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 7px;
  background: radial-gradient(circle at 7px 7px, var(--sheet) 6.5px, transparent 7px) 0 0 / 14px 7px repeat-x;
}

/* Шапка листа. */
.run {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding-block: 16px;
  border-bottom: 1px solid var(--ink);
}
.run span:first-child {
  display: none;
}
.reg {
  position: relative;
  justify-self: end;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.reg::before,
.reg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
}
.reg::before {
  width: 22px;
  height: 1.5px;
  margin: -0.75px 0 0 -11px;
}
.reg::after {
  width: 1.5px;
  height: 22px;
  margin: -11px 0 0 -0.75px;
}
@media (min-width: 600px) {
  .run {
    grid-template-columns: 1fr auto 1fr;
  }
  .run span:first-child {
    display: block;
  }
}

.cat__head {
  display: grid;
  gap: 12px;
  align-items: end;
  padding-block: 36px 28px;
}
.cat__title {
  margin: 0;
  font: 800 var(--cat-fs) / 0.86 var(--f-x);
  text-transform: uppercase;
  text-wrap: balance;
  /* Новое длинное название не должно раздвинуть страницу вбок. */
  overflow-wrap: anywhere;
}
.cat__full {
  margin: 0;
  max-width: 38em;
  font: 400 14px/22px var(--f-mono);
  text-wrap: pretty;
}
@media (min-width: 900px) {
  .cat__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    gap: 32px;
    padding-block: 56px 40px;
  }
  .cat__full {
    padding-bottom: 12px;
  }
}

/* ---------- Строки каталога ---------- */

.cols {
  display: none;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ink);
}
.rows--in {
  border-bottom: 0;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  border-top: 1px solid var(--ink);
}

.pick {
  position: relative;
  display: grid;
  place-items: center start;
  align-self: start;
  min-height: 64px;
  cursor: pointer;
}
.pick input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease);
}
/* Нажимать можно по всей клетке 44 × 64, а не только по квадрату. */
.pick input::before {
  content: "";
  position: absolute;
  inset: 0;
}
.pick input::after {
  content: "";
  width: 13px;
  height: 7px;
  border-left: 2.5px solid var(--sheet);
  border-bottom: 2.5px solid var(--sheet);
  transform: translateY(-1.5px) rotate(-45deg) scale(0);
  transition: transform 0.4s var(--thud);
}
.pick input:checked {
  background: var(--ink);
}
.pick input:checked::after {
  transform: translateY(-1.5px) rotate(-45deg) scale(1);
}

.row__d {
  min-width: 0;
}

.row__s {
  --fg: var(--ink);
  --hl: var(--canary);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 32px;
  grid-template-areas:
    "name name plus"
    "vol maker plus";
  align-items: center;
  gap: 6px 12px;
  min-height: 64px;
  padding: 12px 0 12px 4px;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease);
}
.row__s--plain {
  cursor: default;
}
.row__s::-webkit-details-marker {
  display: none;
}
/* Чернильная плашка под строкой — поднимается при наведении. */
.row__s::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 -4px;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.45s var(--ease);
}
.row__name {
  grid-area: name;
  display: grid;
  gap: 2px;
  justify-items: start;
}
.row__nm {
  font: 500 16px/24px var(--f-mono);
}
/* Маркер: название, отмеченное в заявку, будто провели жёлтым — по каждой
   строке отдельно, если название перенеслось. */
.row__hl {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 0% 42%;
  transition: background-size 0.5s var(--ease);
}
.row:has(> .pick input:checked) .row__hl {
  background-size: 100% 42%;
}
.sheet--canary .row__s {
  --hl: var(--paper);
}
.row__sub {
  font: 400 14px/20px var(--f-mono);
}
.row__maker {
  grid-area: maker;
}
.row__vol {
  grid-area: vol;
  padding-right: 12px;
  white-space: nowrap;
}
.row__plus {
  grid-area: plus;
  position: relative;
  justify-self: end;
  width: 18px;
  height: 18px;
  margin-right: 4px;
}
.row__plus::before,
.row__plus::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}
.row__plus::after {
  transform: rotate(90deg);
}
.row__d[open] .row__plus::before {
  transform: rotate(180deg);
}
.row__d[open] .row__plus::after {
  transform: rotate(180deg);
}

@media (hover: hover) {
  .row__s:not(.row__s--plain):hover {
    --fg: var(--sheet);
    --hl: rgba(255, 255, 255, 0.2);
  }
  .row__s:not(.row__s--plain):hover::before {
    transform: scaleY(1);
  }
}

.row__more {
  display: grid;
  gap: 20px;
  padding: 4px 0 28px 4px;
}
.row__d[open] > .row__more {
  animation: more-in 0.55s var(--ease) backwards;
}
@keyframes more-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}
.flds {
  display: grid;
  gap: 16px;
  margin: 0;
}
.fld dd {
  margin: 4px 0 0;
  max-width: 44em;
  text-wrap: pretty;
}
.row__img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border: 1px solid var(--ink);
  background: #f0f0f0;
}

/* Линейка: несколько видов одного средства под общим заголовком. */
.grp {
  border-top: 1px solid var(--ink);
}
.grp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0;
  padding: 22px 0 14px;
}
.grp__name {
  font: 700 36px/1 var(--f-x);
  text-transform: uppercase;
}

.qa .row {
  grid-template-columns: minmax(0, 1fr);
}
.qa .row__s {
  grid-template-columns: minmax(0, 1fr) 32px;
  grid-template-areas: "name plus";
  padding-left: 0;
}
.qa .row__nm {
  font-size: 16px;
  line-height: 24px;
  text-wrap: balance;
}
.qa .row__more {
  padding-left: 0;
}
.qa__a {
  margin: 0;
  max-width: 44em;
  font-size: 14px;
  line-height: 22px;
}

@media (min-width: 900px) {
  .cols,
  .row__s {
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) 132px 44px;
    grid-template-areas: "name maker vol plus";
    gap: 24px;
  }
  .cols {
    display: grid;
    margin: 0;
    padding: 0 0 10px 56px;
  }
  /* В подписи столбцов пять ячеек: первая — над клеткой отметки. */
  .cols {
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) 132px 44px;
  }
  .cols span:first-child {
    display: none;
  }
  .row__s {
    min-height: 72px;
    padding: 14px 0 14px 12px;
  }
  .row__s::before {
    inset: 0 0 0 0;
  }
  .pick {
    min-height: 72px;
  }
  .row__nm {
    font-size: 18px;
    line-height: 28px;
  }
  .row__vol {
    padding-right: 0;
  }
  .row__plus {
    margin-right: 14px;
  }
  .row__more {
    padding: 8px 68px 36px 12px;
  }
  .row__more--img {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 48px;
  }
  .flds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-content: start;
  }
  /* Фото на широком экране едет за курсором; в раскрытой строке оно тоже есть. */
  .grp__head {
    padding: 28px 0 16px;
  }
  .grp__name {
    font-size: 48px;
  }
  .qa .row__s {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas: "name plus";
    padding-left: 0;
  }
  .qa .row__nm {
    font-size: 20px;
    line-height: 28px;
  }
  .qa__a {
    font-size: 16px;
    line-height: 26px;
  }
}

/* ---------- Лист «Как это работает» ---------- */

.tag {
  margin-inline: 0;
  margin-block: 40px 44px;
  max-width: 34ch;
  font: 500 var(--tag-fs) / 1.22 var(--f-mono);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: baseline;
  padding: 16px 0 24px;
  border-top: 1px solid var(--ink);
}
.step__t {
  margin: 0;
  font: 700 36px/1 var(--f-x);
  text-transform: uppercase;
}
.step__d {
  grid-column: 2;
  margin: 8px 0 0;
  max-width: 30em;
  text-wrap: pretty;
}

.toc {
  padding-top: 40px;
}
.toc__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--ink);
}
.toc__list li {
  border-top: 1px solid var(--ink);
  break-inside: avoid;
}
.toc__list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0 9px;
  font: 700 30px/1 var(--f-x);
  text-decoration: none;
  text-transform: uppercase;
}
.toc__dots {
  flex: 1;
  min-width: 24px;
  height: 0;
  border-bottom: 2px dotted currentColor;
  opacity: 0.55;
}
.toc__arr {
  position: relative;
  flex: none;
  width: 12px;
  height: 16px;
  transition: transform 0.5s var(--ease);
}
.toc__arr::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 1px;
  width: 2px;
  margin-left: -1px;
  background: currentColor;
}
.toc__arr::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
}
@media (hover: hover) {
  .toc__list a:hover .toc__arr {
    transform: translateY(4px);
  }
  .toc__list a:hover .toc__dots {
    opacity: 1;
  }
}

@media (min-width: 900px) {
  .tag {
    margin-block: 72px 80px;
  }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
  .step {
    padding-bottom: 8px;
  }
  .step__t {
    font-size: 48px;
  }
  .toc {
    padding-top: 72px;
  }
  .toc__list {
    columns: 2;
    column-gap: 32px;
    border-bottom: 0;
  }
  .toc__list a {
    font-size: 36px;
    padding: 14px 0 12px;
  }
}

/* ---------- Бланк заявки ---------- */

.lead {
  min-height: 100svh;
}

.form {
  display: grid;
  gap: 40px;
}

/* Белая копия на жёлтом листе: список отмеченного. */
.slip {
  align-self: start;
  padding: 20px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.slip__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.slip__list:empty {
  display: none;
}
.slip__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px dashed var(--ink);
}
.slip__list li.is-new {
  animation: print 0.5s var(--ease) backwards;
}
@keyframes print {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}
.slip__n {
  display: block;
  font: 500 14px/20px var(--f-mono);
}
.slip__m {
  display: block;
  font: 400 12px/16px var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.slip__x {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.slip__x::before,
.slip__x::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transform: rotate(45deg);
  transition: transform 0.5s var(--ease);
}
.slip__x::after {
  transform: rotate(-45deg);
}
@media (hover: hover) {
  .slip__x:hover::before {
    transform: rotate(135deg);
  }
  .slip__x:hover::after {
    transform: rotate(45deg);
  }
}
.slip__empty {
  margin: 12px 0 4px;
  max-width: 30em;
  text-wrap: pretty;
}
.slip .lnk {
  margin-top: 4px;
}

.f {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}
.inp {
  width: 100%;
  padding: 8px 0 10px;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 16px/28px var(--f-mono);
}
.inp:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.inp--area {
  display: block;
  min-height: 108px;
  resize: vertical;
}
.inp[aria-invalid="true"] {
  border-bottom-color: var(--stamp);
}
.err {
  color: var(--stamp);
  font: 500 14px/20px var(--f-mono);
}
.err:empty {
  display: none;
}
/* Поле-ловушка для ботов: человек его не видит и с клавиатуры в него не попадает. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.form__go {
  margin: 32px 0 0;
}
.form__status {
  margin: 12px 0 0;
  color: var(--stamp);
  font: 500 14px/22px var(--f-mono);
}
/* Пустая строка состояния остаётся на странице (нулевой высоты): иначе
   экранный диктор может не прочесть сообщение, появившееся вместе с ней. */
.form__status:empty {
  margin: 0;
}
.fine {
  margin: 16px 0 0;
  max-width: 44em;
  font-size: 12px;
  line-height: 18px;
}

.done {
  padding-block: 8px 16px;
}
.done:focus {
  outline: 0;
}
.stamp {
  display: inline-block;
  margin: 0 0 28px;
  padding: 10px 20px 6px;
  border: 5px double var(--stamp);
  border-radius: 4px;
  color: var(--stamp);
  font: 800 60px/1 var(--f-x);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: rotate(-6deg);
}
.done.is-on .stamp {
  animation: stamp-hit 0.5s var(--thud) 0.1s backwards;
}
@keyframes stamp-hit {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(2.3);
  }
}
.done__t {
  margin: 0;
  font: 800 60px/0.9 var(--f-x);
  text-transform: uppercase;
}
.done__d {
  margin: 12px 0 28px;
  font-size: 16px;
  line-height: 26px;
}

@media (min-width: 900px) {
  .form {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 80px;
    align-items: start;
  }
  .slip {
    padding: 28px;
  }
  .inp {
    font-size: 18px;
    line-height: 32px;
  }
  .stamp {
    font-size: 96px;
  }
  .done__t {
    font-size: 96px;
  }
}

/* ---------- Подвал ---------- */

.foot {
  position: relative;
  padding-block: 36px 28px;
  background: var(--ink);
  color: var(--paper);
  overflow: clip;
}
.foot__mark {
  margin: 0 0 20px;
  font: 800 26.4vw/0.82 var(--f-x);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-line);
}
.foot__row p {
  margin: 0;
  padding-block: 14px;
}
.foot__row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
.foot__row a {
  padding-block: 14px;
  text-decoration: none;
}
@media (hover: hover) {
  .foot__row a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
  }
}
@media (min-width: 1500px) {
  .foot__mark {
    font-size: 396px;
  }
}

/* ---------- Плашка заявки и фото у курсора ---------- */

.dock {
  position: fixed;
  z-index: 60;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  visibility: hidden;
  transform: translateY(calc(100% + 40px));
  transition:
    transform 0.6s var(--ease),
    visibility 0s 0.6s;
}
.dock.is-on {
  visibility: visible;
  transform: none;
  transition: transform 0.6s var(--ease);
}
/* Пока плашка видна, браузер прокручивает фокус и якоря выше неё. */
html:has(.dock.is-on) {
  scroll-padding-bottom: 96px;
}
.dock__t {
  display: grid;
  min-width: 0;
  margin: 0;
}
.dock__names {
  overflow: hidden;
  font: 500 14px/20px var(--f-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dock .btn {
  flex: none;
}
@media (min-width: 900px) {
  .dock {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 420px;
  }
}

.peek {
  display: none;
}
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .peek {
    display: block;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 232px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
  }
  .peek.is-on {
    opacity: 1;
  }
  .peek img {
    display: block;
    width: 100%;
    height: auto;
    border: 8px solid var(--paper);
    background: #f0f0f0;
    box-shadow: 6px 8px 0 rgba(8, 6, 52, 0.34);
  }
}

/* ---------- Движение, привязанное к прокрутке ---------- */
/* Только там, где браузер умеет сам, без скрипта; в остальных всё сразу на месте. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* Крупная надпись листа выезжает из-под маски, пока лист въезжает в экран. */
    .rise {
      view-timeline: --rise block;
      overflow: clip;
      padding-top: 0.1em;
      margin-top: -0.1em;
    }
    .rise > span {
      display: block;
      animation: rise-up linear both;
      animation-timeline: --rise;
      animation-range: entry 0% entry 260%;
    }
    /* Подвал — конец страницы: надпись должна успеть выехать целиком. */
    .foot__mark.rise > span {
      animation-range: entry 0% entry 90%;
    }
    @keyframes rise-up {
      from {
        transform: translateY(72%);
      }
    }

    /* Слова фразы набирают цвет по одному, в порядке чтения (--i ставит скрипт). */
    .tag {
      view-timeline: --tag block;
    }
    .tag .w {
      animation: ink-in var(--ease) both;
      animation-timeline: --tag;
      animation-range: entry calc(60% + var(--i, 0) * 12%) entry calc(110% + var(--i, 0) * 12%);
    }
    @keyframes ink-in {
      from {
        opacity: 0.28;
      }
    }
  }
}

/* ---------- Уменьшить движение ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .ticker__run {
    flex-wrap: wrap;
    width: auto;
  }
  .ticker__set {
    flex-wrap: wrap;
  }
  .ticker__set[aria-hidden] {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Страница «не найдено» ---------- */

.nf {
  min-height: 100svh;
  display: grid;
  background: var(--ink);
  color: var(--paper);
}
.nf__in {
  align-self: center;
  padding-block: 48px;
}
.nf__h {
  margin: 24px 0 16px;
  font: 800 clamp(72px, 15vw, 200px) / 0.86 var(--f-x);
  text-transform: uppercase;
  text-wrap: balance;
}
.nf__d {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: 16px;
  line-height: 26px;
}
