/* ==========================================================================
   Deskfloof — лендинг (каркас)
   Фон белый, подложки нейтрально-серые (без лавандовых оттенков). Цвета и размеры — в переменных. Акцент меняется вместе с выбором Кошка / Собака:
   кошка — коралловый (как клубок), собака — салатовый (как теннисный мячик).
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F1F1F3;
  --tint: #F5F5F7;
  --ink: #1A1630;
  --ink-2: #514A6B;
  --ink-3: #8A84A3;
  --line: #E8E8EC;
  --line-strong: #D6D6DC;
  --dark: #1C1830;
  --dark-2: #29243F;
  --cream: #F7F5FD;
  --bg-rgb: 255 255 255;
  --cream-rgb: 247 245 253;
  --shade: 26 22 48;

  --accent: #1C1830;
  --accent-ink: #1C1830;
  --accent-soft: #EFEFF2;
  --accent-on: #FFFFFF;

  --radius-lg: 32px;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 1px 0 rgb(var(--shade) / .04), 0 12px 32px -14px rgb(var(--shade) / .22);
  --shadow-lg: 0 2px 0 rgb(var(--shade) / .04), 0 30px 60px -24px rgb(var(--shade) / .35);

  --font-display: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --header-h: 64px;

  /* Шкала шрифтов: у похожих элементов — один размер */
  --fs-h1: clamp(2.1rem, 3.6vw, 3rem);       /* 34–48px: заголовок первого экрана */
  --fs-h2: clamp(1.65rem, 2.6vw, 2.25rem);   /* 26–36px: заголовки секций */
  --fs-h3: 1.15rem;                          /* 18px: заголовки карточек */
  --fs-lead: 1.1rem;                         /* 18px: подзаголовки под h1 и h2 */
  --fs-body: 1rem;                           /* 16px: обычный текст */
  --fs-ui: .9375rem;                         /* 15px: меню, чипы, маленькие кнопки */
  --fs-small: .875rem;                       /* 14px: примечания */
  --fs-tiny: .8125rem;                       /* 13px: названия пород, значки */
}


@media (min-width: 640px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ---------- База ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2.5px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.muted { color: var(--ink-2); }

/* Показываем текст только для выбранного вида питомца */
[data-species="cat"] .only-dog,
[data-species="dog"] .only-cat,
[data-species="cat"] .only-dog-block,
[data-species="dog"] .only-cat-block { display: none !important; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: var(--fs-body);
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--ink); color: var(--cream); box-shadow: 0 8px 20px -10px rgb(var(--shade) / .55); }
.btn-primary:hover { box-shadow: 0 12px 26px -10px rgb(var(--shade) / .6); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-sm { padding: 9px 16px; font-size: var(--fs-ui); }
.btn-lg { padding: 17px 28px; font-size: var(--fs-body); }
.btn-block { width: 100%; }

/* Кнопки скачивания со значком системы — «объёмные», их хочется нажать:
   светлый блик сверху, тёмная грань снизу, толщина (сплошная тень вниз) и мягкая тень под кнопкой.
   При наведении кнопка чуть приподнимается, при нажатии — проседает на свою толщину. */
.btn-store {
  --top: #3D3753;
  --bottom: #16131F;
  --edge: #07060C;
  --glow: 255 255 255;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* Как у кнопок магазинов приложений: слева и справа одинаковый отступ, значок с надписью вместе по центру,
     ширина — по содержимому. Сверху на 1 px больше: у надписи без «хвостов» букв глаз видит центр чуть ниже. */
  padding: 17px 28px 16px;
  border-radius: 999px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: var(--fs-body);
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  background: linear-gradient(180deg, var(--top), var(--bottom));
  box-shadow:
    inset 0 1px 0 rgb(var(--glow) / .3),
    inset 0 -1px 0 rgb(0 0 0 / .45),
    inset 0 0 0 1px rgb(var(--glow) / .07),
    0 3px 0 var(--edge),
    0 5px 8px -3px rgb(var(--shade) / .3),
    0 16px 26px -12px rgb(var(--shade) / .55);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s ease;
}
/* мягкий блик на верхней половине — как на выпуклой поверхности */
.btn-store::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px 2px 48%;
  border-radius: 999px 999px 50% 50% / 999px 999px 14px 14px;
  background: linear-gradient(180deg, rgb(var(--glow) / .16), rgb(var(--glow) / 0));
  pointer-events: none;
}
.btn-store svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.btn-store:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 rgb(var(--glow) / .3),
    inset 0 -1px 0 rgb(0 0 0 / .45),
    inset 0 0 0 1px rgb(var(--glow) / .07),
    0 4px 0 var(--edge),
    0 7px 10px -3px rgb(var(--shade) / .32),
    0 20px 30px -12px rgb(var(--shade) / .6);
}
.btn-store:active {
  transform: translateY(3px);
  filter: brightness(.97);
  box-shadow:
    inset 0 1px 0 rgb(var(--glow) / .18),
    inset 0 2px 6px rgb(0 0 0 / .35),
    inset 0 0 0 1px rgb(var(--glow) / .05),
    0 0 0 var(--edge),
    0 3px 6px -3px rgb(var(--shade) / .3);
}
.btn-store:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 4px; }
/* светлый вариант — на тёмном блоке внизу страницы */
.btn-store--light {
  --top: #FFFFFF;
  --bottom: #E4E1EE;
  --edge: #9C96B3;
  --glow: 255 255 255;
  color: var(--ink);
}
.btn-store--light.btn-store { box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .9),
    inset 0 -1px 0 rgb(0 0 0 / .12),
    0 3px 0 var(--edge),
    0 16px 26px -12px rgb(0 0 0 / .6); }
