/* =====================================================
   radsel.ru — styles.css
   Mobile-first, BEM, CSS Custom Properties
   ===================================================== */

/* Кроссфейд между страницами (@view-transition: navigation: auto) —
   пробовали дважды, оба раза отключили. Причина блокировки рендера
   (внешний Google Fonts <link>) устранена (шрифты теперь самохостятся,
   см. раздел "Web Fonts" ниже), но от кроссфейда решили отказаться
   и после этого. При желании вернуться — правило то же самое, но
   должно быть в styles.css и старой, и новой страницы (тут оно уже
   подключено везде одной правкой); Firefox/Safari просто игнорируют
   неизвестный at-rule. */

/* ===== Web Fonts (self-hosted) ===== */
/* Раньше — внешний Google Fonts <link> в <head> каждой страницы,
   блокировал первую отрисовку. Теперь шрифты лежат локально в
   /assets/fonts/, @font-face ниже — точная копия того, что отдавал
   Google (unicode-range, вес, subset), только src переписан на
   локальный путь. font-display: swap — текст не невидим на время
   загрузки шрифта. У Outfit нет кириллических глифов на Google Fonts —
   кириллица в заголовках уже и раньше невидимо использовала system-ui
   из --font-heading, это сохранено как было. */

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/open-sans-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/open-sans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/open-sans-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/open-sans-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/open-sans-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/open-sans-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/outfit-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/outfit-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== 1. CSS Custom Properties ===== */
:root {
  --color-primary:      #ffffff;
  --color-accent:       #0088cc;
  --color-accent-dark:  #006fa8;
  --color-accent-light: #e6f4fb;
  --color-text:         #1a1a2e;
  --color-text-muted:   #5a6577;
  --color-surface:      #f5f8fa;
  --color-border:       #dde3ea;
  --color-error:        #c0392b;
  --footer-bg:          #1A1E22;

  --font-family:        'Open Sans', system-ui, -apple-system, sans-serif;
  --font-heading:       'Outfit', system-ui, sans-serif;
  --font-size-sm:       0.875rem;
  --font-size-base:     1rem;
  --font-size-lg:       1.125rem;
  --font-size-xl:       1.375rem;
  --font-size-2xl:      1.75rem;
  --font-size-3xl:      2.25rem;
  --font-size-4xl:      3rem;
  --line-height-body:   1.65;
  --line-height-heading: 1.15;
  --font-weight-bold:   700;
  --font-weight-medium: 500;

  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;
  --space-2xl: 5.5rem;

  --container-max: 1120px;
  --container-pad: 1.25rem;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     16px;
  --radius-full:   9999px;

  --shadow-card:       0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 136, 204, 0.10);
  --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, 0.06), 0 10px 32px rgba(0, 136, 204, 0.18), 0 24px 48px rgba(0, 0, 0, 0.07);
  --shadow-header:     0 2px 12px rgba(0, 0, 0, 0.08);

  --transition:      0.22s ease;
  --transition-slow: 0.36s ease;

  --header-h: 64px;
}

/* ===== 2. Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-primary);
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
address { font-style: normal; }

/* ===== 3. Base Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p { color: var(--color-text-muted); }

/* ===== 4. Layout ===== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.section-title--left { text-align: left; }

.section-sub {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.section-sub--left {
  text-align: left;
  margin-inline: 0;
}

section {
  padding-block: var(--space-xl);
  scroll-margin-top: var(--header-h);
}

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

/* ===== 5. Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  line-height: 1;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
}

.btn svg { flex-shrink: 0; }

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

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn--accent:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.3);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn--outline:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn--sm { padding: 0.5rem 1rem; font-size: var(--font-size-sm); }
.btn--full { width: 100%; }

/* ===== 6. Header & Nav ===== */

/* Header и хлебные крошки подгружаются через fetch() в components.js /
   breadcrumbs.js и вставляются в эти пустые div уже после первой отрисовки
   страницы. Без резерва места высота placeholder'а — 0, и когда контент
   подгружается, всё, что ниже, резко сдвигается вниз (заметно при переходах
   по верхнему меню). min-height здесь равен фактической высоте вставляемого
   блока, чтобы место было выделено ещё до загрузки JS. */
#header-placeholder { min-height: calc(var(--header-h) + 1px); }

#breadcrumbs-placeholder {
  min-height: calc(var(--space-sm) * 2 + var(--font-size-sm) * var(--line-height-body) + 1px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 248, 250, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow-header); }

.nav__sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 100%;
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: var(--header-h);
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo img { height: 32px; width: auto; }

.nav__logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  margin-left: auto;
  transition: background-color var(--transition);
}

.nav__toggle:hover { background-color: var(--color-surface); }

.nav__toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--font-size-sm);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
}

