/* Тема Nexlor — шлях гостя (`CORE-021`): каталог на `/`, вхід CORE-019, логін порталу,
   кінець демо. Підключається поверх `styles.css` лише на цих сторінках (клас
   `theme-nexlor` на `body`); адмінка її не бачить.

   Значення — з `design/handoff/tokens/tokens.css` (сайт v29): світле тло, темна шапка,
   бурштиновий акцент. Правила порталу лишаються ті самі — тема перевизначає їхні токени
   і додає своє. Кольори — лише в блоці токенів нижче, як і в `styles.css`.

   Шрифти свої, з `fonts/`, як і Plex (DESIGN-001, 4.3): Unbounded і Geologica — змінні
   (Fontsource 5.3.0), підмножини кирилиця, латиниця, розширена латиниця. Ліцензії —
   `fonts/OFL-unbounded.txt`, `fonts/OFL-geologica.txt`. IBM Plex Mono — уже є. */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic-wght.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-latin-ext-wght.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-latin-wght.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geologica-cyrillic-wght.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geologica-latin-ext-wght.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geologica-latin-wght.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Токени ------------------------------------------------------------------ */

.theme-nexlor {
  /* Токени порталу — значеннями сайту (світлий блок). */
  --bg: #edefef;
  --surface: #ffffff;
  --surface-2: #f6f7f7;
  --line: #d5dadb;
  --ink: #14171a;
  --ink-soft: #2a3035;
  --ink-muted: #5a6368;
  --ink-faint: #7b8388;
  --ink-disabled: #9aa1a5;
  --accent: #c98a2b;
  --accent-ink: #1a1206;
  --button-hover: #d89a3c;
  --link-hover: #6b430a;
  --danger-line: #d9b1aa;
  --danger-bg: #fbefed;
  --danger-ink: #9a3b2f;
  --danger-hover-line: #c48f86;
  --danger-hover-ink: #7d2f25;
  --warn-line: #e4c48c;
  --warn-bg: #fbf3e4;
  --warn-ink: #8a570e;
  --warn-note: #8a6a2e;

  /* Свої. */
  --nx-acc-ink: #8a570e;
  --nx-acc-soft: rgba(201, 138, 43, 0.14);
  --nx-ok: #2f7a4a;
  --nx-ok-soft: #e6f2ea;
  --nx-shadow: rgba(18, 26, 30, 0.1);
  --nx-card-shadow: 0 2px 4px rgba(18, 26, 30, 0.07), 0 18px 44px -18px rgba(18, 26, 30, 0.34);
  --nx-card-shadow-hover: 0 3px 6px rgba(18, 26, 30, 0.08), 0 26px 56px -20px rgba(18, 26, 30, 0.42);
  --nx-frame: #1a1b1d;
  --nx-dk-bg: #111213;
  --nx-dk-line: #2c2e31;
  --nx-dk-ink: #eceae6;
  --nx-dk-mut: #a5a7aa;

  --font-sans: 'Geologica', 'Segoe UI', system-ui, sans-serif;
  --nx-font-disp: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --nx-ease: cubic-bezier(0.2, 0, 0, 1);
  --nx-pill: 999px;
  --nx-card: 16px;
  --radius: 10px;

  font-weight: 300;
  color-scheme: light;
}

/* Посилання на світлому — темнішим бурштином: світлий на білому не читається. */
/* Нульова вагомість, як у `styles.css`: кнопка-посилання лишається кнопкою. */
:where(.theme-nexlor a) {
  color: var(--nx-acc-ink);
}

.theme-nexlor h1,
.theme-nexlor h2,
.theme-nexlor .card__title,
.theme-nexlor .panel__title {
  font-family: var(--nx-font-disp);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

/* Шапка — темна, як на сайті ---------------------------------------------- */

.theme-nexlor .header {
  /* Вертикаль менша, ніж була: цілі дотику тепер самі 44 px заввишки (`FIX-039`, Д1). */
  padding: 0.5rem 1.75rem;
  background: var(--nx-dk-bg);
  border-bottom-color: var(--nx-dk-line);
}

.header__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.header__logo img {
  display: block;
  height: 25px;
  width: auto;
}

.theme-nexlor .langs__item {
  /* Ціль дотику ≥ 44 × 44 (`FIX-039`, QA-013 Д1): було 38 × 33. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-color: var(--nx-dk-line);
  border-radius: var(--nx-pill);
  color: var(--nx-dk-mut);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
}

.theme-nexlor .langs__item:hover {
  border-color: var(--accent);
  color: var(--nx-dk-ink);
}

.theme-nexlor .langs__item.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* «Вхід за запрошенням» — малопомітно (рішення 2). */
.header__invite {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--nx-dk-mut);
  font-size: 0.85rem;
  text-decoration: none;
}

.theme-nexlor .header__invite:hover,
.theme-nexlor .header__user {
  color: var(--nx-dk-ink);
}

.theme-nexlor .header .button--quiet {
  min-height: 44px;
  border-color: var(--nx-dk-line);
  color: var(--nx-dk-mut);
}

/* Кнопки й поверхні ------------------------------------------------------- */

.theme-nexlor .button {
  padding: 0.8rem 1.3rem;
  border-radius: var(--nx-pill);
  font-family: var(--nx-font-disp);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--nx-ease);
}

.theme-nexlor .button--quiet {
  padding: 0.35rem 0.8rem;
  font-family: inherit;
  font-weight: 400;
}

/* Друга дія поруч із головною — контуром, щоб бурштин лишався за головною. */
.theme-nexlor .button--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.theme-nexlor .button--outline:hover {
  background: var(--surface-2);
  border-color: var(--ink);
  color: var(--ink);
}

.theme-nexlor .card,
.theme-nexlor .panel {
  border-radius: var(--nx-card);
  box-shadow: var(--nx-card-shadow);
}

.theme-nexlor .field__input {
  background: var(--surface-2);
  border-radius: var(--radius);
}

.theme-nexlor .footer {
  padding: 0.7rem 1.25rem;
  border-top-color: var(--line);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* Каталог ------------------------------------------------------------------- */

.theme-nexlor .main:has(.catalog) {
  align-items: flex-start;
  padding: 3rem 1.75rem 4rem;
}

.catalog {
  width: 100%;
  max-width: 100rem;
}

.catalog__head {
  max-width: 46rem;
  margin-bottom: 2.25rem;
}

.catalog__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Фірмова крапка перед надзаголовком. */
.catalog__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.catalog__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
}

.catalog__dot {
  color: var(--accent);
}

.catalog__lead {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.catalog__soon {
  margin: 1.25rem 0 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-ink);
}

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

.catalog__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.offer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--nx-card);
  box-shadow: var(--nx-card-shadow);
  scroll-margin: 1.5rem;
}

/* Обрана на сайті — рамкою акценту й позначкою (рішення 3). */
.offer.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Одна рамка для світлих і темних кадрів (§4.1): темне поле навколо, кадр — угорі. */
.offer__frame {
  padding: 0.75rem 0.75rem 0;
  background: var(--nx-frame);
}

.offer__shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-radius: 8px 8px 0 0;
  background: var(--surface-2);
}

.offer__shot--none {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.offer__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem 1.5rem 1.5rem;
}