.btn-store--light.btn-store:hover { box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .9),
    inset 0 -1px 0 rgb(0 0 0 / .12),
    0 4px 0 var(--edge),
    0 20px 30px -12px rgb(0 0 0 / .65); }
.btn-store--light.btn-store:active { box-shadow:
    inset 0 2px 6px rgb(0 0 0 / .18),
    0 0 0 var(--edge),
    0 3px 6px -3px rgb(0 0 0 / .4); }
@media (max-width: 520px) { .hero-cta .btn-store { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .btn-store { transition: none; } }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--ink); }

/* ---------- Заглушки под фото и видео ---------- */

.ph {
  position: relative;
  aspect-ratio: var(--ratio, 16 / 9);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .5) 14px 28px);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  overflow: hidden;
  color: var(--ink-2);
}

.ph__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}
.ph__tag::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}
.ph--video .ph__tag::before {
  width: 0; height: 0;
  border-radius: 0;
  background: none;
  border-left: 8px solid var(--accent-ink);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.ph__label { font-size: .9rem; line-height: 1.4; max-width: 34ch; }

.ph--round { border-radius: 50%; padding: 18%; }

.ph--on-dark {
  background-color: var(--dark-2);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .03) 14px 28px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12);
  color: rgb(var(--cream-rgb) / .7);
}
.ph--on-dark .ph__tag { background: rgba(255, 255, 255, .08); box-shadow: none; color: var(--cream); }
.ph--on-dark .ph__tag::before { background: var(--cream); }
.ph--on-dark.ph--video .ph__tag::before { background: none; border-left-color: var(--cream); }


/* Заглушка «рабочий стол» на первом экране */
.ph--desktop {
  --ratio: 16 / 10;
  border-radius: 20px;
  background-color: var(--accent-soft);
  background-image:
    radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, .75), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 16px, rgba(255, 255, 255, .35) 16px 32px);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgb(var(--shade) / .12);
  padding: 48px 28px;
  transition: background-color .3s ease;
}
.ph__menubar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 22px;
  background: rgba(255, 255, 255, .7);
  border-bottom: 1px solid rgb(var(--shade) / .08);
}
.ph__menubar::before {
  content: "";
  position: absolute;
  left: 14px; top: 7px;
  width: 120px; height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ink) 0 10px, transparent 10px 18px, rgb(var(--shade) / .25) 18px 52px, transparent 52px 60px, rgb(var(--shade) / .25) 60px 92px, transparent 92px 100px, rgb(var(--shade) / .25) 100px);
}
.ph__dock {
  position: absolute;
  left: 50%; bottom: 10px;
  width: min(58%, 340px);
  height: 34px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 6px 16px -8px rgb(var(--shade) / .3);
}


/* Пометка «ещё не решено» */
.tbd {
  background: #FFF4C2;
  box-shadow: inset 0 0 0 1px #E2C64B;
  border-radius: 5px;
  padding: 0 5px;
  color: #6B5600;
  font-weight: 600;
  cursor: help;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(var(--bg-rgb) / .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand--sm { font-size: 1.05rem; }
.brand--sm .brand-mark { width: 30px; height: 30px; }

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-ui);
  color: var(--ink-2);
}
.site-nav a:hover { color: var(--ink); background: rgb(var(--shade) / .05); }

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

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s ease; }
.site-header.is-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.site-header.is-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgb(var(--shade) / .3);
    display: none;
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 8px; font-size: var(--fs-body); }
}

/* ---------- Первый экран ---------- */

.hero { padding: 48px 0 64px; }
@media (min-width: 1000px) { .hero { padding: 72px 0 88px; } }