.breadcrumbs__item:not(:first-child)::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-inline: var(--space-xs);
  flex-shrink: 0;
  background-color: var(--color-text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.breadcrumbs__link {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.breadcrumbs__link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.breadcrumbs__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.breadcrumbs__current {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

.nav__toggle .bar {
  fill: currentColor;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav__toggle[aria-expanded="true"] .bar--top { transform: rotate(45deg) translate(4px, 4px); }
.nav__toggle[aria-expanded="true"] .bar--mid { opacity: 0; transform: scaleX(0); }
.nav__toggle[aria-expanded="true"] .bar--bot { transform: rotate(-45deg) translate(4px, -4px); }

.nav__menu {
  display: flex;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--color-primary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) var(--container-pad);
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-header);
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s 0.22s;
}

.nav__menu.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}

.nav__link {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  padding: var(--space-xs) 0;
  transition: color var(--transition);
  border-bottom: 1px solid var(--color-border);
}

.nav__menu li:last-child .nav__link { border-bottom: none; }

.nav__link:hover { color: var(--color-accent); }

.nav__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav__link.is-active {
  color: var(--color-accent);
  position: relative;
}

.nav__link.is-active::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* На мобильном .nav__cta — обычный пункт выпадающего меню (последний
   <li>), выделяется среди .nav__link уже за счёт своих классов
   .btn.btn--accent — своя разметка тут не нужна. margin-left: auto,
   прижимающий кнопку к правому краю строки меню, актуален только на
   десктопе (900px+, см. ниже) — там .nav__menu становится горизонтальным
   рядом. */

/* ===== 6б. Promo Bar ===== */
.promo-bar {
  background: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-sm);
}

.promo-bar__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
}

.promo-bar__item {
  max-width: 100%;
}

.promo-bar__link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: 100%;
  background: var(--color-accent-light);
  border: 1px solid rgba(0, 136, 204, 0.2);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.4rem 0.35rem 0.35rem;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.promo-bar__link:hover {
  border-color: rgba(0, 136, 204, 0.4);
  box-shadow: 0 2px 10px rgba(0, 136, 204, 0.12);
}

.promo-bar__link:hover .promo-bar__text { text-decoration: underline; }

.promo-bar__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.promo-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background: var(--color-accent);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.55rem;
  flex-shrink: 0;
}

.promo-bar__dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  animation: promo-bar-pulse 1.8s ease-in-out infinite;
}

.promo-bar__text {
  min-width: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-bar__arrow {
  flex-shrink: 0;
  color: var(--color-accent);
  transition: transform var(--transition);
}

.promo-bar__link:hover .promo-bar__arrow { transform: translateX(3px); }

@keyframes promo-bar-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .promo-bar__dot { animation: none; }
}

@media (max-width: 599px) {
  .promo-bar__item { flex-basis: 100%; }
  .promo-bar__link { padding-inline-end: 0.6rem; }
}

/* ===== 7. Hero ===== */
.hero {
  padding-block: var(--space-xl);
  background: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
}

.hero--sm { padding-block: 2.1rem; overflow: hidden; }

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
}

.hero__content { text-align: center; }

.hero__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  background: var(--color-accent-light);
  border: 1px solid rgba(0, 136, 204, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.hero__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.025em;
}

.hero__sub {
  font-size: var(--font-size-lg);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

/* Hero visual badges */
.hero__visual {
  display: block;
  width: 100%;
}

/* Hero Image */
.hero__img-wrap {
  position: relative;
  width: 100%;
}

.hero__img-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 65%;
  background: linear-gradient(to right, #ffffff 0%, #ffffff 20%, transparent 100%);
  z-index: 1;
  pointer-events: none;
  display: none;
}

.hero__img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  object-position: center center;
}

.hero--sm .hero__img-wrap img { max-height: 221px; }

/* Show the image at its native size instead of stretching to fill the
   column (e.g. a small logo, not a wide product photo). */
.hero__img-wrap--native img {
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

/* ===== 8. Trust Bar ===== */
.trust-bar {
  padding-block: var(--space-lg);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.trust-bar__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  font-size: var(--font-size-base);
}

.trust-bar__icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ===== 9. Products ===== */
.products { background: var(--color-primary); }

.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.product-card__label {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  z-index: 1;
}

.product-card__img-wrap {
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  overflow: hidden;
}

.product-card__img-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-card__img-wrap--placeholder {
  color: rgba(0, 136, 204, 0.3);
}

.product-card__body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-card__name {
  font-size: var(--font-size-xl);
  color: var(--color-text);
}

/* Whole card is clickable: the link sits on the name, then stretches via
   ::after to cover the entire (already position:relative) card. */
.product-card__name-link {
  color: inherit;
  text-decoration: none;
}

.product-card__name-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.product-card__name-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}