.offer__picked {
  align-self: flex-start;
  margin: 0;
  padding: 0.2rem 0.65rem;
  border-radius: var(--nx-pill);
  background: var(--nx-acc-soft);
  color: var(--nx-acc-ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.offer__title {
  margin: 0;
  font-size: 1.25rem;
}

.offer__text {
  margin: 0;
  color: var(--ink-soft);
}

.offer__state {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.offer__state::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-disabled);
}

.offer__state[data-state='open']::before {
  background: var(--nx-ok);
}

.offer__state[data-state='busy'] {
  color: var(--warn-ink);
}

.offer__state[data-state='busy']::before {
  background: var(--accent);
}

.offer__langs {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* Кнопка — унизу картки, щоб у сусідніх картках вони стояли на одній лінії. */
.offer__go {
  align-self: flex-start;
  margin-top: auto;
}

.offer__body > :nth-last-child(2) {
  margin-bottom: 0.9rem;
}

.theme-nexlor .button.is-disabled,
.theme-nexlor .button.is-disabled:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.catalog__help {
  margin: 2rem 0 0;
  color: var(--ink-muted);
}

/* Телефон: один стовпчик, кадр зверху, кнопка на всю ширину (рішення 8). */
@media (max-width: 45rem) {
  .theme-nexlor .header {
    padding: 0.8rem 1rem;
  }

  .theme-nexlor .main:has(.catalog) {
    padding: 2rem 1rem 3rem;
  }

  .catalog__cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .offer__body {
    padding: 1.2rem 1.1rem 1.25rem;
  }

  .offer__go {
    align-self: stretch;
    text-align: center;
  }
}

/* «Дякуємо» — рамкою кольору «гаразд», не поломки. */
.theme-nexlor .alert--success {
  border-color: var(--nx-ok);
  background: var(--nx-ok-soft);
  color: var(--ink);
}

/* «Усі місця зайняті»: форма контакту під автоповтором (`CORE-022`) ------------ */

.wait-contact {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.wait-contact__title {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
}

.wait-contact__form .button {
  align-self: flex-start;
}

/* Фінальний екран (`CORE-022`) ------------------------------------------------ */

.finale__tried {
  margin: 0.4rem 0 1.5rem;
  color: var(--ink-muted);
}

.finale__talk {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--nx-card);
  background: var(--surface-2);
}

.finale__photo {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.finale__title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.finale__lead {
  margin: 0;
  color: var(--ink-soft);
}

.finale__next {
  margin-top: 1.5rem;
}

.finale__wiped {
  margin: 1.5rem 0 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

@media (max-width: 36rem) {
  .finale__talk {
    flex-direction: column;
  }

  .finale__photo {
    width: 72px;
    height: 72px;
  }

  .finale .actions .button {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* Каталог за макетом v17 (`CORE-025`) ----------------------------------------------------------
   Перенесено з макета (`design/demo-catalog/`, nexlor.css, раунди 1–7 і 9–12) без змін, крім
   заглушки відео; своє для стенду — у кінці розділу. Екрани після «Відкрити демо» — CORE-026. */

/* Раунд 1 макета (Влад, 28.10) ------------------------------------------------ */

/* Фон — як світлі блоки сайту v15: трикутна сітка (canvas з geo-light.js), без світлових ліній. */
.theme-nexlor .main {
  position: relative;
  isolation: isolate;
}

.nx-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.nx-grid img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
}

/* Верх: заголовок → головне речення більшим → подробиці меншим. */
.catalog__head {
  max-width: 52rem;
}

.catalog__title {
  margin: 0 0 1.25rem;
}

.catalog__intro {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 400;
  line-height: 1.35;
}

.catalog__lead {
  font-size: 1rem;
  text-wrap: pretty;
}

/* Низ: картка з Дмитром — помітніше за рядок тексту. */
.catalog__help {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 3rem 0 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--nx-card);
  background: var(--surface);
  box-shadow: var(--nx-card-shadow);
}

.catalog__help-ava {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.catalog__help-text {
  min-width: 0;
}

.catalog__help-q {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-family: var(--nx-font-disp);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.catalog__help-who {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  text-wrap: pretty;
}

.catalog__help-go {
  flex: none;
  margin-left: auto;
}

@media (max-width: 45rem) {
  .catalog__help {
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.25rem;
    padding: 1.25rem 1.1rem;
  }

  .catalog__help-ava {
    width: 56px;
    height: 56px;
  }

  .catalog__help-text {
    flex: 1;
  }

  .catalog__help-go {
    flex: 1 1 100%;
    margin-left: 0;
    text-align: center;
  }
}

/* Раунд 2 макета (Влад, 28.10): відео на картках, два стани сторінки --------- */

/* Сітки карток: 4 в ряд (усі системи) і 3 в ряд (інші). */
.cg {
  display: grid;
  gap: 1.25rem;
}

.cg--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cv {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--nx-card);
  background: var(--surface);
  box-shadow: var(--nx-card-shadow);
  cursor: pointer;
  transition: transform 0.25s var(--nx-ease), box-shadow 0.25s var(--nx-ease), border-color 0.25s var(--nx-ease);
}

.cv__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--nx-frame);
  cursor: pointer;
}

.cv__frame:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.cv__shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  transition: transform 0.5s var(--nx-ease);
}

/* Затемнення під кнопкою «▶» — з'являється при наведенні. */
.cv__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 19, 0.32);
  opacity: 0;
  transition: opacity 0.2s var(--nx-ease);
}

.cv__play {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.2s var(--nx-ease), transform 0.25s var(--nx-ease);
}

.cv__play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Тривалість — видно завжди, щоб було ясно: тут відео. */
.cv__dur {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: var(--nx-pill);
  background: rgba(17, 18, 19, 0.78);
  color: #fff;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.cv__dur svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

@media (hover: hover) {
  .cv:hover {
    border-color: #c3c9cb;
    box-shadow: var(--nx-card-shadow-hover);
    transform: translateY(-3px);
  }

  .cv:hover .cv__frame::after,
  .cv:hover .cv__play {
    opacity: 1;
  }

  .cv:hover .cv__play {
    transform: translate(-50%, -50%) scale(1);
  }

  .cv:hover .cv__shot {
    transform: scale(1.035);
  }
}

/* Телефон і планшет без наведення: «▶» видно одразу. */
@media (hover: none) {
  .cv__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.9);
  }
}

.cv:focus-within .cv__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cv__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.05rem 1.1rem 1.15rem;
}

.cv__title {
  margin: 0;
  font-size: 1.05rem;
}

.cv__text {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.cg--4 .cv__text {
  min-height: 2.9em; /* 2 рядки — кнопки в сусідніх картках на одній лінії */
}

.cv__body .offer__state {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.85rem;
}

.theme-nexlor .cv__go {
  align-self: stretch;
  margin-top: auto;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--ink);
  font-size: 0.92rem;
  text-align: center;
  transition: background-color 0.2s var(--nx-ease), color 0.2s var(--nx-ease);
}

@media (hover: hover) and (pointer: fine) {
  .theme-nexlor .cv:hover .cv__go,
  .theme-nexlor .cv__go:hover {
    background: var(--accent);
    color: var(--accent-ink);
  }
}

/* Стан «обрана система»: ліворуч відео + опис + кнопка, праворуч — інші системи й Дмитро. */
.theme-nexlor .main:has(.catalog[data-state='one']) {
  padding-top: 0.5rem;
  padding-bottom: 1.25rem;
}

.cs-wrap {
  /* ширина відео — щоб відео + назва + кнопка вмістились в один екран */
  --vw: min(66rem, max(34rem, calc((100svh - 21rem) * 1.6)));
  display: grid;
  grid-template-columns: minmax(0, var(--vw)) minmax(18rem, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.cs-wrap > .cs {
  min-width: 0;
}

.cs__back {
  margin: 0 0 0.35rem;
}

.cs__back a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  color: var(--ink-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.cs__back a:hover {
  color: var(--ink);
}

.vp-wrap {
  position: relative;
}

.vp {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--nx-card);
  background: var(--nx-frame);
  box-shadow: 0 40px 80px -48px rgba(18, 26, 30, 0.7);
  color: #fff;
}

.vp:fullscreen {
  border-radius: 0;
}

.vp__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: var(--nx-frame);
  cursor: pointer;
}

.vp__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  opacity: 0;
  transition: opacity 0.6s var(--nx-ease);
  will-change: transform;
}

