/* Демо карточек для маркетплейсов. Визуальная система сайта — docs/VISUAL-CONCEPT.md:
   монохром, оранжево-красный только точечно, Unbounded / Onest / JetBrains Mono, панели с большим радиусом.
   Интерфейс нарочно бесцветный: цвет на экране дают только сами карточки. */
:root {
  --ink-0: #0c0d0e;
  --ink-1: #16181a;
  --ink-2: #24272a;
  --ink-3: #3a3e42;
  --fog: #8b8f93;
  --fog-2: #a9acaf;
  --paper: #e6e5e1;
  --paper-2: #cfd1cf;
  --text: #ecebe8;
  --text-dark: #141516;
  --ember: #ff4a12;
  --r-xl: 40px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --gut: clamp(12px, 2vw, 28px);
  --pad: clamp(20px, 3.4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .2s;
  --t-mid: .45s;
  --t-slow: .8s;
  --display: 'Unbounded', 'Onest', sans-serif;
  --body: 'Onest', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  /* слои */
  --z-top: 10;
  --z-toast: 90;
}
* { box-sizing: border-box; margin: 0; padding: 0 }
/* Скроллбары скрыты по всему сайту (решение Карины 25.11.2026: на Windows они портят вид).
   Прокрутка колесом, тачпадом, клавишами и пальцем работает как обычно. */
* { scrollbar-width: none }
*::-webkit-scrollbar { display: none }

html { background: var(--ink-0); color: var(--text); -webkit-text-size-adjust: 100% }
body { font: 300 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden }
a { color: inherit; text-decoration: none }
ol, ul { list-style: none }
img { display: block; max-width: 100% }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation }
button:disabled { cursor: default }
fieldset { border: 0; min-width: 0 }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400 }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 8px }
h1, h2 { text-wrap: balance }
p { text-wrap: pretty }
[hidden] { display: none !important }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--paper); color: var(--text-dark); padding: 8px 14px; border-radius: 99px }
.skip:focus { left: 8px }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay; border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") }

/* ---------- Кнопки ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 99px; font: 400 14px/1 var(--body); cursor: pointer; border: 0; white-space: nowrap;
  transition: transform var(--t-mid) var(--ease), background var(--t-fast), color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast) }
.pill i { font-style: normal; transition: transform var(--t-mid) var(--ease) }
.pill:hover i { transform: translateX(3px) }
.pill:active { transform: scale(.97) }
.pill:disabled { opacity: .55; transform: none }
.pill-light { background: var(--paper); color: var(--text-dark) }
.pill-light:hover { background: #fff }
.pill-line { border: 1px solid var(--ink-3); color: var(--text) }
.pill-line:hover { border-color: var(--fog); background: rgba(255, 255, 255, .03) }
.pill-ember { background: var(--ember); color: #fff; font-weight: 500 }
.pill-ember:hover { background: #ff5f2e }
.pill small { opacity: .55; font-size: 10px }
.text-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; color: var(--fog-2); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ink-3); transition: color var(--t-fast) }
.text-btn:hover { color: var(--text); text-decoration-color: var(--ember) }
.text-btn i { font-style: normal }
.icon-btn { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--text);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-mid) var(--ease) }
.icon-btn:hover { background: rgba(255, 255, 255, .06); border-color: var(--fog) }
.icon-btn:disabled { opacity: .3; background: none; border-color: var(--ink-3) }
.icon-btn.sm { width: 40px; height: 40px }
.icon-btn.sm .ic { width: 16px; height: 16px }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px }

/* ---------- Шапка и подвал сайта ---------- */
/* Шапка стоит там же, где на главной внутри панели первого экрана: отступ страницы + внутренний
   отступ панели + 1 px рамки. Так при переходе между страницами логотип, меню и кнопки не прыгают. */
.site-top { position: relative; z-index: var(--z-top); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto;
  padding: calc(var(--gut) + clamp(20px, 3.4vw, 48px) + 1px) calc(var(--gut) + clamp(20px, 3.4vw, 48px) + 1px) 0 }
@media (max-width: 760px) {
  .site-top { padding: calc(var(--gut) + 23px) calc(var(--gut) + 21px) 0 }   /* как .hero-top на телефоне: 22px 20px внутри панели */
}
.brand { display: grid; gap: 4px }
.brand b { font: 400 15px/1 var(--display); letter-spacing: .02em }
.brand span { color: var(--fog) }
.site-nav { display: flex; gap: 6px; padding: 5px; border-radius: 99px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07) }
.site-nav a { padding: 10px 18px; border-radius: 99px; font-size: 14px; color: #c9cacb; transition: background var(--t-fast), color var(--t-fast) }
.site-nav a:hover, .site-nav a[aria-current] { background: rgba(255, 255, 255, .08); color: var(--text) }
.top-right { display: flex; align-items: center; gap: 10px }
.lang { display: flex; padding: 4px; border-radius: 99px; border: 1px solid var(--ink-2) }
.lang button { min-width: 40px; height: 36px; border-radius: 99px; color: var(--fog); transition: background var(--t-fast), color var(--t-fast) }
.lang button[aria-pressed="true"] { background: var(--ink-2); color: var(--text) }
.site-top .lang button { height: 38px }   /* как переключатель на главной сайта */
.lang button:hover { color: var(--text) }

.site-foot { max-width: 1480px; margin: clamp(80px, 12vh, 140px) auto 0; padding: 0 var(--gut) 18px }
.foot-main { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--ink-2) }
.foot-title { font: 300 clamp(22px, 2.4vw, 36px)/1.1 var(--display); letter-spacing: -.03em; max-width: min(20ch, 100%) }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 18px; border-top: 1px solid var(--ink-2); color: #6d7175; text-transform: none; letter-spacing: .04em }

