/* pages.css — MyNUC.ru shared stylesheet for sub-pages
 *
 * ВАЖНО: с v=14 (2026-05-17) дизайн-система вынесена в общий файл
 * /css/mynuc-shared.css. Он подключается ПЕРВЫМ через @import — оттуда
 * приходят:
 *   • CSS-токены палитры (:root + [data-theme="dark"])
 *   • Класс .island и его потомки (.island-title, .island-input, …)
 *   • Mobile responsive правила (768/640/480)
 *   • Touch-friendly адаптация (hover отключён на тач-устройствах)
 *
 * pages.css наследует токены и добавляет sub-page-specific стили
 * (топбар, шапка, page-foot, register-формы и т.п.). При коллизии —
 * правила pages.css перекрывают shared, потому что подключены позже.
 *
 * map-portal и admin-panel подключают тот же mynuc-shared.css через
 * <link> в app/layout.tsx — единый источник правды без дублирования.
 */
/* Относительный путь — работает и через HTTP (продакшен) и через file:// (локальный
   просмотр). Раньше был абсолютный '/css/...' — на file:// уходил в корень диска,
   файл не загружался, все правки shared.css были невидимы. Юзер 2026-06-01:
   «на разных браузерах вообще без изменений». */
@import url('css/mynuc-shared.css?v=86');

/* ── Magistral C — основной шрифт экосистемы (взят из Mega).
   Юзер 2026-06-01: «меняем все шрифты как на меге». 4 веса (400 Regular,
   500 Medium, 700 Bold, 900 Black). Файлы локально в /fonts/. */