.vp__shot.is-on {
  opacity: 1;
}

.vp.is-init .vp__shot {
  transition: none;
}

/* Кільце на місці, про яке розповідають у цьому розділі відео. */
.vp__ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(201, 138, 43, 0.22), 0 0 30px rgba(201, 138, 43, 0.45);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.35s var(--nx-ease), transform 0.45s var(--nx-ease);
  pointer-events: none;
}

.vp__ring.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.vp__sub {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: max-content;
  max-width: min(calc(100% - 24px), 44rem);
  margin: 0;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: rgba(17, 18, 19, 0.84);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.3s var(--nx-ease), transform 0.3s var(--nx-ease);
  pointer-events: none;
}

.vp__sub.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.vp__sub.is-top {
  top: 14px;
  bottom: auto;
}

.vp.is-paused + .vp__sub,
.vp.is-paused .vp__ring {
  opacity: 0;
}

.vp__big {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  place-items: center;
  width: 84px;
  height: 60px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.vp__big svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.vp.is-paused .vp__big {
  display: grid;
}

.vp.is-paused .vp__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 19, 0.3);
}

.vp__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 2.5rem 0.6rem 0.35rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6) 38%, rgba(0, 0, 0, 0.88));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.vp__btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

@media (hover: hover) {
  .vp__btn:hover {
    background: rgba(255, 255, 255, 0.14);
  }
}

.vp__btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.vp__btn:focus-visible,
.vp__big:focus-visible,
.vp__track:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.vp__track {
  position: relative;
  flex: 1;
  height: 44px;
  margin: 0 0.4rem;
  cursor: pointer;
}

.vp__track::before,
.vp__fill {
  position: absolute;
  top: 20px;
  height: 4px;
}

.vp__track::before {
  content: '';
  left: 0;
  right: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.vp__fill {
  left: 0;
  width: 100%;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.vp__time {
  flex: none;
  margin-right: 0.25rem;
  color: #fff;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.vp__time b {
  color: #fff;
  font-weight: 500;
}

/* Відео й опис під ним — одна картка, як плеєр: темний кадр зверху, біла панель знизу. */
.cs {
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--nx-card);
  background: var(--surface);
  box-shadow: var(--nx-card-shadow);
}

.cs .vp {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Панель під відео: зверху мітка й назва ліворуч, кнопка праворуч; нижче — опис і три факти на всю ширину. */
.cs__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'main go' 'more go';
  gap: 0.35rem 2rem;
  align-items: center;
  padding: 0.95rem 1.25rem 1.05rem 1.4rem;
}

.cs__main {
  grid-area: main;
  min-width: 0;
}

.cs__go {
  grid-area: go;
  align-self: center;
}

.cs__more {
  grid-area: more;
  min-width: 0;
}

.cs__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--nx-acc-ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cs__tag svg {
  flex: none;
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.theme-nexlor .cs__title {
  margin: 0.3rem 0 0;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  text-wrap: balance;
}

.cs__text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.cs__go {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
}

.cs__go .offer__state {
  margin: 0;
  font-size: 0.85rem;
}

.theme-nexlor .cs__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.95rem 1.6rem 0.95rem 1.9rem;
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: 0 12px 26px -14px rgba(201, 138, 43, 0.9);
  transition: background-color 0.2s var(--nx-ease), transform 0.16s cubic-bezier(0.23, 1, 0.32, 1);
}

.cs__cta svg {
  flex: none;
  width: 18px;
  height: 18px;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .cs__cta:hover svg {
    transform: translateX(3px);
  }
}

.theme-nexlor .cs__cta:active {
  transform: scale(0.97);
}

/* Три факти під кнопкою: окрема копія · 60 хвилин · без реєстрації */
.cs__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
  list-style: none;
}

.cs__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.cs__facts svg {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--nx-ok);
}

/* Колонка праворуч: «Інші системи» — рядки «відео + назва», під ними Дмитро. */
.cs-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  container-type: inline-size;
}

.theme-nexlor .cs-side__h {
  margin: 0;
  color: var(--ink-soft);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cs-side__list {
  display: grid;
  flex: 1;
  grid-auto-rows: minmax(5.5rem, 1fr);
  gap: 0.75rem;
}

.cv--row {
  display: grid;
  grid-template-columns: 46% minmax(0, 1fr);
}

.cv--row .cv__frame {
  height: 100%;
  aspect-ratio: auto;
}

.cv--row .cv__shot {
  position: absolute;
  inset: 0;
  object-position: 30% 0;
}

.cv--row .cv__play {
  width: 46px;
  height: 34px;
  border-radius: 11px;
}

.cv--row .cv__play svg {
  width: 18px;
  height: 18px;
}

.cv--row .cv__dur {
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
}

.cv--row .cv__body {
  justify-content: center;
  gap: 0.3rem;
  padding: 0.8rem 0.95rem 0.85rem;
}

.theme-nexlor .cv--row .cv__title {
  font-size: 0.95rem;
  overflow-wrap: normal;
  hyphens: none;
}

.cv--row .cv__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  text-wrap: pretty;
}

.cv--row .offer__state {
  margin: 0;
  font-size: 0.78rem;
}

.cv__watch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  color: var(--nx-acc-ink);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.cv__watch svg {
  flex: none;
  width: 12px;
  height: 12px;
  fill: currentColor;
}

@media (hover: hover) {
  .cv--row:hover {
    transform: translateX(-3px);
  }
}

/* Дмитро у колонці — компактно: фото + питання, кнопка на всю ширину. */
.catalog__help--side {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 0.85rem;
  margin: 0.5rem 0 0;
  padding: 1rem 1.1rem 1.1rem;
}

.catalog__help--side .catalog__help-ava {
  width: 48px;
  height: 48px;
}

.theme-nexlor .catalog__help--side .catalog__help-q {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.catalog__help--side .catalog__help-who {
  font-size: 0.82rem;
  line-height: 1.35;
}

.catalog__help--side .catalog__help-go {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
}

.theme-nexlor .catalog__help--side .catalog__help-go {
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--nx-acc-ink);
}

.theme-nexlor .catalog__help--side .catalog__help-go:hover {
  background: var(--nx-acc-soft);
  color: var(--nx-acc-ink);
}

/* Перехід між станами (View Transitions) — «плавна зміна» (Влад обрав варіант 1, 28.10).
   Нічого не їде по сторінці. Шапка й підвал стоять на місці. Нова сторінка проявляється поверх старої
   (стара гасне повільніше — без сірого «провалу» посередині). */
