/* ==========================================================================
   VERITEX · компоненты
   Правила ТЗ, которые тут соблюдены:
   — анимируем только transform и opacity (наведение = слой-подсветка, чей opacity меняется);
   — тени-«подушки», стекло, градиентные кнопки не используем;
   — тап-цели ≥ 44px; фокус — кольцо --violet-glow;
   — состояния .is-hover / .is-focus / .is-active нужны только витрине, чтобы показать состояние без мыши.
   ========================================================================== */

/* ---------- иконки (inline-спрайт в index.html) ---------- */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }

/* ---------- точка статуса / линейки ---------- */
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot, currentColor); flex: none; }

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: 0;
  white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease);
}
/* слой наведения: меняется только opacity */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: #fff; opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.btn:where(:active, .is-active) { transform: scale(0.98); }
.btn:where(:disabled, [aria-disabled="true"], .is-disabled) { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* Главная: одна на экран */
.btn--primary { background: var(--violet); color: #fff; }
.btn--primary::after { background: #fff; }
.btn--primary:where(:hover, .is-hover)::after { opacity: 0.1; }

.btn--secondary { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--secondary:where(:hover, .is-hover)::after { opacity: 0.07; }

.btn--sm { min-height: var(--tap); padding: 0 18px; font-size: 13px; letter-spacing: 0; text-transform: none; }   /* компактные кнопки внутри компонентов — без капса, как в макете */

/* текстовая ссылка-кнопка: «Проверить партию →» */
.btn--text { min-height: var(--tap); padding: 0 6px; color: var(--violet-glow); }
.btn--text::after { display: none; }
.btn--text .icon { transition: transform var(--dur-fast) var(--ease); }
.btn--text:where(:hover, .is-hover) .icon { transform: translateX(3px); }

/* кнопка на светлой «бумаге» */
.btn--ink { background: var(--paper-ink); color: var(--paper); }
.btn--ink-outline { color: var(--paper-ink); box-shadow: inset 0 0 0 1px rgba(23, 21, 27, 0.28); }
.btn--ink-outline::after { background: var(--paper-ink); }
.btn--ink::after { background: #fff; }
.btn--ink:where(:hover, .is-hover)::after { opacity: 0.14; }
.btn--ink-outline:where(:hover, .is-hover)::after { opacity: 0.06; }

.btn--block { width: 100%; }

/* круглая иконка 44×44 (поиск, избранное, корзина) */
.icon-btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: var(--tap); height: var(--tap); padding: 0; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text); font-family: var(--font-mono); font-size: 13px;
  transition: transform var(--dur-fast) var(--ease);
}
.icon-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.icon-btn:where(:active, .is-active) { transform: scale(0.96); }
.icon-btn:where(:hover, .is-hover)::after { opacity: 0.07; }
.icon-btn--wide { padding: 0 16px; }
.icon-btn--solid { background: var(--violet); box-shadow: none; color: #fff; }
.icon-btn--ghost { box-shadow: none; }

/* ==========================================================================
   Чипы, сегменты, переключатель вида, счётчик, свитч, чекбокс, радио
   ========================================================================== */
.chip {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; line-height: 1; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.chip::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.chip:where(:hover, .is-hover)::after { opacity: 0.07; }
.chip:where(:active, .is-active-press) { transform: scale(0.97); }
.chip[aria-pressed="true"], .chip.is-selected { background: var(--text); color: var(--bg); box-shadow: none; }
.chip[aria-pressed="true"]::after { background: #000; }
.chip .dot { --dot: var(--accent, var(--violet-glow)); }

.seg {
  display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center;
  min-width: 72px; min-height: var(--tap); padding: 0 20px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 14px; color: var(--text-muted);
}
.seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--violet-glow); outline-offset: 3px; }
.seg input:disabled + span { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }

/* переключатель вида «Таблица / Список» */
.view-switch { display: inline-flex; padding: 4px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); }
.view-switch button { width: var(--tap); height: var(--tap); border-radius: var(--r-pill); display: grid; place-items: center; color: var(--text-muted); }
.view-switch button[aria-pressed="true"] { background: var(--violet); color: #fff; }

.stepper { display: inline-flex; align-items: center; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); }
.stepper button { width: var(--tap); height: var(--tap); border-radius: var(--r-pill); display: grid; place-items: center; }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 36px; text-align: center; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* свитч */
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; font-size: 14px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; width: 44px; height: 26px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1.5px var(--field-border); flex: none; }
.switch__track i { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); transition: transform var(--dur-base) var(--ease); }
.switch input:checked + .switch__track { background: var(--violet); box-shadow: none; }
.switch input:checked + .switch__track i { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--violet-glow); outline-offset: 3px; }