.product-card__tagline {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

.product-card__desc { font-size: var(--font-size-sm); }

.product-card__specs {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.product-card__specs li {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding-left: 1.25rem;
  position: relative;
}

.product-card__specs li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

/* ===== 11. Use Cases ===== */
.usecases { background: var(--color-primary); }

.usecases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.usecase-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.usecase-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.usecase-card__icon {
  color: var(--color-accent);
  background: var(--color-accent-light);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.usecase-card h3 {
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.usecase-card p { font-size: var(--font-size-base); color: var(--color-text-muted); }

.usecase-card__list {
  flex: 1 0 auto;
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.usecase-card__list li {
  font-size: var(--font-size-base);
  color: var(--color-text);
  padding-left: 1.25rem;
  position: relative;
}

.usecase-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.usecase-card--dacha {
  position: relative;
  overflow: hidden;
}

.usecase-card--dacha > * {
  position: relative;
  z-index: 2;
}

.usecase-card--dacha::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(245, 248, 250, 0.75) 0%, transparent 68%),
    linear-gradient(to top,  rgba(245, 248, 250, 0.75) 0%, transparent 68%);
  pointer-events: none;
  z-index: 1;
}

.usecase-card--dacha::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/home.jpg');
  background-size: 85% auto;
  background-position: right 0 bottom 0;
  background-repeat: no-repeat;
  mask-image: radial-gradient(
    ellipse 92% 92% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 72% 62% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
  pointer-events: none;
  z-index: 0;
}

.usecase-card--wireless,
.usecase-card--garage,
.usecase-card--heating {
  position: relative;
  overflow: hidden;
}

.usecase-card--wireless > *,
.usecase-card--garage > *,
.usecase-card--heating > * {
  position: relative;
  z-index: 2;
}

.usecase-card--wireless::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(245, 248, 250, 0.45) 0%, transparent 68%),
    linear-gradient(to top,  rgba(245, 248, 250, 0.45) 0%, transparent 68%);
  pointer-events: none;
  z-index: 1;
}

.usecase-card--garage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(245, 248, 250, 0.65) 0%, transparent 68%),
    linear-gradient(to top,  rgba(245, 248, 250, 0.65) 0%, transparent 88%);
  pointer-events: none;
  z-index: 1;
}

.usecase-card--wireless::after,
.usecase-card--garage::after,
.usecase-card--heating::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: 85% auto;
  background-position: right 0 bottom 0;
  background-repeat: no-repeat;
  mask-image: radial-gradient(
    ellipse 92% 92% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 92% 92% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
  pointer-events: none;
  z-index: 0;
}

.usecase-card--wireless::after {
  background-image: url('../assets/images/ccu825-radio_whbg.jpg');
  mask-image: radial-gradient(
    ellipse 72% 62% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 72% 62% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
}

.usecase-card--garage::after {
  background-image: url('../assets/images/gate.jpg');
}

.usecase-card--heating::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(245, 248, 250, 0.45) 0%, transparent 68%),
    linear-gradient(to top,  rgba(245, 248, 250, 0.45) 0%, transparent 68%);
  pointer-events: none;
  z-index: 1;
}

.usecase-card--heating::after {
  background-image: url('../assets/images/gas_heater.jpg');
  background-size: 48% auto;
  mask-image: radial-gradient(
    ellipse 72% 62% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 72% 62% at 100% 100%,
    black 0%,
    black 55%,
    rgba(0,0,0,0.6) 70%,
    rgba(0,0,0,0.2) 83%,
    transparent 96%
  );
}

.usecase-card__btn {
  margin-top: var(--space-md);
  align-self: flex-start;
}

/* ===== Features (5) ===== */
.features { background: var(--color-surface); }

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* ===== Prof Use Cases (5а) ===== */
.prof-usecases { background: var(--color-primary); }

.prof-usecases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

/* ===== 12. Support ===== */
.support { background: var(--color-surface); }

.support__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.support-card {
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.support-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.support-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-lg);
}

.support-card__icon {
  color: var(--color-accent);
  background: var(--color-accent-light);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-card h3 {
  font-size: var(--font-size-base);
  color: var(--color-text);
}

.support-card p { font-size: var(--font-size-sm); flex: 1; }

.support-card__link {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  transition: color var(--transition);
  margin-top: auto;
}

.support-card__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: auto;
}

.support-card__contacts .support-card__link { margin-top: 0; }

.support-card:hover .support-card__link { color: var(--color-accent-dark); }

/* ===== 13. Contact ===== */
.contact { background: var(--color-primary); border-top: 1px solid var(--color-border); }

.contact__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.contact__form-wrap { flex: 1; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.field__label {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.field__required { color: var(--color-error); }

.field__input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field__input:hover { border-color: #b0bec5; }

.field__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.field__textarea { resize: vertical; min-height: 100px; }

.field__error {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  min-height: 1.25em;
}

.field--error .field__input { border-color: var(--color-error); }

.field--error .field__input:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.contact-form__success {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-primary);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
}

.contact-form__success svg {
  color: var(--color-accent);
  margin-inline: auto;
  margin-bottom: var(--space-md);
}

.contact-form__success h3 {
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  height: fit-content;
}

.contact__info-title {
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.contact__info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--color-text-muted);
}

.contact__info-item svg {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact__info-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact__info-label { font-size: var(--font-size-sm); color: var(--color-text-muted); }

.contact__info-item a {
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition);
}

.contact__info-item a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.contact__info-item a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== FAQ / Accordion ===== */
.faq { background: var(--color-primary); }

.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 760px;
  margin-inline: auto;
}

/* Firmware version accordions (ccu422.html, ccu825.html #firmware) span the
   full section width like the heading above them - not a centered, narrower
   reading column like FAQ accordions elsewhere. */
.fw-version .accordion {
  max-width: none;
  margin-inline: 0;
}

/* Left-aligned accordion, flush with the heading above it — for pages where
   a centered reading column doesn't match the rest of the layout. */
.accordion--left {
  max-width: 760px;
  margin-inline: 0;
}

.accordion-heading {
  max-width: 760px;
  margin-inline: auto;
}

.accordion__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.accordion__item:has(.accordion__trigger[aria-expanded="true"]) {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.accordion__trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  background: var(--color-primary);
  transition: background-color var(--transition), color var(--transition);
}

.accordion__trigger:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