:root {
  --vt-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.theme-nexlor .header {
  view-transition-name: nx-header;
}

.theme-nexlor .footer {
  view-transition-name: nx-footer;
}

::view-transition-old(*),
::view-transition-new(*) {
  mix-blend-mode: normal;
}

/* шапка й підвал однакові в обох станах — без анімації */
::view-transition-group(nx-header),
::view-transition-group(nx-footer),
::view-transition-old(nx-header),
::view-transition-new(nx-header),
::view-transition-old(nx-footer),
::view-transition-new(nx-footer) {
  animation: none;
}

::view-transition-old(root) {
  animation: vt-fade-out 340ms linear both;
}

::view-transition-new(root) {
  animation: vt-fade-in 260ms var(--vt-out) both;
}

@keyframes vt-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 68rem) {
  .cg--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Невисокий екран ноутбука (720–800 px): колонка праворуч не довша за відео з описом. */
@media (max-height: 50rem) and (min-width: 56.01rem) {
  .catalog__help--side .catalog__help-who {
    display: none;
  }

  .catalog__help--side {
    align-items: center;
  }

  /* колонка широка — Дмитро одним рядком: фото, питання, кнопка */
  @container (min-width: 26rem) {
    .catalog__help--side {
      display: flex;
      gap: 0.75rem;
      padding: 0.75rem 0.9rem;
    }

    .catalog__help--side .catalog__help-ava {
      width: 40px;
      height: 40px;
    }

    .theme-nexlor .catalog__help--side .catalog__help-q {
      margin: 0;
      font-size: 0.92rem;
    }

    .theme-nexlor .catalog__help--side .catalog__help-go {
      flex: none;
      margin-left: auto;
      padding: 0.6rem 1rem;
    }
  }
}

/* Вузька колонка (1024): у рядках — лише назва й «Дивитися відео». */
@container (max-width: 21rem) {
  .cv--row {
    grid-template-columns: 36% minmax(0, 1fr);
  }

  .cv--row .cv__text {
    display: none;
  }

  .theme-nexlor .cv--row .cv__title {
    font-size: 0.88rem;
  }
}

/* Широка колонка: кадр вужчий — опису більше місця. */
@container (min-width: 26rem) {
  .cv--row {
    grid-template-columns: 40% minmax(0, 1fr);
  }
}

/* Планшет: колонка «Інші системи» — під відео, три картки в ряд. */
@media (max-width: 56rem) {
  .cs-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .cs-side__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cs-side .cv--row {
    display: flex;
  }

  .cs-side__list {
    grid-auto-rows: auto;
  }

  .cs-side .cv--row .cv__frame {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .cs-side .cv--row .cv__body {
    justify-content: flex-start;
  }

  .cs-side .cv--row .cv__watch {
    margin-top: auto;
  }

  .catalog__help--side {
    display: flex;
    margin-top: 1rem;
    padding: 1.5rem 1.75rem;
  }

  .catalog__help--side .catalog__help-ava {
    width: 64px;
    height: 64px;
  }

  .theme-nexlor .catalog__help--side .catalog__help-q {
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  }

  .catalog__help--side .catalog__help-who {
    font-size: 0.95rem;
  }

  .catalog__help--side .catalog__help-go {
    margin-left: auto;
  }
}

/* Телефон ------------------------------------------------------------------ */
@media (max-width: 45rem) {
  .cg--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .cg--4 .cv__go {
    align-self: stretch;
    text-align: center;
  }

  .cs-side__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .cs-side .cv--row {
    display: grid;
  }

  .cs-side .cv--row {
    grid-template-columns: 40% minmax(0, 1fr);
    min-height: 6.5rem;
  }

  .cs-side .cv--row .cv__frame {
    height: 100%;
    aspect-ratio: auto;
  }

  .cs-side .cv--row .cv__text {
    display: none;
  }

  .cs-side .cv--row .cv__body {
    justify-content: center;
  }

  .cs-side .cv--row .cv__watch {
    margin-top: 0.35rem;
  }

  .catalog__help--side {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.1rem;
  }

  .catalog__help--side .catalog__help-ava {
    width: 56px;
    height: 56px;
  }

  .catalog__help--side .catalog__help-text {
    flex: 1;
  }

  .catalog__help--side .catalog__help-go {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .vp {
    border-radius: 12px;
  }

  .vp__sub,
  .vp__sub.is-on,
  .vp.is-paused + .vp__sub {
    position: static;
    width: auto;
    max-width: none;
    min-height: 2.8em;
    margin: 0.55rem 0 0;
    padding: 0 0 0 0.75rem;
    border-left: 2px solid var(--accent);
    border-radius: 0;
    background: none;
    color: var(--ink-soft);
    font-size: 0.88rem;
    text-align: left;
    opacity: 1;
    transform: none;
  }

  .vp__ring {
    width: 44px;
    height: 44px;
  }

  .vp__bar {
    gap: 0;
    padding: 1.4rem 0.2rem 0;
  }

  .vp__time {
    font-size: 0.75rem;
  }

  .vp__big {
    width: 64px;
    height: 46px;
  }

  .cs__info {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'main' 'go' 'more';
    gap: 0.75rem;
    padding: 0.9rem 1rem 1rem;
  }

  .vp__sub,
  .vp__sub.is-on,
  .vp.is-paused + .vp__sub {
    margin: 0.75rem 1rem 0;
  }

  .cs__go {
    align-items: stretch;
    min-width: 0;
    max-width: none;
  }

  .cs__text {
    min-height: 0;
  }
}

/* Дуже вузький телефон: звуку в заглушці немає — кнопку звуку ховаємо, смузі більше місця. */
@media (max-width: 22.5rem) {
  [data-vp-mute] {
    display: none;
  }

}

/* Телефон горизонтально: відео ліворуч, праворуч назва й кнопка; інші системи — рядом нижче на всю ширину. */
@media (max-height: 500px) and (max-width: 960px) {
  .theme-nexlor .header {
    padding-block: 0.5rem;
  }

  .cg--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-wrap {
    --vw: calc((100svh - 8.5rem) * 1.6);
    grid-template-columns: minmax(0, var(--vw)) minmax(0, 1fr);
    grid-template-areas: 'vp info' 'side side';
    gap: 1.25rem;
    align-items: start;
  }

  .cs-wrap > .cs {
    display: contents;
  }

  .vp-wrap {
    grid-area: vp;
  }

  .vp {
    border-radius: 12px;
  }

  .cs__info {
    grid-area: info;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'main' 'more' 'go';
    gap: 0.4rem;
    margin: 0;
    padding: 0;
  }

  .theme-nexlor .cs__title {
    font-size: 1.25rem;
  }

  .cs__text {
    min-height: 0;
    font-size: 0.9rem;
  }

  .cs__go {
    align-items: stretch;
    min-width: 0;
    max-width: none;
  }

  .cs-side {
    grid-area: side;
  }

  .cs-side__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .cs-side .cv--row {
    display: flex;
  }

  .cs-side .cv--row .cv__frame {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .cs-side .cv--row .cv__body {
    justify-content: flex-start;
  }

  .cs-side .cv--row .cv__text {
    display: none;
  }

  .catalog__help--side {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
  }

  .catalog__help--side .catalog__help-go {
    margin-left: auto;
  }

  .vp__sub {
    bottom: 50px;
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
  }

  .vp__ring {
    width: 44px;
    height: 44px;
  }

  .vp__bar {
    gap: 0;
    padding: 1.4rem 0.2rem 0;
  }

  .vp__time {
    font-size: 0.75rem;
  }

  .vp__big {
    width: 64px;
    height: 46px;
  }
}

/* Раунд 4 макета (Влад, 28.10): на ноутбуці сторінка вміщається в один екран, без прокрутки --- */

/* Рядок про Дмитра — під картками. */
.catalog[data-state='all'] .ah {
  margin-top: 1.75rem;
}

@media (min-width: 56.01rem) and (min-height: 32rem) {
  .theme-nexlor .main:has(.catalog[data-state='all']) {
    align-items: center;
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }

  /* Заголовок, картки на всю решту висоти екрана, під ними — рядок про Дмитра. */
  .catalog[data-state='all'] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: 'head' 'cards' 'help';
    gap: 1.75rem;
    /* екран мінус шапка, підвал і відступи */
    max-height: max(26rem, calc(100svh - 10.5rem));
  }

  .catalog[data-state='all'] .catalog__head {
    grid-area: head;
    align-self: end;
    margin: 0;
  }

  .catalog[data-state='all'] .ah {
    grid-area: help;
    margin: 0;
  }

  .catalog[data-state='all'] .cg--4 {
    grid-area: cards;
    grid-auto-rows: minmax(0, 1fr);
    min-height: 0;
  }

  /* Невисокий екран — кадр картки нижчий (обрізається), текст і кнопка завжди цілі. */
  .cg--4 .cv {
    min-height: 0;
  }

  .cg--4 .cv__frame {
    flex: 0 1 auto;
    min-height: 6.5rem;
  }

  .cg--4 .cv__body {
    flex: 1 0 auto;
  }
}

/* Колонка праворуч не влазить у висоту відео з описом — лише назви, Дмитро без підпису. */
.cs-wrap.is-tight .cv--row .cv__text,
.cs-wrap.is-tight .ah__who {
  display: none;
}

.cs-wrap.is-short .cs__text {
  display: none;
}

.cs-wrap.is-short .cs__facts {
  margin-top: 0;
}

/* Раунд 5–6 макета (Влад, 28.10): «Напишіть Дмитру» — текстом з фото й підписом (обрано варіант 5, трохи більший) */

.ah {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.15rem;
  line-height: 1.4;
}

.ah__t {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  text-wrap: pretty;
}

/* посилання: темний текст, бурштинове підкреслення; при наведенні — темніший бурштин */
.theme-nexlor .ah__link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-skip-ink: none; /* суцільна лінія і під «у», «р» — Safari інакше рве її пунктиром */
  transition: text-decoration-color 0.2s var(--nx-ease), color 0.2s var(--nx-ease);
}

@media (hover: hover) and (pointer: fine) {
  .theme-nexlor .ah__link:hover {
    color: var(--nx-acc-ink);
    text-decoration-color: var(--nx-acc-ink);
  }
}

.ah__ava {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
}

.ah__ava img {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

/* зелена крапка «на зв'язку» — як у кружку Дмитра на сайті */
.ah__ava i {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--nx-ok);
}

.ah__who {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* у колонці «Інші системи» — трохи менше, бо колонка вужча */
.cs-side .ah {
  margin-top: auto;
  padding: 0.5rem 0.25rem 0;
  font-size: 1.05rem;
}

.cs-side .ah__ava {
  width: 48px;
  height: 48px;
}

.cs-side .ah__who {
  font-size: 0.86rem;
}

@media (max-width: 45rem) {
  .ah {
    font-size: 1.02rem;
  }

  .ah__ava {
    width: 48px;
    height: 48px;
  }
}


/* Вузький плеєр (невисокий ноутбук): опис і факти — на всю ширину під назвою й кнопкою. */
@container (min-width: 30rem) and (max-width: 44rem) {
  .cs__info {
    grid-template-areas: 'main go' 'more more';
  }

  .cs__go {
    align-self: end;
  }
}

/* Раунд 7 макета (Влад, 28.10): заставка на відео перед стартом — видно, що відео змінилось ---------- */
.vp__intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: clamp(1.25rem, 4%, 2.5rem);
  background: linear-gradient(200deg, rgba(17, 18, 19, 0.35), rgba(17, 18, 19, 0.88) 70%);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--nx-ease), visibility 0s linear 0.35s;
  pointer-events: none;
}

.vp.is-intro .vp__intro {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s var(--nx-ease);
}

.vp__intro-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--acc-d, #e4aa55);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vp__intro-tag svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.vp__intro-title {
  margin: 0;
  font-family: var(--nx-font-disp);
  font-size: clamp(1.5rem, 3.4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* смужка відліку: 1,4 с до старту */
.vp__intro-bar {
  position: relative;
  width: min(12rem, 40%);
  height: 3px;
  margin-top: 0.6rem;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}

.vp__intro-bar i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.vp.is-intro.is-count .vp__intro-bar i {
  animation: vp-count 1.4s linear forwards;
  will-change: transform;
}

@keyframes vp-count {
  to {
    transform: scaleX(1);
  }
}

/* під час заставки підпис і кільце не показуємо, велику ▶ теж */
.vp-wrap .vp.is-intro + .vp__sub,
.vp-wrap .vp.is-intro .vp__ring,
.vp-wrap .vp.is-intro .vp__big {
  opacity: 0;
}

.vp.is-intro .vp__media::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .vp.is-intro .vp__intro-bar i {
    animation: none;
    transform: scaleX(1);
  }
}

@media (max-width: 45rem) {
  .vp__intro {
    padding: 1rem;
  }

  .vp__intro-title {
    font-size: 1.35rem;
  }

  .vp__intro-tag {
    font-size: 0.7rem;
  }
}

.vp__bar {
  transition: opacity 0.3s var(--nx-ease);
}

.vp.is-intro .vp__bar {
  opacity: 0;
}


/* Раунд 9 макета (29.10): «Переглянути ще раз» */
/* Кінець відео: «↺ Переглянути ще раз» словами, а не лише значком */
.vp__big.is-replay {
  display: none;
  gap: 0.55rem;
  grid-auto-flow: column;
  width: auto;
  height: 54px;
  padding: 0 1.4rem 0 1.15rem;
  border-radius: 999px;
  font: 500 0.95rem/1 var(--nx-font-disp);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.vp.is-paused .vp__big.is-replay {
  display: grid;
}

.vp__big.is-replay svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 45rem) {
  .vp__big.is-replay {
    height: 44px;
    padding: 0 1.1rem 0 0.9rem;
    font-size: 0.85rem;
  }
}

/* велика кнопка — над затемненням паузи (раніше затемнення лягало й на неї, кнопка виглядала тьмяною) */
.vp__big {
  z-index: 3;
}


/* Раунд 10 (Влад, 29.10) */

/* велика кнопка на відео (▶ / «Переглянути ще раз») поводиться як кнопка */
.vp__big {
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.2s var(--nx-ease), box-shadow 0.2s var(--nx-ease);
}

.vp__big svg {
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .vp__big:hover {
    background: #d89a3c;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75), 0 0 0 6px rgba(201, 138, 43, 0.25);
    transform: translate(-50%, -50%) scale(1.05);
  }

  /* значок повтору робить пів-оберту назад, ▶ трохи зсувається вперед */
  .vp__big.is-replay:hover svg {
    transform: rotate(-200deg);
  }

  .vp__big:not(.is-replay):hover svg {
    transform: translateX(2px);
  }
}

.vp__big:active {
  transform: translate(-50%, -50%) scale(0.97);
}

.vp__big:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* три факти під відео: якщо не влазять в один рядок — переносяться акуратно */
.cs__facts li {
  white-space: normal;
}

/* Раунд 11 макета (29.10): виправлення за перевіркою агентів --------------------------------------- */

/* фокус з клавіатури видно скрізь (на бурштині й на темному — біле кільце) */
.theme-nexlor :focus-visible,
.sb :focus-visible {
  outline: 2px solid var(--nx-acc-ink);
  outline-offset: 3px;
}

.theme-nexlor .header :focus-visible,
.sb :focus-visible,
.theme-nexlor .button--primary:focus-visible,
.vp :focus-visible {
  outline-color: #fff;
}

.fx__title:focus,
.cs__title:focus,
.catalog__title:focus {
  outline: none;
}

/* шапка на широкому екрані — по краях вмісту (до 100 rem) */
@media (min-width: 103.5rem) {
  .theme-nexlor .header {
    padding-inline: calc((100vw - 100rem) / 2);
  }
}

.theme-nexlor .langs {
  gap: 8px;
}

/* заставка відео: панель керування не фокусується й не видима */
.vp.is-intro .vp__bar {
  visibility: hidden;
}

/* «на весь екран» — разом із підписом */
.vp-wrap:fullscreen {
  display: grid;
  place-items: center;
  background: #000;
}

.vp-wrap:fullscreen .vp {
  width: min(100vw, calc(100vh * 1.6));
  border-radius: 0;
}

/* «Переглянути ще раз» — одразу бурштинова; при наведенні лише трохи світлішає (раунд 12: без обертання значка, збільшення й обвідки) */
@media (hover: hover) and (pointer: fine) {
  .vp__big.is-replay:hover {
    background: #d89a3c;
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%);
  }

  .vp__big.is-replay:hover svg {
    transform: none;
  }
}