/* чекбокс (метка ≥44px по высоте) */
.check { display: flex; align-items: flex-start; gap: 14px; min-height: var(--tap); padding-block: 10px; cursor: pointer; font-size: 15px; line-height: 1.45; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 1px 0 0; width: 22px; height: 22px;
  border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--field-border); background: transparent; cursor: pointer;
}
.check input:checked {
  background: var(--violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.5 3.5L16 8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: none;
}
.check input:focus-visible { outline: 2px solid var(--violet-glow); outline-offset: 3px; }
.check input:disabled { opacity: 0.4; cursor: not-allowed; }
.check input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--err); }

/* радио-карточка: способ доставки */
.radio-card {
  display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 14px 18px;
  border-radius: var(--r-input); box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--bg);
  cursor: pointer;
}
.radio-card input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--field-border); cursor: pointer;
}
.radio-card input:checked { box-shadow: inset 0 0 0 2px var(--violet-glow); background: radial-gradient(circle, var(--violet-glow) 0 5px, transparent 5.5px); }
.radio-card input:focus-visible { outline: 2px solid var(--violet-glow); outline-offset: 3px; }
.radio-card:has(input:checked) { box-shadow: inset 0 0 0 1px var(--violet-glow); background: rgba(112, 70, 163, 0.14); }
.radio-card__body { flex: 1; min-width: 0; }
.radio-card__title { font-size: 16px; }
.radio-card__sub { font-size: 13px; color: var(--text-muted); }
.radio-card__price { font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); white-space: nowrap; }

/* ==========================================================================
   Поля ввода: подпись ВСЕГДА видимая; placeholder — только подсказка формата
   ========================================================================== */
.field { display: grid; gap: 8px; }
.field__label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.field__hint  { font-size: 13px; color: var(--text-muted); }
.field__error { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--err); }
.field__error .icon { margin-top: 1px; }

.input {
  width: 100%; height: 56px; padding: 0 18px;
  background: var(--bg); color: var(--text);
  border: 0; border-radius: var(--r-input);
  box-shadow: inset 0 0 0 1px var(--field-border);
  font-size: 16px;   /* ≥16px: iOS не приближает страницу при фокусе */
  appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--text-muted); opacity: 1; }
.input:where(:hover, .is-hover) { box-shadow: inset 0 0 0 1px var(--text-muted); }
.input:where(:focus-visible, .is-focus) { box-shadow: inset 0 0 0 1px var(--violet-glow); outline: 2px solid var(--violet-glow); outline-offset: 2px; }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--err); }
.input:disabled { opacity: 0.45; cursor: not-allowed; }
.input--mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.input--lg { height: 64px; font-size: 22px; padding-inline: 22px; }
.input-wrap { position: relative; }
.input-wrap > .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-wrap > .input { padding-left: 48px; }
.input-row { display: flex; gap: var(--s-2); }
.input-row > .input { flex: 1; min-width: 0; }

/* ==========================================================================
   Теги, статусы, плашки
   ========================================================================== */
.tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; line-height: 1; color: var(--text-muted); text-transform: uppercase; }
.tag .dot { --dot: var(--accent); }

.status { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px; line-height: 1.2; color: var(--text-muted); white-space: nowrap; }
.status[data-s="ok"]   .dot { background: var(--ok); }
.status[data-s="warn"] .dot { background: var(--warn); }
.status[data-s="off"]  .dot { background: var(--off); }

.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-strong); font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.pill--ok { color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.pill--verified { color: var(--violet-glow); box-shadow: inset 0 0 0 1px rgba(169, 139, 219, 0.5); }

/* число чистоты */
.purity { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ok); }

/* «✓ Партия зарегистрирована Veritex» */
.banner-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-radius: var(--r-cell); background: var(--ok-surface); box-shadow: inset 0 0 0 1px var(--ok-line); }
.banner-ok__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ok); color: var(--bg); display: grid; place-items: center; flex: none; }
.banner-ok__title { font-size: 20px; line-height: 1.2; }
.banner-ok__sub { font-size: 14px; color: var(--text-muted); }
.banner-ok__url { margin-left: auto; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* Плашка RUO */
.note-ruo { padding: 14px 18px; border-radius: var(--r-input); background: var(--warn-surface); box-shadow: inset 0 0 0 1px var(--warn-line); color: var(--warn-ink); font-size: 14px; line-height: 1.5; }

/* Плашка объявлений */
.announce { position: relative; display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 6px 52px 6px 16px; background: var(--bg-raised); box-shadow: inset 0 -1px 0 var(--line); font-size: 13px; color: var(--text-muted); text-align: center; }
.announce a { color: var(--violet-glow); text-decoration: underline; text-underline-offset: 3px; }
.announce__close { position: absolute; right: 4px; top: 0; width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--text-muted); border-radius: 50%; }

/* ==========================================================================
   Таблица данных (паспорт вещества): подпись слева, значение моно справа
   ========================================================================== */
.data-table { display: grid; }
.data-table > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: 14px 0; border-top: 1px solid var(--line); }
.data-table > div:last-child { border-bottom: 1px solid var(--line); }
.data-table dt { font-size: 14px; color: var(--text-muted); }
.data-table dd { font-family: var(--font-mono); font-size: var(--fs-mono); text-align: right; font-variant-numeric: tabular-nums; }

/* бусины аминокислот */
.beads { display: flex; flex-wrap: wrap; gap: 8px; }
.bead { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; box-shadow: inset 0 0 0 1px var(--line-strong); cursor: default; }
.bead[data-kind="acid"]  { background: var(--violet); box-shadow: none; color: #fff; }
.bead[data-kind="basic"] { background: #1F7A8C; box-shadow: none; color: #fff; }
.bead::after {
  content: attr(data-name); position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translate(-50%, 4px); padding: 6px 10px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-family: var(--font-body); font-size: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 5; transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.bead:where(:hover, :focus-visible, .is-hover)::after { opacity: 1; transform: translate(-50%, 0); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.legend i[data-kind="acid"]  { background: var(--violet); box-shadow: none; }
.legend i[data-kind="basic"] { background: #1F7A8C; box-shadow: none; }

/* ==========================================================================
   Ячейка товара («клетка таблицы Менделеева»)
   ========================================================================== */
.cell {
  --accent: var(--violet-glow); --accent-solid: var(--violet);
  position: relative; isolation: isolate; overflow: clip;   /* clip, не hidden: ячейка может вырасти под контент */
  display: flex; flex-direction: column;
  aspect-ratio: 1 / 0.92; padding: var(--s-3);
  border-radius: var(--r-cell); background-color: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (min-width: 768px) { .cell { aspect-ratio: 1 / 1; } }

/* кольцо линейки и внутреннее свечение: появляются через opacity */
.cell::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--accent); opacity: 0; transition: opacity var(--dur-base) var(--ease); }
.cell::after  { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--accent-solid) 38%, transparent), transparent 70%); opacity: 0; transition: opacity var(--dur-base) var(--ease); }

.cell__top { display: flex; justify-content: space-between; align-items: center; min-height: 16px; }
.cell__num { font-family: var(--font-mono); font-size: 12px; line-height: 1; color: var(--text-faint); }   /* декоративный номер, aria-hidden */
.cell__main { margin-block: auto; padding-block: var(--s-2); }
.cell__code { display: block; font-size: var(--fs-cell); line-height: 1.08; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.cell__code::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* вся ячейка — ссылка */
.cell__code:focus-visible { outline: none; }
.cell:has(.cell__code:focus-visible) { outline: 2px solid var(--violet-glow); outline-offset: 3px; }
.cell__dose { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.cell__foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 20px; }
.cell__price { font-size: 15px; font-variant-numeric: tabular-nums; }


/* действия при наведении (замещают нижнюю строку) */
.cell__actions { position: absolute; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); z-index: 2; display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); }
.cell__actions .btn { flex: 1; min-width: 0; padding-inline: 12px; }
.cell__notify { position: relative; z-index: 2; min-height: var(--tap); margin: -12px 0 -12px -6px; padding: 0 6px; font-size: 13px; color: var(--violet-glow); text-decoration: underline; text-underline-offset: 3px; }

