/* ФотоРолик: дизайн-система в одном файле.
   1) Токены (цвет, шрифт, отступы, радиусы, тени, движение). Меняйте значения только здесь.
   2) Основа и раскладка  3) Компоненты  4) Страницы  5) Адаптив */

/* ---------- 1. Токены ---------- */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* шкала размеров */
  --fs-12: 12px; --fs-13: 13px; --fs-15: 15px; --fs-17: 17px;
  --fs-21: 21px; --fs-28: 28px; --fs-40: 40px; --fs-56: 56px;

  /* цвета: светлая тема */
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --fill: #f5f5f7;
  --fill-strong: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --sep: rgba(0, 0, 0, .08);
  --sep-strong: rgba(0, 0, 0, .14);
  --nav-bg: rgba(251, 251, 253, .72);

  /* акцент: тёплый «липовый» оранжево-коричневый, белый текст на нём AA */
  --accent: #bf4800;
  --accent-hover: #a33d00;
  --accent-text: #b64500;
  --accent-tint: rgba(191, 72, 0, .08);
  --accent-tint-2: rgba(191, 72, 0, .14);
  --accent-ring: rgba(191, 72, 0, .22);
  --on-accent: #ffffff;

  /* семантика: только статусы */
  --green: #34c759; --green-text: #1b7a35; --green-tint: rgba(52, 199, 89, .14);
  --orange: #ff9f0a; --orange-text: #a35a00; --orange-tint: rgba(255, 159, 10, .16);
  --red: #ff3b30; --red-text: #c9150b; --red-tint: rgba(255, 59, 48, .1);

  /* отступы, сетка 8 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* форма */
  --r-sm: 8px; --r-field: 10px; --r-md: 12px; --r-card: 18px; --r-xl: 28px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --sh-3: 0 2px 6px rgba(0, 0, 0, .06), 0 24px 64px rgba(0, 0, 0, .16);

  /* движение */
  --ease: cubic-bezier(.25, .1, .25, 1);
  --dur: 200ms;

  --container: 1080px;
  --nav-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0b0b0c;
    --surface: #1c1c1e;
    --surface-2: #232325;
    --fill: #2c2c2e;
    --fill-strong: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --sep: rgba(255, 255, 255, .1);
    --sep-strong: rgba(255, 255, 255, .18);
    --nav-bg: rgba(22, 22, 23, .72);

    --accent: #c25000;
    --accent-hover: #ad4700;
    --accent-text: #ff9f5a;
    --accent-tint: rgba(255, 140, 60, .12);
    --accent-tint-2: rgba(255, 140, 60, .2);
    --accent-ring: rgba(255, 140, 60, .32);

    --green: #30d158; --green-text: #4ee07a; --green-tint: rgba(48, 209, 88, .16);
    --orange: #ff9f0a; --orange-text: #ffb340; --orange-tint: rgba(255, 159, 10, .18);
    --red: #ff453a; --red-text: #ff6961; --red-tint: rgba(255, 69, 58, .16);

    --sh-1: 0 0 0 1px rgba(255, 255, 255, .06);
    --sh-2: 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 24px rgba(0, 0, 0, .4);
    --sh-3: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 64px rgba(0, 0, 0, .6);
  }
}

/* ---------- 2. Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--s-4)); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: var(--fs-17);
  line-height: 1.47;
  letter-spacing: -.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--text); text-wrap: balance; }
.lead { text-wrap: pretty; }
b, strong { font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code {
  font-family: var(--font-mono);
  font-size: .88em;
  letter-spacing: 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--text);
}
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.icon { flex: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); border-radius: var(--r-sm); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
}
.skip-link:focus { top: var(--s-2); }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--s-5)); margin: 0 auto; padding: 0 var(--s-5); }
.page { padding-top: var(--s-8); padding-bottom: var(--s-9); }

/* Типографика */
.display { font-size: var(--fs-56); line-height: 1.07; letter-spacing: -.03em; font-weight: 700; }
.h1 { font-size: var(--fs-40); line-height: 1.1; letter-spacing: -.028em; }
.h2 { font-size: var(--fs-28); line-height: 1.14; letter-spacing: -.02em; }
.h3 { font-size: var(--fs-21); line-height: 1.19; letter-spacing: -.016em; }
.lead { font-size: var(--fs-21); line-height: 1.38; letter-spacing: -.016em; color: var(--text-2); }
.eyebrow { font-size: var(--fs-17); font-weight: 600; color: var(--accent-text); margin-bottom: var(--s-2); }