/* Текст и кнопка по центру, под ними — MacBook на всю ширину контейнера */
.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 5vw, 64px);
}
.hero-copy { max-width: 760px; text-align: center; }
.hero-copy .lead { margin-inline: auto; }
.hero-copy .hero-cta { justify-content: center; }

.hero h1 .nowrap { white-space: nowrap; }
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* Переключатель cat / dog прямо в заголовке: два слова на «дорожке», выбранное — на цветной плашке */
.word-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  vertical-align: baseline;
  padding: .06em;
  margin: 0 .04em;
  border-radius: .32em;
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--line), 0 10px 24px -14px rgb(var(--shade) / .35);
  letter-spacing: -0.02em;
}
.word-switch__btn {
  position: relative;
  z-index: 1;
  padding: .02em .16em .1em;
  border: 0;
  border-radius: .26em;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1;
  color: var(--ink-3);
  opacity: .55;
  cursor: pointer;
  transition: color .25s ease, opacity .25s ease;
}
.word-switch__btn:hover { opacity: .85; }
.word-switch__btn[aria-pressed="true"] { color: var(--accent-on); opacity: 1; cursor: default; }
.word-switch__thumb {
  position: absolute;
  z-index: 0;
  top: .06em; bottom: .06em; left: .06em;
  width: calc(50% - .06em);
  border-radius: .26em;
  background: var(--accent);
  transition: transform .4s cubic-bezier(.5, 1.5, .4, .9), background-color .3s ease;
}
[data-species="dog"] .word-switch__thumb { transform: translateX(100%); }

/* Рукописная подсказка «pick yours!» со стрелкой к переключателю.
   Размер — в em заголовка: при любой ширине экрана стрелка встаёт на то же место между «cat dog» и «your windows.» */
.pick-note {
  position: absolute;
  left: 100%;
  top: 0;
  width: 8.5417em;   /* 410 / 48 */
  height: 2.2917em;  /* 110 / 48 */
  max-width: none;   /* общее правило img, svg { max-width: 100% } сжало бы её до ширины переключателя */
  overflow: visible;
  pointer-events: none;
  user-select: none;
}
.pick-note__text {
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 36px;   /* в единицах рисунка: при заголовке 48 px — 36 px */
  font-weight: 600;
  letter-spacing: 0;
  fill: var(--ink);
  animation: pick-note-write .6s ease-out .5s both;
}
.pick-note__line,
.pick-note__head {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;   /* штрих во всю длину линии (pathLength = 1) и пробел длиннее неё */
}
.pick-note__line { animation: pick-note-draw .8s cubic-bezier(.45, 0, .25, 1) 1s both; }
.pick-note__head { animation: pick-note-draw .2s ease-out 1.75s both; }
@keyframes pick-note-write { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% 0 -20% 0); } }
/* старт с 1.1, а не с 1: иначе до начала анимации скруглённый край линии виден точкой */
@keyframes pick-note-draw { from { stroke-dashoffset: 1.1; } to { stroke-dashoffset: 0; } }
@media (max-width: 899px) { .pick-note { display: none; } }
@media (prefers-reduced-motion: reduce) { .pick-note * { animation: none; } }

.lead {
  margin-top: 20px;
  font-size: var(--fs-lead);
  color: var(--ink-2);
  max-width: 34em;
}

/* Переключатель Кошка / Собака */
.species-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  margin-top: 28px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.species-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 128px;
  padding: 10px 20px 10px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  font-size: var(--fs-ui);
  cursor: pointer;
  transition: color .25s ease;
}
.species-btn[aria-pressed="true"] { color: var(--cream); }
.species-ph {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.species-btn[aria-pressed="true"] .species-ph { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px var(--accent); }
.species-thumb {
  position: absolute;
  z-index: 0;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform .35s cubic-bezier(.5, 1.6, .4, .9);
}
[data-species="dog"] .species-thumb { transform: translateX(100%); }

.species-switch--sm { margin-top: 0; box-shadow: inset 0 0 0 1px var(--line); }
.species-switch--sm .species-btn { min-width: 0; padding: 8px 16px; font-size: var(--fs-ui); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 28px;
}
.fineprint { margin-top: 16px; font-size: var(--fs-small); color: var(--ink-3); }

/* «Ключ и ссылка придут на почту»: в первом экране (только на телефоне), у цен и после оплаты на телефоне.
   На белом фоне — серая плашка, на сером (цены) — белая. */
.mail-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--tint);
  font-size: var(--fs-ui);
  line-height: 1.4;
  color: var(--ink);
  text-align: left;
}
.mail-note svg { flex: none; width: 20px; height: 20px; }
.mail-note[hidden], .mail-note--mobile { display: none; }
.is-mobile .mail-note--mobile { display: flex; }
.section--tinted .mail-note { background: var(--surface); }
.mail-note--center { width: fit-content; max-width: 100%; margin: 28px auto 0; }