.cell:where(:hover, .is-hover, :focus-within)::before,
.cell:where(:hover, .is-hover, :focus-within)::after { opacity: 1; }
.cell__foot > * { transition: opacity var(--dur-fast) var(--ease); }
.cell__foot { flex-wrap: wrap; row-gap: 4px; }

/* Кнопки при наведении — только на широких экранах (ячейка ≥ ~190px).
   На телефоне вместо наведения тап открывает карточку, ячейка остаётся как есть. */
.cell__actions { display: none; }
@media (min-width: 768px) and (hover: hover) {
  .cell__actions { display: flex; }
  .cell__foot { flex-wrap: nowrap; }
  .cell[data-status="ok"]:where(:hover, .is-hover, :focus-within) .cell__actions,
  .cell[data-status="low"]:where(:hover, .is-hover, :focus-within) .cell__actions { opacity: 1; transform: none; pointer-events: auto; }
  .cell[data-status="ok"]:where(:hover, .is-hover, :focus-within) .cell__foot > *,
  .cell[data-status="low"]:where(:hover, .is-hover, :focus-within) .cell__foot > * { opacity: 0; }
}

/* нет в наличии / ожидается: приглушено + штриховка; нижняя строка и кнопка остаются читаемыми */
.cell[data-status="soon"], .cell[data-status="off"] {
  background-image: repeating-linear-gradient(135deg, transparent 0 9px, rgba(244, 240, 250, 0.045) 9px 10px);
}
.cell[data-status="soon"] .cell__top,
.cell[data-status="soon"] .cell__main,
.cell[data-status="off"] .cell__top,
.cell[data-status="off"] .cell__main { opacity: 0.5; }
.cell--ghost .cell__code { color: var(--text-muted); font-size: calc(var(--fs-cell) * 0.85); }
.cell--ghost .cell__code::after { display: none; }