/* ---------- 3. Компоненты ---------- */

/* Верхняя панель */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--sep);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-size: var(--fs-17); font-weight: 600; letter-spacing: -.02em;
}
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: var(--s-1); }
.nav__links > a:not(.btn), .nav__sheet a {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 0 var(--s-3); border-radius: var(--r-pill);
  font-size: var(--fs-13); color: var(--text-2); letter-spacing: -.01em;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav__links > a[aria-current="page"] { color: var(--text); background: var(--fill); font-weight: 500; }
.nav__links .btn { margin-left: var(--s-2); }
.nav__menu { display: none; position: relative; }
.nav__menu summary {
  list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 44px; height: 44px; margin-right: -10px; border-radius: var(--r-pill); color: var(--text);
}
.nav__menu summary::-webkit-details-marker { display: none; }
.nav__sheet {
  position: absolute; right: -8px; top: calc(100% + 6px); min-width: 220px;
  display: flex; flex-direction: column; padding: var(--s-2);
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--sh-3);
}
.nav__sheet a { min-height: 44px; font-size: var(--fs-17); color: var(--text); border-radius: var(--r-sm); padding: 0 var(--s-3); }
.nav__sheet a:hover { background: var(--fill); text-decoration: none; }
.nav__sheet a[aria-current="page"] { color: var(--accent-text); font-weight: 500; }

/* Подвал: по той же колонке, что и контент */
.footer { border-top: 1px solid var(--sep); background: var(--bg); }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  padding-top: var(--s-5); padding-bottom: var(--s-5);
  font-size: var(--fs-13); color: var(--text-2);
}
.footer__brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 500; color: var(--text-2); }
.footer__links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer__links a { color: var(--text-2); }
.footer__links a:hover { color: var(--text); }

/* Кнопки */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 22px;
  border: 0; border-radius: var(--r-pill);
  font: inherit; font-size: var(--fs-17); font-weight: 500; letter-spacing: -.016em; line-height: 1;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--accent-tint); color: var(--accent-text); }
.btn-secondary:hover { background: var(--accent-tint-2); }
.btn-plain { background: transparent; color: var(--accent-text); padding: 0 var(--s-3); }
.btn-plain:hover { background: var(--accent-tint); }
.btn-lg { min-height: 52px; padding: 0 28px; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: var(--fs-13); }
.btn-nav { min-height: 28px; }
.btn-block { width: 100%; }
.nav .btn-sm { min-height: 28px; padding: 0 12px; font-size: var(--fs-12); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.actions--center { justify-content: center; }

/* Карточка */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-2);
}

/* Таблетки-статусы */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: var(--fs-13); font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  background: var(--fill); color: var(--text-2);
}
.pill-green { background: var(--green-tint); color: var(--green-text); }
.pill-orange { background: var(--orange-tint); color: var(--orange-text); }
.pill-red { background: var(--red-tint); color: var(--red-text); }
.pill-accent { background: var(--accent); color: var(--on-accent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.4s var(--ease) infinite; }

/* Поля */
.input {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 48px; padding: 0 var(--s-4);
  font: inherit; font-size: var(--fs-17); color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-field);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:hover { background: var(--fill-strong); }
.input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: var(--s-3); }
.field + .field { margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--sep); }
.field__label { padding: 0; font-size: var(--fs-17); font-weight: 600; color: var(--text); }
legend.field__label { float: left; width: 100%; margin-bottom: var(--s-3); }
legend.field__label + * { clear: both; }
.optional { font-weight: 400; color: var(--text-3); margin-left: var(--s-1); }
.field__hint { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--fs-13); color: var(--text-2); }
.field__hint .icon { margin-top: 1px; color: var(--text-3); }
.field__hint--split { justify-content: space-between; }
legend + .tiles, legend + .segmented { margin-top: 0; }