/* ---------- Вступление ---------- */
.intro { max-width: 1480px; margin: 0 auto; padding: clamp(48px, 9vh, 104px) var(--gut) clamp(28px, 4vh, 44px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: end }
.crumbs { grid-column: 1 / -1; color: var(--fog); margin-bottom: clamp(22px, 3vh, 34px) }
.crumbs a { display: inline-block; padding: 12px 2px; margin: -12px -2px; text-underline-offset: 4px; transition: color var(--t-fast) }   /* область нажатия 38 px при строке 14 px */
.crumbs a:hover { color: var(--text); text-decoration: underline }
.crumbs span[aria-hidden] { margin: 0 6px; color: var(--ink-3) }
h1 { grid-column: 1 / 8; font: 300 clamp(34px, 4.6vw, 76px)/1.02 var(--display); letter-spacing: -.035em }
.intro h1 { white-space: pre-line }   /* строки заголовка заданы в тексте (решение Карины), на узком экране переносятся дальше */
.intro-lead { grid-column: 8 / -1; color: var(--fog-2); font-size: 17px; max-width: 460px; justify-self: end }
.demo-note { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 12px; justify-self: start; margin-top: clamp(24px, 3vh, 36px);
  padding: 10px 18px 10px 14px; border-radius: 99px; border: 1px solid var(--ink-2); font-size: 14px; color: #c9cacb }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); flex: none }

/* ---------- Панель демо: экран в экране ---------- */
.app { position: relative; isolation: isolate; max-width: calc(1480px - 2 * var(--gut)); margin: 0 auto; margin-inline: max(var(--gut), calc((100vw - 1480px) / 2 + var(--gut)));
  border-radius: var(--r-xl); border: 1px solid rgba(255, 255, 255, .07); overflow: hidden;
  background: radial-gradient(120% 80% at 70% 0%, #1b1e21 0%, #131517 45%, #0f1011 100%);
  scroll-margin-top: var(--gut) }
@media (min-width: 1528px) { .app { margin-inline: auto } }
/* Один размер панели на всех шагах: иначе при переходе между шагами и во время конвейера
   панель меняла высоту и всё, что ниже, дёргалось. Шаги рассчитаны так, чтобы поместиться. */
@media (min-width: 901px) {
  .app { display: flex; flex-direction: column; min-height: 980px }   /* по самому высокому шагу — конвейеру из 8 этапов */
  .screen[data-step="4"] { padding-bottom: 24px }
  .screen { flex: 1 }
}
.app-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px var(--pad); border-bottom: 1px solid var(--ink-2) }
.app-flag { display: inline-flex; align-items: center; gap: 10px; color: var(--fog); white-space: nowrap }
.app-flag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ember) }

/* Шаги: пять капсул с линией прогресса под ними */
.stepper { position: relative; display: flex; gap: 4px; padding-bottom: 2px }
.stepper::after { content: ''; position: absolute; left: 0; right: 0; bottom: -19px; height: 1px; background: var(--ember); transform-origin: 0 50%;
  transform: scaleX(calc(var(--progress, 0) * .8 + .2)); transition: transform var(--t-slow) var(--ease-out) }
.st button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 6px; border-radius: 99px; color: var(--fog); transition: background var(--t-fast), color var(--t-fast) }
.st button:not(:disabled):hover { background: rgba(255, 255, 255, .05); color: var(--text) }
.st-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ink-3); font-size: 10px; letter-spacing: .04em }
.st-n .ic { width: 14px; height: 14px }
.st-name { font-size: 14px }
.st.is-current button { color: var(--text) }
.st.is-current .st-n { background: var(--paper); border-color: var(--paper); color: var(--text-dark) }
.st.is-done .st-n { border-color: var(--fog); color: var(--text) }
.st-mobile { display: none }

.screen { position: relative; padding: clamp(26px, 3.6vw, 52px) var(--pad) clamp(30px, 4vw, 56px) }
.screen.enter > * { animation: rise var(--t-slow) var(--ease-out) both }
.screen.enter > *:nth-child(2) { animation-delay: .06s }
.screen.enter > *:nth-child(3) { animation-delay: .12s }
.screen.enter > *:nth-child(4) { animation-delay: .18s }
@keyframes rise { from { opacity: 0; transform: translateY(16px) } }