@font-face {
  font-family: 'Magistral C';
  src: url('/fonts/MagistralC-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Magistral C';
  src: url('/fonts/MagistralC-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Magistral C';
  src: url('/fonts/MagistralC-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Magistral C';
  src: url('/fonts/MagistralC-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Глобальный шрифт всего сайта — Magistral C (как в Mega). Fallback
   на системный Segoe UI (Windows) → system-ui → sans-serif.
   Letter-spacing 0.03em — юзер 2026-06-01: «текст сливается, как в логотипе
   увеличиваем меж-буквенное расстояние с 0 до 0,3». Magistral C имеет
   плотные глифы — небольшое разрежение даёт читаемость. */
html, body, input, button, select, textarea {
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0.04em;
}

:root {
  --a:   #0b4a8f;
  --bg:  #f8fafc;
  --sur: #ffffff;
  --t1:  #0a0d14;
  --t2:  #5c6474;
  --t3:  #9399a6;
  --brd: #e2e8f0;
  --brdm: rgba(0,0,0,.12);
  --shadow-card: 0 1px 3px rgba(0,0,0,.05);
  --tint-weak:  rgba(0,0,0,.018);
  --tint-blue:  rgba(11,74,143,.04);
  --tint-blue2: rgba(11,74,143,.03);
  --tint-blue3: rgba(11,74,143,.025);
  --brd-blue:   rgba(11,74,143,.12);
  --brd-blue2:  rgba(11,74,143,.1);
  --tt-bg: rgba(8,10,20,.82);
}

/* ── ТЁМНАЯ ТЕМА ── */
[data-theme="dark"] {
  /* Юзер 2026-06-04: «опять серый» — старая dark-палитра (#c4d4ed/#8ea4c5)
     нечитаема. Переходим на Mega-палитру + читаемые тексты. Это ГЛОБАЛЬНО
     чинит все var(--t2)/var(--t3) элементы разом (philosophy, principle,
     module-desc и т.д.). pages.css загружается ПОСЛЕ shared.css (@import),
     поэтому именно здесь источник правды для dark-переменных. */
  --bg:   #0b1f42;   /* Mega --c-bg (был #0d1117 — почти чёрный) */
  --sur:  #11274f;   /* Mega --c-surface (был #161b22 — серый) */
  --t1:   #f5f9ff;   /* ярко-белый Mega --c-ink (был #e6edf3) */
  --t2:   #c4d4ed;   /* светло-голубой Mega --c-ink-2 (был #c4d4ed серый) */
  --t3:   #8ea4c5;   /* читаемый Mega --c-ink-3 (был #8ea4c5 невидим) */
  --brd:  #264471;   /* navy-tint (был #21262d — почти-чёрный на navy) */
  --brdm: rgba(63, 138, 255, .22);   /* navy-tint бордер инпутов (был белёсый) */
  --shadow-card: 0 1px 3px rgba(0,0,0,.35);
  --tint-weak:  rgba(255,255,255,.03);
  --tint-blue:  rgba(11,74,143,.10);
  --tint-blue2: rgba(11,74,143,.08);
  --tint-blue3: rgba(11,74,143,.07);
  --brd-blue:   rgba(11,74,143,.22);
  --brd-blue2:  rgba(11,74,143,.18);
  --tt-bg: rgba(230,237,243,.9);
}

html, body {
  min-height: 100%;
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--t1);
  transition: background-color .25s ease, color .2s ease;
}

/* Фирменная клетка-сетка УДАЛЕНА (юзер 2026-06-04): фирменный стиль теперь —
   СИНЯЯ ПОДЛОЖКА + анимированные кольца (body::after в mynuc-shared.css).
   html bg + прозрачный body оставлены — кольца рисуются поверх, без сетки. */
html { background-color: var(--bg); }
body { background-color: transparent; }

/* ── TOPBAR (LOCKED — единый стиль шапки всей экосистемы) ──
   Backdrop-blur + СИНЯЯ ОКАНТОВКА border-bottom (LOCKED по фидбеку юзера:
   «бар без окантовки смотреться некрасиво»). Цвет окантовки — наш
   фирменный #0b4a8f с opacity .18 — заметная но не криклявая.

   z-index: 100 — над контентом и ниже модалок. Sticky top.
   Высота 54px зафиксирована во ВСЕЙ экосистеме (CLAUDE.md LOCKED). */
.topbar {
  background: rgba(248, 250, 252, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
          backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(11, 74, 143, .18);
  box-shadow: 0 1px 0 0 rgba(11, 74, 143, .04);  /* лёгкий accent-glow под border */
  height: 54px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background .25s ease, border-color .25s ease;
}
[data-theme="dark"] .topbar {
  background: rgba(11, 31, 66, 0.78);
  border-bottom-color: rgba(11, 74, 143, .25);
  box-shadow: 0 1px 0 0 rgba(11, 74, 143, .08);
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: filter .25s ease;
}
.logo-link:hover {
  filter: drop-shadow(0 0 4px rgba(11,74,143,.65)) drop-shadow(0 0 12px rgba(11,74,143,.3));
}
.logo-text {
  font-size: 15px;
  font-weight: 400;
  color: var(--t1);
  letter-spacing: -.01em;
}
.logo-text b { font-weight: 600; color: var(--t1); }
.logo-text span { color: var(--a); }

/* ── Brand logo classes (shared with webmail) — LOCKED ── */
.c-word { font-size: 40px; font-weight: 200; letter-spacing: 0; line-height: 1; font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif; }  /* Magistral C — буквы шире Inter, letter-spacing убрали в 0 (раньше было -0.048em — буквы налезали) */
.c-word b { font-weight: 700; }
.sh {
  /* Юзер 2026-06-05: вернуть переливание словознака как в бэкапе 31.05 — яркий
     9-стоп #0035cc→#0057ff→#0095ff→#00d0ff→#c8eeff (cyan-пик, «переливается на 100%»).
     2026-06-02 был приглушён до #08376b…#3f8aff (боялись слияния на белом) — юзер отменил. */
  background: linear-gradient(90deg, #0035cc 0%, #0057ff 16%, #0095ff 32%, #00d0ff 46%, #c8eeff 51%, #00d0ff 56%, #0095ff 68%, #0057ff 84%, #0035cc 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 12s linear infinite;
}
@keyframes shimmer { 0% { background-position: 160% center; } 100% { background-position: -160% center; } }
/* Dark-тема: словознак на тёмном navy — СВЕТЛЫЕ переливающиеся тона (тёмные края
   #0035cc сливались). Юзер 2026-06-05: «в тёмной теме хрень полная». Те же стопы, светлее. */
[data-theme="dark"] .sh,
[data-theme="dark"] .lux-ru,
[data-theme="dark"] .lux-word {
  background: linear-gradient(90deg, #1a6fff 0%, #3f8aff 16%, #5ab0ff 32%, #8fd4ff 46%, #c8eeff 51%, #8fd4ff 56%, #5ab0ff 68%, #3f8aff 84%, #1a6fff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════
   BRAND .ru АНИМАЦИЯ — крутится + разбрасывает цифровые коды на hover.
   Юзер 2026-06-04: «как в Аксель-К и Меге». Структура (JS-обёртка):
     <span class="sh">My<b>NUC</b><span class="lux-ru">.ru
       <span class="lux-ru-codes"><i>1</i><i>0</i>…</span>
     </span></span>
   ═══════════════════════════════════════════════════════════════════════ */
.lux-ru {
  display: inline-block;
  position: relative;
  transform-origin: 50% 55%;
  transition: transform 1.0s cubic-bezier(.4, 0, .2, 1);   /* вращение .ru, плавно без отскока */
  /* ВАЖНО: .lux-ru — inline-block → теряет background-clip: text родителя
     .sh и наследует text-fill-color: transparent (.ru становится невидим).
     Даём СВОЙ shimmer-gradient идентичный .sh чтобы .ru снова виден. */
  background: linear-gradient(90deg, #0035cc 0%, #0057ff 16%, #0095ff 32%, #00d0ff 46%, #c8eeff 51%, #00d0ff 56%, #0095ff 68%, #0057ff 84%, #0035cc 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 12s linear infinite;
}
/* Hover на логотип → .ru крутится на 360° */
.sh:hover .lux-ru,
.c-word:hover .lux-ru,
.logo-link:hover .lux-ru,
a:hover > .sh .lux-ru {
  transform: rotate(360deg);
}
/* Цифровые коды (0/1) — контейнер в центре .ru, разлетаются на hover */
.lux-ru-codes {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  pointer-events: none;
}
.lux-ru-codes i {
  position: absolute;
  left: 0; top: 0;
  width: 13px; height: 13px;
  color: #1565d8;                 /* SVG stroke = currentColor — насыщенный фирменный синий */
  opacity: 0;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 4px rgba(21, 101, 216, .5));
}
.lux-ru-codes i svg { display: block; width: 100%; height: 100%; }
[data-theme="dark"] .lux-ru-codes i {
  color: #6cb4ff;                 /* ярче и чище на тёмном фоне */
  filter: drop-shadow(0 0 5px rgba(108, 180, 255, .8));
}
/* 8 кодов — разные направления разлёта */
.lux-ru-codes i:nth-child(1) { --dx: 18px;  --dy: -16px; }
.lux-ru-codes i:nth-child(2) { --dx: 24px;  --dy: -2px;  }
.lux-ru-codes i:nth-child(3) { --dx: 19px;  --dy: 15px;  }
.lux-ru-codes i:nth-child(4) { --dx: 4px;   --dy: 22px;  }
.lux-ru-codes i:nth-child(5) { --dx: -14px; --dy: 17px;  }
.lux-ru-codes i:nth-child(6) { --dx: -20px; --dy: 2px;   }
.lux-ru-codes i:nth-child(7) { --dx: -12px; --dy: -18px; }
.lux-ru-codes i:nth-child(8) { --dx: 6px;   --dy: -24px; }
.sh:hover .lux-ru-codes i,
.c-word:hover .lux-ru-codes i,
.logo-link:hover .lux-ru-codes i,
a:hover > .sh .lux-ru-codes i {
  animation: luxRuBurst 1.6s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes luxRuBurst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  25%  { opacity: 1; transform: translate(calc(-50% + var(--dx) * .5), calc(-50% + var(--dy) * .5)) scale(1.1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.7); }
}

/* Hover на логотип → лёгкий подъём + свечение wordmark (движение) */
.logo-link, .lw {
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.logo-link:hover, .lw:hover {
  transform: translateY(-3px);
}
.sh:hover, .c-word:hover {
  text-shadow: 0 0 16px rgba(26, 111, 255, .4);
}
/* «MyNUC» текст двигается (hop+grow) + бейдж-hex двигается (scale+наклон) — как домик/«Мега» в Mege */
.lux-word {
  display: inline-block;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);   /* быстрый заметный hop */
  /* inline-block теряет background-clip родителя .sh → даём свой shimmer, иначе «MyNUC» прозрачный */
  background: linear-gradient(90deg, #0035cc 0%, #0057ff 16%, #0095ff 32%, #00d0ff 46%, #c8eeff 51%, #00d0ff 56%, #0095ff 68%, #0057ff 84%, #0035cc 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 12s linear infinite;
}
.sh:hover .lux-word, .c-word:hover .lux-word, .logo-link:hover .lux-word, a:hover > .sh .lux-word { transform: translateY(-5px) scale(1.08); }
.logo-link svg, .lw svg { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 50% 55%; }
/* бейдж: hover по тексту .sh тоже срабатывает — .sh внутри .logo-link → .logo-link:hover истинно */
.logo-link:hover svg, .lw:hover svg { transform: scale(1.18) rotate(-5deg); }
@media (prefers-reduced-motion: reduce) {
  .lux-ru, .lux-ru-codes i, .lux-word, .logo-link svg { animation: none !important; transition: none !important; }
  .sh:hover .lux-ru, .c-word:hover .lux-ru, .sh:hover .lux-word, .c-word:hover .lux-word, .logo-link:hover .lux-word, .logo-link:hover svg { transform: none; }
}
@keyframes neonBreathe {
  0%,100% { filter: drop-shadow(0 0 5px rgba(0,87,255,.55)) drop-shadow(0 0 16px rgba(0,87,255,.28)); }
  50% { filter: drop-shadow(0 0 11px rgba(0,100,255,.82)) drop-shadow(0 0 32px rgba(0,87,255,.5)) drop-shadow(0 0 70px rgba(0,160,255,.2)); }
}

/* Section suffix: "MyNUC.ru · 2FA", "· О проекте", "· Документация" …
 * Kills the shimmer gradient (`.sh`) specifically on this span so the
 * suffix stays a solid dark label (not an animated blue blob).
 *
 * Colour: --t1 (dark on light, light on dark) → "Mail" / "2FA" reads
 * as confident near-black. The bullet `::before` is muted --t3 so it
 * acts as a quiet separator. Font-weight inherits from .c-word's 200
 * — same lightness the original "Mail" label had. */
/* Brand-suffix — типографика приведена к стилю .ib (Войти/Регистрация).
   Юзер 2026-05-20: «сделать таким же симпатичным как Войти». Это даёт
   единый язык в шапке: и бренд-suffix, и кнопки используют Inter 500/13px,
   нормальный letter-spacing. Отличие от .sh-логотипа MyNUC.ru намеренное —
   suffix это «текущий раздел», visually отделён от бренд-имени. */
.sh .brand-suffix,
.sh .brand-suffix::before {
  /* Жёсткий сброс shimmer-gradient наследуемого от родителя .sh —
     иначе синий gradient «прозрачно» просвечивает через текст suffix
     и создаёт визуальный «синий ореол» на буквах. Юзер 2026-05-20:
     «убери эти баги». Все 4 свойства с !important чтобы перебить
     inline-style на .sh (background, animation) и cascade от parent. */
  background: none !important;
  background-image: none !important;
  background-color: transparent !important;
  -webkit-background-clip: border-box !important;
          background-clip: border-box !important;
  animation: none !important;
  text-shadow: none !important;
  filter: none !important;
}
.sh .brand-suffix {
  /* Серый var(--t2) #5c6474 — приглушённый, не доминирует над логотипом.
     Тонкий regular-вес (400) и 12px. Юзер 2026-05-20: «исправь на наш
     серый» — не чёрный (var(--t1) был слишком тёмный). */
  -webkit-text-fill-color: var(--t2) !important;
  color: var(--t2) !important;
  margin-left: 8px;
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}
.sh .brand-suffix::before {
  content: '· ';
  /* Точка-разделитель — в цвет с текстом suffix (var(--t2) серый).
     Юзер 2026-05-20: «точка должна быть тоже в цвет». */
  -webkit-text-fill-color: var(--t2) !important;
  color: var(--t2) !important;
  opacity: 1 !important;
  margin-right: 2px !important;
  font-weight: 400 !important;
}

/* Topbar right group */
.topbar-right { display: flex; align-items: center; gap: 6px; }

/* Header tools — общий контейнер для группы иконок-утилит в шапке.
   Используется как на главной (.hdr-tools), так и на sub-страницах
   (повторяет ту же геометрию). Единый источник правды — здесь. */
.hdr-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
/* Вертикальный разделитель между группами (утилиты | действия). */
.hdr-sep {
  width: 1px;
  height: 20px;
  background: var(--brdm);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   ICON BUTTONS — shared across landing + sub-pages + webmail
   ─────────────────────────────────────────────────────────
   Single source of truth for the header action icons:
   shield, music, theme, mail, back-button.

   Design (revised Apr 2026 based on feedback):
     • Rectangle 34×34 (accessibility-friendly tap target)
     • border-radius 8px — the same radius as message cards,
       search field, action toolbar. Feels part of the family.
     • transparent background by default — icon sits visually
       on the header, not in a blue bubble. On hover fills
       with subtle accent tint + icon deepens to accent blue.
     • stroke-width 1.8 — Linear/Raycast/Arc modern weight.
     • Rich per-icon hover cues (.k-shield pulses, .k-mail
       dips, .k-theme rotates) for a little personality.
   ═══════════════════════════════════════════════════════ */
.icon-btn {
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border: 1px solid transparent;     /* placeholder под hover-border 1px — изящная толщина */
  border-radius: 8px;
  background: transparent;
  color: var(--t2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .2s ease;
  flex-shrink: 0;
}
/* HOVER ЭТАЛОН шапки — компактный outlined-стиль для маленьких 34px
   кнопок (.icon-btn / .ib / .theme-btn / .pg-snd). Юзер 2026-05-20:
   «цвет окантовки как у Войти в систему — rgba(11,74,143,.38), это
   изящный полупрозрачный синий который на белом блендится светлее,
   на тёмном слегка ярче». Применяется ко всем кнопкам всего проекта
   (для крупных hero — .btn-primary тоже использует .38 в idle).
   Без box-shadow (не выходит за рамки на 34px кнопке). */
.icon-btn:hover {
  background: rgba(11, 74, 143, .06);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
  transform: translateY(-1px);
}
.icon-btn:active { transform: translateY(0) scale(.98); }
.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  transition: transform .3s ease;
  flex-shrink: 0;
}
/* Shield — постоянная «дышащая» анимация (не только hover). По аналогии
   с замком на странице восстановления пароля. Каждые 4 с svg увеличивается
   на 6% и обрастает мягким синим glow-ом — сигнал «защита активна».
   Это ЕДИНСТВЕННАЯ оставленная индивидуальная анимация (семантический
   индикатор статуса 2FA). Остальные иконки правого бара (mail, theme,
   music) приведены к единому эталону без собственных «жизней». */
.icon-btn.k-shield svg { animation: shield-breathe 4s ease-in-out infinite; }
@keyframes shield-breathe {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(11,74,143,0));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 4px rgba(11,74,143,.55))
            drop-shadow(0 0 10px rgba(11,74,143,.25));
  }
}

/* ── Видимость shield-иконки в шапке (LOCKED 2026-05-21 v2) ────────
   Юзер: «пока мы не в системе под учётной записи он присутствует на
   страницах, а как вошли под учётной записью он скрывается». Гость
   видит shield на ВСЕХ страницах. Authed скрывает — статус 2FA уже
   отображается в UserDropdown (pill «В системе · 2FA активна» +
   пункт «Профиль и 2FA»).

   header.js добавляет `body.ds-authed` при успешной авторизации. */
body.ds-authed .icon-btn.k-shield {
  display: none !important;
}

/* ── Touch-устройства: подавляем :hover-эффекты (LOCKED 2026-05-21) ──
   Юзер: «на мобильной версии при тапе на кнопку выполняется действие
   и кнопка не зависает». На touch-устройствах :hover остаётся
   активным после tap (нет mouseout) → кнопка «застревает» в hover-
   состоянии: видна окантовка + tooltip. Не нужно — на touch есть
   :active (мгновенный feedback) который и без того срабатывает.

   `@media (hover: none)` — устройства БЕЗ hover (touch screens).
   `@media (hover: hover)` (mouse/trackpad) — наоборот, оставляем hover.

   Применяется ко всем интерактивным элементам шапки + hero CTA
   + dropdown options + tooltips на ВСЕХ страницах проекта. */
@media (hover: none) {
  .icon-btn:hover,
  .ib:hover,
  .theme-btn:hover,
  .pg-snd:hover,
  .back-btn:hover,
  .reg-opt:hover,
  .btn-primary:hover,
  .btn-ghost:hover,
  .user-dd-trigger:hover,
  .user-dd-link:hover,
  .user-dd-logout:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }
  /* color сохраняем idle — без принудительного transparent */
  .icon-btn:hover,
  .theme-btn:hover,
  .pg-snd:hover,
  .back-btn:hover {
    color: var(--t2) !important;
  }
  .ib:hover {
    color: var(--t2) !important;
  }
  /* Tooltips на touch — никогда не показываем (тап = «hover» = tooltip
     которая «застряла» — для touch юзер не понимает зачем она) */
  [data-tip]:hover::after,
  [data-tip]::after {
    opacity: 0 !important;
    display: none !important;
    pointer-events: none !important;
  }
  /* SVG-вращения внутри кнопок — сброс на touch */
  .theme-btn:hover svg,
  .icon-btn:hover svg,
  .pg-snd:hover svg {
    transform: none !important;
    animation: none;
  }
  /* .reg-opt — на touch без translateX лифта */
  .reg-opt:hover .reg-opt-icon {
    background: rgba(11, 74, 143, .08) !important;
  }
}

/* ── Native <select> popup options — цвет в тему (LOCKED 2026-05-21) ──
   Юзер: «белый цвет при выборе, а не цвет темы». В register-mail и
   register-cloud формах поле «Домен» это <select class="f-select">.
   .f-select сам стилизован (color: #0b4a8f для выбранного), но
   браузерный <option>-popup рендерится в системном стиле и в dark
   теме показывает белый-на-белом (или системные цвета).
   Принудительно ставим background+color в цвет темы для всех <option>.
   Стилизация option работает только частично в Chromium/Yandex, но
   достаточно для устранения white-on-white case. */
select option,
.f-select option {
  background: var(--sur) !important;
  background-color: var(--sur) !important;
  color: var(--t1) !important;
}
select option:checked,
.f-select option:checked {
  background: rgba(11, 74, 143, .08) !important;
  background-color: rgba(11, 74, 143, .08) !important;
  color: #0b4a8f !important;
  font-weight: 500;
}
[data-theme="dark"] select option,
[data-theme="dark"] .f-select option {
  background: var(--sur) !important;
  background-color: var(--sur) !important;
  color: var(--t1) !important;
}
[data-theme="dark"] select option:checked,
[data-theme="dark"] .f-select option:checked {
  background: rgba(11, 74, 143, .18) !important;
  background-color: rgba(11, 74, 143, .18) !important;
  color: #5ab0ff !important;
}

[data-theme="dark"] .icon-btn { color: var(--t2); }
[data-theme="dark"] .icon-btn:hover {
  background: rgba(11, 74, 143, .10);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
}

/* Equalizer bars next to the music button share the same row height.
   Kept as a separate element (not inside the button) so the bars
   remain visible even when hovering/pressing the button. */
.icon-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
}

/* Speaker button + equalizer on sub-pages */
.pg-snd-wrap { display: flex; align-items: center; gap: 6px; }
.pg-eq {
  display: flex; align-items: flex-end; gap: 2px; height: 14px;
  transition: opacity .3s;
}
.pg-eq .b {
  width: 3px; border-radius: 2px; background: var(--a); opacity: .6;
  animation: pgEqBar 0s ease-in-out infinite alternate;
}
.pg-eq .b:nth-child(1){ height:4px;  animation-duration:.55s; animation-delay:0s; }
.pg-eq .b:nth-child(2){ height:11px; animation-duration:.4s;  animation-delay:.1s; }
.pg-eq .b:nth-child(3){ height:7px;  animation-duration:.65s; animation-delay:.05s; }
.pg-eq .b:nth-child(4){ height:13px; animation-duration:.45s; animation-delay:.18s; }
.pg-eq .b:nth-child(5){ height:5px;  animation-duration:.5s;  animation-delay:.08s; }
@keyframes pgEqBar {
  0%   { transform: scaleY(.25); opacity: .35; }
  100% { transform: scaleY(1);   opacity: .7; }
}
.pg-snd-wrap.m .pg-eq { opacity: .18; }
.pg-snd-wrap.m .pg-eq .b { animation-play-state: paused; }
/* Music speaker button — matches .icon-btn visually so the whole
   header row is a consistent vocabulary of 34×34 rounded-rectangle
   icons. Uses transparent-by-default + hover-tint rather than the
   old always-tinted circle. */
.pg-snd {
  height: 34px; min-width: 34px; padding: 0 8px;
  border: 1px solid transparent;     /* placeholder под hover-border 1px — изящная толщина */
  border-radius: 8px;
  background: transparent;
  color: var(--t2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .2s ease;
  flex-shrink: 0;
}
.pg-snd:hover {
  background: rgba(11, 74, 143, .06);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
  transform: translateY(-1px);
}
.pg-snd:active { transform: translateY(0) scale(.98); }
.pg-snd svg { width: 16px; height: 16px; stroke-width: 1.8; }
.pg-snd-wrap.m .son { display: none; }
.pg-snd-wrap:not(.m) .sof { display: none; }
[data-theme="dark"] .pg-snd:hover {
  background: rgba(11, 74, 143, .10);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
}

/* ════════════════════════════════════════════════════════════════════════
   ШАПКА — динамические состояния (управляются public/js/header.js)
   ────────────────────────────────────────────────────────────────────────
   data-shield-state: щит-индикатор 2FA
     guest          — нейтральный (как было)
     authed-2fa     — зелёный («безопасное подключение»)
     authed-no2fa   — оранжевый («небезопасное подключение»)
     authed-unknown — нейтральный (fallback при сетевой ошибке)

   data-auth-state: состояние кнопок логина/регистрации
     undefined     — гость, оригинальные кнопки
     in-system     — «В системе» (зелёный)
     logout        — «Выйти из системы» (нейтральный, как ghost)
   ════════════════════════════════════════════════════════════════════════ */
.icon-btn.k-shield[data-shield-state="authed-2fa"] {
  color: #1a8a42;                                 /* зелёный — безопасно */
}
.icon-btn.k-shield[data-shield-state="authed-2fa"] svg {
  filter: drop-shadow(0 0 6px rgba(26, 138, 66, 0.55));
}
.icon-btn.k-shield[data-shield-state="authed-no2fa"] {
  color: #f59e0b;                                 /* оранжевый — без 2FA */
}
.icon-btn.k-shield[data-shield-state="authed-no2fa"] svg {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
  /* Останавливаем «дышащую» анимацию shield-breathe — оранжевый щит и
     так привлекает внимание. */
  animation: none !important;
}
.icon-btn.k-shield[data-shield-state="authed-2fa"] svg {
  animation: none !important;
}

/* «В системе» — зелёная плашка с зелёной окантовкой (постоянной).
   border-color переопределяет универсальный transparent от .ib. */
.ib[data-auth-state="in-system"],
.icon-btn[data-auth-state="in-system"] {
  color: #1a8a42;
  background: rgba(26, 138, 66, 0.07);
  border-color: rgba(26, 138, 66, 0.38);
}
.ib[data-auth-state="in-system"]:hover,
.icon-btn[data-auth-state="in-system"]:hover {
  background: rgba(26, 138, 66, 0.13);
  color: #156d34;
  border-color: rgba(26, 138, 66, 0.55);
  box-shadow: 0 0 0 3px rgba(26, 138, 66, 0.10);
}

/* «Выйти из системы» — серая окантовка (в цвет букв). На hover —
   приглушённо-красный #c75858 (НЕ ярко-красный #d93025), как у offline. */
.ib[data-auth-state="logout"],
.icon-btn[data-auth-state="logout"] {
  color: var(--t2);
  border-color: var(--brdm);
}
.ib[data-auth-state="logout"]:hover,
.icon-btn[data-auth-state="logout"]:hover {
  background: rgba(199, 88, 88, 0.06);
  color: #c75858;                                   /* приглушённо-красный (не ярко!) */
  border-color: rgba(199, 88, 88, 0.45);
  box-shadow: 0 0 0 3px rgba(199, 88, 88, 0.08);
}

/* «В системе» при потере связи → приглушённо-красная (не ярко-красная,
   чтобы не путать с критической ошибкой). */
.ib[data-auth-state="offline"],
.icon-btn[data-auth-state="offline"] {
  color: #c75858;
  background: rgba(199, 88, 88, 0.06);
  border-color: rgba(199, 88, 88, 0.38);
}
.ib[data-auth-state="offline"]:hover,
.icon-btn[data-auth-state="offline"]:hover {
  background: rgba(199, 88, 88, 0.12);
  color: #b94a4a;
  border-color: rgba(199, 88, 88, 0.55);
  box-shadow: 0 0 0 3px rgba(199, 88, 88, 0.10);
}
.ib[data-auth-state="offline"] svg,
.icon-btn[data-auth-state="offline"] svg {
  /* Лёгкое мерцание чтобы юзер заметил состояние, но не раздражало. */
  animation: offlinePulse 2.4s ease-in-out infinite;
}
@keyframes offlinePulse {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1; }
}

/* ── Dark theme — те же 3 состояния, ярче для контраста на тёмном фоне ──
   ВАЖНО про специфичность: `[data-theme="dark"] .ib` (см. ниже в файле)
   имеет ту же специфичность что `.ib[data-auth-state="..."]` и побеждает
   по порядку (написан позже). Поэтому тут явно объявляем dark-варианты
   ДЛЯ КАЖДОГО состояния с селектором `[data-theme="dark"] .ib[data-auth-state]`
   (специфичность 0,3,0 — выше) — это гарантирует что цветовая индикация
   работает на обеих темах. */
[data-theme="dark"] .ib[data-auth-state="in-system"],
[data-theme="dark"] .icon-btn[data-auth-state="in-system"] {
  color: #34d399;                                   /* ярче-зелёный для тёмной */
  background: rgba(52, 211, 153, 0.10);
}
[data-theme="dark"] .ib[data-auth-state="in-system"]:hover,
[data-theme="dark"] .icon-btn[data-auth-state="in-system"]:hover {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}
[data-theme="dark"] .ib[data-auth-state="logout"],
[data-theme="dark"] .icon-btn[data-auth-state="logout"] {
  color: var(--t2);
}
[data-theme="dark"] .ib[data-auth-state="logout"]:hover,
[data-theme="dark"] .icon-btn[data-auth-state="logout"]:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}
[data-theme="dark"] .ib[data-auth-state="offline"],
[data-theme="dark"] .icon-btn[data-auth-state="offline"] {
  color: #f87171;                                   /* offline на тёмной — ярче-красный */
  background: rgba(248, 113, 113, 0.10);
}
[data-theme="dark"] .ib[data-auth-state="offline"]:hover,
[data-theme="dark"] .icon-btn[data-auth-state="offline"]:hover {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
}

/* Также щит на тёмной теме — `.icon-btn.k-shield[data-shield-state]` имеет
   специфичность 0,3,0 (две классы + атрибут), `[data-theme="dark"] .icon-btn`
   = 0,2,0. Значит цвета щита НЕ перекрываются. Но #1a8a42 (тёмно-зелёный)
   плохо читается на тёмном фоне — заменим на ярче. */
[data-theme="dark"] .icon-btn.k-shield[data-shield-state="authed-2fa"] {
  color: #34d399;
}
[data-theme="dark"] .icon-btn.k-shield[data-shield-state="authed-2fa"] svg {
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.55));
}
[data-theme="dark"] .icon-btn.k-shield[data-shield-state="authed-no2fa"] {
  color: #fbbf24;
}
[data-theme="dark"] .icon-btn.k-shield[data-shield-state="authed-no2fa"] svg {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.65));
}