.hero-demo { position: relative; width: 100%; }

/* ---------- Секции ---------- */

/* Отступы между секциями считаем по буквам, как их видит глаз: от базовой линии последней строки (или края
   картинки) до границы фона и от границы до верха заглавных букв. --pad — эта видимая пустота:
   ровно 70 px на телефоне, на большом экране 128 px.
   У строки текста над заглавными и под базовой линией есть невидимый «воздух» шрифта:
   (line-height / 2 − 0.35) × кегль (у Figtree над заглавными и под строкой по 0.25 кегля).
   Его вычитаем из padding: --air-top — у того, что стоит в секции первым, --air-end — у последнего.
   У картинок и плашек воздуха нет — там 0. Проверка: tools/audit-gaps.mjs */
.section {
  --pad: clamp(70px, 9vw + 6px, 128px);
  --air-top: calc(.2 * var(--fs-h2));      /* первым почти везде идёт заголовок h2 (line-height 1.1) */
  --air-end: 0px;                          /* внизу картинка или плашка */
  padding: calc(var(--pad) - var(--air-top)) 0 calc(var(--pad) - var(--air-end));
}
#how { --air-end: calc(.425 * var(--fs-body)); }        /* текст карточек: 16 px, line-height 1.55 */
#menu { --air-end: calc(.425 * var(--fs-small)); }      /* строка про Liquid Glass: 14 px, 1.55 */
@media (max-width: 959px) { #menu { --air-top: 0px; } } /* на узком экране первым идёт ролик */
/* в «Every so often…» на широком экране подзаголовок справа выше заголовка — первым идёт он: 17.6 px, 1.55 */
@media (min-width: 900px) { #moments { --air-top: calc(.425 * var(--fs-lead)); } }
#breeds { --air-end: calc(.325 * var(--fs-small)); }    /* подписи шкал характера: 14 px, 1.35 */
@media (min-width: 1040px) { #breeds { --air-end: 0px; } } /* на широком внизу плашка окраса */
#pricing { --air-end: calc(.55 * var(--fs-small)); }    /* строка про возврат денег: 14 px, 1.8 */
.section--tinted { background: var(--tint); }
/* Два серых блока подряд — одна общая подложка, и между ними та же видимая пустота --pad.
   Отрицательный margin убирает воздух над заголовком второго блока (подложки одного цвета — наложения не видно). */
.section--tinted + .section--tinted { padding-top: 0; margin-top: calc(-1 * var(--air-top)); }

.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-lead { margin-top: 14px; font-size: var(--fs-lead); color: var(--ink-2); max-width: 46ch; }


.section-head--center { text-align: center; margin-inline: auto; }
.section-head--center .section-lead { margin-inline: auto; }

@media (min-width: 900px) {
  .section-head--row {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
  }
  .section-head--row > div { max-width: 640px; }
  .section-head--row .section-lead { margin-top: 0; max-width: 38ch; }
}

/* ---------- Карточки ---------- */

/* Карточка без рамки. На сером фоне — белая подложка; на белом фоне — ни подложки, ни внутренних отступов:
   блоки разделяют промежутки между ними, а текст стоит ровно по краю картинки над ним. */
.card {
  background: var(--surface);
  border-radius: var(--radius);
}
.section:not(.section--tinted) .card { background: none; border-radius: 0; padding: 0; }
.card > .ph { border-radius: calc(var(--radius) - 10px); }
.card-body { padding: 16px 10px 8px; }
.section:not(.section--tinted) .card-body { padding: 14px 0 0; }
.card-body h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
.card-body p { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-body); }

/* 01 · Сетка-бенто: на широком экране 4 колонки, большие карточки занимают две.
   У всех карточек одна высота фото/видео — заголовки стоят на одной линии. */
.bento {
  display: grid;
  gap: 36px 16px;
}
.bento .card { padding: 10px 10px 14px; display: flex; flex-direction: column; }
.bento .ph, .bento .scene--card { aspect-ratio: auto; height: var(--media-h, 220px); }
@media (min-width: 680px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); --media-h: 230px; }
  .bento .card--wide { grid-column: span 2; }
}
@media (min-width: 1080px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; --media-h: 250px; }
}

/* 02 · Меню действий */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.split-media .ph { max-width: 500px; margin-inline: auto; background-color: var(--surface-2); }
.split-media .scene--square { aspect-ratio: 1 / 1; max-width: 500px; margin-inline: auto; border-radius: var(--radius); }
.split-copy .section-head { margin-bottom: 28px; }