.scr-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(22px, 3vw, 36px) }
.kick { color: var(--fog); margin-bottom: 12px }
h2 { font: 300 clamp(26px, 2.8vw, 44px)/1.05 var(--display); letter-spacing: -.03em }
h2:focus { outline: none }
h2:focus-visible { outline: 2px solid var(--ember) }

/* ---------- 1. Загрузка ---------- */
.drop { position: relative; display: grid; justify-items: center; align-content: center; gap: 14px; min-height: clamp(340px, 50vh, 520px); padding: 40px 24px; text-align: center;
  border-radius: var(--r-lg); border: 1px dashed var(--ink-3); background: rgba(255, 255, 255, .015); cursor: pointer;
  transition: border-color var(--t-mid), background var(--t-mid) }
.drop:hover, .drop.over { border-color: var(--fog); background: rgba(255, 255, 255, .035) }
.drop.over { border-color: var(--ember); border-style: solid }
.drop-ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--ink-3); margin-bottom: 6px; transition: transform var(--t-mid) var(--ease), border-color var(--t-mid) }
.drop-ic .ic { width: 28px; height: 28px; stroke-width: 1.2 }
.drop:hover .drop-ic, .drop.over .drop-ic { transform: translateY(-4px); border-color: var(--ember); color: var(--ember) }
.drop-title { font: 300 clamp(20px, 2vw, 28px)/1.2 var(--display); letter-spacing: -.02em }
.drop-or { color: var(--fog) }
.drop .pill { pointer-events: none }
.drop-hint { color: #6d7175; margin-top: 8px; letter-spacing: .06em; text-transform: none }
/* уголки кадра, как в видоискателе */
.drop-corner { position: absolute; width: 22px; height: 22px; border: 0 solid var(--fog); opacity: .7 }
.drop-corner.tl { top: 18px; left: 18px; border-top-width: 1px; border-left-width: 1px; border-top-left-radius: 8px }
.drop-corner.tr { top: 18px; right: 18px; border-top-width: 1px; border-right-width: 1px; border-top-right-radius: 8px }
.drop-corner.bl { bottom: 18px; left: 18px; border-bottom-width: 1px; border-left-width: 1px; border-bottom-left-radius: 8px }
.drop-corner.br { bottom: 18px; right: 18px; border-bottom-width: 1px; border-right-width: 1px; border-bottom-right-radius: 8px }

/* ---------- Окна ---------- */
dialog { color: var(--text); border: 0; padding: 0; background: none; max-width: none; max-height: none }
dialog::backdrop { background: rgba(8, 9, 10, .78); backdrop-filter: blur(6px) }
dialog[open] { animation: pop var(--t-mid) var(--ease-out) both }
dialog[open]::backdrop { animation: fade var(--t-mid) var(--ease) both }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98) } }
@keyframes fade { from { opacity: 0 } }
.modal { margin: auto; width: min(980px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto; overscroll-behavior: contain;
  padding: clamp(24px, 3.4vw, 48px); border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 120px;
  background: linear-gradient(180deg, #1d2023, #131517); border: 1px solid rgba(255, 255, 255, .09) }
.modal-sm { width: min(560px, calc(100vw - 24px)); border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 80px }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px }
.modal-head h2 { font-size: clamp(22px, 2.2vw, 32px) }
.modal-head > :first-child { min-width: 0 }   /* заголовок сжимается, кнопка «Закрыть» не уходит за край */
.modal-head > button { flex: none }
.modal-note { color: var(--fog-2); max-width: 560px; margin-bottom: 26px }
.modal-text { color: #c9cacb; font-size: 17px; margin-bottom: 28px }
.link-field { width: 100%; min-height: 48px; padding: 0 16px; margin-bottom: 22px; border-radius: var(--r-sm); border: 1px solid var(--ink-3); background: var(--ink-0); color: var(--text); font: 400 13px/1 var(--mono) }

.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px) }
.pick { position: relative; display: grid; gap: 14px; width: 100%; text-align: left; padding: 10px 10px 16px; border-radius: var(--r-lg); border: 1px solid var(--ink-2); background: rgba(255, 255, 255, .02);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-mid) var(--ease) }
.pick:hover { border-color: var(--fog); background: rgba(255, 255, 255, .04); transform: translateY(-3px) }
.pick-img { display: block; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--ink-2) }
.pick-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease) }
.pick:hover .pick-img img { transform: scale(1.03) }
.pick-meta { display: grid; gap: 2px; padding: 0 6px }
.pick-meta b { font: 400 17px/1.2 var(--display); letter-spacing: -.01em }
.pick-meta span { color: var(--fog); font-size: 14px }
.pick-tag { position: absolute; top: 20px; left: 20px; padding: 6px 10px; border-radius: 99px; background: rgba(12, 13, 14, .72); backdrop-filter: blur(8px); color: #c9cacb; font-size: 9px }

/* ---------- 2. Описание ---------- */
.desc { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 3vw, 44px); align-items: start }
.src { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-2); aspect-ratio: 3 / 4 }
.src img { width: 100%; height: 100%; object-fit: cover }
.src figcaption { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 99px;
  background: rgba(12, 13, 14, .72); backdrop-filter: blur(10px); color: #c9cacb; text-transform: none; letter-spacing: .04em }
.ok { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); color: var(--text-dark) }
.ok .ic { width: 12px; height: 12px; stroke-width: 2 }
.desc-field { display: grid; gap: 12px }
.field-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--fog) }
.ro { display: inline-flex; align-items: center; gap: 6px; color: var(--fog) }
.ro .ic { width: 14px; height: 14px }
textarea { width: 100%; min-height: clamp(260px, 42vh, 440px); resize: none; padding: 22px 24px; border-radius: var(--r-md); border: 1px solid var(--ink-2);
  background: rgba(0, 0, 0, .28); color: #c4c5c6; font: 300 15px/1.65 var(--body); cursor: not-allowed }
textarea:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px }
.field-note { display: flex; gap: 10px; color: var(--fog-2); font-size: 14px; max-width: 620px }
.field-note .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--fog) }
.desc-field .actions { margin-top: 14px }