.accordion__trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.accordion__trigger[aria-expanded="true"] { color: var(--color-accent); }

.accordion__icon {
  flex-shrink: 0;
  color: var(--color-accent);
  transition: transform var(--transition);
}

.accordion__trigger[aria-expanded="true"] .accordion__icon {
  transform: rotate(180deg);
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-slow);
  overflow: hidden;
}

.accordion__panel.is-open { grid-template-rows: 1fr; }

.accordion__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.accordion__panel-inner p {
  padding: 0 var(--space-lg) var(--space-md);
}

.accordion__panel-inner .usecase-card__list {
  padding: 0 var(--space-lg) var(--space-md);
  margin-top: 0;
}

.accordion__panel-inner .step-list {
  padding: 0 var(--space-lg) var(--space-md);
}

/* Screenshot galleries inside FAQ answers: match the side padding of the
   surrounding text, and cap the track/column count so the small (200px)
   source screenshots aren't blown up - 3 fit per row at desktop widths,
   fewer as the column narrows, down to one on mobile - no breakpoints to
   hand-tune. Layers on top of .shot-gallery--native (below), which owns the
   shared "don't stretch native-size images" behaviour. (Flex-wrap doesn't
   work here: Chromium fails to size the accordion's animated 0fr->1fr grid
   row around wrapped flex content and silently clips it - CSS Grid's
   auto-fill sizes correctly instead.) */
.accordion__panel-inner .shot-gallery--native {
  grid-template-columns: repeat(auto-fill, 200px);
  justify-items: start;
  max-width: calc(3 * 200px + 2 * var(--space-sm) + 2 * var(--space-lg));
  padding: 0 var(--space-lg) var(--space-md);
  margin-top: 0;
}

.accordion__count {
  font-weight: normal;
  color: var(--color-text-muted);
  margin-left: 0.375rem;
}

/* Inline text link — keeps the surrounding font size, only marks the link visually */
.text-link {
  color: var(--color-accent);
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.text-link:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.text-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== Dealer list (accordion panel content) ===== */
.dealer-list {
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-lg) var(--space-md);
}

.dealer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
}

.dealer:first-child { border-top: none; padding-top: 0; }

.dealer__name {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.dealer__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

.dealer__addr {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: 0.375rem;
}

.dealer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: 0.375rem;
}

.contacts-map-section { background: var(--color-surface); }

.contacts-map {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 10;
}

.contacts-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 640px) {
  .contacts-map { aspect-ratio: 16 / 7; }
}

/* ===== 14. Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--space-lg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer__cols {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: start;
  gap: var(--space-lg);
  width: 100%;
}

.footer__col--nav {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.footer__col--right {
  display: flex;
  justify-content: flex-end;
}

.footer__logo { display: flex; align-items: center; }

.footer__logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer__logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.footer__nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-md) var(--space-lg);
}

.footer__nav a {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer__nav a:hover { color: var(--color-primary); }

.footer__nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer__subnav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
  padding-left: 0;
  list-style: none;
}

.footer__subnav a {
  display: block;
  padding-block: 1px;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.45);
  transition: color var(--transition);
}

.footer__subnav a:hover { color: var(--color-primary); }

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: left;
}

.footer__contacts li {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.65);
}

.footer__contacts a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer__contacts a:hover { color: var(--color-primary); }

.footer__social-logo {
  display: inline-block;
  height: 16px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
}

.footer__contacts a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
  width: 100%;
}

.footer__informer {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

@media (max-width: 768px) {
  .footer__cols {
    grid-template-columns: 1fr;
  }

  .footer__col--nav,
  .footer__col--right {
    justify-content: center;
  }

  .footer__contacts {
    text-align: center;
  }
}

/* ===== 16. Media Queries ===== */

/* --- 600px --- */
@media (min-width: 600px) {
  :root {
    --font-size-2xl: 2.25rem;
    --font-size-3xl: 2.75rem;
  }

  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }

  .hero__title { font-size: var(--font-size-3xl); }

  .hero__ctas {
    flex-direction: row;
    justify-content: center;
  }

  .hero__sub { text-align: center; }

  .trust-bar__item { font-size: var(--font-size-lg); }

  .products__grid { grid-template-columns: repeat(2, 1fr); }

  .usecases__grid { grid-template-columns: repeat(2, 1fr); }

  .features__grid { grid-template-columns: repeat(2, 1fr); }

  .prof-usecases__grid { grid-template-columns: repeat(2, 1fr); }

  .support__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- 900px --- */