/* ── .ib (Войти / Регистрация / В системе / Выйти) для шапок sub-страниц ──
   Раньше .ib был только в register-формах. Теперь это общий класс —
   используется во всех шапках экосистемы рядом с back-btn. */
/* .ib — кнопки шапки (Войти/Регистрация/Кабинет/Выйти).
   На hover появляется СИНЯЯ ОКАНТОВКА + glow ring (как у .btn-primary) —
   единый язык outlined-кнопок (LOCKED по фидбеку юзера). В покое border
   прозрачный (1px transparent) чтобы при появлении не «дёргать» layout. */
.ib {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;     /* placeholder под hover-border 1px — изящная толщина */
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--t2);
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease,
              box-shadow .15s ease, transform .15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
/* hover — компактный outlined-стиль (см. блок .icon-btn:hover выше).
   Единый язык со всеми элементами шапки (.icon-btn / .pg-snd / .theme-btn). */
.ib:hover {
  background: rgba(11, 74, 143, .06);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
  transform: translateY(-1px);
}
.ib:active { transform: translateY(0) scale(.98); }
.ib svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 1.6; }
[data-theme="dark"] .ib { color: var(--t2); }
[data-theme="dark"] .ib:hover {
  background: rgba(11, 74, 143, .10);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
}