/* ---------- 3. Настройки ---------- */
.cfg { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(22px, 3vw, 48px); align-items: start }
legend { color: var(--fog); margin-bottom: 14px }
.style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px }
.style { position: relative; display: grid; align-content: start; gap: 12px; padding: 8px 8px 14px; border-radius: var(--r-md); border: 1px solid var(--ink-2); cursor: pointer; text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast) }
.style:hover { border-color: var(--ink-3); background: rgba(255, 255, 255, .02) }
.style input { position: absolute; opacity: 0; pointer-events: none }
.style:has(input:checked) { border-color: var(--paper); background: rgba(255, 255, 255, .04) }
.style:has(input:focus-visible) { outline: 2px solid var(--ember); outline-offset: 3px }
.style-img { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--ink-2) }
.style-img img { width: 100%; height: 100%; object-fit: cover }
.style-meta { display: grid; gap: 4px; padding: 0 4px }
.style-meta b { font: 400 15px/1.2 var(--display); letter-spacing: -.01em }
.style-meta span { color: var(--fog); font-size: 13px; line-height: 1.45 }
.style-check { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); color: var(--text-dark);
  opacity: 0; transform: scale(.6); transition: opacity var(--t-fast), transform var(--t-mid) var(--ease-out) }
.style-check .ic { width: 14px; height: 14px; stroke-width: 2 }
.style:has(input:checked) .style-check { opacity: 1; transform: none }
.style-brand { border-style: dashed }
.style-brand .style-img { display: grid; place-items: center; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 10px, transparent 10px 20px) }
.brand-plus { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px dashed var(--ink-3); color: var(--fog) }
.style-brand .style-meta b { color: var(--fog-2) }
.style-brand .pick-tag { top: 16px; left: 16px }