/* Сообщения */
.alert {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: 14px var(--s-4); border-radius: var(--r-md);
  font-size: var(--fs-15); margin-bottom: var(--s-5);
}
.alert .icon { margin-top: 1px; }
.alert-error { background: var(--red-tint); color: var(--red-text); }

/* Индикаторы ожидания */
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff;
  animation: spin .9s linear infinite;
}
.spinner--sm { width: 22px; height: 22px; border-width: 2px; border-color: var(--sep-strong); border-top-color: var(--text-2); }

/* Пустое состояние */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2);
  padding: var(--s-8) var(--s-5);
}
.empty__icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--s-2);
  border-radius: var(--r-pill); background: var(--fill); color: var(--text-2);
}
.empty__title { font-size: var(--fs-21); font-weight: 600; }
.empty__text { color: var(--text-2); max-width: 360px; margin-bottom: var(--s-3); }

/* Заголовок страницы и блоки */
.page-head { margin-bottom: var(--s-7); max-width: 720px; }
.page-head .lead { margin-top: var(--s-3); }
.page-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); }
.page-head--center { margin-left: auto; margin-right: auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.page-head__icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--s-5);
  border-radius: var(--r-card); background: var(--accent-tint); color: var(--accent-text);
}
.block { margin-top: var(--s-8); }
.block > .h2, .block__head { margin-bottom: var(--s-5); }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.block__head .h2 { margin: 0; }
.block__meta { font-size: var(--fs-13); color: var(--text-2); }
.hint { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); font-size: var(--fs-13); color: var(--text-2); }

/* Плитки-метрики */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-5); min-height: 168px; }
.stat__icon {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: auto;
  border-radius: 10px; background: var(--accent-tint); color: var(--accent-text);
}
.stat__icon--red { background: var(--red-tint); color: var(--red-text); }
.stat__label { margin-top: var(--s-5); font-size: var(--fs-15); color: var(--text-2); }
.stat__value { font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -.028em; }
.stat__sub { color: var(--text-3); font-weight: 500; }
.stat__hint { font-size: var(--fs-15); color: var(--text-2); }
.stat--action .btn { margin-top: var(--s-2); align-self: flex-start; }

/* Таблица */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-card); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.table th {
  position: sticky; top: 0;
  padding: 14px var(--s-4); text-align: left; white-space: nowrap;
  font-size: var(--fs-13); font-weight: 500; color: var(--text-2);
  background: var(--surface-2); border-bottom: 1px solid var(--sep);
}
.table td { padding: 14px var(--s-4); border-bottom: 1px solid var(--sep); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--fill); }
.table th:first-child, .table td:first-child { padding-left: var(--s-5); }
.table th:last-child, .table td:last-child { padding-right: var(--s-5); }
.cell-error { min-width: 200px; max-width: 280px; color: var(--red-text); font-size: var(--fs-13); }
.table-empty { text-align: center; color: var(--text-2); padding: var(--s-7) !important; }