@media (min-width: 900px) {
  :root { --container-pad: 2rem; }

  .nav__toggle { display: none; }

  .nav__menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    flex: 1;
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: none;
    justify-content: center;
  }

  .nav__link {
    border-bottom: none;
    padding: var(--space-xs);
    position: relative;
  }

  .nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform var(--transition);
    border-radius: var(--radius-full);
  }

  .nav__link:hover::after { transform: scaleX(1); }

  .nav__link.is-active::after { display: none; }

  .nav__cta { margin-left: auto; }

  /* Hero — image overlaps behind text */
  .hero__inner {
    flex-direction: row;
    align-items: center;
    position: relative;
    min-height: 440px;
  }

  .hero--sm .hero__inner { min-height: 264px; }

  .hero__content {
    text-align: left;
    flex: 0 0 51%;
    position: relative;
    z-index: 2;
  }

  .hero__sub { text-align: left; margin-inline: 0; }

  .hero__ctas { justify-content: flex-start; }

  .hero__visual {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 62%;
    z-index: 1;
    display: block;
  }

  .hero__img-wrap::before { display: block; }

  .hero__img-wrap img {
    max-height: 480px;
    object-position: right center;
  }

  .hero--sm .hero__img-wrap img { max-height: 264px; }

  /* Products 3-col */
  .products__grid { grid-template-columns: repeat(3, 1fr); }

  /* Features and Prof Use Cases — 3-col */
  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .prof-usecases__grid { grid-template-columns: repeat(3, 1fr); }

  /* Support 4-col */
  .support__grid { grid-template-columns: repeat(4, 1fr); }

  /* Contact 2-col */
  .contact__inner {
    flex-direction: row;
    align-items: flex-start;
  }

  .contact__form-wrap { flex: 1.5; }
  .contact__info { flex: 1; }
}

/* --- 1200px --- */
@media (min-width: 1200px) {
  :root { --font-size-4xl: 3.5rem; }

  .hero__title { font-size: var(--font-size-4xl); }

  .hero__visual { width: 65%; }
}

/* ===== 18. Features Tabs ===== */
.feat-tabs {
  padding: var(--space-xl) 0;
  background: var(--color-primary);
}

.feat-tabs__shell {
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-primary);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
}

.feat-tabs__tablist {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--color-surface);
  border-bottom: 1.5px solid var(--color-border);
}

.ft-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
}

.ft-tab:not(:last-child) { border-right: 1.5px solid var(--color-border); }
.ft-tab:hover { background: rgba(0, 136, 204, 0.04); }
.ft-tab.active { background: var(--color-primary); }

.ft-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.ft-tab.active::after { opacity: 1; }

.ft-tab__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.ft-tab__label strong {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-heading);
  color: var(--color-text);
  text-align: center;
  line-height: 1.2;
}

.ft-tab__label span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  text-align: center;
  line-height: 1.3;
}

.ft-panels { position: relative; }

.ft-panel {
  display: none;
  grid-template-columns: 1fr 360px;
  min-height: 340px;
  position: relative;
  animation: ft-panel-in 0.2s ease;
}

.ft-panel.active { display: grid; }

@keyframes ft-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ft-panel__text {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.ft-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
  background: var(--ft-bg, var(--color-accent-light));
  color: var(--ft-color, var(--color-accent));
}

.ft-badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.ft-panel__text h3 {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--line-height-heading);
  color: var(--color-text);
}

.ft-panel__text > p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
  max-width: 480px;
}

.ft-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 20px;
}

.ft-chk {
  position: relative;
  padding-left: 1.4rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  line-height: 1.45;
}

.ft-chk::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.05em;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
}

.ft-chk--sel {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background var(--transition), color var(--transition);
}

.ft-chk--sel:hover {
  background: var(--ft-bg, var(--color-accent-light));
}

.ft-chk--sel.ft-chk--active {
  background: var(--ft-bg, var(--color-accent-light));
  font-weight: var(--font-weight-bold);
}

/* ===== Feature Channel Buttons (panel 0) ===== */
.ft-channels {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  row-gap: 5px;
  column-gap: 5mm;
  margin-top: var(--space-md);
}

.ft-ch-btn {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface, #fff);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition),
              background-color var(--transition), box-shadow var(--transition);
}

.ft-ch-btn:hover {
  border-color: var(--ft-color, var(--color-accent));
  color: var(--ft-color, var(--color-accent));
  background: var(--ft-bg, var(--color-accent-light));
}

.ft-ch-btn:focus-visible {
  outline: 2px solid var(--ft-color, var(--color-accent));
  outline-offset: 2px;
}

.ft-ch-btn:active {
  transform: scale(0.97);
}

.ft-ch-btn.ft-chk--active {
  border-color: var(--ft-color, var(--color-accent));
  background: var(--ft-bg, var(--color-accent-light));
  color: var(--ft-color, var(--color-accent));
  font-weight: var(--font-weight-bold);
  box-shadow: 0 2px 8px var(--ft-glow, rgba(0, 136, 204, 0.18));
}

.ft-ch-btn__icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ft-ch-btn__icon svg { width: 100%; height: 100%; }
.ft-ch-btn__icon img { width: 100%; height: 100%; object-fit: contain; }

.ft-panel__visual {
  overflow: hidden;
  position: relative;
}

/* Regular image visual bleeds across full panel under text */
.ft-panel__visual:not(.ft-panel__visual--phone):not(.ft-panel__visual--browser) {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Gradient: opaque on left (over text), fades to image on right */
.ft-panel__visual:not(.ft-panel__visual--phone):not(.ft-panel__visual--browser)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff 55%, transparent 80%);
  z-index: 1;
  pointer-events: none;
}

.ft-panel__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  transition: transform var(--transition-slow);
}

/* Full height, natural width, pinned to right */
.ft-panel__visual:not(.ft-panel__visual--phone):not(.ft-panel__visual--browser) img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  object-fit: unset;
}

.ft-panel.active .ft-panel__visual > img {
  transform: scale(1.02);
}

/* ---- Phone mockup (panel 0) ---- */
.ft-panel__visual--phone {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}