/* невисокий ноутбук (is-short): опис ховаємо, а три факти лишаємо */
.cs-wrap.is-short .cs__facts {
  display: flex;
}

/* вузька бічна колонка (1024): у рядку Дмитра — лише посилання й коротко */
@container (max-width: 20rem) {
  .cs-side .ah__q {
    display: none;
  }
}

.fx__talk p,
.fx__text,
.cv__text,
.cs__text {
  text-wrap: pretty;
}

@media (max-width: 45rem) {
  /* текстові посилання — зона дотику 44 px */
  .theme-nexlor .ah__link,
  [data-cat-back] {
    display: inline-block;
    padding-block: 10px;
  }
}

/* раунд 12: невисокий ноутбук (1366×640, 1280×720) — факти на всю ширину під назвою й кнопкою, а не вузьким стовпчиком */
.cs-wrap.is-short .cs__info {
  grid-template-areas: 'main go' 'more more';
}

.cs-wrap.is-short .cs__tag {
  display: none;
}

.cs-wrap.is-short .cs__title {
  font-size: 1.6rem;
}
/* Своє для стенду (`CORE-025`): обидва стани рендерить сервер, видно один. Обгортка стану
   прозора для сітки — правила макета чекають заголовок, картки й Дмитра прямо в `.catalog`. */