.modes { counter-reset: none; }
.mode {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line-strong);
}
.mode:last-child { border-bottom: 1px solid var(--line-strong); }
.mode-name {
  justify-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-ui);
}
.mode-text { color: var(--ink-2); }
.split-copy .fineprint { margin-top: 18px; }

/* 03 · Сценки — горизонтальная лента */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 78%);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;      /* место под полосу прокрутки… */
  margin-bottom: -12px;      /* …но низ секции оно не раздувает: пустота под карточками ровно --pad */
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.card--scene { padding: 10px 10px 14px; }
@media (min-width: 640px) { .rail { grid-auto-columns: minmax(250px, 42%); } }
@media (min-width: 1100px) {
  .rail { grid-auto-columns: calc((100% - 3 * 16px) / 4); overflow: visible; }
}
.card--scene .scene--portrait { aspect-ratio: 4 / 5; }

/* 05 · Породы и характер */
/* На широком экране две колонки одной высоты: слева породы и окрас, справа превью и характер.
   Последние карточки колонок (Coat и Character) растягиваются, поэтому низ у них на одной линии.
   На узком экране колонки «растворяются», и карточки идут так: породы, окрас, превью, характер. */
.maker { display: grid; gap: 40px; }
.maker-main, .maker-side { display: contents; }
.maker-breeds { order: 1; }
.maker-coat { order: 2; }
.maker-preview { order: 3; }
.maker-character { order: 4; }
@media (min-width: 1040px) {
  .maker { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
  .maker-main, .maker-side { display: flex; flex-direction: column; gap: 40px; }
  .maker-coat, .maker-character { flex: 1 0 auto; }
}

.maker-breeds { padding: 20px; }
.maker-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.maker-note { font-size: var(--fs-small); color: var(--ink-3); }

.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 640px) { .breed-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; } }
/* рядом с превью — всегда 5 в ряд: сетка из трёх рядов оставляет под собой место для карточки Coat */
@media (min-width: 1040px) { .breed-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .maker-breeds { padding: 14px; }
  .breed { padding: 8px 4px 10px; font-size: .76rem; border-radius: 14px; }
}
.breed {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px 12px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-tiny);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}
/* Название породы — не больше двух строк, длиннее обрезается многоточием («German Shorthaired…»).
   Полное название видно в подписи под превью, а экранные дикторы читают его целиком. */
.breed-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.breed:hover { background: var(--bg); }
.breed.is-selected { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
/* Миниатюра породы: сидящий питомец из кода приложения (thumbs.webp), без подложки.
   Все породы в листе одного размера; размеры ячейки и листа (--tw, --th, --tsw, --tsh) и номер ячейки (--c, --r)
   ставит scenes.js из manifest.json. --s — масштаб: питомец около 40 px в высоту, на телефоне около 34 px. */
.breed-pic {
  --s: .32;
  position: relative;
  width: 100%;
  height: 46px;
}
.breed-pic::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: calc(var(--tw, 163px) * var(--s));
  height: calc(var(--th, 135px) * var(--s));
  transform: translateX(-50%);
  background: url("assets/pets/thumbs.webp") no-repeat;
  background-size: calc(var(--tsw, 978px) * var(--s)) calc(var(--tsh, 675px) * var(--s));
  background-position: calc(var(--c, 0) * var(--tw, 163px) * -1 * var(--s)) calc(var(--r, 0) * var(--th, 135px) * -1 * var(--s));
}
/* на телефоне — помельче; правило стоит после основного, иначе оно его не перебьёт */
@media (max-width: 639px) { .breed-pic { height: 40px; --s: .27; } }

.maker-preview { padding: 10px; }
.maker-preview .scene--preview { aspect-ratio: 16 / 10; }
.maker-caption { padding: 12px 0 0; font-size: var(--fs-body); color: var(--ink-2); }
.maker-caption b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.maker-character { padding: 24px; }
.maker-character h3 { font-size: var(--fs-h3); font-weight: 700; }
.maker-character .muted { margin-top: 4px; font-size: var(--fs-body); }

/* Окрас: цвета и рисунки шерсти из приложения (assets/pets/coats-*.webp, coats.json), справа — питомец в выбранном окрасе */
.maker-coat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(170px, 30%, 210px);
  gap: 24px;
  padding: 24px;
}
.maker-coat h3 { font-size: var(--fs-h3); font-weight: 700; }
.maker-coat .muted { margin-top: 4px; font-size: var(--fs-body); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 2px; }
.swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14);
  cursor: pointer;
  transition: transform .15s ease;
}
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.coat-patterns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.coat-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 190px;
  padding: 16px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