.ft-panel__visual--phone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 65% 30%, rgba(0, 136, 204, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- Browser mockup (panel 4) ---- */
.ft-panel__visual--browser {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}

.ft-panel__visual--browser::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(79, 94, 208, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.browser-frame {
  width: 100%;
  max-width: 440px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.14),
    0 32px 72px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
  transform: perspective(900px) rotateY(-8deg) rotateX(4deg);
  transition: transform var(--transition-slow);
}

.ft-panel.active .browser-frame {
  transform: perspective(900px) rotateY(-8deg) rotateX(5deg);
}

.browser-frame__bar {
  background: #e8e9ec;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.browser-frame__dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.browser-frame__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.browser-frame__dots span:nth-child(1) { background: #ff5f57; }
.browser-frame__dots span:nth-child(2) { background: #ffbd2e; }
.browser-frame__dots span:nth-child(3) { background: #28c840; }

.browser-frame__url {
  flex: 1;
  background: #fff;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 0.7rem;
  color: #666;
  font-family: var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(0, 0, 0, 0.09);
}

.browser-frame__screen {
  display: block;
  line-height: 0;
  overflow: hidden;
  background: #fff;
  padding: 11px;
}

.browser-frame__screen img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.ft-panel.active .browser-frame__screen img {
  transform: scale(1.02);
}

.ft-phone {
  width: 190px;
  background: #12192a;
  border-radius: 36px;
  padding: 12px 10px 12px;
  border: 2px solid #252f42;
  box-shadow: -14px 20px 44px rgba(13, 31, 60, .40), 0 0 0 1px #0a101c;
  transform: perspective(900px) rotateY(-8deg) rotateX(25deg);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.ft-phone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.07) 0%, transparent 55%);
  pointer-events: none;
}

.ft-phone__notch {
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 6px;
}

.ft-phone__bar {
  width: 52px;
  height: 3px;
  background: #252f42;
  border-radius: 2px;
}

.ft-phone__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1e2a3e;
  border: 1px solid #2e3d55;
}

.ft-phone__screen {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.ft-phone__screen img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transform: none;
  transition: none;
}

.ft-phone__home {
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.ft-phone__home span {
  width: 64px;
  height: 3px;
  background: #252f42;
  border-radius: 2px;
}

/* Floating notifications */
.ft-notif {
  position: absolute;
  background: #fff;
  border-radius: 11px;
  padding: 7px 11px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  z-index: 3;
}

.ft-notif__ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ft-notif__ico svg { width: 14px; height: 14px; }

.ft-notif__text { display: flex; flex-direction: column; gap: 1px; }

.ft-notif__title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-heading);
  line-height: 1.2;
}

.ft-notif__sub {
  font-size: 9.5px;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.2;
}

.ft-notif--top {
  top: 22px;
  right: 14px;
  animation: ft-notif-float 3s ease-in-out infinite;
}

@keyframes ft-notif-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}


@media (max-width: 767px) {
  .feat-tabs__tablist {
    grid-template-columns: repeat(3, 1fr);
  }

  .ft-tab:nth-child(3) { border-right: none; }

  .ft-tab:nth-child(4),
  .ft-tab:nth-child(5) {
    border-top: 1.5px solid var(--color-border);
  }

  .ft-panel {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .ft-panel__text {
    padding: 22px 18px;
    gap: 12px;
  }

  /* On mobile: image flows below text, not as background */
  .ft-panel__visual:not(.ft-panel__visual--phone):not(.ft-panel__visual--browser) {
    position: relative;
    height: 220px;
    overflow: hidden;
  }

  .ft-panel__visual:not(.ft-panel__visual--phone):not(.ft-panel__visual--browser) img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .ft-panel__visual:not(.ft-panel__visual--phone):not(.ft-panel__visual--browser)::after {
    display: none;
  }
}

/* ===== Product Pages Shared (myccu, ccurobot) ===== */
.pg-hero {
  overflow: visible;
}

.pg-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.pg-hero__content {
  text-align: center;
  width: 100%;
}

.pg-phone-col {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.pg-phone-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg-ft-phone { width: 210px; }

.pg-notif { right: -12px; }

@media (max-width: 440px) {
  .pg-notif    { display: none; }
  .pg-ft-phone { width: 180px; }
}

@media (min-width: 960px) {
  .pg-hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .pg-hero__content {
    text-align: left;
    flex: 1;
    max-width: 500px;
    width: auto;
  }

  .pg-ft-phone { width: 260px; }
  .pg-notif    { right: -20px; }
}

/* ===== 17. Catalog page (/products/) ===== */
.catalog-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* После hero линия сверху уже есть — это его нижняя граница. Свою убираем,
   иначе две границы встают вплотную и полоса выглядит вдвое толще. */
.hero + .catalog-nav { border-top: 0; }

.catalog-nav__list {
  display: flex;
  gap: var(--space-xs);
  padding-block: 0.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.catalog-nav__list::-webkit-scrollbar { display: none; }

.catalog-nav__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition),
              border-color var(--transition);
}

/* Компактная навигация на 4 или 5 вкладок: сетка без горизонтального
   скролла — на узком экране все разделы видны сразу, ничего не спрятано
   за краем. На более широких экранах возвращаемся к обычному ряду. */
@media (max-width: 899px) {
  .catalog-nav__list--tabs4,
  .catalog-nav__list--tabs5 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    overflow-x: visible;
  }

  .catalog-nav__list--tabs4 .catalog-nav__link,
  .catalog-nav__list--tabs5 .catalog-nav__link {
    justify-content: center;
    text-align: center;
    white-space: normal;
    min-width: 0;
  }
}