/* Сегментированный выбор */
.segmented {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
  padding: 3px; border-radius: var(--r-md); background: var(--fill);
}
.segmented__item { position: relative; cursor: pointer; }
.segmented__body {
  display: flex; align-items: center; gap: var(--s-3);
  min-height: 56px; height: 100%; padding: var(--s-2) var(--s-3); border-radius: 9px;
  color: var(--text-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.segmented__item:hover .segmented__body { color: var(--text); }
.segmented input:checked + .segmented__body {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 3px 8px rgba(0, 0, 0, .08);
}
.segmented input:focus-visible + .segmented__body { box-shadow: 0 0 0 4px var(--accent-ring); }
.segmented__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.segmented__text b { font-size: var(--fs-15); font-weight: 600; }
.segmented__text small { font-size: var(--fs-12); color: var(--text-2); }
.ratio {
  flex: none; height: 24px; aspect-ratio: var(--r); max-width: 32px; max-height: 24px;
  border: 1.5px solid currentColor; border-radius: 4px;
}
.segmented input:checked + .segmented__body .ratio { border-color: var(--accent-text); background: var(--accent-tint); }

/* Плитки выбора (радио) */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.tile { position: relative; cursor: pointer; }
.tile__body {
  position: relative; display: flex; flex-direction: column; gap: var(--s-1); height: 100%;
  padding: var(--s-4); border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--sep-strong);
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.tile:hover .tile__body { box-shadow: inset 0 0 0 1px var(--text-3); }
.tile input:checked + .tile__body { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.tile input:focus-visible + .tile__body { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-ring); }
.tile__icon { color: var(--text-2); margin-bottom: var(--s-2); }
.tile input:checked + .tile__body .tile__icon { color: var(--accent-text); }
.tile__title { font-size: var(--fs-15); font-weight: 600; }
.tile__text { font-size: var(--fs-13); line-height: 1.38; color: var(--text-2); }
.tile__check {
  position: absolute; top: var(--s-3); right: var(--s-3);
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--sep-strong); color: transparent;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tile input:checked + .tile__body .tile__check { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* Зона загрузки файлов вместо браузерной кнопки */
.dropzone {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-1);
  padding: var(--s-6) var(--s-5); cursor: pointer;
  border-radius: var(--r-md); background: var(--fill);
  border: 1.5px dashed var(--sep-strong);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-tint); }
.dropzone:focus-within { box-shadow: 0 0 0 4px var(--accent-ring); border-color: var(--accent); }
.dropzone.has-files { padding: var(--s-4) var(--s-5); }
.dropzone__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: var(--s-2);
  border-radius: var(--r-md); background: var(--surface); color: var(--accent-text); box-shadow: var(--sh-1);
}
.dropzone.has-files .dropzone__icon { display: none; }
.dropzone__title { font-size: var(--fs-17); font-weight: 600; color: var(--text); }
.dropzone__hint { font-size: var(--fs-13); color: var(--text-2); }
.dropzone__btn { margin-top: var(--s-3); pointer-events: none; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); }
.thumbs li { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--fill); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs__num {
  position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center; border-radius: var(--r-pill);
  font-size: var(--fs-12); font-weight: 600; font-variant-numeric: tabular-nums;
  color: #fff; background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* Список-группа (как в настройках iOS) */
.list-group { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-2); overflow: hidden; }
.list-group li { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); }
.list-group li + li { border-top: 1px solid var(--sep); }
.list-group b { display: block; font-size: var(--fs-17); }
.list-group p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-15); }
.list-group__icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: var(--accent-tint); color: var(--accent-text);
}

/* Метаданные (dl) */
.meta { display: flex; flex-direction: column; }
.meta > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--sep); }
.meta dt { color: var(--text-2); font-size: var(--fs-15); }
.meta dd { margin: 0; font-size: var(--fs-15); font-weight: 500; text-align: right; }

/* ---------- 4. Страницы ---------- */