/* Питомец — ячейка листа coats-*.webp; размеры ячейки и листа (--cw, --ch, --cols, --rows), номер ячейки (--c, --r)
   ставит scenes.js из coats.json. Лист нарисован вдвое крупнее, чем показывается. */
.coat-pet {
  --s: .5;
  display: block;
  flex: none;
  width: calc(var(--cw, 238px) * var(--s));
  height: calc(var(--ch, 235px) * var(--s));
  background-repeat: no-repeat;
  background-size: calc(var(--cw, 238px) * var(--cols, 8) * var(--s)) calc(var(--ch, 235px) * var(--rows, 7) * var(--s));
  background-position: calc(var(--c, 0) * var(--cw, 238px) * -1 * var(--s)) calc(var(--r, 0) * var(--ch, 235px) * -1 * var(--s));
  transform-origin: 50% 100%;
  transition: opacity .2s ease;
}
.coat-pet.is-pop { animation: coat-pop .32s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes coat-pop { 0% { transform: scale(1.06, .9); } 100% { transform: none; } }
.coat-stage figcaption { font-size: var(--fs-small); color: var(--ink-2); text-align: center; }
.coat-stage figcaption::first-letter { text-transform: uppercase; }
@media (max-width: 639px) {
  .maker-coat { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 18px; }
  .coat-stage { order: -1; min-height: 160px; }
}
@media (prefers-reduced-motion: reduce) { .coat-pet.is-pop { animation: none; } .swatch { transition: none; } }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 600;
  font-size: var(--fs-ui);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); box-shadow: none; }
.preset-blurb { margin-top: 12px; min-height: 1.5em; font-size: var(--fs-body); color: var(--ink-2); }

.traits { margin: 18px 0 0; display: grid; gap: 14px; }
.trait { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.trait dt { font-weight: 700; font-size: var(--fs-ui); }
.trait dd { margin: 0; display: grid; gap: 6px; padding-top: 7px; }
.trait small { color: var(--ink-3); font-size: var(--fs-small); line-height: 1.35; }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--v) * 100%);
  border-radius: inherit;
  background: var(--accent);
  transition: width .45s cubic-bezier(.3, 1.3, .5, 1), background-color .3s ease;
}