/* Навигация с большим числом вкладок или длинными названиями (архивные
   страницы файлов): перенос на новую строку вместо горизонтального
   скролла, чтобы вкладки не уезжали за край экрана незаметно для
   пользователя — на любой ширине экрана. */
.catalog-nav__list--wrap {
  flex-wrap: wrap;
  overflow-x: visible;
}

.catalog-nav__link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.catalog-nav__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.catalog-nav__link:active { transform: translateY(1px); }

.catalog-nav__link.active {
  color: var(--color-primary);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.catalog-section { scroll-margin-top: calc(var(--header-h) + 60px); }
.catalog-section--alt { background: var(--color-surface); }

.catalog-section .section-sub { margin-bottom: var(--space-lg); }

.fw-picker-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.fw-picker-panel .section-sub { margin-bottom: var(--space-sm); }

/* Product photos on white background — show whole device, no crop */
.product-card__img-wrap--contain { padding: var(--space-sm); }

.product-card__img-wrap--contain img {
  object-fit: contain;
  height: 200px;
  mix-blend-mode: multiply;
}

/* Discontinued products */
.product-card--discontinued { background: var(--color-primary); }

.product-card--discontinued:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-card);
}

.product-card--discontinued .product-card__img-wrap {
  background: var(--color-primary);
}

.product-card--discontinued .product-card__img-wrap img {
  filter: grayscale(1);
  opacity: 0.75;
}

.product-card__label--muted { background: var(--color-text-muted); }

/* Accessory cards (expansion boards, external devices, software) */
.acc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.acc-card {
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: box-shadow var(--transition), transform var(--transition),
              border-color var(--transition);
  position: relative;
}