/* сетка ячеек */
.cell-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
@media (min-width: 768px)  { .cell-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); } }
@media (min-width: 1100px) { .cell-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- Список («прайс») ---------- */
.plist { border-radius: var(--r-cell); background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.plist__head, .plist__row { display: grid; align-items: center; column-gap: var(--s-3); padding: 0 var(--s-4); }
.plist__head { min-height: 48px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.plist__row { position: relative; min-height: 84px; border-top: 1px solid var(--line); padding-block: 12px; }
.plist__row[data-status="soon"] .plist__name, .plist__row[data-status="off"] .plist__name, .plist__row[data-status="soon"] .plist__dose, .plist__row[data-status="off"] .plist__dose { opacity: 0.55; }
.plist__name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.plist__name .vial { width: 28px; flex: none; }
.plist__code { display: block; font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.plist__code::after { content: ""; position: absolute; inset: 0; }
.plist__dose { display: flex; gap: 6px; flex-wrap: wrap; }
.plist__dose span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 13px; box-shadow: inset 0 0 0 1px var(--violet-glow); }
.plist__dose span.is-na { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-muted); }
.plist__num { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.plist__cas, .plist__lot, .plist__form { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.plist__price { font-size: 16px; font-variant-numeric: tabular-nums; }
.plist__form { font-family: var(--font-body); font-size: 14px; color: var(--text-muted); }
.plist__cas { color: var(--text-muted); }
.plist__act { position: relative; z-index: 2; justify-self: end; }
.plist__meta-m { display: contents; }
@media (min-width: 1000px) {
  .plist__head, .plist__row { grid-template-columns: 40px minmax(180px, 1.5fr) 100px minmax(120px, 1fr) minmax(110px, 0.9fr) minmax(150px, 1.1fr) 90px 190px; }
}
@media (max-width: 999.98px) {
  .plist__head { display: none; }
  .plist__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "dose act" "meta meta"; row-gap: 8px; }
  .plist__num, .plist__form { display: none; }
  .plist__name { grid-area: name; } .plist__dose { grid-area: dose; } .plist__act { grid-area: act; }
  .plist__meta-m { display: flex; gap: 14px; flex-wrap: wrap; grid-area: meta; align-items: center; }
}

/* ==========================================================================
   «Бумажная» панель COA — единственное светлое место сайта
   Показываем только реальные данные из отчёта лаборатории. Нет данных — пустая рамка, не рисунок.
   ========================================================================== */
.paper { background: var(--paper); color: var(--paper-ink); border-radius: var(--r-panel); padding: var(--s-4); --muted: var(--paper-muted); }
@media (min-width: 768px) { .paper { padding: var(--s-5); } }
.paper .muted { color: var(--paper-muted); }
.paper a:not(.btn), .paper .link { color: var(--violet); }
.coa__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: var(--s-4); }
.coa__eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-muted); }
.coa__lot { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: var(--r-pill); background: var(--paper-ink); color: var(--paper); font-family: var(--font-mono); font-size: 12px; }
.coa__grid { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .coa__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.coa__purity { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; line-height: 1; }
.coa__purity b { font-weight: 400; font-size: clamp(56px, 9vw, 84px); letter-spacing: -0.04em; }
.coa__purity span { font-size: 28px; color: var(--violet); }
.coa__sub { margin-top: 12px; font-size: 14px; color: var(--paper-muted); }
.coa__rows { margin-top: var(--s-4); display: grid; }
.coa__rows > div { display: flex; justify-content: space-between; gap: var(--s-3); padding: 11px 0; border-top: 1px solid var(--paper-line); font-size: 14px; }
.coa__rows dt { color: var(--paper-muted); }
.coa__rows dd { font-family: var(--font-mono); font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.coa__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.coa__slot { display: grid; place-items: center; text-align: center; aspect-ratio: 16 / 10; border-radius: 16px; padding: var(--s-3); background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(23, 21, 27, 0.04) 9px 10px), #fff; box-shadow: inset 0 0 0 1.5px rgba(23, 21, 27, 0.2); border: 0; font-family: var(--font-mono); font-size: 12px; color: var(--paper-muted); }
.coa__peaks { width: 100%; margin-top: var(--s-3); border-collapse: collapse; font-size: 13px; }
.coa__peaks th { text-align: left; font-weight: 400; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-muted); padding: 8px 0; }
.coa__peaks td { padding: 9px 0; border-top: 1px solid var(--paper-line); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.coa__peaks th:last-child, .coa__peaks td:last-child { text-align: right; }

/* ==========================================================================
   Окно «Доступ в лабораторию» (RUO-гейт)
   ========================================================================== */
.gate { position: relative; overflow: hidden; width: 100%; max-width: 640px; border-radius: var(--r-panel); background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line-strong); }
.gate__bar { display: flex; justify-content: space-between; gap: 12px; padding: 18px 28px; white-space: nowrap; border-bottom: 1px dashed var(--line-strong); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.gate__body { display: grid; grid-template-columns: 1fr; gap: var(--s-3); padding: 22px 20px 26px; }
@media (min-width: 560px) { .gate__body { padding: 28px; } .gate__bar { padding-inline: 28px; } }
@media (max-width: 559.98px) { .gate__bar { padding-inline: 20px; font-size: 10px; letter-spacing: 0.08em; } }
@media (min-width: 560px) { .gate__body { grid-template-columns: 76px 1fr; column-gap: 24px; } }
.gate__icon { width: 76px; height: 76px; }
.gate__title { font-size: clamp(26px, 5vw, 34px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 400; }
.gate__text { margin-top: 14px; font-size: 16px; line-height: 1.55; color: var(--text-muted); }
.gate__consent { margin-top: 20px; padding: 6px 16px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px var(--line); }
.gate__consent .check { font-size: 14px; }
.gate__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.gate__lines { display: flex; height: 5px; }
.gate__lines i { flex: 1; }
.gate__lines i:nth-child(1) { background: var(--line-peptides); }
.gate__lines i:nth-child(2) { background: var(--line-sarms); }
.gate__lines i:nth-child(3) { background: var(--line-skin); }
.gate__lines i:nth-child(4) { background: var(--line-sport); }

dialog.gate-dialog { padding: 0; border: 0; background: transparent; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: visible; color: var(--text); }
dialog.gate-dialog::backdrop { background: rgba(15, 13, 19, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header { display: flex; align-items: center; gap: var(--s-4); min-height: 76px; }
.site-header__logo img { height: 40px; width: auto; }
.nav { display: none; align-items: center; gap: 4px; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a:where(:hover, .is-hover) { color: var(--text); }
.site-header__tools { margin-left: auto; display: flex; gap: 8px; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--violet); color: #fff; font-family: var(--font-mono); font-size: 11px; display: grid; place-items: center; }

/* ==========================================================================
   Бегущая строка препаратов
   ========================================================================== */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__track { display: flex; width: max-content; animation: ticker-scroll var(--ticker-duration, 40s) linear infinite; }
.ticker:where(:hover, :focus-within) .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; flex: none; align-items: center; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 22px; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.ticker__item:where(:hover, .is-hover) { color: var(--accent); }
.ticker__item .dot { --dot: var(--ok); }
.ticker__item[data-s="warn"] .dot { --dot: var(--warn); }
.ticker__item[data-s="off"]  .dot { --dot: var(--off); }
.ticker__sep { color: var(--text-faint); font-family: var(--font-mono); }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .ticker__track { animation: none !important; }
  .ticker__group[aria-hidden="true"] { display: none; }
}

/* ==========================================================================
   Флакон (SVG-заглушка до появления 3D): собирается из данных товара
   ========================================================================== */
.vial { display: block; width: 100%; height: auto; }

/* ==========================================================================
   Панель фильтров каталога, select, нижняя панель корзины (mobile)
   ========================================================================== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: 10px; border-radius: var(--r-cell); background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line); }
.toolbar .input-wrap { flex: 1 1 220px; min-width: 0; }
.toolbar .input { height: 44px; }
.toolbar__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.select { position: relative; }
.select .input { padding-right: 44px; cursor: pointer; }
.select > .icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); }
.toolbar .select .input { width: auto; min-width: 150px; font-size: 14px; }

.cart-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 24px; border-radius: var(--r-pill); background: var(--paper); color: var(--paper-ink); font-size: 15px; font-variant-numeric: tabular-nums; }
