/* ═══════════════════════════════════════════════════════════════════════════
   site-switch-embed.css — меню «Другие разделы сайта» на поддоменах
   (book.alexlisovoy.ru, mtb.alexlisovoy.ru).

   Поддомен подключает с https://alexlisovoy.ru/ только этот файл и
   site-switch-embed.js, а в шапке держит статичную кнопку .topnav-switch
   (та же разметка, что на главной). Своих копий списка, панели и стилей у
   поддоменов нет: правка меню здесь доходит до них без их выката.

   Состав: сам виджет (site-switch.css той же версии, что на страницах основного
   сайта) и то, что на основном сайте виджет получает от дизайн-системы, —
   токены, шрифт и базовые правила html/body/button/a/:focus-visible.
   Значения токенов — из design-system/colors_and_type.css; совпадение и версию
   ?v проверяет test-seo-integrity.py. Версию поднимать вместе с site-switch.*.
   ═══════════════════════════════════════════════════════════════════════════ */
@import url("/site-switch.css?v=20261020");

/* Шрифт виджета. Своё имя гарнитуры, чтобы не подменять одноимённый шрифт поддомена.
   Файлы с alexlisovoy.ru — сервер отдаёт их с Access-Control-Allow-Origin. */
@font-face {
  font-family: 'TSW Fira Sans Compressed';
  src: url('/design-system/fonts/FiraSansCompressed-Regular-s1.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'TSW Fira Sans Compressed';
  src: url('/design-system/fonts/FiraSansCompressed-Medium-s1.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* Токены дизайн-системы — только внутри виджета, страницу поддомена не трогают.
   Тему кнопки под шапку (--tsw-fg / --tsw-bd) задаёт сам поддомен, как и главная. */
.topnav-switch {
  --accent:      #C8792A;
  --accent-dark: #A66220;
  --accent-line: rgba(200, 121, 42, 0.20);
  --surface:     #FFFFFF;
  --border:      #E8E4DF;
  --bg-cream:    #FAF6F0;
  --text-dark:   #2C2C2A;
  --text-muted:  #8A8880;
  --text-light:  #F5F1EC;
  --radius-sm:   4px;
  --dur:         0.2s;
  --ease:        ease;
  --font-body:   'TSW Fira Sans Compressed', 'Fira Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI Condensed', sans-serif;

  /* Наследуемое, что на основном сайте приходит от html и body */
  font: 400 17px/1.65 var(--font-body);
  color: var(--text-dark);
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-align: start;
  text-indent: 0;
  text-shadow: none;
  white-space: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Базовые правила дизайн-системы (* / button / a / :focus-visible) в пределах виджета */
.topnav-switch,
.topnav-switch *,
.topnav-switch *::before,
.topnav-switch *::after { box-sizing: border-box; }
.topnav-switch button { margin: 0; padding: 0; font: inherit; cursor: pointer; }
.topnav-switch svg { vertical-align: baseline; }
.topnav-switch a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.topnav-switch a:hover { color: var(--accent-dark); text-decoration-color: var(--accent); }
.topnav-switch :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .topnav-switch,
  .topnav-switch *,
  .topnav-switch *::before,
  .topnav-switch *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