/* Back button */
/* .back-btn — кнопка «На главную» на sub-страницах. Юзер 2026-05-21:
   «нет фирменного стиля, окантовка выходит за рамки». Приведена к
   ЕДИНОМУ правилу шапки (CLAUDE.md LOCKED) — placeholder transparent
   border в покое (не нагружает визуально), на hover тонкая 1px
   полупрозрачная rgba(11,74,143,.38) окантовка БЕЗ box-shadow ring. */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;                        /* как у .ib / .icon-btn — единый рост */
  padding: 0 12px;                     /* как у .ib */
  font-size: 13px;                     /* как у .ib */
  font-weight: 500;
  font-family: inherit;
  color: var(--t2);
  text-decoration: none;
  border: 1px solid transparent;       /* placeholder под hover-border 1px */
  border-radius: 8px;                  /* как у .ib / .icon-btn */
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
.back-btn svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 1.6; }
.back-btn:hover {
  background: rgba(11, 74, 143, .06);
  border-color: rgba(11, 74, 143, .38);
  color: #0b4a8f;
  transform: translateY(-1px);
}
.back-btn:active { transform: translateY(0) scale(.98); }
[data-theme="dark"] .back-btn:hover {
  background: rgba(11, 74, 143, .10);
  border-color: rgba(11, 74, 143, .38);
  color: #0b4a8f;
}