/* 07 · Три шага */
.steps { display: grid; gap: 16px; counter-reset: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.step { padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.step-num {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
}
.step h3 { font-size: var(--fs-h3); font-weight: 700; }
.step p { color: var(--ink-2); font-size: var(--fs-body); }
.step .step-links { margin-top: auto; padding-top: 8px; }   /* «Download for Mac or Windows» — внизу карточки */

/* 08 · Цены */
.plans {
  display: grid;
  gap: 20px;
  max-width: 860px;
  margin-inline: auto;
}
@media (min-width: 760px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan { position: relative; padding: 30px 28px 28px; display: flex; flex-direction: column; }
.plan h3 { font-size: var(--fs-h3); font-weight: 700; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 20px; }
.plan-price .amount { font-family: var(--font-display); font-weight: 800; font-size: 2.75rem; line-height: 1; letter-spacing: -0.025em; }
.plan-price .per { color: var(--ink-3); font-weight: 600; }
.plan-list { display: grid; gap: 10px; margin-bottom: 28px; }
/* Галочка: круг и знак «✓» одного размера, по центру первой строки пункта */
.plan-list li { position: relative; padding-left: 30px; line-height: 24px; }
.plan-list li::before,
.plan-list li::after {
  content: "";
  position: absolute;
  left: 0; top: 3px;            /* (24px строка − 18px значок) / 2 */
  width: 18px; height: 18px;
}
.plan-list li::before { border-radius: 50%; background: var(--accent); }
.plan-list li::after {
  background: var(--accent-on);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.3 9.2 7.8 11.6 12.7 6.6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.3 9.2 7.8 11.6 12.7 6.6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.plan .btn { margin-top: auto; }

.plan--best { background: var(--dark); color: var(--cream); box-shadow: var(--shadow-lg); }
.plan--best .plan-price .per { color: rgb(var(--cream-rgb) / .6); }
.plan--best .btn-primary { background: var(--surface); color: var(--ink); }
.plan--best .plan-list li::before { background: var(--cream); }
.plan--best .plan-list li::after { background: var(--ink); }
.plan-badge {
  position: absolute;
  top: -13px; left: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-size: var(--fs-tiny);
  font-weight: 700;
}

/* 09 · FAQ */
/* В одну колонку от подзаголовка до первого вопроса по буквам ровно 40 px: из них 20 px — отступ самого вопроса,
   и по 0.425 кегля (17.6 px) — воздух шрифта под подзаголовком и над вопросом. */
.faq-grid { display: grid; gap: 0; }
.faq-grid > .section-head { margin-bottom: calc(40px - 20px - .85 * var(--fs-lead)); }
@media (min-width: 960px) { .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; } }
/* линии только между вопросами: над первым и под последним — нет */
.faq details + details { border-top: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-lead);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 11px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 11px no-repeat,
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--accent-soft); }
.faq details p { padding: 0 44px 22px 0; color: var(--ink-2); }

/* ---------- Финальный призыв ---------- */

/* Тёмный блок с текстом по центру; по его верхнему краю гуляет питомец */
.final { padding: 24px 0 clamp(64px, 8vw, 104px); }   /* сверху — запас под питомца на краю блока */
.final-inner {
  position: relative;
  padding: clamp(44px, 6vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--cream);
}
.final-copy { max-width: 640px; margin-inline: auto; text-align: center; }
.final .hero-cta { justify-content: center; }
.final h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.final-copy > p { margin-top: 14px; font-size: var(--fs-lead); color: rgb(var(--cream-rgb) / .75); }
.final .btn-primary { background: var(--cream); color: var(--ink); }

/* ---------- Юридические страницы: privacy.html, terms.html, refunds.html ---------- */
/* Собираются из legal/*.md скриптом tools/build-legal.mjs. Одна колонка текста; размеры — из общей шкалы:
   заголовок страницы как заголовок секции, разделы как заголовки карточек. */
.brand + .header-actions { margin-left: auto; }   /* в шапке без меню кнопка Buy всё равно справа */
.legal { padding: 48px 0 clamp(70px, 9vw + 6px, 128px); }
.legal-inner { width: min(720px, 100% - 2 * var(--gutter)); }
.legal h1 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; }
.legal-lead { margin-top: 20px; font-size: var(--fs-lead); color: var(--ink-2); }
.legal-updated { margin-top: 12px; font-size: var(--fs-small); color: var(--ink-3); }
.legal-updated + p { margin-top: 28px; }
.legal h2 { margin-top: 40px; font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.legal h2 + * { margin-top: 10px; }
.legal p, .legal li, .legal td { color: var(--ink-2); }
.legal :is(p, ul, .legal-table) + :is(p, ul, .legal-table) { margin-top: 12px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal ul { display: grid; gap: 6px; }
.legal li { position: relative; padding-left: 20px; }
.legal li::before {
  content: "";
  position: absolute;
  left: 5px; top: .68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}
/* Таблица: линии только между строками. На телефоне каждая строка — карточка с подписями столбцов. */
.legal-table table { width: 100%; border-collapse: collapse; }
.legal-table th { padding: 0 20px 10px 0; text-align: left; font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.legal-table td { padding: 12px 20px 12px 0; vertical-align: top; border-top: 1px solid var(--line-strong); }
.legal-table :is(th, td):last-child { padding-right: 0; }
@media (max-width: 639px) {
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table :is(table, tbody, tr, td) { display: block; }
  .legal-table tr { padding: 14px 0; }
  .legal-table tr + tr { border-top: 1px solid var(--line-strong); }
  .legal-table tr:first-child { padding-top: 4px; }
  .legal-table td { padding: 0; border: 0; }
  .legal-table td + td { margin-top: 8px; }
  .legal-table td::before { content: attr(data-label); display: block; font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
}
.footer-nav a[aria-current="page"] { color: var(--ink); }

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

.site-footer { padding: 32px 0 48px; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.footer-row .muted { font-size: var(--fs-small); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.footer-nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-ui); font-weight: 500; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) { .footer-nav { margin-left: 0; width: 100%; } }

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


/* ---------- Окно покупки (dialog) ---------- */

.checkout {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 28px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgb(var(--shade) / .06);
  overflow: auto;
}
.checkout::backdrop {
  background: rgb(var(--shade) / .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.checkout[open] { animation: co-in .2s ease-out; }
.checkout[open]::backdrop { animation: co-fade .2s ease-out; }
@keyframes co-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes co-fade { from { opacity: 0; } }

.co-close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}
.co-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.co-close:hover { background: var(--accent-soft); }

.checkout h2 { padding-right: 40px; font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; }
.co-lead { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-body); }

.co-group { margin: 20px 0 0; padding: 0; border: 0; display: grid; gap: 10px; }
.co-group[hidden] { display: none; }   /* иначе display: grid перебивает hidden и вопрос остаётся на экране */
.co-group legend { margin-bottom: 10px; padding: 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.co-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
  transition: box-shadow .15s ease, background-color .15s ease;
}
.co-option:hover { background: var(--surface-2); }
.co-option:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.co-option:has(input:focus-visible) { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.co-option input { position: absolute; opacity: 0; pointer-events: none; }
.co-ico { width: 22px; height: 22px; flex: none; fill: currentColor; }
.co-text { display: grid; gap: 2px; }
.co-text b { font-weight: 700; font-size: var(--fs-body); }
.co-text small { font-size: var(--fs-small); color: var(--ink-3); }
.co-price { margin-left: auto; font-weight: 800; font-size: var(--fs-body); }

.co-pay { width: 100%; margin-top: 22px; }
.co-note { margin-top: 12px; font-size: var(--fs-small); color: var(--ink-3); text-align: center; }
/* Экран «готово»: про скачивание — текстом со ссылкой (установщик уже скачивается сам), без большой кнопки */
.co-dl { margin-top: 18px; color: var(--ink-2); font-size: var(--fs-body); }
.co-dl[hidden] { display: none; }
.checkout .co-step[data-step="done"] .co-note { text-align: left; }
/* Windows: что нажать, если браузер или SmartScreen предупреждают — три шага картинками (install-windows.html — подробно).
   Окно «готово» с этими шагами шире: слева шаги, справа картинка; на узком экране картинка над шагами. */
.checkout:has(.co-win:not([hidden])) { width: min(680px, calc(100% - 32px)); }
.co-win { margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-small); color: var(--ink-2); }
.co-win[hidden] { display: none; }
.co-win__title { font-weight: 600; color: var(--ink); }
.co-win__body { margin-top: 12px; display: grid; gap: 14px; }
.co-win__steps { order: 2; display: grid; gap: 4px; counter-reset: co-win; }
.co-win__steps li { counter-increment: co-win; }
.co-win__steps button {
  display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; align-items: center;
  width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none;
  font: inherit; text-align: left; color: var(--ink-2); cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.co-win__steps button::before {
  content: counter(co-win); grid-row: span 2; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--line-strong); color: var(--ink-2);
  font-size: var(--fs-tiny); font-weight: 700; transition: background-color .2s ease, color .2s ease;
}
.co-win__steps b { font-weight: 600; color: var(--ink); }
.co-win__steps small { font-size: var(--fs-tiny); color: var(--ink-3); }
.co-win__steps button:hover { background: rgb(var(--bg-rgb) / .6); }
.co-win__steps button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 0 rgb(var(--shade) / .04), 0 6px 16px -8px rgb(var(--shade) / .25); }
.co-win__steps button[aria-pressed="true"]::before { background: var(--ink); color: #fff; }
.co-win__steps button:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.co-win__shot { order: 1; position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.co-win__shot img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease; }
.co-win__shot img.is-active { opacity: 1; }
.co-win__more { margin-top: 12px; font-size: var(--fs-tiny); color: var(--ink-3); }
@media (min-width: 600px) {
  .co-win__body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); align-items: center; }
  .co-win__steps { order: 0; }
}
@media (prefers-reduced-motion: reduce) { .co-win__shot img { transition: none; } }
.co-have { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); text-align: center; }
.is-mobile .co-have { display: none; }      /* на телефоне скачивать нечего: установщик — по ссылке из письма */

/* Ключ лицензии на экране «готово» — показывается, когда модуль deskfloof-api его нашёл */
.co-key { margin-top: 18px; display: grid; gap: 8px; }
.co-key[hidden] { display: none; }
.co-key__label { font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.co-key__row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 14px;
  background: var(--bg-soft, #F5F5F7);
}
.co-key__value {
  flex: 1; min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92rem; color: var(--ink);
  overflow-wrap: anywhere; user-select: all;
}
.co-key__copy {
  flex: none; font: inherit; font-weight: 600; font-size: var(--fs-small);
  padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff;
}

.co-back {
  margin: -6px 0 10px -4px;
  padding: 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.co-back:hover { color: var(--ink); }
.co-ph { margin-top: 18px; min-height: 260px; }
.co-sim { margin-top: 10px; border: 0; background: none; font: inherit; font-size: var(--fs-small); cursor: pointer; }
.checkout .co-step[data-step="done"] .co-pay { margin-top: 20px; }
@media (prefers-reduced-motion: reduce) { .checkout[open], .checkout[open]::backdrop { animation: none; } }

/* ---------- Как установить на Windows: install-windows.html ---------- */
/* Та же колонка, что у юридических страниц. Картинки окон (assets/install/*.svg, рисует tools/install-shots.py) —
   по две в ряд, на телефоне друг под другом; подпись — какой браузер или какой шаг */
.install-dl { margin-top: 16px; }
.legal .install-dl + p { margin-top: 14px; }
.install-shots { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 14px; }
.install-shots figure { margin: 0; }
.install-shots img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.install-shots figcaption { margin-top: 8px; font-size: var(--fs-small); color: var(--ink-3); }