.catalog > [data-view] {
  display: contents;
}

.catalog [hidden] {
  display: none !important;
}

/* Відео ще немає — лише знімок: без курсора-кнопки й без панелі плеєра. */
.vp--still .vp__media {
  cursor: default;
}

.vp__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  background: var(--nx-frame);
}

/* Без скрипта — рідні кнопки відео, свої ховаємо. */
.vp:not(.is-js) .vp__bar,
.vp:not(.is-js) .vp__big,
.vp:not(.is-js) .vp__intro {
  display: none;
}

.cv__frame {
  color: inherit;
  text-decoration: none;
}

/* Знімка немає (фікстури) — підпис посередині темного кадру. */
.cv__shot.offer__shot--none,
.vp__shot.offer__shot--none {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Назва системи не рветься посеред слова (на `body` — `overflow-wrap: anywhere`); стан і
   «Доступно українською» — серед фактів, а не біля кнопки: там вони стискали назву до стовпчика літер. */
.cs__facts .offer__state,
.cs__facts .offer__langs {
  margin: 0;
  font-size: inherit;
}

.cs__title {
  overflow-wrap: normal;
}

/* Неактивна кнопка («Тимчасово недоступна») довша за «Відкрити демо» — переноситься, а не
   відбирає місце в назви. */
.cs__cta.is-disabled {
  max-width: 14rem;
  white-space: normal;
  overflow-wrap: normal;
  text-align: center;
}

/* Екрани демо за макетом v17 (`CORE-026`) -----------------------------------------------------
   Перенесено з макета (`design/demo-catalog/`, nexlor.css, раунди 8–11: лише екрани після
   «Відкрити демо») без змін, крім обгортки сторінки макета; своє для стенду — у кінці розділу. */

/* Раунд 8 макета (Влад, 29.10): екрани демо в мові каталогу -------------------------------------
   Одна картка на екран: кадр системи / значок, мітка, заголовок з бурштиновою крапкою, текст, дії,
   рядок Дмитра внизу. Туторіал (оглядова карта) прибрано. */

.theme-nexlor .main.fx-main {
  align-items: center;
  padding: 2rem 1.25rem;
}

.fx {
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--nx-card-shadow);
}

.fx--wide {
  max-width: 46rem;
}

.fx__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.75rem 2rem 1.9rem;
}

/* кадр системи зверху (відкриваємо / готуємо / готове) */
.fx__shot {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--nx-frame);
}

.fx__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.fx__shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 18, 19, 0) 40%, rgba(17, 18, 19, 0.35));
}

/* «відкриваємо»: кружляє бурштинове кільце */
.fx__shot-spin {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fx-spin 0.9s linear infinite;
}

/* «готуємо»: смужка внизу кадру */
.fx__bar {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.fx__bar i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0.1);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* «готове»: зелена галочка */
.fx__ok {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--nx-ok);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(47, 122, 74, 0.25), 0 12px 30px -8px rgba(0, 0, 0, 0.5);
  animation: fx-pop 0.4s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.fx__ok svg {
  width: 28px;
  height: 28px;
}

.fx__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.1rem;
  border-radius: 16px;
}

.fx__icon svg {
  width: 26px;
  height: 26px;
}

.fx__icon--info {
  background: var(--surface-2);
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.fx__icon--warn {
  background: var(--nx-acc-soft);
  color: var(--nx-acc-ink);
}

.fx__icon--danger {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.fx__icon--ok {
  background: var(--nx-ok-soft);
  color: var(--nx-ok);
}

.fx__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  color: var(--nx-acc-ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fx__tag svg {
  width: 10px;
  height: 10px;
}

.theme-nexlor .fx__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  text-wrap: balance;
}

.fx__text {
  max-width: 34rem;
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.fx__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.theme-nexlor .fx__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.9rem 1.6rem;
  font-size: 0.95rem;
}

.theme-nexlor .button--primary.fx__btn {
  box-shadow: 0 12px 26px -14px rgba(201, 138, 43, 0.9);
}

.fx__btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.theme-nexlor .fx__btn--outline {
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--ink);
}

.theme-nexlor .fx__btn--outline:hover {
  background: var(--nx-acc-soft);
  color: var(--ink);
}

.theme-nexlor .fx__btn--danger {
  border: 1.5px solid var(--danger-line);
  background: transparent;
  color: var(--danger-ink);
}

.theme-nexlor .fx__btn--danger:hover {
  border-color: var(--danger-hover-line);
  background: var(--danger-bg);
  color: var(--danger-hover-ink);
}

.fx__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  color: var(--ink-faint);
}

.theme-nexlor .fx__link {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
  text-decoration-skip-ink: none;
}

.theme-nexlor .fx__link:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.fx__foot {
  padding: 1rem 2rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.fx__foot .ah {
  font-size: 1rem;
}

.fx__foot .ah__ava {
  width: 44px;
  height: 44px;
}

.fx__foot .ah__who {
  font-size: 0.85rem;
}

.fx__foot--note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.fx__foot--note svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* кроки підготовки */
.fx__steps {
  display: grid;
  gap: 0.55rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.fx__step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink-faint);
  transition: color 0.3s var(--nx-ease);
}

.fx__step-mark {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
}

.fx__step-mark svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.2s var(--nx-ease),
    transform 0.2s var(--nx-ease);
}

/* Галочка є в кожній мітці (крок веде `app.js`, `FIX-043`), видно — лише в пройденого. */
.fx__step.is-done .fx__step-mark svg {
  opacity: 1;
  transform: none;
}

.fx__step.is-done {
  color: var(--ink-soft);
}

.fx__step.is-done .fx__step-mark {
  border-color: var(--nx-ok);
  background: var(--nx-ok);
  color: #fff;
  transition:
    background-color 0.2s var(--nx-ease),
    border-color 0.2s var(--nx-ease);
}

.fx__step.is-now {
  color: var(--ink);
  font-weight: 500;
}

.fx__step.is-now .fx__step-mark {
  border-color: var(--nx-acc-soft);
  border-top-color: var(--accent);
  animation: fx-spin 0.9s linear infinite;
}