/* На мобиле ≤768px — скрываем текст, оставляем только SVG-стрелку
   (юзер 2026-05-21: «в мобильной версии кнопка назад должна быть
   просто стрелкой»). Кнопка становится квадратной 34×34. */
@media (max-width: 768px) {
  .back-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
    gap: 0;
    font-size: 0;                      /* скрывает текст */
    justify-content: center;
  }
  .back-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Primary button — унифицированный thin-border CTA.
   Тот же класс что в webmail/globals.css. Используется на
   register.html / register-mail.html / 2fa/index.html и любой
   будущей sub-странице где нужна кнопка действия.

   Без заливок. Синяя рамка + синий текст → при hover лёгкая
   подложка + рамка полного цвета + небольшой 3px glow ring.
   Одна семья с «На главную» (.back-btn), но чуть крупнее. */
/* ═══════════════════════════════════════════════════════════════════
   BUTTON SYSTEM — чистый код, фирменный #0b4a8f, card-style на primary.
   Никаких Mega-переменных, никаких --c-primary/--c-ink — только наши
   родные --a (#0b4a8f), --sur, --brd, --t1, --t2. */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--brd);
  border-radius: 8px;
  background: transparent;
  color: var(--t2);
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  line-height: 1;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: all .22s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .10), transparent);
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }

/* .btn-primary — ЕДИНАЯ плитка для обеих тем (юзер 2026-06-01:
   «плитка должна быть как в тёмной теме»). Тёмно-синий #11274f
   background + белый текст + голубоватая окантовка + лёгкое
   голубое свечение в idle. На hover — ТЁМНЫЙ #0b4a8f (как у карточек,
   юзер: «мы отказались от #0b4a8f в пользу тёмного»). */
.btn-primary {
  background: #0b4a8f;
  color: #f5f9ff;
  border-color: rgba(63, 138, 255, .22);
  box-shadow: 0 0 14px rgba(63, 138, 255, .10);
}
.btn-primary:hover {
  background: #0b4a8f;
  color: #f5f9ff;
  border-color: #0b4a8f;                            /* тёмный (как карточки) */
  box-shadow:
    0 0 18px rgba(11, 74, 143, .30),                /* outer glow по периметру (заметный) */
    0 0 0 1px rgba(11, 74, 143, .15),               /* Mega ring */
    0 18px 40px -10px rgba(11, 74, 143, .70);       /* Mega drop-shadow выраженный */
  transform: translateY(-4px);
}
/* DARK — фон #11274f (Mega --c-surface, темнее чем light primary) */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover {
  background: #11274f;
}
/* DARK hover — усиленное свечение по периметру (как у плиток в dark).
   Юзер 2026-06-01: «при наведении пропала подсветка как у плиты». */
[data-theme="dark"] .btn-primary:hover {
  box-shadow:
    0 0 14px rgba(63, 138, 255, .25),         /* idle glow ярче — голубое свечение */
    0 0 0 1px rgba(11, 74, 143, .15),         /* tight Mega ring */
    0 18px 40px -18px rgba(11, 74, 143, 1);   /* Mega drop-shadow снизу */
}
.btn-primary:active { transform: translateY(-2px) scale(.99); }
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* .btn-ghost — outlined, на hover — ТЁМНЫЙ #0b4a8f (как карточки) +
   подсветка по периметру (3 слоя как у плиток в light). */
.btn-ghost:hover {
  border-color: #0b4a8f;
  color: #0b4a8f;
  box-shadow:
    0 0 18px rgba(11, 74, 143, .30),                /* outer glow по периметру (заметный) */
    0 0 0 1px rgba(11, 74, 143, .15),               /* Mega ring */
    0 18px 40px -10px rgba(11, 74, 143, .70);       /* Mega drop-shadow выраженный */
  transform: translateY(-2px);
}
/* DARK hover — усиленное голубое свечение по периметру (как у плиток). */
[data-theme="dark"] .btn-ghost:hover {
  box-shadow:
    0 0 14px rgba(63, 138, 255, .25),         /* idle glow ярче */
    0 0 0 1px rgba(11, 74, 143, .15),
    0 18px 40px -18px rgba(11, 74, 143, 1);
}

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ── PAGE LAYOUT ── */
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

/* Page heading block */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--brd);
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--a);
  margin-bottom: 11px;
}
.page-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 5px rgba(11,74,143,.45);
}
.page-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--t1);
  line-height: 1.25;
  margin-bottom: 8px;
}
.page-desc {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.75;
  max-width: 600px;
  text-align: justify;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 12px;
  margin-top: 28px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--brd);
}

/* ── CARD (LOCKED — единый стандарт ВСЕХ карточек экосистемы, см. CLAUDE.md
   «LED-card hover»). Применяется автоматически: docs.html, terms.html,
   privacy.html, 2fa/index.html подключают pages.css → их .card получает
   единый стиль. Параметры синхронизированы 1:1 с .led-card ниже и с
   .card в admin-panel/map-portal globals.css.

   ПОКОЙ:  серый border var(--brd) + серая subtle drop-shadow
   HOVER:  ФИРМЕННЫЙ #0b4a8f border + двойная #0b4a8f blue-glow
           (offset Y=16 → светится снизу) + spring-lift + cardBreathe. */
/* .card / .card:hover — УДАЛЕНО v4 (2026-05-17): стиль теперь приходит
   из /css/mynuc-shared.css через @import выше. Локальный padding/margin
   оставляем — это специфика sub-страниц. */