.cfg-side { display: grid; gap: 28px }
.seg { display: flex; flex-wrap: wrap; gap: 6px }
.seg-item { position: relative }
.seg-item input { position: absolute; opacity: 0; pointer-events: none }
.seg-item span { display: inline-grid; place-items: center; min-width: 46px; min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--ink-3); font-size: 14px; color: #c9cacb; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast) }
.seg-item span:hover { border-color: var(--fog) }
.seg-item input:checked + span { background: var(--paper); border-color: var(--paper); color: var(--text-dark) }
.seg-item input:focus-visible + span { outline: 2px solid var(--ember); outline-offset: 3px }
.seg-count .seg-item span { min-width: 52px; font: 300 17px/1 var(--display) }
.seg-sm .seg-item span { min-height: 40px; min-width: 44px; padding: 0 14px; font-size: 13px }
.seg-off { display: inline-grid; place-items: center; min-height: 46px; padding: 0 14px; border-radius: 99px; border: 1px dashed var(--ink-2); color: #5d6064; font-size: 13px; cursor: not-allowed }
.cfg-note { color: #6d7175; margin-top: 10px; text-transform: none; letter-spacing: .04em }
.roles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; color: var(--fog) }
.roles .mono { margin-right: 4px }
.role { padding: 5px 11px; border-radius: 99px; font-size: 13px; border: 1px solid var(--ink-2); color: #5d6064; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .15);
  transition: color var(--t-fast), border-color var(--t-fast) }
.role.on { color: var(--text); border-color: var(--ink-3); text-decoration: none }
.launch { display: grid; gap: 14px; padding-top: 22px; border-top: 1px solid var(--ink-2) }
.launch-sum { font: 300 16px/1.3 var(--display); letter-spacing: -.01em }
.eta { color: var(--fog); text-transform: none; letter-spacing: .04em }

/* ---------- 4. Конвейер: все этапы на одном экране ---------- */
.screen[data-step="4"] .scr-head { margin-bottom: 18px }
.screen[data-step="4"] { padding-top: clamp(20px, 2.6vw, 36px) }
.clock { display: grid; justify-items: end; gap: 6px; color: var(--fog) }
.clock b { font: 200 clamp(36px, 4vw, 60px)/.9 var(--display); letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums }
.is-finished .clock span { color: var(--ember) }
.run-sum { color: var(--fog); margin: -10px 0 16px; text-transform: none; letter-spacing: .04em }
.stages { border-bottom: 1px solid var(--ink-2) }
/* Строка этапа — как строка таблицы: номер | название и зачем | результат | статус.
   Высота строки и ширина статуса постоянные, результат появляется в своей ячейке —
   поэтому, пока идёт конвейер, панель не меняет размер и ничего не прыгает. */
.stage { position: relative; display: grid; grid-template-columns: 40px minmax(0, 6fr) minmax(0, 6fr) 140px; column-gap: clamp(14px, 2vw, 28px); align-items: center;
  min-height: 78px; padding: 8px 0; border-top: 1px solid var(--ink-2); transition: background var(--t-mid) }
.stage-n { color: #5d6064; align-self: start; padding-top: 6px }
.stage-main { align-self: start; padding-top: 2px }
.stage-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px }
.stage-name b { font: 300 clamp(17px, 1.5vw, 21px)/1.2 var(--display); letter-spacing: -.02em; color: var(--fog); transition: color var(--t-mid) }
.stage-type { color: #5d6064; font-size: 9px }
.stage-desc { color: #6d7175; font-size: 13px; line-height: 1.4; margin-top: 2px; transition: color var(--t-mid) }
.stage-out { min-width: 0; display: flex; align-items: center; min-height: 56px }
.stage-side { display: grid; justify-items: end; gap: 4px }
.stage-cost { color: #4d5054; text-transform: none; letter-spacing: .04em; font-variant-numeric: tabular-nums }
.stage.is-run .stage-cost { color: var(--fog) }
.stage.is-done .stage-cost { color: var(--fog-2) }
.spent { color: var(--fog-2); text-transform: none; letter-spacing: .04em; font-variant-numeric: tabular-nums }
.stage-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: #5d6064; white-space: nowrap; font-variant-numeric: tabular-nums; justify-self: end }
.stage-status .ic { width: 14px; height: 14px; stroke-width: 2 }
.stage-bar { position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ember); transform-origin: 0 50%; transform: scaleX(var(--p)); opacity: 0 }
.stage.is-run { background: linear-gradient(90deg, rgba(255, 74, 18, .05), transparent 60%) }
.stage.is-run .stage-bar { opacity: 1 }
.stage.is-run .stage-n, .stage.is-run .stage-status { color: var(--ember) }
.stage.is-run .stage-name b { color: var(--text) }
.stage.is-run .stage-desc { color: var(--fog-2) }
.stage.is-done .stage-name b, .stage.is-skip .stage-name b { color: var(--text) }
.stage.is-done .stage-status { color: var(--text) }
.stage.is-skip .stage-status { color: var(--fog) }
.stage.is-done .stage-n, .stage.is-skip .stage-n { color: var(--fog) }
/* готовый этап «сворачивается» цветом, а не высотой: описание гаснет, результат остаётся */
.stage.is-done .stage-desc, .stage.is-skip .stage-desc { color: #4d5054 }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(255, 74, 18, .3); border-top-color: var(--ember); animation: spin .8s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }

.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--ink-3); font-size: 13px; color: #d4d5d6; animation: chip var(--t-mid) var(--ease-out) both }
.chips-num .mono { color: var(--fog); font-size: 10px }
@keyframes chip { from { opacity: 0; transform: translateY(6px) scale(.96) } }
.heads { display: flex; flex-wrap: wrap; gap: 6px 22px }
.heads li { display: flex; gap: 8px; align-items: baseline; font: 300 13px/1.35 var(--display); letter-spacing: -.01em; color: #d4d5d6; animation: chip var(--t-mid) var(--ease-out) both }
.heads .mono { color: var(--fog); font-size: 10px }
.thumbs { display: flex; gap: 8px }
.thumbs li { width: 42px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .03); border: 1px dashed var(--ink-3) }
.thumbs li.on { border: 0 }
.thumbs img { width: 100%; height: 100%; object-fit: cover; animation: develop 1.1s var(--ease) both }
/* сцена проявляется как снимок: из размытия и засветки */
@keyframes develop { from { opacity: 0; filter: blur(8px) brightness(1.6); transform: scale(1.06) } }
.ticks { display: flex; gap: 6px }
.ticks li { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ink-3); color: #5d6064; font: 400 9px/1 var(--mono) }
.ticks li.on { border-color: var(--paper); background: var(--paper); color: var(--text-dark) }
.ticks .ic { width: 13px; height: 13px; stroke-width: 2 }
.pass { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text) }
.pass .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--ember); color: #fff; stroke-width: 2.2 }
/* строка сводки сразу высотой с кнопку «Смотреть результат», чтобы её появление ничего не сдвигало */
.run-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; margin: -12px 0 10px }
.run-line .run-sum { margin: 0 }
.run-cost { color: var(--fog-2) }
/* выводы новых этапов */
.fields { display: grid; gap: 4px }
.fields li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: #d4d5d6; animation: chip var(--t-mid) var(--ease-out) both; min-width: 0 }
.fields li .mono { flex: none; width: 104px; color: var(--fog); font-size: 9px }
.fields li:first-child { font: 300 13px/1.35 var(--display) }
.pass-wrap { display: grid; gap: 8px }
.chips-sm li { padding: 3px 9px; font-size: 11px; color: var(--fog-2) }