/* Лендинг */
.page-landing { background: var(--bg-alt); }
.hero { padding: var(--s-9) 0 var(--s-9); background: var(--bg-alt); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-8); align-items: center; }
.hero__copy .display { margin-bottom: var(--s-5); max-width: 600px; }
.hero__copy .lead { max-width: 560px; margin-bottom: var(--s-6); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); font-size: var(--fs-15); color: var(--text-2); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts .icon { color: var(--green-text); }
.hero__media { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.hero__caption { font-size: var(--fs-13); color: var(--text-2); }

/* «Телефон» с примером */
.device {
  position: relative; width: 300px;
  padding: 10px; border-radius: 48px;
  background: #1d1d1f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 0 0 4px #2a2a2c, var(--sh-3);
}
.device__screen { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 38px; background: #000; }
.hero__bar { display: flex; align-items: center; gap: var(--s-3); }
.play-toggle {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--text); background: var(--fill);
  transition: background-color var(--dur) var(--ease);
}
.play-toggle:hover { background: var(--fill-strong); }
.play-toggle:focus-visible { border-radius: 50%; }
.play-toggle .i-play, .is-paused .play-toggle .i-pause { display: none; }
.is-paused .play-toggle .i-play { display: block; }

.section { padding: var(--s-10) 0; background: var(--bg-alt); }
.section--alt { background: var(--bg); }
.section__head { max-width: 760px; margin-bottom: var(--s-7); }
.section__head .lead { margin-top: var(--s-4); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }

.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.photo { margin: 0; }
.photo img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--r-card); background: var(--fill-strong); box-shadow: var(--sh-2);
}
.photo figcaption { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); font-size: var(--fs-13); color: var(--text-2); }
.photo figcaption .num {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--sh-1); font-weight: 600; font-size: var(--fs-12); color: var(--text);
}

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.step { padding: var(--s-6); background: var(--bg); box-shadow: none; }
.step__icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--s-6);
  border-radius: 14px; background: var(--surface); color: var(--accent-text); box-shadow: var(--sh-1);
}
.step__num { display: block; font-size: var(--fs-13); font-weight: 500; color: var(--text-2); margin-bottom: var(--s-1); }
.step .h3 { margin-bottom: var(--s-2); }
.step p { color: var(--text-2); font-size: var(--fs-17); }

.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.price { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: var(--s-6); }
.price--best { box-shadow: inset 0 0 0 2px var(--accent), var(--sh-2); }
.price__badge { position: absolute; top: var(--s-5); right: var(--s-5); }
.price__title { font-size: var(--fs-17); font-weight: 600; color: var(--text); }
.price__sum { margin-top: var(--s-5); font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -.028em; }
.price__rate { margin-top: var(--s-2); font-size: var(--fs-15); color: var(--text-2); }
.price .btn { margin-top: var(--s-6); }

.cta { text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta .lead { margin: var(--s-3) 0 var(--s-6); }

/* Демо: форма + живой предпросмотр */
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-5); align-items: start; }
.form-card { padding: var(--s-6); }
.form-foot { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--sep); }
.form-foot__note { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-13); color: var(--text-2); }
.preview { position: sticky; top: calc(var(--nav-h) + var(--s-5)); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.preview__head { display: flex; align-items: center; justify-content: space-between; }
.preview__label { font-size: var(--fs-15); font-weight: 600; }
.preview__stage {
  display: grid; place-items: center; height: 400px; border-radius: var(--r-md);
  background: var(--fill);
}
.preview__frame {
  position: relative; overflow: hidden;
  aspect-ratio: var(--r);
  width: min(100% - 32px, calc(368px * var(--r)));
  border-radius: 14px; background: #1d1d1f; box-shadow: var(--sh-2);
  transition: width 250ms var(--ease);
}
.preview__frame img { width: 100%; height: 100%; object-fit: cover; }
.preview__empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  padding: var(--s-4); text-align: center; font-size: var(--fs-13); color: rgba(255, 255, 255, .6);
}
.preview__caption {
  position: absolute; left: 8%; right: 8%; top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 8px; text-align: center;
  font-size: var(--fs-15); font-weight: 600; line-height: 1.25; color: #fff;
  background: rgba(0, 0, 0, .45); overflow-wrap: anywhere;
}