.card {
  padding: 24px 28px;
  margin-bottom: 14px;
}
.card:last-child { margin-bottom: 0; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.01em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 2026-04-17 redesign: номерок раздела карточки из заливного синего
   квадрата превращается в тонкую рамку с акцентным текстом. Тот же
   язык что у .btn-primary / .icon-btn — ничего не заливается, всё
   обводится. На тёмной теме цвет адаптируется через var(--a). */
.card-title .num {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: transparent;
  color: var(--a);
  border: 1.5px solid rgba(11,74,143,.38);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .card-title .num { color: #0b4a8f; border-color: rgba(11,74,143,.45); }

.card p {
  font-size: 13.5px;
  line-height: 1.82;
  color: var(--t2);
  margin-bottom: 11px;
  text-align: justify;
}
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--t1); font-weight: 600; }
.card a { color: var(--a); font-weight: 500; text-decoration: none; }
.card a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── CALLOUT ── */
.callout {
  border-left: 3px solid var(--a);
  background: var(--tint-blue);
  padding: 13px 16px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.78;
  color: var(--t1);
  text-align: justify;
  transition: background .25s ease;
}
.callout.warn {
  border-left-color: #d97706;
  background: rgba(217,119,6,.05);
}
[data-theme="dark"] .callout.warn { background: rgba(217,119,6,.12); }
.callout strong { font-weight: 600; }

/* ── NORMS LIST ── */
.norms { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.norm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: var(--tint-weak);
  transition: background .25s ease, border-color .25s ease;
}
.norm-code {
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  color: var(--a);
  background: rgba(11,74,143,.08);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 1px;
  transition: background .25s ease;
}
[data-theme="dark"] .norm-code { background: rgba(11,74,143,.18); }
.norm-desc { font-size: 13px; color: var(--t2); line-height: 1.58; text-align: justify; }
.norm-desc strong { color: var(--t1); font-weight: 500; }

/* ── CHIP GRID ── */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.chip {
  padding: 14px 15px;
  border-radius: 9px;
  border: 1px solid var(--brd-blue);
  background: var(--tint-blue);
  transition: background .25s ease, border-color .25s ease;
}
.chip-icon { font-size: 18px; margin-bottom: 7px; display: block; }
.chip-title { font-size: 12.5px; font-weight: 600; color: var(--t1); margin-bottom: 3px; }
.chip-desc { font-size: 11.5px; color: var(--t3); line-height: 1.45; }

/* ── PRINCIPLE GRID ── */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.principle {
  padding: 16px 15px 14px;
  border-radius: 9px;
  border: 1px solid var(--brd-blue);
  background: var(--tint-blue2);
  transition: background .25s ease, border-color .25s ease;
}
.principle-icon { font-size: 19px; margin-bottom: 8px; display: block; }
.principle-title { font-size: 12.5px; font-weight: 600; color: var(--t1); margin-bottom: 4px; }
.principle-desc { font-size: 11.5px; color: var(--t2); line-height: 1.5; }

/* ── STEPS ── */
.steps { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 9px;
  border: 1px solid var(--brd-blue2);
  background: var(--tint-blue3);
  transition: background .25s ease, border-color .25s ease;
}
/* 2026-04-17 redesign: step-number чипсы на страницах docs/about
   стали thin-border кругами вместо заливных синих. Тот же принцип
   что у .card-title .num. */
.step-n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: transparent;
  color: var(--a);
  border: 1.5px solid rgba(11,74,143,.38);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
[data-theme="dark"] .step-n { color: #0b4a8f; border-color: rgba(11,74,143,.45); }
.step-body { font-size: 13.5px; color: var(--t2); line-height: 1.68; text-align: justify; }
.step-body strong { color: var(--t1); font-weight: 500; }
.step-body a { color: var(--a); font-weight: 500; text-decoration: none; }
.step-body a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── DATA ROWS ── */
.data-rows { display: flex; flex-direction: column; gap: 8px; }
.data-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: var(--tint-weak);
  transition: background .25s ease, border-color .25s ease;
}
.data-icon { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.data-text { font-size: 13.5px; color: var(--t2); line-height: 1.68; text-align: justify; }
.data-text strong { color: var(--t1); font-weight: 500; }

/* ── MONO INLINE ── */
.mono {
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  font-size: 11.5px;
  background: rgba(11,74,143,.07);
  color: var(--a);
  padding: 1px 6px;
  border-radius: 4px;
  transition: background .25s ease;
}
[data-theme="dark"] .mono { background: rgba(11,74,143,.18); }

/* ── STATUS ROW ── */
.status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--t3);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--brd);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34,197,94,.5);
  flex-shrink: 0;
}

/* ── PAGE FOOTER NOTE ── */
.page-foot {
  margin-top: 32px;
  padding: 15px 20px;
  border-radius: 10px;
  background: var(--tint-weak);
  border: 1px solid var(--brd);
  font-size: 12px;
  color: var(--t3);
  line-height: 1.7;
  text-align: center;
  transition: background .25s ease, border-color .25s ease;
}
.page-foot a { color: var(--a); text-decoration: none; }
.page-foot a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   USER DROPDOWN — vanilla JS компонент шапки для авторизованных юзеров.
   1:1 синхронизирован с opt/map-portal/components/UserDropdown.tsx и
   opt/admin-panel/components/UserDropdown.tsx. Используется header.js
   на всех публичных страницах mynuc.ru.

   Структура: trigger (аватар + badge + ▾) → click → menu (имя, статус,
   сервисы, профиль, админ, выйти).
   ══════════════════════════════════════════════════════════════════ */