/* ---------- 5. Результат ---------- */
.res-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; align-items: center }
.pill-sm { min-height: 40px; padding: 0 16px; font-size: 13px }
.gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px) }
.g-item { position: relative; animation: rise var(--t-slow) var(--ease-out) both }
.g-item:nth-child(2) { animation-delay: .05s } .g-item:nth-child(3) { animation-delay: .1s } .g-item:nth-child(4) { animation-delay: .15s } .g-item:nth-child(5) { animation-delay: .2s }
.g-open { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--ink-2); cursor: zoom-in; -webkit-touch-callout: none; user-select: none }
.g-open img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease), opacity var(--t-mid); -webkit-user-drag: none }
.g-item:hover .g-open img { transform: scale(1.025) }
.g-error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; text-align: center; font-size: 13px; color: var(--fog-2); background: var(--ink-1) }
.g-item .g-error { border-radius: var(--r-md); aspect-ratio: 3 / 4; inset: 0 0 auto }
.g-cap { display: flex; align-items: center; gap: 10px; padding: 10px 2px 0; font-size: 13px; color: #c9cacb }
.g-cap .mono { color: var(--fog) }
.g-more { margin-left: auto; border-color: transparent }
.g-acts { position: absolute; top: 10px; right: 10px; display: grid; gap: 6px; opacity: 0; transform: translateX(6px); transition: opacity var(--t-fast), transform var(--t-mid) var(--ease) }
.g-acts .icon-btn { background: rgba(12, 13, 14, .72); backdrop-filter: blur(10px); border-color: rgba(255, 255, 255, .12) }
.g-acts .icon-btn:hover { background: var(--paper); color: var(--text-dark); border-color: var(--paper) }
.g-acts .icon-btn[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: #fff }
.g-item:hover .g-acts, .g-item:focus-within .g-acts { opacity: 1; transform: none }
.g-item.is-scene .g-open { outline: 1px solid var(--ember); outline-offset: 3px }
.swipe-hint { display: none }

.res-actions { display: grid; grid-template-columns: auto 1fr; gap: 20px clamp(24px, 3vw, 44px); align-items: start; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink-2) }
.res-group { display: grid; gap: 10px }
.res-group > .mono { color: var(--fog) }
.tags { display: flex; flex-wrap: wrap; gap: 6px }
.tag { min-height: 44px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--ink-2); font-size: 13px; color: #c9cacb; transition: border-color var(--t-fast), color var(--t-fast) }
.tag:hover { border-color: var(--fog); color: var(--text) }
.screen[data-step="5"] { padding-bottom: 24px }

/* все кнопки блока одной высоты, подписи групп на одной линии */
.res-actions .pill { min-height: 44px }
.tag-icon { display: inline-grid; place-items: center; width: 44px; padding: 0 }
.tag-icon .brand { width: 18px; height: 18px; fill: currentColor }
.tag-icon:hover { color: var(--paper) }
.tags-sep { width: 1px; height: 28px; align-self: center; margin: 0 6px; background: var(--ink-3) }
.listing { display: grid; gap: 12px; padding: 18px 20px; margin-bottom: 22px; border-radius: var(--r-md); border: 1px solid var(--ink-2); background: rgba(0, 0, 0, .25); user-select: text }
.listing-title { font: 300 18px/1.3 var(--display); letter-spacing: -.01em }
.listing-desc { display: grid; gap: 10px; color: #c9cacb; font-size: 15px }
.listing-label { color: var(--fog); margin-top: 6px }
.listing .chips-sm li { animation: none }
.listing-attrs { display: grid; gap: 4px; font-size: 14px }
.listing-attrs div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .06) }
.listing-attrs dt { color: var(--fog) }