/* Монтаж и готовый ролик: кадр и панель статуса одной композицией по центру */
.job-grid {
  display: grid; grid-template-columns: auto 340px; justify-content: center;
  gap: var(--s-6); align-items: stretch;
}
.job-grid--wide { grid-template-columns: minmax(0, 1fr) 340px; }
.stage { display: flex; justify-content: center; align-items: flex-start; min-width: 0; }
.frame {
  display: block; aspect-ratio: var(--r);
  height: clamp(480px, 100vh - 300px, 720px); width: auto; max-width: 100%;
  border-radius: var(--r-card); background: #000; box-shadow: var(--sh-3);
}
.job-grid--wide .frame { width: 100%; height: auto; }
.render {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  padding: var(--s-6); text-align: center; color: #fff;
  background: radial-gradient(120% 80% at 50% 0%, #3a2a20 0%, #1d1d1f 60%);
}
.render .spinner { margin-bottom: var(--s-4); }
.render__title { font-size: var(--fs-21); font-weight: 600; color: #fff; }
.render__text { max-width: 260px; font-size: var(--fs-15); color: rgba(255, 255, 255, .72); }
.render__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.render__bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent-text), transparent);
  animation: slide 1.6s var(--ease) infinite;
}
.render--failed { background: #1d1d1f; }
.render__icon { color: #ff6961; margin-bottom: var(--s-3); }
.job-page .page-head { margin-bottom: var(--s-6); }
.job-side { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); }
.job-side .meta { margin-top: var(--s-1); }
.job-side .meta > div:last-child { border-bottom: 1px solid var(--sep); }
.job-side__head { display: flex; align-items: center; justify-content: space-between; }
.job-side__label { font-size: var(--fs-15); font-weight: 600; }
.job-side__actions { display: flex; flex-direction: column; gap: var(--s-3); margin-top: auto; }
.job-side__note { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-13); color: var(--text-2); }
.progress { display: flex; flex-direction: column; gap: 0; }
.progress li { position: relative; display: flex; gap: var(--s-3); align-items: flex-start; padding: 0 0 var(--s-4); font-size: var(--fs-15); color: var(--text-2); }
.progress li:last-child { padding-bottom: 0; }
.progress li:not(:last-child)::before {
  content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--sep);
}
.progress li.is-done:not(:last-child)::before { background: var(--green); }
.progress__mark {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--sep-strong); color: #fff;
}
.progress li > span:last-child { padding-top: 1px; }
.progress .is-done { color: var(--text); }
.progress .is-done .progress__mark { background: var(--green); box-shadow: none; }
.progress .is-active { color: var(--text); font-weight: 500; }
.progress .is-active .progress__mark { box-shadow: inset 0 0 0 2px var(--accent); }
.progress .is-active .progress__mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s var(--ease) infinite; }
.progress .is-failed { color: var(--red-text); }
.progress .is-failed .progress__mark { background: var(--red); box-shadow: none; }

/* Кабинет: ролики */
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-4); }
.job { overflow: hidden; display: flex; flex-direction: column; }
.job__media {
  display: grid; place-items: center; height: 360px; padding: var(--s-4);
  background: var(--fill);
}
.job__media video {
  aspect-ratio: var(--r); width: min(100%, calc(328px * var(--r)));
  border-radius: var(--r-md); background: #000; box-shadow: var(--sh-2);
}
.job__placeholder { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); font-size: var(--fs-15); color: var(--text-2); }
.job__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-5); }
.job__row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.job__title { font-size: var(--fs-17); font-weight: 600; }
.job__meta { font-size: var(--fs-13); color: var(--text-2); }
.job__caption { font-size: var(--fs-15); }
.job__body .btn { margin-top: var(--s-2); }

/* Админка */
.search-card { padding: var(--s-5); }
.search { display: flex; gap: var(--s-3); max-width: 560px; }
.search__field { position: relative; flex: 1; display: flex; align-items: center; }
.search__field .icon { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; }
.search__field .input { padding-left: 42px; }
.search .btn { min-height: 48px; }
.user-found { display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: var(--s-6); margin: var(--s-5) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--sep); }
.user-found dt { font-size: var(--fs-13); color: var(--text-2); }
.user-found dd { margin: 2px 0 0; font-size: var(--fs-17); font-weight: 500; }
.search-empty { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); font-size: var(--fs-15); color: var(--text-2); }