.acc-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.acc-card__thumb {
  background: var(--color-primary);
  border-radius: var(--radius-md);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.acc-card__thumb img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.acc-card__thumb--placeholder { color: rgba(0, 136, 204, 0.35); }

.acc-card__name {
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.acc-card__desc {
  font-size: var(--font-size-sm);
  flex: 1;
}

.acc-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.acc-card__tag {
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid rgba(0, 136, 204, 0.15);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.acc-card__link {
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.acc-card__link:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.acc-card__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Whole card is clickable: the link sits on the name, then stretches via
   ::after to cover the entire (already position:relative) card. */
.acc-card__name-link {
  color: inherit;
  text-decoration: none;
}

.acc-card__name-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.acc-card__name-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}

@media (min-width: 600px) {
  .acc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .acc-grid { grid-template-columns: repeat(3, 1fr); }
  .acc-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 17в. Product detail page ===== */

/* Tab-mode panels: sections toggled via the hidden attribute */
.catalog-section[hidden] { display: none; }

/* Product hero: two real columns, no overlap — gallery must stay clickable */
@media (min-width: 900px) {
  .hero--product .hero__content { flex: 0 0 48%; min-width: 0; }

  .hero--product .hero__visual {
    position: static;
    transform: none;
    width: auto;
    flex: 1;
    min-width: 0;
  }

  /* No overlap here, so the readability gradient over the photo isn't needed */
  .hero--product .hero__img-wrap::before { display: none; }
}

/* Product gallery: main image + thumbnails */
.pgallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.pgallery__main {
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.pgallery__main img {
  width: 100%;
  height: 350px;
  object-fit: contain;
  padding: var(--space-sm);
}

.pgallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.pgallery__thumb {
  width: 62px;
  height: 62px;
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  overflow: hidden;
  opacity: 0.75;
  transition: border-color var(--transition), opacity var(--transition);
}

.pgallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pgallery__thumb:hover { opacity: 1; }

.pgallery__thumb:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  opacity: 1;
}

.pgallery__thumb.is-active {
  border-color: var(--color-accent);
  opacity: 1;
}

/* Shot gallery: 2x2 grid of screenshots, click to enlarge in a lightbox */
.shot-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.shot-gallery--single { grid-template-columns: 1fr; }

/* Native-size thumbnails (source images already sized as intended) - fill
   as many columns as fit the available width instead of stretching a
   fixed 2-up grid, and reflow on their own as the viewport changes. Shared
   base for any gallery of small, pre-sized screenshots; the accordion FAQ
   context (search "shot-gallery--native" further up this file) layers its
   own track width/padding/cap on top instead of redeclaring this. Default
   150px track matches the "Описание" screenshots on download/archive/uguard.html. */
.shot-gallery--native {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  justify-content: start;
  align-items: start;
}

.shot-gallery--native.shot-gallery--single {
  grid-template-columns: minmax(0, max-content);
}

.shot-gallery--native .shot-gallery__item img {
  width: auto;
  height: auto;
  max-width: 100%;
}

.shot-gallery__item {
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: zoom-in;
  transition: box-shadow var(--transition), transform var(--transition);
}

.shot-gallery__item:hover { box-shadow: var(--shadow-card-hover); }

.shot-gallery__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.shot-gallery__item--square { border-radius: 0; }

.shot-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Diagram strip: figure+caption per item, fixed-height frame so uneven
   diagram aspect ratios still line up in a row */
.shot-gallery--diagrams {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 700px) {
  .shot-gallery--diagrams { grid-template-columns: repeat(3, 1fr); }
}

.shot-gallery__figure { margin: 0; }

.shot-gallery--diagrams .shot-gallery__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 350px;
  padding: var(--space-sm);
}

.shot-gallery--diagrams .shot-gallery__item img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.shot-gallery__caption {
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* Lightbox: full-size preview overlay for .shot-gallery items */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(10, 20, 30, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: min(100%, 1100px);
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
}

.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }

.lightbox__close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Spec / modification tables */
.spec-table-wrap {
  overflow-x: auto;
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Узкая таблица (мало колонок, короткое содержимое, напр. таблица
   соответствия модификаций) — не растягивается на всю ширину контейнера. */
.spec-table-wrap--narrow {
  max-width: 480px;
}

.spec-table-wrap--narrow .spec-table { min-width: 0; }

.spec-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 0.7rem var(--space-md);
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.spec-table thead th {
  border-top: none;
  background: var(--color-surface);
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  white-space: nowrap;
}

.spec-table tbody th[scope="row"] {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  width: 44%;
}

.spec-table td { color: var(--color-text-muted); }

.spec-table__group th {
  background: var(--color-accent-light);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-dark);
}

.spec-table--center td,
.spec-table--center thead th:not(:first-child) { text-align: center; }

/* Значения строк выровнены влево, заголовок остаётся центрированным
   (напр. таблица соответствия модификаций) */
.spec-table--left-values tbody td { text-align: left; }

/* Колонка "Файл" — имена файлов выровнены влево, даже в остальном
   центрированной таблице (напр. пакеты/прошивки для перехода) */
.spec-table--center td[data-label="Файл"],
.spec-table--center td[data-label="Новая модиф."] { text-align: left; }

.spec-table--center tbody th[scope="row"] { width: auto; white-space: nowrap; }

/* Колонка "Новая модиф." — не переносится на новую строку (напр.
   прошивки для перехода Windows -> Веб) */
.spec-table td[data-label="Новая модиф."] { white-space: nowrap; }

@media (min-width: 900px) {
  .spec-table th,
  .spec-table td { font-size: var(--font-size-base); }
}

/* Mobile: stack each spec-table row into a self-contained card instead of
   forcing horizontal scroll — long values were getting clipped at the
   viewport edge with no obvious way to reveal the rest. */
@media (max-width: 599px) {
  .spec-table-wrap {
    overflow-x: visible;
    background: none;
    border: none;
    box-shadow: none;
  }

  .spec-table { min-width: 0; }

  .spec-table thead { display: none; }

  .spec-table,
  .spec-table tbody,
  .spec-table tr { display: block; }

  .spec-table tbody tr:not(.spec-table__group) {
    margin-bottom: var(--space-sm);
    background: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }

  .spec-table tbody tr:first-child { margin-top: 0; }

  .spec-table__group { margin-bottom: var(--space-xs); }
  .spec-table__group th { border-radius: var(--radius-md); }

  .spec-table th,
  .spec-table td {
    display: block;
    width: auto;
    border-top: none;
  }

  .spec-table tbody th[scope="row"] {
    width: 100%;
    padding-bottom: 0.5rem;
    background: var(--color-surface);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
  }

  .spec-table td {
    padding-top: 0.3rem;
    border-top: 1px solid var(--color-border);
  }

  /* Multi-column tables (e.g. modifications table): reveal the column
     name above each value via data-label since there's no header row. */
  .spec-table--center td { text-align: left; }

  .spec-table--center td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    margin-bottom: 0.15rem;
  }
}

/* Download lists (documentation & firmware) */
.dl-grid { display: grid; gap: var(--space-sm); }

@media (min-width: 900px) {
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
}

.dl-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

a.dl-item:hover {
  border-color: rgba(0, 136, 204, 0.45);
  box-shadow: var(--shadow-card);
}

a.dl-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

a.dl-item:active { transform: translateY(1px); }

.dl-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: var(--radius-md);
}

.dl-item__body { min-width: 0; flex: 1; }

.dl-item__name {
  display: block;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  overflow-wrap: anywhere;
}

.dl-item__meta {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.dl-item__arrow {
  flex-shrink: 0;
  color: var(--color-accent);
  transition: transform var(--transition);
}

a.dl-item:hover .dl-item__arrow { transform: translateY(2px); }

/* Inline order-code chip */
.order-code {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.85em;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
}

.order-code--wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Order-code breakdown (buy/ccu-order-code.html) */
@media (min-width: 900px) {
  .acc-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.oc-list {
  display: grid;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.oc-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.oc-list .order-code { flex-shrink: 0; }

.oc-notes {
  max-width: 72ch;
  margin-top: var(--space-lg);
  display: grid;
  gap: var(--space-sm);
}

/* Numbered step list, e.g. order procedure on buy/index.html */
.step-list {
  display: grid;
  gap: var(--space-md);
  counter-reset: step;
  max-width: 72ch;
}

.step-list > li {
  position: relative;
  padding-left: calc(28px + var(--space-sm));
  min-height: 28px;
  color: var(--color-text-muted);
  line-height: var(--line-height-body);
}

.step-list > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 18. Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