/* ---------- Как это устроено ---------- */
.modal-how { width: min(860px, calc(100vw - 24px)) }
.modal.modal-wide { width: min(780px, calc(100vw - 24px)) }
.how-steps { border-bottom: 1px solid var(--ink-2); margin-bottom: 26px }
.how-step { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(150px, 220px); gap: 6px 18px; align-items: start; padding: 14px 0; border-top: 1px solid var(--ink-2) }
.how-n { color: var(--ember); padding-top: 3px }
.how-name { font: 300 17px/1.25 var(--display); letter-spacing: -.01em; margin-bottom: 6px }
.how-io { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; color: var(--fog-2); font-size: 14px; line-height: 1.45 }
.how-io + .how-io { margin-top: 3px }
.how-io .mono { color: #6d7175; font-size: 9px; padding-top: 4px }
.how-who { justify-self: end; text-align: right; text-wrap: balance; font-size: 12px; line-height: 1.4; color: #c9cacb; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--ink-3) }
.how-rules-title { color: var(--fog); margin-bottom: 12px }
.how-rules { display: grid; gap: 10px; margin-bottom: 28px }
.how-rules li { position: relative; padding-left: 20px; color: var(--fog-2); font-size: 14px; line-height: 1.5 }
.how-rules b { font-weight: 500; color: var(--text) }
.how-rules li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--ember) }

/* ---------- Просмотр крупно ---------- */
.viewer { inset: 0; width: 100vw; height: 100svh; margin: 0; display: none; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(8, 9, 10, .96) }
.viewer[open] { display: grid }
.viewer::backdrop { background: transparent; backdrop-filter: none }
.v-top, .v-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 14px var(--pad) }
.v-count { color: var(--fog); min-width: 80px }
.v-stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 0 var(--pad); min-height: 0; touch-action: pan-y }
.v-fig { position: relative; justify-self: center; height: 100%; max-height: 100%; aspect-ratio: 3 / 4; max-width: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--ink-2) }
.v-fig img { width: 100%; height: 100%; object-fit: contain }
.v-fig.slide-l { animation: slideL var(--t-mid) var(--ease-out) }
.v-fig.slide-r { animation: slideR var(--t-mid) var(--ease-out) }
@keyframes slideL { from { opacity: 0; transform: translateX(24px) } }
@keyframes slideR { from { opacity: 0; transform: translateX(-24px) } }
.v-head { display: flex; gap: 14px; align-items: baseline; font: 300 18px/1.3 var(--display); letter-spacing: -.01em }
.v-head .mono { color: var(--fog); white-space: nowrap }
.v-acts { display: flex; flex-wrap: wrap; gap: 8px }
.v-acts .ic, .res-actions .ic { width: 16px; height: 16px }

/* ---------- Шторка ---------- */
.sheet { margin: auto auto 0; width: 100%; max-width: 560px; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: #1a1c1f; border: 1px solid rgba(255, 255, 255, .09); border-bottom: 0 }
.sheet[open] { animation: sheetUp var(--t-mid) var(--ease-out) both }
@keyframes sheetUp { from { transform: translateY(100%) } }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--ink-3); margin: 0 auto 16px }
.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px }
.sheet-head img { width: 48px; height: 64px; object-fit: cover; border-radius: 8px }
.sheet-head .mono { color: var(--fog); margin-bottom: 4px }
.sheet-head h2 { font-size: 17px }
.sheet-list button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 6px; border-top: 1px solid var(--ink-2); font-size: 15px; text-align: left }
.sheet-list small { margin-left: auto; color: var(--fog); text-transform: none }
.sheet-close { width: 100%; margin-top: 10px }

/* ---------- Подсказки ---------- */
.toast { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 200%); visibility: hidden; padding: 12px 20px; border-radius: 99px;
  background: var(--paper); color: var(--text-dark); transition: transform var(--t-mid) var(--ease), visibility 0s var(--t-mid) }
.toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform var(--t-mid) var(--ease) }
.after-demo { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1480px; margin: 0 auto; padding: 22px var(--gut) 0 calc(var(--gut) + var(--pad)) }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fog-2); font-size: 15px; transition: color var(--t-fast) }
.link-arrow i { font-style: normal; color: var(--ember); transition: transform var(--t-mid) var(--ease) }
.link-arrow:hover { color: var(--text) }
.link-arrow:hover i { transform: translate(2px, -2px) }
.fatal { color: var(--fog-2) }

/* ---------- Планшет ---------- */
@media (max-width: 1100px) {
  .cfg { grid-template-columns: 1fr }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .res-actions { grid-template-columns: 1fr }
  .st-name { display: none }
  .st button { padding: 0 6px }
  .st.is-current .st-name { display: inline }
  .st.is-current button { padding-right: 16px }
}
@media (max-width: 900px) {
  .site-nav { display: none }
  h1 { grid-column: 1 / -1 }
  .intro-lead { grid-column: 1 / -1; justify-self: start; margin-top: 18px }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .desc { grid-template-columns: minmax(0, 1fr) }
  .src { max-width: 320px; aspect-ratio: 4 / 3 }
}