/* утримання місця */
.fx__hold {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  order: 9;
  margin: 1rem 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.fx__hold svg {
  width: 16px;
  height: 16px;
}

.fx__hold b {
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
}

/* «усі місця зайняті»: відлік кільцем */
.fx__count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
}

.fx__ring {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
}

.fx__ring circle {
  fill: none;
  stroke: var(--line);
  stroke-width: 4;
}

.fx__ring circle + circle {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

/* інші системи — маленькі картки */
.fx__others {
  align-self: stretch;
  margin-top: 1.5rem;
}

.fx__others-h {
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fx__others-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.fx__mini {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--nx-card-shadow);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--nx-ease), transform 0.25s var(--nx-ease), box-shadow 0.25s var(--nx-ease);
}

.fx__mini img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: left top;
  border-bottom: 1px solid var(--line);
}

.fx__mini span {
  padding: 0.55rem 0.7rem 0.6rem;
  font-family: var(--nx-font-disp);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (hover: hover) and (pointer: fine) {
  .fx__mini:hover {
    border-color: var(--accent);
    box-shadow: var(--nx-card-shadow-hover);
    transform: translateY(-2px);
  }
}

/* фінал: Дмитро — головна дія */
.fx--ended .fx__icon {
  margin-bottom: 0.9rem;
}

.fx__talk {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-self: stretch;
  margin-top: 1.4rem;
  padding: 1.25rem 1.4rem;
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.fx__talk img {
  width: 72px;
  height: 72px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.theme-nexlor .fx__talk h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.fx__talk p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* «Завершити?» — вікно поверх сесії */
.fx-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(13, 15, 17, 0.6);
  backdrop-filter: blur(3px);
  animation: fx-fade 0.2s var(--nx-ease) both;
}

.fx-modal__card {
  width: 100%;
  max-width: 32rem;
  animation: fx-pop 0.25s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.fx-modal__card .fx {
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
}

/* смужка сесії — як шапка сайту */
body.is-bare {
  background: #111213;
}

.sb {
  flex: none;
  background: #111213;
  color: #eceae6;
}

.sb__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem 0.55rem 1.1rem;
}

.sb__logo {
  font-family: var(--nx-font-disp);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.sb__logo i {
  display: inline-block;
  width: 0.22em;
  height: 0.22em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: var(--accent);
}

.sb__sys {
  min-width: 0;
  margin-right: auto;
  padding-left: 0.75rem;
  border-left: 1px solid #2c2e31;
  overflow: hidden;
  color: #a5a7aa;
  font-size: 0.92rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sb__clock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #1a1b1d;
  box-shadow: inset 0 0 0 1px #2c2e31;
  color: #eceae6;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}

.sb__clock b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sb__clock svg {
  width: 15px;
  height: 15px;
  color: #a5a7aa;
}

.sb__clock.is-soon {
  box-shadow: inset 0 0 0 1px var(--accent);
  color: #e4aa55;
}

.sb__clock.is-soon svg {
  color: #e4aa55;
}

.sb__clock.is-urgent {
  background: rgba(217, 112, 94, 0.14);
  box-shadow: inset 0 0 0 1px #d9705e;
  color: #f0a394;
}

.sb__clock.is-urgent svg {
  color: #f0a394;
}

.theme-nexlor .sb__want,
.sb__want {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1206;
  font-family: var(--nx-font-disp);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.sb__want:hover {
  background: #d89a3c;
}

.sb__end {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.85rem 0 1rem;
  border: 1px solid #3a3c40;
  border-radius: 999px;
  background: transparent;
  color: #eceae6;
  font: 500 0.85rem/1 var(--font-sans);
  cursor: pointer;
}

.sb__end svg {
  width: 15px;
  height: 15px;
}

.sb__end:hover {
  border-color: #d9705e;
  color: #f0a394;
}

.sb__short {
  display: none;
}

.sb__warn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 10px 8px;
  padding: 0.6rem 0.75rem 0.6rem 0.9rem;
  border-radius: 10px;
  background: rgba(201, 138, 43, 0.14);
  box-shadow: inset 0 0 0 1px rgba(201, 138, 43, 0.45);
  color: #f1d7ad;
  font-size: 0.9rem;
}

.sb__warn > span {
  flex: 1;
}

.sb__warn svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: #e4aa55;
}

.sb__warn--urgent {
  background: rgba(217, 112, 94, 0.14);
  box-shadow: inset 0 0 0 1px rgba(217, 112, 94, 0.5);
  color: #f6c7bd;
}

.sb__warn--urgent svg {
  color: #f0a394;
}

.sb__remind {
  color: #a5a7aa;
}

.sb__here {
  flex: none;
  min-height: 34px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1206;
  font: 600 0.85rem/1 var(--font-sans);
  cursor: pointer;
}

@keyframes fx-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fx-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

@keyframes fx-fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx__shot-spin,
  .fx__step.is-now .fx__step-mark {
    animation-duration: 2.4s;
  }

  .fx__ok,
  .fx-modal,
  .fx-modal__card {
    animation: none;
  }

  .fx__step,
  .fx__step-mark svg,
  .fx__step.is-done .fx__step-mark,
  .fx__bar i {
    transition: none;
  }
}

@media (max-width: 45rem) {
  .theme-nexlor .main.fx-main {
    align-items: flex-start;
    padding: 1rem;
  }

  .fx__body {
    padding: 1.4rem 1.25rem 1.5rem;
  }

  .fx__foot {
    padding: 0.9rem 1.25rem;
  }

  .fx__actions {
    align-self: stretch;
    flex-direction: column;
  }

  .fx__actions .fx__btn {
    width: 100%;
  }

  .fx__others-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .fx__mini {
    flex-direction: row;
    align-items: center;
  }

  .fx__mini img {
    width: 38%;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .fx__talk {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.1rem;
  }

  .fx__talk .fx__btn {
    width: 100%;
  }

  .sb__row {
    gap: 0.45rem;
    padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  }

  .sb__sys {
    padding-left: 0.5rem;
    font-size: 0.82rem;
  }

  .sb__long {
    display: none;
  }

  .sb__short {
    display: inline;
  }

  .sb__end {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .sb__clock {
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }

  .sb__clock svg {
    display: none;
  }
}

@media (max-width: 23rem) {
  .sb__logo {
    display: none;
  }

  .sb__sys {
    padding-left: 0;
    border-left: 0;
  }
}

.fx {
  color: var(--ink);
  font-weight: 300;
}

.fx-modal__card .fx__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: stretch;
}

.fx-modal__card .fx__btn {
  padding-inline: 1rem;
}

@media (max-width: 30rem) {
  .fx-modal__card .fx__actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* кружляння видно й на білому кадрі */
.fx__shot-spin {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: var(--accent);
  background: rgba(17, 18, 19, 0.72);
  box-shadow: 0 0 0 8px rgba(17, 18, 19, 0.35);
}

/* смужка сесії живе без теми Nexlor (is-bare) — кольори задаємо прямо */
.sb {
  --accent: #c98a2b;
}

.sb__logo,
.sb__clock {
  flex: none;
  white-space: nowrap;
}

@media (max-width: 45rem) {
  .sb__logo {
    display: none;
  }

  .sb__sys {
    padding-left: 0;
    border-left: 0;
  }

  .sb__warn {
    font-size: 0.85rem;
  }
}

/* Раунд 9 макета (Влад, 29.10) ------------------------------------------------------------------- */

/* «Демо готове»: смужка добігає за 0,5 с (`FIX-045`) — і демо відкривається саме */
.fx__bar--go i {
  transform: scaleX(0);
  animation: fx-fill 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  will-change: transform;
}

@keyframes fx-fill {
  to {
    transform: scaleX(1);
  }
}

/* «Завершити демо?»: без значка, кнопки в один рядок праворуч, текст не переноситься */
.fx--confirm .fx__body {
  padding: 1.75rem 1.75rem 1.5rem;
}

.fx--confirm .fx__title {
  font-size: 1.6rem;
}

.fx-modal__card .fx__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: stretch;
  gap: 0.6rem;
}

.theme-nexlor .fx-modal__card .fx__btn {
  padding: 0.85rem 1.4rem;
  white-space: nowrap;
}

@media (max-width: 30rem) {
  .fx-modal__card .fx__actions {
    flex-direction: column-reverse;
  }

  .fx-modal__card .fx__btn {
    width: 100%;
  }
}

/* Раунд 10 макета (Влад, 29.10) */

/* лого в смужці сесії — справжній файл логотипа, як у шапці сайту (текст шрифтом виходив стиснутим) */
img.sb__logo {
  display: block;
  flex: none;
  width: auto;
  height: 19px;
}

/* Раунд 11 макета (29.10): екрани демо */

/* екрани демо: менше «стрибків» карти між кроками й без прокрутки на невисоких ноутбуках */
.theme-nexlor .main.fx-main {
  padding-block: clamp(1rem, 3vh, 2rem);
}

.theme-nexlor .main.fx-main:has(.fx--media) {
  align-items: flex-start;
  padding-top: clamp(1.5rem, 9vh, 6rem);
}

.fx__shot {
  aspect-ratio: auto;
  height: clamp(120px, 24vh, 252px);
}

@media (max-height: 52rem) and (min-width: 45.01rem) {
  .fx__body {
    padding: 1.4rem 1.75rem 1.5rem;
  }

  .fx__mini img {
    aspect-ratio: 16 / 6;
  }

  .fx__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.7rem;
  }

  .fx__icon svg {
    width: 21px;
    height: 21px;
  }

  .fx__talk {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
  }

  .fx__others {
    margin-top: 1.1rem;
  }

  .fx__count {
    margin-top: 0.9rem;
  }
}

/* «Відкриваємо демо»: кадр притемнений, кружляння на ньому читається */
.fx--opening .fx__shot img {
  filter: blur(1.5px) brightness(0.82);
  transform: scale(1.02);
}

.fx--opening .fx__shot-spin {
  background: rgba(17, 18, 19, 0.55);
  box-shadow: none;
}

/* «Завершити?»: безпечна кнопка перша в коді (і першою на телефоні), на ноутбуці — праворуч */
.fx-modal__card .fx__actions {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.fx--confirm {
  position: relative;
}

.fx__x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.fx__x svg {
  width: 20px;
  height: 20px;
}

.fx__x:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 30rem) {
  .fx-modal__card .fx__actions {
    flex-direction: column;
  }
}

/* смужка сесії: шрифт як у всьому макеті, кнопки 44 px на телефоні, назва системи не зникає */
.sb {
  font-family: 'Geologica', 'Segoe UI', system-ui, sans-serif;
}

.sb__sys {
  flex: 1 1 auto;
}

.sb__want,
.sb__end,
.sb__clock {
  flex: none;
}

.theme-nexlor .sb__want,
.sb__want,
.sb__end {
  font-family: var(--nx-font-disp);
  font-size: 0.8rem;
  font-weight: 500;
}

.sb__link {
  color: #f1d7ad;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
  text-decoration-skip-ink: none;
}

body.is-bare {
  height: 100vh;
  height: 100dvh;
}

@media (max-width: 45rem) {
  img.sb__logo {
    display: none;
  }

  .sb__want,
  .sb__end,
  .sb__here {
    min-height: 44px;
  }

  .sb__end {
    width: 44px;
  }

  /* текстові посилання — зона дотику 44 px */
  .theme-nexlor .fx__link,
  .theme-nexlor .ah__link,
  [data-cat-back] {
    display: inline-block;
    padding-block: 10px;
  }

  .fx__count .fx__btn {
    width: 100%;
  }

  .fx__links span {
    display: none;
  }

  .fx__links {
    gap: 0 1.25rem;
  }
}

@media (max-width: 22.5rem) {
  .fx__talk {
    padding: 0.9rem;
  }

  .theme-nexlor .fx__btn {
    padding-inline: 1rem;
    font-size: 0.88rem;
  }
}

/* телефон горизонтально: кадр не забирає весь екран */
@media (orientation: landscape) and (max-height: 500px) {
  .fx__shot {
    height: 34svh;
  }

  .theme-nexlor .main.fx-main:has(.fx--media) {
    padding-top: 0.75rem;
  }

  .fx__others-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fx__mini {
    flex-direction: column;
  }

  .fx__mini img {
    width: 100%;
    aspect-ratio: 16 / 6;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sb__warn {
    padding-block: 0.35rem;
  }
}

/* дуже невисокий ноутбук (≤ 736 px): інші системи — без кадрів, лише назви */
@media (max-height: 46rem) and (min-width: 45.01rem) {
  .fx__mini img {
    display: none;
  }

  .fx__mini span {
    padding: 0.75rem 0.9rem;
  }
}

@media (max-height: 42rem) and (min-width: 45.01rem) {
  .fx__shot {
    height: 16vh;
  }

  .theme-nexlor .main.fx-main:has(.fx--media) {
    padding-top: 1rem;
  }

  .fx__steps {
    gap: 0.35rem;
    margin-top: 0.9rem;
  }

  .fx__foot {
    padding-block: 0.7rem;
  }

  .fx__foot .ah__who {
    display: none;
  }

  .fx__text {
    margin-top: 0.4rem;
  }
}

@media (max-height: 42rem) and (min-width: 45.01rem) {
  .fx__icon {
    display: none;
  }
}

/* Своє для стенду (`CORE-026`): макет малює екрани скриптом, стенд — сервером. */

/* Діалог «Завершити?» сервер малює схованим; показує його `app.js`. */
.fx-modal[hidden] {
  display: none;
}

/* Форма з однією кнопкою (POST) стоїть у ряду дій як сама кнопка. */
.fx__form {
  display: contents;
}

/* Форми, що йдуть самі (авто-вхід, «Відкриваємо демо»): кнопка лише без скрипта. */
form[data-auto-open],
form[data-public-start] {
  margin-top: 0;
}

form[data-auto-open] .fx__btn,
form[data-public-start] .fx__btn {
  margin-top: 1.4rem;
}

/* Інші системи, «Хочу таку» й «Завершити» — посилання, а не кнопки макета. */
a.fx__mini,
a.sb__want,
a.sb__end {
  text-decoration: none;
}

/* Смужка на кадрі підготовки — за поточним кроком (`data-step` фрагмента опитування). */
.fx:has(.fx__live[data-step='1']) .fx__bar i {
  transform: scaleX(0.3);
}

.fx:has(.fx__live[data-step='2']) .fx__bar i {
  transform: scaleX(0.5);
}

.fx:has(.fx__live[data-step='3']) .fx__bar i {
  transform: scaleX(0.7);
}

.fx:has(.fx__live[data-step='4']) .fx__bar i {
  transform: scaleX(0.9);
}

/* Усі кроки пройдено — `app.js` дає смужці добігти перед «Демо готове» (`FIX-043`). */
.fx:has(.fx__live[data-step='5']) .fx__bar i {
  transform: scaleX(1);
}

/* Підпис для читача екрана (годинник смужки: «Залишилось часу»). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Невисокий ноутбук (1280×720): заголовок у два рядки (PL, EN) не має виштовхувати картку
   за екран — кадр системи нижчий. */
@media (max-height: 46rem) and (min-width: 45.01rem) {
  .fx__shot {
    height: 18vh;
  }
}