.user-dd { position: relative; margin-left: 4px; }
.user-dd-trigger {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 0 4px 0 0;
  background: transparent; border: none; cursor: pointer;
  border-radius: 999px;
  transition: background .15s ease;
}
.user-dd-trigger:hover { background: rgba(11,74,143,.06); }
.user-dd-avatar-wrap { position: relative; display: inline-flex; }
.user-dd-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  background: rgba(11,74,143,.10);
  border: 1px solid rgba(11,74,143,.22);
  color: var(--a);
  flex-shrink: 0;
}
.user-dd-badge {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--sur);
  transition: background .2s ease;
}
.user-dd-badge.is-online {
  background: var(--ok, #1a8a42);
  box-shadow: 0 0 0 1px rgba(26,138,66,.35);
}
.user-dd-badge.is-warn {
  /* 2FA не настроена — оранжевый, как было у старого щита.
     Лёгкий pulse чтобы привлечь внимание без раздражения. */
  background: var(--warn, #f59e0b);
  box-shadow: 0 0 0 1px rgba(245,158,11,.40);
  animation: badgePulse 3.2s ease-in-out infinite;
}
.user-dd-badge.is-offline {
  background: var(--err, #c75858);
  box-shadow: 0 0 0 1px rgba(199,88,88,.35);
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
.user-dd-chevron {
  color: var(--t3);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.user-dd.is-open .user-dd-chevron { transform: rotate(180deg); }

.user-dd-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 280px;
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,20,80,.10), 0 4px 12px rgba(0,0,0,.06);
  padding: 6px;
  z-index: 99999;   /* поверх всех окон/оверлеев */
  animation: userDdFadeIn .15s ease-out;
}
/* Фирменный сине-navy фон дропдауна в тёмной теме — var(--sur) #11274f
   читался как «чёрный». Градиент даёт явно синюю панель. */
[data-theme="dark"] .user-dd-menu {
  background: linear-gradient(180deg, #1c3e78 0%, #15315f 45%, #11274f 100%);
}
@keyframes userDdFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-dd-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 4px;
}
.user-dd-name {
  font-size: 13px; font-weight: 500; color: var(--t1); line-height: 1.3;
  word-break: break-word;
}
.user-dd-username {
  font-size: 11px; color: var(--t3); margin-top: 3px; word-break: break-all;
}
.user-dd-status {
  margin-top: 8px;
  font-size: 11px; color: var(--t3);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.user-dd-status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
}
.user-dd-status-dot.is-online { background: var(--ok, #1a8a42); }
.user-dd-status-dot.is-warn   { background: var(--warn, #f59e0b); }
.user-dd-status-dot.is-offline{ background: var(--err, #c75858); }
.user-dd-warn {
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: #b87509;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.25);
  padding: 2px 6px; border-radius: 4px;
}
[data-theme="dark"] .user-dd-warn { color: #f5b343; background: rgba(245,158,11,.18); }

.user-dd-label {
  padding: 6px 12px 4px;
  font-size: 10px;
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--t3);
}
.user-dd-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--t2);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
/* Иконки lucide-стиля внутри пункта меню — 14×14, цвет наследуется от
   родителя (var(--t2) → var(--a) на hover/is-current). Совпадает с
   React-версией UserDropdown.tsx где иконки lucide-react с size={14}. */
.user-dd-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 1.6;
}
.user-dd-link:hover {
  background: rgba(11,74,143,.08); color: var(--a);
}
.user-dd-link.is-current {
  background: rgba(11,74,143,.10); color: var(--a); font-weight: 500;
}
.user-dd-link.is-current:hover { background: rgba(11,74,143,.14); }
.user-dd-link-label { flex: 1; }
.user-dd-here {
  font-size: 10px;
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: .1em;
  color: var(--a); opacity: 0.7;
}
.user-dd-divider { height: 1px; background: var(--brd); margin: 4px 0; }
.user-dd-logout {
  width: 100%;
  padding: 8px 12px;
  background: transparent; border: none; border-radius: 7px;
  color: var(--t2);
  font-size: 13px; font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.user-dd-logout:hover {
  background: rgba(217,48,37,.07); color: #d93025;
}
/* Тёмная тема: текст на СИНЕЙ панели — светлый/белый (серый var(--t2)/(--t3) плохо читался) */
[data-theme="dark"] .user-dd-name { color: #ffffff; }
[data-theme="dark"] .user-dd-username,
[data-theme="dark"] .user-dd-label { color: #9fbbe6; }
[data-theme="dark"] .user-dd-link,
[data-theme="dark"] .user-dd-logout { color: #dce7f5; }
[data-theme="dark"] .user-dd-link svg { color: #9fbbe6; }
[data-theme="dark"] .user-dd-link:hover { background: rgba(90,176,255,.14); color: #7cc0ff; }
[data-theme="dark"] .user-dd-link:hover svg { color: #7cc0ff; }
[data-theme="dark"] .user-dd-link.is-current { background: rgba(90,176,255,.18); color: #7cc0ff; }
[data-theme="dark"] .user-dd-link.is-current:hover { background: rgba(90,176,255,.22); }
[data-theme="dark"] .user-dd-divider { background: rgba(255,255,255,.10); }

/* ── Утилиты-иконки в шапке для authed и guest — одинаковый набор ──
   v4 (2026-05-20): юзер: «смену режимов темное светлое, музыка и почта
   по умолчанию всегда присутствуют». shield, music, theme, mail —
   видимы для гостя И для authed. Только правая часть меняется:
   гость → [Войти][Регистрация ▾], authed → [AN ▾ UserDropdown].
   Дублирование с пунктами UserDropdown (Профиль и 2FA, Почта) —
   намеренное: quick-access в 1 клик из шапки.
   shield для authed меняет цвет через data-shield-state (зелёный/
   оранжевый), сохраняя breathe-анимацию как индикатор статуса 2FA. */

/* ── THEME TOGGLE BUTTON ── (harmonised with .icon-btn — rectangle 34×34,
   transparent by default, accent tint on hover. The sun/moon icon
   rotates 22° on hover for a gentle "day/night" tilt cue.) */
.theme-btn {
  height: 34px; min-width: 34px; padding: 0 8px;
  border: 1px solid transparent;     /* placeholder под hover-border 1px — изящная толщина */
  border-radius: 8px;
  background: transparent; cursor: pointer;
  color: var(--t2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .2s ease;
  flex-shrink: 0;
  position: relative;
}
.theme-btn:hover {
  background: rgba(11, 74, 143, .06);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
  transform: translateY(-1px);
}
.theme-btn:active { transform: translateY(0) scale(.98); }
.theme-btn svg { width: 16px; height: 16px; stroke-width: 1.8; }
/* В dark idle иконка светится янтарным (семантика: «сейчас тёмная»).
   На hover — единый синий, как у всех элементов шапки. */
[data-theme="dark"] .theme-btn { color: #f59e0b; }
[data-theme="dark"] .theme-btn:hover {
  background: rgba(11, 74, 143, .10);
  color: #0b4a8f;
  border-color: rgba(11, 74, 143, .38);
}

/* tooltips */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 7px); left: 50%;
  transform: translateX(-50%); background: rgba(8,10,20,.92); color: #fff;
  font-size: 11px; white-space: nowrap; padding: 5px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .15s; font-family: inherit;
  z-index: 9999;
}
[data-tip]:hover::after { opacity: 1; }
[data-theme="dark"] [data-tip]::after {
  background: rgba(230,237,243,.92); color: #0d1117;
}

/* ════════════════════════════════════════════════════════════════════════
   LED-card hover — ОВиК-точная копия (LOCKED)
   ────────────────────────────────────────────────────────────────────────
   Источник: D:\MyNUC.ru - LED\Важно\Сайт - Климатология и Холодоснабжение
   ОВиК.txt (строки 49-59). Юзер: «копируй ПОЛНОСТЬЮ стиль и толщину
   подсветки и окантовки с образца, как снизу светится больше — с верху
   меньше». Эффект «glow снизу» = `box-shadow` с `offset-y: 16px` (тень
   падает вниз на 16px от карточки → визуально «свет под плиткой»).

   ИТЕРАЦИЯ 4 (финальная):
     • В ПОКОЕ: НИКАКОЙ анимации. Тонкая нейтральная рамка var(--brd).
       Плотный фон var(--sur). Карточка визуально чистая, как в ОВиК.
       cardBreathe в покое УБРАН (юзер: «вырви глаз»).
     • НА HOVER: spring-lift -4px scale 1.005 (ОВиК) + ОВиК-shadow
       (16px главная + 4px ближняя) + border #93c5fd + НОВАЯ анимация
       ledHoverGlow — тень-glow «дышит» пока курсор на плитке (юзер
       просил «добавить анимацию при наведении, в образце этого нет»).

   Используется через единый класс `.led-card` ИЛИ через копию правил
   на конкретных классах: .dash-svc, .seo-item, .ab-module, .lg-block,
   .module-card, .card. Все они — синхронизированы 1:1.
   ════════════════════════════════════════════════════════════════════════ */

/* Базовый класс — можно навешивать прямо в HTML или повторять правила
   на доменных классах. Применяет фирменный ЕДИНЫЙ паттерн.
   ИТЕРАЦИЯ 5 (LOCKED): юзер потребовал ярко-синий #0b4a8f border
   на hover вместо светлого #93c5fd, и серую тень в покое (для
   "осязаемости" карточки даже без hover). */
.led-card {
  position: relative;
  background: var(--sur);
  border: 1px solid var(--brd);
  border-radius: 14px;
  box-shadow: var(--shadow-card);          /* серая subtle drop-shadow в покое */
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1),
              border-color .25s ease,
              box-shadow .25s ease;
  will-change: transform, box-shadow;
}
.led-card:hover {
  transform: translateY(-4px) scale(1.005);
  border-color: #0b4a8f;                   /* ФИРМЕННЫЙ ярко-синий (не #93c5fd!) */
  box-shadow:
    0 16px 32px -8px rgba(11, 74, 143, .25),
    0 4px 12px -4px rgba(11, 74, 143, .18);
  z-index: 10;
  animation: cardBreathe 2.4s ease-in-out infinite;
}
[data-theme="dark"] .led-card:hover {
  border-color: #0b4a8f;
  box-shadow:
    0 16px 32px -8px rgba(11, 74, 143, .42),
    0 4px 12px -4px rgba(11, 74, 143, .28);
  animation: cardBreatheDark 2.4s ease-in-out infinite;
}

/* cardBreathe — пульсирующая тень СНИЗУ (offset Y 16/4) пока юзер
   держит курсор на карточке. Амплитуда .25→.34 — выраженная (юзер:
   «#0b4a8f» — фирменный ярко-синий, а не приглушённый). Запускается
   ТОЛЬКО внутри :hover (статика в покое). Также используется как
   alias во всех inline-стилях index.html/dashboard.html/about.html. */
/* @keyframes cardBreathe / cardBreatheDark — УДАЛЕНО v4 (2026-05-17):
   единственный источник теперь /css/mynuc-shared.css (приходит через
   @import в начале этого файла). Aliases ledHoverGlow* оставлены для
   backward-compat — старые inline-стили в index.html/about.html ещё
   могут на них ссылаться. */
/* Aliases для backward-compat (на случай если где-то остались ссылки) */
@keyframes ledHoverGlow {
  0%, 100% {
    box-shadow:
      0 16px 32px -8px rgba(11, 74, 143, .25),
      0 4px 12px -4px rgba(11, 74, 143, .18);
  }
  50% {
    box-shadow:
      0 22px 38px -8px rgba(11, 74, 143, .34),
      0 6px 16px -4px rgba(11, 74, 143, .24);
  }
}
@keyframes ledHoverGlowDark {
  0%, 100% {
    box-shadow:
      0 16px 32px -8px rgba(11, 74, 143, .42),
      0 4px 12px -4px rgba(11, 74, 143, .28);
  }
  50% {
    box-shadow:
      0 22px 38px -8px rgba(11, 74, 143, .55),
      0 6px 16px -4px rgba(11, 74, 143, .35);
  }
}

/* Reduced-motion — гасим появление/анимации карточек (cardFadeIn) и кнопок.
   (btnBreathe удалён — hero .btn-primary теперь filled статичный, без мерцания.) */
@media (prefers-reduced-motion: reduce) {
  [class*="-module"], [class*="seo-item"], [class*="lg-block"],
  [class*="dash-svc"], .card, .btn-primary {
    animation: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   .tier-anim — анимированный mini-chat preview под иконкой тарифа
   ────────────────────────────────────────────────────────────────────────
   Используется на 5 register-формах (после блока .auth-logo / перед формой).
   Цель — показать что «система живая, готова к работе» через метафору
   messaging activity feed. Единый визуальный язык для ВСЕХ тарифов:
     • входящее (in) сообщение слева
     • исходящее (out) с typing dots — продолжается всегда (бесконечный bounce)
     • исходящее (out) с финальным текстом ниже

   Текст у каждого тарифа свой (chat / mail / cloud / business / business-mail).
   Анимация однократная при загрузке — НЕ зацикленная (чтобы не отвлекать
   юзера во время заполнения формы). typing dots — единственный вечный loop.

   prefers-reduced-motion → анимация выключена, всё видно сразу без движения.
   ──────────────────────────────────────────────────────────────────────── */
.tier-anim {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 8px 16px;
  margin: 0 0 14px;
  min-height: 134px;
  border-bottom: 1px dashed var(--brd);
}

/* Каждое сообщение — flex-row для выравнивания left/right */
.tam-msg {
  display: flex;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  animation: tamSlideIn .42s cubic-bezier(.16,1,.3,1) forwards;
}
.tam-msg.tam-in  { justify-content: flex-start; animation-delay: .55s; }
.tam-msg.tam-typing { justify-content: flex-end; animation-delay: 1.35s; }
.tam-msg.tam-out { justify-content: flex-end; animation-delay: 2.35s; }

@keyframes tamSlideIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Bubble — основной стиль. Round corners одна сторона "рваная" в сторону
   аватара (как в Telegram / iMessage). */
.tam-bubble {
  display: inline-block;
  max-width: 78%;
  padding: 8px 13px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 14px;
  letter-spacing: -.005em;
  word-break: break-word;
}
.tam-msg.tam-in .tam-bubble {
  background: rgba(11, 74, 143, .07);
  color: var(--t1);
  border: 1px solid rgba(11, 74, 143, .14);
  border-bottom-left-radius: 4px;
}
.tam-msg.tam-typing .tam-bubble,
.tam-msg.tam-out .tam-bubble {
  background: linear-gradient(135deg, #0057ff, #0040cc);
  color: #fff;
  border: 1px solid rgba(11, 74, 143, .35);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(11, 74, 143, .18);
}

[data-theme="dark"] .tam-msg.tam-in .tam-bubble {
  background: rgba(11, 74, 143, .12);
  border-color: rgba(11, 74, 143, .25);
  color: var(--t1);
}

/* Bouncing typing-dots. 3 точки, каждая бойнсит со сдвигом фазы */
.tam-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 14px;
  padding: 2px 0;
}
.tam-dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  animation: tamBounce 1.4s ease-in-out infinite;
}
.tam-dots i:nth-child(2) { animation-delay: .18s; }
.tam-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes tamBounce {
  0%, 60%, 100% { transform: translateY(0);  opacity: .45; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* Time/timestamp под bubble — мелкий текст, как в мессенджерах */
.tam-time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Magistral C', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: .05em;
  opacity: .8;
}
.tam-msg.tam-in  .tam-time { text-align: left; padding-left: 6px; }
.tam-msg.tam-typing .tam-time,
.tam-msg.tam-out .tam-time { text-align: right; padding-right: 6px; }

/* Иконка-маркер «✓✓» (двойная галка прочитано) для исходящих */
.tam-read {
  display: inline-block;
  width: 12px; height: 12px;
  vertical-align: -2px;
  margin-left: 4px;
  color: #0095ff;
}

/* Reduced motion — без анимации, всё видно сразу */
@media (prefers-reduced-motion: reduce) {
  .tam-msg {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .tam-dots i { animation: none; opacity: .7; }
}

/* Mobile — bubbles чуть мельче, gap меньше */
@media (max-width: 480px) {
  .tier-anim { gap: 6px; padding: 10px 4px 12px; min-height: 120px; }
  .tam-bubble { font-size: 12.5px; padding: 7px 11px; max-width: 86%; }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .page-wrap { padding: 28px 16px 56px; }
  .card { padding: 18px 20px; }
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 22px; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .page-wrap { padding: 20px 13px 48px; }
  .card { padding: 15px 16px; }
  .chip-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .principle-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .page-title { font-size: 20px; }
  .norm { flex-direction: column; gap: 5px; }
  .step { padding: 10px 12px; gap: 10px; }
  /* .back-btn — мобильная адаптация (только SVG-стрелка) живёт в основном
     блоке `.back-btn` выше через @media (max-width: 768px) — здесь дубликат
     удалён, иначе font-size:12px перебивал бы наш font-size:0 (скрытие текста). */
}

/* ═══════════════════════════════════════════════════════════════════
   DROPDOWN: «Регистрация» в шапке — 5 типов аккаунта
   Используется на index.html и на 5 register-*.html как переключатель.
   JS-функции toggleDD/openDD/closeAll живут в public/js/header.js.
   ═══════════════════════════════════════════════════════════════════ */
.dd {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 270px; background: var(--sur);
  border: 1px solid var(--brd); border-radius: 13px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1), 0 1px 4px rgba(0,0,0,.06);
  padding: 20px;
  opacity: 0; transform: translateY(-5px) scale(.97);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 200;
}
.dd.open { opacity: 1; transform: none; pointer-events: auto; }
.dt { font-size: 13px; font-weight: 600; color: var(--t1); letter-spacing: -.01em; margin-bottom: 14px; }
#bd { position: fixed; inset: 0; z-index: 150; display: none; }
#bd.on { display: block; }

#rdd { width: 320px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.reg-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 13px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1.5px dashed rgba(11, 74, 143, .22);
  background: var(--sur);
  transition: border-color .25s ease, background .25s ease,
              box-shadow .25s ease, transform .2s ease;
}
.reg-opt:hover {
  border-style: solid;
  border-color: #93c5fd;
  background: rgba(11, 74, 143, .06);
  box-shadow:
    0 8px 20px -8px rgba(11, 74, 143, .22),
    0 2px 8px -4px rgba(11, 74, 143, .14);
  transform: translateX(2px);
}
[data-theme="dark"] .reg-opt { border-color: rgba(11, 74, 143, .30); }
[data-theme="dark"] .reg-opt:hover {
  border-color: rgba(11, 74, 143, .55);
  background: rgba(11, 74, 143, .08);
}
.reg-opt-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11,74,143,.08);
  border-radius: 9px;
  color: var(--a);
  flex-shrink: 0;
  transition: background .18s ease;
}
.reg-opt:hover .reg-opt-icon { background: rgba(11,74,143,.14); }
.reg-opt-icon svg { width: 20px; height: 20px; }
.reg-opt-text { flex: 1; min-width: 0; }
.reg-opt-title { font-size: 13px; font-weight: 600; color: var(--t1); margin-bottom: 2px; letter-spacing: -.005em; }
.reg-opt-desc { font-size: 11.5px; color: var(--t3); line-height: 1.35; }

[data-theme="dark"] .dd { background: var(--sur); box-shadow: 0 8px 32px rgba(0,0,0,.55),0 1px 4px rgba(0,0,0,.4); }
@media (max-width: 640px) { .dd { width: 240px; right: -10px; } }