/* Вход */
.auth { min-height: calc(100vh - var(--nav-h) - 260px); display: grid; place-items: center; }
.auth__card { width: 100%; max-width: 420px; padding: var(--s-7) var(--s-6) var(--s-6); text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth__icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--s-5);
  border-radius: var(--r-card); background: var(--accent-tint); color: var(--accent-text);
}
.auth__icon--muted { background: var(--fill); color: var(--text-2); }
.auth__text { margin: var(--s-3) 0 var(--s-6); color: var(--text-2); font-size: var(--fs-15); }
.auth__form { width: 100%; display: flex; flex-direction: column; gap: var(--s-3); }
.auth .alert { width: 100%; text-align: left; margin: calc(-1 * var(--s-3)) 0 var(--s-4); }

/* Приватность */
.prose-page { max-width: 720px; margin: 0 auto; }
.callout { display: flex; gap: var(--s-4); align-items: flex-start; margin-top: var(--s-5); padding: var(--s-5); }
.callout__icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: var(--red-tint); color: var(--red-text);
}
.callout b { display: block; }
.callout p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-15); }

/* ---------- Анимации ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes slide { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spinner { animation: spin 2.4s linear infinite !important; }
}

/* ---------- 5. Адаптив ---------- */
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-6); }
  .device { width: 280px; }
  .display { font-size: 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-grid, .job-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .tiles { grid-template-columns: 1fr; }
  .tile__body { flex-direction: row; align-items: center; gap: var(--s-3); padding-right: var(--s-7); }
  .tile__icon { margin: 0; }
  .tile__title { min-width: 140px; }
  .tile__check { top: 50%; transform: translateY(-50%); }
  .user-found { grid-template-columns: repeat(3, minmax(0, auto)); }
}

@media (max-width: 833px) {
  :root { --fs-56: 40px; --fs-40: 32px; --fs-28: 24px; --fs-21: 19px; }
  .display { font-size: var(--fs-56); }
  .container { padding: 0 var(--s-4); }
  .page { padding-top: var(--s-6); padding-bottom: var(--s-8); }
  .page-head { margin-bottom: var(--s-6); }
  .hero { padding: var(--s-7) 0 var(--s-8); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero__copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .actions { justify-content: center; }
  .facts { justify-content: center; }
  .section { padding: var(--s-8) 0; }
  .section__head { margin-bottom: var(--s-6); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .steps { grid-template-columns: 1fr; gap: var(--s-3); }
  .step { padding: var(--s-5); display: grid; grid-template-columns: 48px 1fr; column-gap: var(--s-4); }
  .step__icon { grid-row: span 3; margin: 0; }
  .demo-grid, .job-grid { grid-template-columns: 1fr; }
  .preview { display: none; }
  .job-grid { gap: var(--s-5); }
  .frame { height: auto; width: min(100%, calc(min(70vh, 640px) * var(--r))); }
}

@media (max-width: 599px) {
  .nav__links { display: none; }
  .nav__menu { display: block; }
  .actions .btn { width: 100%; }
  .stats, .stats--3 { grid-template-columns: 1fr 1fr; gap: var(--s-3); }
  .stats--3 .stat--action { grid-column: 1 / -1; }
  .stat { min-height: 0; padding: var(--s-4); }
  .stat__label { margin-top: var(--s-4); font-size: var(--fs-13); }
  .stat__value { font-size: var(--fs-28); }
  .form-card { padding: var(--s-5) var(--s-4); }
  .segmented { grid-template-columns: 1fr; }
  .segmented__body { min-height: 48px; }
  .tile__title { min-width: 0; }
  .tile__body { flex-wrap: wrap; }
  .tile__text { flex-basis: 100%; padding-left: 34px; margin-top: -4px; }
  .form-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .form-foot .btn { width: 100%; }
  .form-foot__note { justify-content: center; }
  .page-head--row { align-items: center; }
  .block { margin-top: var(--s-7); }
  .search { flex-direction: column; max-width: none; }
  .user-found { grid-template-columns: 1fr 1fr; gap: var(--s-4); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .price { padding: var(--s-5); }
  .auth__card { padding: var(--s-6) var(--s-5) var(--s-5); }
  .job__media { height: 320px; }
}