/* ---------- Телефон: шаги один под другим, галерея листается свайпом, действия — шторкой ---------- */
@media (max-width: 640px) {
  :root { --pad: 18px; --r-xl: 28px; --r-lg: 22px }
  .site-top .pill { display: none }
  /* Unbounded широкий: на 390 px «маркетплейса» помещается только при ~25 px */
  h1 { font-size: clamp(22px, 6.4vw, 34px); line-height: 1.08 }
  .intro-lead { font-size: 16px }
  .demo-note { border-radius: var(--r-md); align-items: flex-start; font-size: 13px }
  .demo-note .dot { margin-top: 6px }
  .app { margin-inline: 10px; min-height: 0 }
  .app-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px var(--pad) 18px }
  .app-flag { order: -1; font-size: 9px }
  /* шаги — пять полосок; кликабельные (пройденные) получают зону нажатия 24 px */
  .stepper { gap: 6px; padding-bottom: 0; margin-bottom: 24px }
  .stepper > .st { flex: 1 }
  .st button { position: relative; width: 100%; min-height: 24px; height: 24px; padding: 0; border-radius: 0; background: none }
  .st button::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 99px; background: var(--ink-2) }
  .st.is-done button::before { background: var(--fog) }
  .st.is-current button::before { background: var(--ember) }
  .st button:not(:disabled):hover { background: none }
  .st .st-n, .st .st-name, .st.is-current .st-name { display: none }
  .st.is-current button { padding: 0 }
  .stepper::after { display: none }
  .st-mobile { display: block; position: absolute; left: 0; top: 100%; margin-top: 2px; color: var(--fog); font-size: 10px; white-space: nowrap }
  .scr-head { flex-direction: column; align-items: flex-start }
  .res-tools { justify-content: flex-start }
  .scr-head .kick { display: none }
  .drop { min-height: 360px }
  .drop-title { font-size: 19px }
  .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
  .pick { padding: 6px 6px 10px; gap: 8px }
  .pick-meta b { font-size: 13px }
  .pick-meta span { font-size: 12px }
  .pick-tag { position: static; justify-self: start; margin-left: 4px; font-size: 8px; padding: 4px 8px }
  .modal { border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 48px }
  .src { max-width: none; aspect-ratio: 16 / 10 }
  textarea { min-height: 300px; padding: 16px; font-size: 15px }
  .style-grid { gap: 8px }
  .style-meta span { font-size: 12px }
  .actions .pill { flex: 1 }
  .clock { justify-items: start; flex-direction: row }
  /* на телефоне ячейки идут столбиком, но место под результат и статус занято с самого начала */
  .stage { grid-template-columns: 30px minmax(0, 1fr); align-items: start; min-height: 0; padding: 12px 0 }
  .stage-out { grid-column: 2; margin-top: 10px; align-items: flex-start }
  .stage-out[data-kind="passport"], .stage-out[data-kind="storyboard"], .stage-out[data-kind="copy"] { min-height: 112px }
  .stage-out[data-kind="listing"] { min-height: 104px }
  .stage-out[data-kind="scenes"], .stage-out[data-kind="type"] { min-height: 72px }
  .stage-out[data-kind="check"] { min-height: 100px }
  .stage-side { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; gap: 14px; margin-top: 8px }
  .stage-status { min-height: 22px }
  .how-step { grid-template-columns: 28px minmax(0, 1fr) }
  .how-io + .how-io { margin-top: 6px }
  .listing-attrs div { grid-template-columns: 1fr; gap: 0 }
  .res-actions .res-group:first-child .pill { flex: 1 1 100% }
  .tags-sep { flex-basis: 100%; height: 0; margin: 2px 0 }
  .how-io { grid-template-columns: 1fr; gap: 0 }
  .how-io .mono { padding-top: 0; margin-bottom: 1px }
  .how-who { grid-column: 2; justify-self: start; text-align: left }
  .run-line { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; min-height: 76px; margin-top: -6px }
  .thumbs { gap: 6px }
  .thumbs li { width: calc((100% - 24px) / 5); max-width: 54px }
  .chips li { font-size: 12px; padding: 5px 10px }
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 6px }
  .g-item { flex: 0 0 72%; scroll-snap-align: center }
  .g-acts { display: none }
  .swipe-hint { display: block; color: #6d7175; margin-top: 10px; text-transform: none; letter-spacing: .04em }
  .v-stage { grid-template-columns: minmax(0, 1fr); padding: 0 12px }
  .v-nav { display: none }
  .v-top, .v-bottom { padding: 12px 14px }
  .v-acts .pill { flex: 1; padding: 0 14px }
  .v-acts .pill-line:last-child { display: none }
  .foot-meta { flex-direction: column }
  .after-demo { padding-left: var(--gut) }
}

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important }
  .spin { animation: none; border-color: var(--ember) }
}
.calm .screen.enter > *, .calm .chips li, .calm .heads li, .calm .thumbs img, .calm .g-item { animation: none }

/* Шапка на телефоне: высота переключателя языка как у кнопки «Написать» на главной сайта,
   иначе логотип сдвигается при переходе. Стоит в конце, чтобы правило высоты выше его не перебивало. */
@media (max-width: 760px) {
  .site-top .lang button { height: 30px }
}
