/* ============================================================
   «Старт в науку — Форты Кронштадта»
   ДИЗАЙН-СИСТЕМА · морская чертёжная карта
   Тёмная тема «ночь над Балтикой» · светлая «старая штурманская карта»
   Единый контракт: см. DESIGN-CONTRACT.md
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ============================================================
   1. ТОКЕНЫ
   ============================================================ */
:root {
  /* «ночь над Балтикой» — глубокая сланцево-синяя палитра с тёплым золотом */
  --bg-0: #0a101d;
  --bg-1: #0f1930;
  --bg-2: #15233e;
  --bg-3: #1c2f52;
  --text-0: #f2f6fc;
  --text-1: #c8d3e3;
  --text-2: #8493ad;
  --accent: #d3a62f;
  --accent-2: #4a90d9;
  --accent-line: rgba(211, 166, 47, .5);
  --line: rgba(242, 246, 252, .1);
  --gold-soft: rgba(211, 166, 47, .14);
  --sea-soft: rgba(74, 144, 217, .1);

  --rad-sm: 0;
  --rad-md: 4px;
  --rad-lg: 8px;

  --shadow-1: 0 2px 8px rgba(3, 8, 18, .45);
  --shadow-2: 0 14px 38px rgba(3, 8, 18, .55);

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* служебные состояния */
  --ok: #3fa86a;
  --ok-soft: rgba(63, 168, 106, .15);
  --ok-line: rgba(63, 168, 106, .55);
  --bad: #d96a68;
  --bad-soft: rgba(217, 106, 104, .14);
  --bad-line: rgba(217, 106, 104, .55);
  --glass: rgba(10, 16, 29, .8);
}

[data-theme="light"] {
  /* «старая штурманская карта» — тёплые кремовые поверхности, контраст сохранён */
  --bg-0: #f1ebdc;
  --bg-1: #f7f2e6;
  --bg-2: #fcf9f0;
  --bg-3: #eae2ce;
  --text-0: #181f2b;
  --text-1: #232c3d;
  --text-2: #3d4a63;
  --accent: #8f6d22;
  --accent-2: #1e5ca8;
  --accent-line: rgba(143, 109, 34, .55);
  --line: rgba(24, 31, 43, .14);
  --gold-soft: rgba(143, 109, 34, .11);
  --sea-soft: rgba(30, 92, 168, .08);
  --shadow-1: 0 2px 8px rgba(50, 42, 24, .09);
  --shadow-2: 0 12px 36px rgba(50, 42, 24, .16);

  --ok: #2c7d4e;
  --ok-soft: rgba(44, 125, 78, .12);
  --ok-line: rgba(44, 125, 78, .55);
  --bad: #b3483f;
  --bad-soft: rgba(179, 72, 63, .11);
  --bad-line: rgba(179, 72, 63, .55);
  --glass: rgba(241, 235, 220, .88);
}

/* ============================================================
   2. СБРОС И БАЗА
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-1);
  background:
    radial-gradient(1100px 520px at 50% -8%, var(--gold-soft) 0%, transparent 62%),
    radial-gradient(900px 460px at 92% 12%, var(--sea-soft) 0%, transparent 55%),
    var(--bg-0);
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text-0);
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--text-0); }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; }

ul, ol { list-style: none; }

.mono { font-family: var(--font-mono); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

::selection { background: var(--accent); color: #0a0f18; }
[data-theme="light"] ::selection { color: #fff; }

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

/* кастомный скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 35%, var(--bg-3)); }
* { scrollbar-width: thin; scrollbar-color: var(--bg-3) var(--bg-0); }

/* ============================================================
   3. УТИЛИТЫ И КОНТЕЙНЕР
   ============================================================ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--wide { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; position: relative; }

.section-head { max-width: 760px; margin-bottom: 48px; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  white-space: nowrap;
}
.section-label::before { content: '//'; letter-spacing: 0; color: var(--text-2); }

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  margin-bottom: 14px;
}

.section-note {
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--text-2);
  max-width: 640px;
}

/* морская сетка-карта: вертикальные линии (в hero и фонах секций) */
.grid-lines {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.grid-lines::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, transparent 0 95px, var(--line) 95px 96px);
  opacity: .55;
}
.grid-lines::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 30%, transparent);
  opacity: .35;
}

/* большая фоновaя «кокарда» — водяной знак */
.kokard {
  position: absolute;
  width: 520px; height: 520px;
  max-width: 90vw;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.kokard::before {
  content: ''; position: absolute; inset: 44px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}
.kokard::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--accent-line) 0 0) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--accent-line) 0 0) 0 50% / 100% 1px no-repeat;
  opacity: .5;
}

/* ============================================================
   4. КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--text-0);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  transition: transform .18s ease, background .2s ease, border-color .2s ease,
              color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0f18;
  box-shadow: var(--shadow-1);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: translateX(-220%) skewX(-18deg);
  transition: transform .65s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.btn-primary:hover::before { transform: translateX(340%) skewX(-18deg); }
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #fff);
  border-color: color-mix(in srgb, var(--accent) 88%, #fff);
  color: #0a0f18;
}
[data-theme="light"] .btn-primary:hover { color: #fff; background: var(--bg-0); border-color: var(--bg-0); }

.btn-ghost {
  border-color: transparent;
  color: var(--text-1);
}
.btn-ghost:hover { color: var(--accent); background: var(--gold-soft); }

.btn-danger {
  border-color: var(--bad-line);
  color: var(--bad);
  background: var(--bad-soft);
}
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }

.btn-sm { padding: 8px 16px; font-size: .78rem; font-family: var(--font-mono); letter-spacing: .05em; }

.btn-outline {
  border-color: var(--accent-line);
  color: var(--accent);
}
.btn-outline:hover { background: var(--gold-soft); color: var(--accent); box-shadow: var(--shadow-1); }

.btn-sm { padding: 7px 16px; font-size: .8rem; }
.btn-block { width: 100%; }

/* ============================================================
   5. ШАПКА
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }

.brand-mark {
  position: relative;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--accent-line);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  background:
    linear-gradient(var(--accent-line) 0 0) left 0 top 0 / 6px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) left 0 top 0 / 1px 6px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 0 top 0 / 6px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 0 top 0 / 1px 6px no-repeat,
    linear-gradient(var(--accent-line) 0 0) left 0 bottom 0 / 6px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) left 0 bottom 0 / 1px 6px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 0 bottom 0 / 6px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 0 bottom 0 / 1px 6px no-repeat;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-0);
}
.brand-name b { color: var(--accent); font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: block;
  padding: 9px 14px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--text-1);
  background: none;
  border: 0;
  border-radius: var(--rad-sm);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.nav-link:hover { color: var(--text-0); }
.nav-link:hover::after { transform: scaleX(.55); }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { transform: scaleX(1); }

/* выпадающее меню «Форты» */
.nav-drop { position: relative; }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 1px solid var(--accent-line);
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 100;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop-menu.open,
.nav-drop.dd-open .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop.dd-open > .nav-link { color: var(--accent); }

.nav-drop-menu a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: .83rem;
  color: var(--text-1);
  border-radius: var(--rad-sm);
}
.nav-drop-menu a i { font-style: normal; font-family: var(--font-mono); font-size: .68rem; color: var(--text-2); }
.nav-drop-menu a:hover { background: var(--gold-soft); color: var(--accent); }

.nav-tools { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  transition: border-color .2s ease, color .2s ease, transform .18s ease;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:hover { border-color: var(--accent-line); color: var(--accent); transform: translateY(-2px); }

/* кнопка «Кабинет» в правом верхнем углу шапки */
.cabinet-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .03em;
  white-space: nowrap;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent-line);
  border-radius: var(--rad-md);
  overflow: hidden;
  transition: color .2s ease, border-color .2s ease, transform .18s ease, box-shadow .2s ease;
}
.cabinet-btn svg { width: 13px; height: 13px; flex: 0 0 auto; }
.cabinet-btn span { position: relative; z-index: 1; }
.cabinet-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #fff));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .34s cubic-bezier(.16, 1, .3, 1);
}
.cabinet-btn:hover {
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}
.cabinet-btn:hover::before { transform: scaleX(1); }
.cabinet-btn:active { transform: translateY(0); }
[data-theme="light"] .cabinet-btn { color: #7c5d1d; }
[data-theme="light"] .cabinet-btn:hover { color: #fff; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
}
.nav-burger span { display: block; height: 1px; background: var(--text-1); transition: background .2s; }
.nav-burger:hover span { background: var(--accent); }

/* мобильное меню — выезжает справа */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 88vw);
  z-index: 2000;
  padding: 88px 26px 40px;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform .38s cubic-bezier(.16,1,.3,1);
  visibility: hidden;
}
.mobile-menu.open { transform: none; visibility: visible; }

.mobile-menu::before {
  content: '// меню';
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text-2);
  display: block;
  margin-bottom: 18px;
}
.mobile-menu a {
  display: block;
  padding: 11px 4px;
  font-size: 1rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, padding-left .2s ease;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--accent); padding-left: 10px; }
.mobile-menu .mm-sub {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 20px 4px 8px;
  border-bottom: 1px solid var(--line);
}

body.menu-open { overflow: hidden; }

/* ============================================================
   6. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-0);
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 64px; }

.hero--page { min-height: 46vh; align-items: flex-end; }
.hero--page .container { padding-top: 150px; padding-bottom: 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 56px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.hero-eyebrow::before { content: '//'; color: var(--text-2); }

.hero-title {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 1.06;
  margin-bottom: 26px;
}
.hero-title .accent { color: var(--accent); }
.hero-title .thinline { display: block; font-weight: 400; font-style: italic; color: var(--text-2); font-size: .62em; margin-top: 10px; }

.hero-lead {
  font-size: 1.06rem;
  font-weight: 300;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 14px;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--text-2);
  margin-bottom: 30px;
}
.hero-meta .sep { color: var(--accent); margin: 0 6px; }

.hero-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stat {
  padding: 18px 28px 18px 0;
  margin-right: 28px;
  border-right: 1px solid var(--line);
}
.hero-stat:last-child { margin-right: 0; border-right: 0; padding-right: 0; }
.hero-stat-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 6px;
}
.hero-stat-label {
  display: block;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* морской «компас»-розетка: детализированный SVG-компас */
.hero-ornament {
  position: relative;
  width: min(360px, 74vw);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: var(--shadow-2), 0 0 0 1px var(--gold-soft);
  background: radial-gradient(circle at 32% 28%, var(--gold-soft) 0%, transparent 62%);
}
.hero-ornament svg {
  width: 100%;
  height: 100%;
  display: block;
  color: var(--text-2);
  border-radius: 50%;
}

/* ============================================================
   7. ПРЕЗЕНТАЦИЯ (масштабируемая)
   ============================================================ */
.pres-section { position: relative; padding: 96px 0; background: var(--bg-1); overflow: hidden; }
.pres-section .section-head { position: relative; z-index: 2; }

.pres-tools { display: flex; justify-content: flex-end; margin-bottom: 16px; position: relative; z-index: 2; }

.pres-full {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-1);
  background: transparent; border: 1px solid var(--line);
  padding: 8px 14px; cursor: pointer; transition: all .3s;
}
.pres-full::before { content: '⛶'; color: var(--accent); }
.pres-full:hover { color: var(--accent); border-color: var(--accent-line); }

.pres-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-0);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  width: 100%;
}
.pres-wrap::after { /* засечки фона на рамке презы */
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(201,162,39,.05) 95px 96px),
    repeating-linear-gradient(0deg, transparent 0 94px, rgba(201,162,39,.05) 94px 95px);
}

.pres-scale {
  width: 1440px;
  height: 810px;
  position: relative;
  transform-origin: top left;
  z-index: 1;
}
.pres-scale iframe { width: 1440px; height: 810px; border: 0; display: block; background: #fff; }

.pres-note {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--text-2);
  margin-top: 14px;
}
.pres-note::before { content: '⛶ '; color: var(--accent); }

/* ============================================================
   8. СЕТКИ КОНТЕНТА / КАРТОЧКИ
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .25s ease, box-shadow .25s ease;
}
.card::after { /* «уголки»-крестики в углах карточки */
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(var(--accent-line) 0 0) left 0 top 0 / 10px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) left 7px top 0 / 1px 10px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 0 top 0 / 10px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 7px top 0 / 1px 10px no-repeat,
    linear-gradient(var(--accent-line) 0 0) left 0 bottom 0 / 10px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) left 7px bottom 0 / 1px 10px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 0 bottom 0 / 10px 1px no-repeat,
    linear-gradient(var(--accent-line) 0 0) right 7px bottom 0 / 1px 10px no-repeat;
  opacity: 0;
  transition: opacity .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.card:hover::after { opacity: .65; }

.card--feature { grid-column: span 2; }

.card-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-3); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.card:hover .card-media img { transform: scale(1.04); }

.card-year {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  background: var(--glass);
  border: 1px solid var(--accent-line);
  color: var(--accent);
}

.card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.22rem; margin-bottom: 8px; }
.card-text { font-size: .9rem; color: var(--text-2); line-height: 1.7; }

.card-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card:hover .card-link { gap: 12px; }

/* ============================================================
   9. СПИСОК ФОРТОВ (нумерованный, с линейками)
   ============================================================ */
.forts-list {
  counter-reset: forts;
  border-top: 1px solid var(--line);
}
.forts-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  position: relative;
  counter-increment: forts;
  transition: background .2s ease;
}
.forts-row:hover { background: var(--gold-soft); }
.forts-row::before {
  content: counter(forts, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .86rem;
  color: var(--accent);
  letter-spacing: .1em;
  align-self: start;
  padding-top: 4px;
}
.forts-name { font-family: var(--font-head); font-size: 1.28rem; color: var(--text-0); }
.forts-name small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 400; color: var(--text-2); }
.forts-meta { font-family: var(--font-mono); font-size: .74rem; color: var(--text-2); text-align: right; line-height: 1.9; }
.forts-meta b { color: var(--accent); font-weight: 500; display: block; }
.forts-row .arrow { font-family: var(--font-mono); color: var(--accent); font-size: 1rem; }

/* ============================================================
   10. ТАЙМЛАЙН
   ============================================================ */
.tl { position: relative; margin-top: 16px; padding-left: 44px; }
.tl::before {
  content: '';
  position: absolute;
  left: 12px; top: 4px; bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--accent-line) 55%, transparent);
}
.tl-item { position: relative; margin-bottom: 34px; }
.tl-dot {
  position: absolute;
  left: -40px; top: 8px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 1px solid var(--accent);
  display: grid; place-items: center;
}
.tl-dot::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tl-year { display: inline-block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.tl-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-line);
  padding: 18px 22px;
  border-radius: var(--rad-md);
}
.tl-card h4 { font-size: 1.08rem; margin-bottom: 6px; }
.tl-card p { font-size: .9rem; color: var(--text-2); margin: 0; }

/* ============================================================
   11. СТРАНИЦА ФОРТА
   ============================================================ */
.fort-hero {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-0);
}
.fort-hero-bg { position: absolute; inset: 0; }
.fort-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.fort-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-0) 4%, rgba(11,17,29,.2) 52%, rgba(11,17,29,.55) 100%);
}
[data-theme="light"] .fort-hero-bg::after {
  background: linear-gradient(to top, var(--bg-0) 6%, rgba(245,241,230,.1) 55%, rgba(245,241,230,.5) 100%);
}

.fort-hero-in { position: relative; z-index: 2; padding: 56px 0 44px; display: flex; flex-direction: column; gap: 10px; }
.fort-hero-title { font-size: clamp(1.9rem, 4.6vw, 3.1rem); color: #fff; }
[data-theme="light"] .fort-hero-title { color: var(--text-0); text-shadow: 0 1px 0 var(--bg-0); }
.fort-hero-meta { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.fort-body { padding: 56px 0 96px; }

.fort-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
}
.fort-nav .fort-nav-link { color: var(--text-1); display: inline-flex; gap: 8px; align-items: center; }
.fort-nav .fort-nav-link:hover { color: var(--accent); }
.fort-nav .next { margin-left: auto; }

/* спецификация форта */
.spec-box {
  background: var(--bg-1);
  border: 1px solid var(--accent-line);
  padding: 6px 26px;
  margin-bottom: 48px;
  border-radius: var(--rad-md);
}
.spec-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-key { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); padding-top: 3px; }
.spec-val { font-size: .92rem; color: var(--text-1); }

/* статьи на странице форта */
.article {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  padding: 30px 34px;
  margin-bottom: 26px;
  position: relative;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.article:focus-within, .article.is-highlight { border-color: var(--accent-line); }

.article-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.article-index { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .2em; color: var(--text-2); }
.article-head .article-index::after { content: ' ///'; color: var(--accent); }

.article-title { font-size: 1.42rem; margin: 10px 0 8px; }
.article-meta { font-family: var(--font-mono); font-size: .72rem; color: var(--text-2); margin-bottom: 18px; }

.article-body { font-size: .96rem; line-height: 1.85; color: var(--text-1); }
.article-body p { margin-bottom: 14px; }
.article-body strong { color: var(--text-0); font-weight: 600; }
.article-body figure { margin: 20px 0; }
.article-body figcaption { font-family: var(--font-mono); font-size: .72rem; color: var(--text-2); margin-top: 8px; }

.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.read-state {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--text-2);
  transition: color .25s ease;
}
.read-state.is-read { color: var(--ok); }
.read-state.is-read::before { content: '✓ '; }
.read-state::before { content: '· '; }

.mark-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--rad-sm);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.mark-read:hover { color: var(--accent); border-color: var(--accent-line); }
.mark-read.is-read { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); cursor: default; }

/* ============================================================
   12. ГАЛЕРЕЯ И ЛАЙТБОКС
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--rad-sm);
  cursor: zoom-in;
  background: var(--bg-3);
  transition: transform .25s ease, border-color .25s ease;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.gallery-item:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.gallery-item:hover img { transform: scale(1.05); }

.gallery-lb-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 10px;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--text-0);
  background: linear-gradient(to top, rgba(11,17,29,.85), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover .gallery-lb-caption { opacity: 1; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px;
  background: rgba(5,9,16,.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.lb.active { opacity: 1; visibility: visible; }
.lb img {
  max-width: 92vw;
  max-height: 80vh;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.lb .gallery-lb-caption {
  position: static;
  opacity: 1;
  background: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--text-1);
}
.lb-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color .2s ease, border-color .2s ease;
}
.lb-close:hover { color: var(--accent); border-color: var(--accent-line); }

/* ============================================================
   13. СЛОВАРЬ / ИСТОЧНИКИ
   ============================================================ */
.gloss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gloss-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent-line);
  padding: 24px;
  border-radius: var(--rad-sm);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.gloss-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.gloss-term {
  font-family: var(--font-mono);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: 10px;
}
.gloss-def { font-size: .88rem; color: var(--text-2); line-height: 1.7; }

.bib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bib-col {
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: var(--rad-sm);
  counter-reset: bib;
}
.bib-h {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.bib-li { position: relative; padding: 8px 0 8px 30px; font-size: .86rem; color: var(--text-2); line-height: 1.7; border-bottom: 1px dashed var(--line); counter-increment: bib; }
.bib-li:last-child { border-bottom: 0; }
.bib-li::before {
  content: '[' counter(bib) ']';
  position: absolute; left: 0; top: 8px;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent-line);
}
.bib-li a { color: var(--accent-2); }
.bib-li a:hover { color: var(--accent); }

/* ============================================================
   14. КАБИНЕТ
   ============================================================ */
.cab-hero { position: relative; overflow: hidden; background: var(--bg-0); }
.cab-hero .container { position: relative; z-index: 2; padding-top: 150px; padding-bottom: 56px; }
.cab-greet { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; color: var(--text-2); margin-top: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 64px; }
.stat-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  padding: 24px 22px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.stat-num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--text-0); line-height: 1.1; }
.stat-num em { font-style: normal; color: var(--accent); }
.stat-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-2); margin-top: 10px; display: block; }
.stat-note { font-size: .76rem; color: var(--text-2); margin-top: 4px; }

.prog-track { position: relative; height: 8px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--rad-sm); overflow: hidden; }
.prog-bar { position: absolute; inset: 0; }
.prog-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff));
  transition: width .9s cubic-bezier(.16,1,.3,1);
}

.fort-progress { border-top: 1px solid var(--line); }
.fort-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(200px, .9fr) auto;
  align-items: center;
  gap: 22px;
  padding: 20px 6px;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}
.fort-row:last-child { border-bottom: 0; }
.fort-row:hover { background: var(--gold-soft); }

.fort-row-info { display: flex; align-items: center; gap: 16px; min-width: 0; }
.fort-row-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fort-row-titles b { font-family: var(--font-head); font-size: 1.06rem; color: var(--text-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fort-row-titles .mono { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; color: var(--text-2); }

.fort-row-mid { display: flex; flex-direction: column; gap: 8px; }
.fort-row-mid .prog-track { width: 100%; }
.fort-row-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--rad-sm);
  color: var(--text-2);
}
.badge--pass { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.badge--fail { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }

.tab-line { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tab {
  padding: 10px 18px;
  font-size: .84rem;
  letter-spacing: .04em;
  color: var(--text-2);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text-0); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tests-table { width: 100%; border-collapse: collapse; }
.tests-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 500;
  padding: 12px 14px;
  border-bottom: 1px solid var(--accent-line);
}
.tests-table tbody td {
  padding: 13px 14px;
  font-size: .9rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--line);
}
.tests-table tbody tr:hover td { background: var(--gold-soft); }
.tests-table td .mono { font-size: .78rem; color: var(--text-2); }
.tests-table .pct { font-family: var(--font-mono); color: var(--accent); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 72px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--rad-md);
  position: relative;
  overflow: hidden;
}
.empty-state .kokard { opacity: .5; }
.empty-state .empty-title { font-family: var(--font-head); font-size: 1.5rem; color: var(--text-0); }
.empty-state .empty-sub { font-size: .92rem; color: var(--text-2); max-width: 420px; }

/* ============================================================
   15. ТЕСТЫ / КВИЗ
   ============================================================ */
.quiz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.test-card { cursor: pointer; }
.test-mark {
  width: 56px; height: 56px;
  margin-bottom: 16px;
  color: var(--accent);
  display: block;
}
.test-mark circle, .test-mark path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.test-mark text {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  fill: currentColor;
  stroke: none;
}

.test-meta { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; color: var(--text-2); margin-top: 4px; }

.quiz-panel { display: none; }
.quiz-panel.is-open { display: block; }

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.quiz-name { font-family: var(--font-head); font-size: 1.3rem; color: var(--text-0); }
.quiz-stepper { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; color: var(--text-2); }

.quiz-progress { height: 6px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--rad-sm); overflow: hidden; margin-bottom: 34px; }
.quiz-progress .prog-fill { height: 100%; }

.quiz { background: var(--bg-1); border: 1px solid var(--line); border-top: 2px solid var(--accent-line); border-radius: var(--rad-md); padding: 34px 38px; box-shadow: var(--shadow-1); }
.quiz-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; }
.quiz-ask { font-family: var(--font-head); font-size: 1.42rem; line-height: 1.35; margin-bottom: 28px; }

.quiz-opts { display: grid; gap: 12px; }
.quiz-opt {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  font-size: .95rem;
  color: var(--text-1);
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  transition: border-color .18s ease, background .18s ease, transform .15s ease;
}
.quiz-opt .opt-key {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: var(--rad-sm);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--accent-line); transform: translateX(4px); }
.quiz-opt:disabled { cursor: default; }

.quiz-opt.selected { border-color: var(--accent); background: var(--gold-soft); }
.quiz-opt.correct { border-color: var(--ok-line); background: var(--ok-soft); color: var(--text-0); }
.quiz-opt.correct .opt-key { color: var(--ok); border-color: var(--ok-line); }
.quiz-opt.wrong { border-color: var(--bad-line); background: var(--bad-soft); color: var(--text-0); }
.quiz-opt.wrong .opt-key { color: var(--bad); border-color: var(--bad-line); }

.quiz-expl {
  margin-top: 22px;
  padding: 16px 20px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-1);
  background: var(--gold-soft);
  border-left: 2px solid var(--accent);
  border-radius: var(--rad-sm);
}
.quiz-expl::before { content: 'i / '; font-family: var(--font-mono); color: var(--accent); }

.quiz-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* экран результата */
.quiz-result { text-align: center; padding: 20px 0; }
.result-ring { position: relative; width: 190px; height: 190px; margin: 0 auto 26px; }
.result-ring svg { transform: rotate(-90deg); }
.result-ring .ring-bg { fill: none; stroke: var(--bg-3); stroke-width: 5; }
.result-ring .ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: butt;
  stroke-dasharray: 538;
  stroke-dashoffset: 538;
  transition: stroke-dashoffset 1.1s cubic-bezier(.16,1,.3,1);
}
.ring-num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-0);
}
.ring-num small { font-family: var(--font-mono); font-size: .9rem; color: var(--accent); }
.result-msg { font-size: 1.06rem; color: var(--text-1); max-width: 460px; margin: 0 auto 8px; }
.result-sub { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; color: var(--text-2); margin-bottom: 30px; }
.result-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ============================================================
   16. КАДЕТЫ / АВТОРЫ
   ============================================================ */
.author-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--rad-md);
  padding: 30px;
  text-align: center;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.author-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.author-card h3 { font-size: 1.16rem; margin-bottom: 2px; }
.role-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 8px 0 12px;
  padding: 3px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--rad-sm);
}
.author-card p { font-size: .88rem; color: var(--text-2); }

.benefit-card { background: var(--bg-1); border: 1px solid var(--line); border-left: 2px solid var(--accent-line); padding: 24px 26px; border-radius: var(--rad-sm); transition: transform .25s ease, box-shadow .25s ease; }
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.benefit-card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.benefit-card p { font-size: .88rem; color: var(--text-2); margin: 0; }

.quote-card {
  background: var(--gold-soft);
  border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent);
  padding: 30px 34px;
  border-radius: var(--rad-sm);
}
.quote-card p { font-family: var(--font-head); font-style: italic; font-size: 1.12rem; color: var(--text-0); line-height: 1.6; margin: 0; }
.quote-card cite { font-family: var(--font-mono); font-style: normal; font-size: .74rem; color: var(--text-2); display: block; margin-top: 12px; }

.placeholder-note {
  background: var(--bg-1);
  border: 1px dashed var(--accent-line);
  border-radius: var(--rad-md);
  padding: 40px;
  text-align: center;
  color: var(--text-2);
}
.placeholder-note::before { content: '⌕ '; font-family: var(--font-mono); color: var(--accent); }

/* ============================================================
   17. ФУТЕР
   ============================================================ */
.footer { background: var(--bg-1); border-top: 1px solid var(--line); padding: 48px 0 36px; }
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--text-1); }
.footer-brand .brand-mark { transform: scale(1.1); }
.footer-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.footer-nav a { font-size: .82rem; color: var(--text-2); padding: 4px 10px; }
.footer-nav a:hover { color: var(--accent); }
.footer-nav .sep { color: var(--text-2); opacity: .4; }

.footer-line { height: 1px; margin: 30px 0 22px; background: linear-gradient(90deg, var(--accent-line), transparent 70%); }

.footer-sign {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  line-height: 1.8;
  color: var(--text-2);
  margin: 0;
}

/* ============================================================
   18. АНИМАЦИИ / REVEAL
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.js .reveal.visible { opacity: 1; transform: none; }

/* варианты появления */
.js .reveal-left { opacity: 0; transform: translateX(-34px); transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1); }
.js .reveal-right { opacity: 0; transform: translateX(34px); transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1); }
.js .reveal-zoom { opacity: 0; transform: scale(.95); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.js .reveal-left.visible,
.js .reveal-right.visible,
.js .reveal-zoom.visible { opacity: 1; transform: none; }

/* плавное масштабирование картинок — деликатная «дышащая» зоомация */
.gallery-item img, .card-media img { transition: transform .9s cubic-bezier(.16,1,.3,1); }
.gallery-item:hover img, .card:hover .card-media img { transform: scale(1.06); }

/* ————— каскадное появление hero-блока на загрузке ————— */
.js [data-hero-anim] .hero-text > *,
.js [data-hero-anim] .hero-stats { animation: heroRise .85s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 110ms + 70ms); }
.js [data-hero-anim] .hero-text > *:nth-child(1) { --i: 0; }
.js [data-hero-anim] .hero-text > *:nth-child(2) { --i: 1; }
.js [data-hero-anim] .hero-text > *:nth-child(3) { --i: 2; }
.js [data-hero-anim] .hero-text > *:nth-child(4) { --i: 3; }
.js [data-hero-anim] .hero-stats { --i: 4; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* ————— золотая «строка печати» в карточках-статьях ————— */
.article { position: relative; }
.article::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: right .9s cubic-bezier(.16,1,.3,1);
}
.article.is-read::after, .article:hover::after { right: 0; }

.js .reveal.d1 { transition-delay: .06s; }
.js .reveal.d2 { transition-delay: .12s; }
.js .reveal.d3 { transition-delay: .18s; }
.js .reveal.d4 { transition-delay: .24s; }
.js .reveal.d5 { transition-delay: .30s; }
.js .reveal.d6 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .prog-fill { transition: none !important; }
}

/* ============================================================
   19. АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1200px) {
  .cards-grid, .gloss-grid, .quiz-grid, .bib-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-ornament { width: min(300px, 60vw); }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-ornament { width: min(260px, 58vw); }
  .hero { text-align: left; }
  .hero-stats { margin-top: 32px; }

  .forts-row { grid-template-columns: 56px 1fr auto; }

  .fort-row { grid-template-columns: 1fr minmax(160px, .8fr) auto; }
  .fort-row-actions { grid-column: 1 / -1; justify-content: flex-start; }

  .spec-row { grid-template-columns: 170px 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 68px 0; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .cards-grid, .gloss-grid, .quiz-grid, .bib-grid { grid-template-columns: 1fr; }
  .card--feature { grid-column: span 1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-direction: column; gap: 14px; }
  .hero-stat, .hero-stat:last-child { border-right: 0; padding: 8px 0; margin: 0; border-bottom: 1px solid var(--line); }
  .hero-stat:last-child { border-bottom: 0; }

  .forts-row { grid-template-columns: 44px 1fr; gap: 12px; }
  .forts-meta { grid-column: 2; text-align: left; }

  .fort-row { grid-template-columns: 1fr auto; }
  .fort-row-mid { grid-column: 1 / -1; grid-row: 2; flex-direction: row; align-items: center; gap: 14px; }
  .fort-row-mid .prog-track { flex: 1; max-width: 300px; }

  .quiz { padding: 26px 22px; }
  .quiz-nav .btn { flex: 1; }

  .footer-grid { flex-direction: column; align-items: flex-start; }

  .pres-section { padding: 64px 0; }
  .pres-tools { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-grid { grid-template-columns: 1fr; gap: 12px; }
  .section-title { font-size: 1.5rem; }
  .hero-title { font-size: 2rem; }
  .article, .quiz { padding: 22px 18px; }
  .article-head { flex-direction: column; gap: 4px; }
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
  .result-actions .btn { width: 100%; }
  .fort-nav { flex-direction: column; align-items: stretch; }
  .fort-nav .next { margin-left: 0; }
  .lb { padding: 24px; }
  .cabinet-btn { padding: 9px 12px; }
  .cabinet-btn span { display: none; }
}

/* ============================================================
   20. СОВМЕСТИМОСТЬ СО СТАРЫМИ СТРАНИЦАМИ (до пересборки)
   ============================================================ */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: transparent; border-bottom: 1px solid transparent; transition: background .3s ease, box-shadow .3s ease; }
.navbar.scrolled { background: var(--glass); backdrop-filter: blur(14px); border-bottom-color: var(--line); box-shadow: var(--shadow-1); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.navbar-brand { display: inline-flex; align-items: center; gap: 12px; }
.navbar-logo { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--accent-line); font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.navbar-title { font-family: var(--font-head); font-size: 1rem; color: var(--text-0); font-weight: 600; }
.navbar-title span { color: var(--accent); }
.navbar-menu { display: flex; align-items: center; gap: 2px; }
.navbar-menu a { display: block; padding: 9px 14px; font-size: .84rem; font-weight: 500; color: var(--text-1); border-radius: var(--rad-sm); }
.navbar-menu a:hover, .navbar-menu a.active { color: var(--accent); }
.burger { display: none; flex-direction: column; gap: 5px; width: 38px; height: 38px; padding: 8px; background: none; border: 1px solid var(--line); border-radius: var(--rad-md); }
.burger span { display: block; height: 1px; background: var(--text-1); }
.mobile-close { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: var(--text-2); font-size: 1.8rem; }

.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 55% at 50% 35%, var(--gold-soft) 0%, transparent 60%), var(--bg-0); }
.hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; padding: 140px 24px 80px; }
.hero-eyebrow { display: inline-block; padding: 6px 16px; border: 1px solid var(--accent-line); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }
.hero h1 { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.6rem); color: var(--text-0); line-height: 1.12; margin-bottom: 20px; }
.hero h1 .accent { color: var(--accent); }
.hero-description { font-size: 1.05rem; color: var(--text-2); max-width: 620px; margin: 0 auto 32px; font-weight: 300; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.hero-scroll-line { width: 1px; height: 34px; margin: 6px auto 0; background: linear-gradient(180deg, var(--accent), transparent); }
.hero-particle { position: absolute; width: 2px; height: 2px; background: var(--accent); border-radius: 50%; opacity: 0; animation: particleFloat 9s infinite ease-in-out; }
@keyframes particleFloat { 0% { opacity: 0; transform: translateY(80vh) scale(.5); } 15% { opacity: .5; } 85% { opacity: .5; } 100% { opacity: 0; transform: translateY(-6vh) scale(1); } }

.presentation-section { padding: 64px 0 80px; }
.presentation-frame { border: 1px solid var(--line); box-shadow: var(--shadow-2); background: var(--bg-2); }
.presentation-frame iframe { width: 100%; height: 72vh; min-height: 460px; border: 0; display: block; }

.text-center { text-align: center; }
.section-subtitle { font-size: 1.02rem; color: var(--text-2); font-weight: 300; max-width: 640px; margin-bottom: 32px; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }
.gold-line { width: 56px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); margin: 20px 0; }

.forts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.fort-card { position: relative; display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--rad-md); overflow: hidden; text-decoration: none; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.fort-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.fort-card-image { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.fort-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.fort-card:hover .fort-card-image img { transform: scale(1.05); }
.fort-card-year { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 3px 10px; font-family: var(--font-mono); font-size: .7rem; color: var(--accent); background: var(--glass); border: 1px solid var(--accent-line); }
.fort-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.fort-card-title { font-family: var(--font-head); font-size: 1.2rem; color: var(--text-0); margin-bottom: 8px; }
.fort-card-desc { font-size: .88rem; color: var(--text-2); line-height: 1.7; flex: 1; }
.fort-card-link { margin-top: 14px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.fort-card.featured { grid-column: span 2; }
.fort-card.featured .fort-card-image { aspect-ratio: 16 / 9; }

.timeline { position: relative; margin: 36px 0; padding-left: 44px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 1px; background: linear-gradient(180deg, var(--accent), var(--accent-line) 55%, transparent); }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot { position: absolute; left: -37px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg-0); border: 1px solid var(--accent); }
.timeline-year { display: inline-block; font-family: var(--font-mono); font-size: .78rem; color: var(--accent); margin-bottom: 6px; }
.timeline-card { background: var(--bg-1); border: 1px solid var(--line); border-left: 2px solid var(--accent-line); padding: 18px 22px; border-radius: var(--rad-md); }
.timeline-card h4 { font-family: var(--font-head); font-size: 1.05rem; color: var(--text-0); margin-bottom: 6px; }
.timeline-card p { font-size: .88rem; color: var(--text-2); margin: 0; }

.glossary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.glossary-card { background: var(--bg-1); border: 1px solid var(--line); border-top: 2px solid var(--accent-line); padding: 26px; border-radius: var(--rad-sm); }
.glossary-card h4 { font-family: var(--font-mono); font-size: .9rem; font-weight: 500; color: var(--accent); margin-bottom: 10px; }
.glossary-card p { font-size: .88rem; color: var(--text-2); }

.gallery-grid .gallery-item { cursor: zoom-in; }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 12px 10px;
  font-size: .72rem;
  color: var(--text-0);
  background: linear-gradient(to top, rgba(11,17,29,.85), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

.bib-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.bib-category { background: var(--bg-1); border: 1px solid var(--line); padding: 26px; border-radius: var(--rad-sm); }
.bib-category h3 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.bib-category li { padding: 7px 0 7px 22px; position: relative; font-size: .86rem; color: var(--text-2); }
.bib-category li::before { content: '—'; position: absolute; left: 0; color: var(--accent-line); }
.bib-category a { color: var(--accent-2); }

.bot-section { padding: 64px 0; background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bot-card { display: inline-flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--rad-md); }
.bot-card img { border: 1px solid var(--line); }
.map-section { padding: 60px 0; background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.cadets-intro { background: var(--bg-1); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 30px; border-radius: var(--rad-md); margin-bottom: 28px; }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; }
.benefit-card { background: var(--bg-1); border: 1px solid var(--line); border-left: 2px solid var(--accent-line); padding: 24px; border-radius: var(--rad-sm); }
.benefit-card h3 { font-family: var(--font-head); font-size: 1.04rem; color: var(--text-0); margin-bottom: 8px; }
.benefit-card p { font-size: .88rem; color: var(--text-2); margin: 0; }
.quote-block { background: var(--gold-soft); border: 1px solid var(--accent-line); border-left: 3px solid var(--accent); padding: 28px 32px; border-radius: var(--rad-sm); }
.quote-block p { font-family: var(--font-head); font-style: italic; font-size: 1.08rem; color: var(--text-0); margin: 0; }

.authors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.author-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--rad-md); padding: 30px; text-align: center; }
.author-card h3 { font-family: var(--font-head); font-size: 1.14rem; color: var(--text-0); margin-bottom: 4px; }
.author-card .role { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.author-card p { font-size: .88rem; color: var(--text-2); }

.fort-hero-content { position: relative; z-index: 2; width: 100%; padding: 56px 0 44px; }
.fort-hero-content .container { display: flex; flex-direction: column; gap: 8px; }
.fort-hero-content h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4.4vw, 3rem); color: #fff; }
.fort-hero-badge { display: inline-block; width: fit-content; padding: 4px 14px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--accent); background: var(--glass); border: 1px solid var(--accent-line); }
.fort-back { font-size: .86rem; color: var(--text-2); }
.fort-back:hover { color: var(--accent); }
.fort-content { padding: 52px 0 80px; }
.fort-section { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--rad-md); padding: 30px; margin-bottom: 22px; }
.fort-section h3 { font-family: var(--font-head); font-size: 1.16rem; color: var(--text-0); margin-bottom: 14px; }
.fort-section p { font-size: .92rem; color: var(--text-1); }
.fort-section em { font-family: var(--font-mono); font-style: normal; font-size: .74rem; color: var(--text-2); }
.fort-section ul { list-style: none; }
.fort-section ul li { padding: 6px 0 6px 22px; position: relative; font-size: .9rem; color: var(--text-1); }
.fort-section ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent-line); }
.fort-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.fort-table th, .fort-table td { padding: 11px 14px; text-align: left; font-size: .88rem; border-bottom: 1px solid var(--line); }
.fort-table th { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.fort-table td { color: var(--text-1); }
.fort-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }

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

/* светлая тема: поправки контраста для старых белых фото в hero */
.lightbox-overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 36px; background: rgba(5,9,16,.94); }
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 82vh; border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.4rem; color: var(--text-1); background: none; border: 1px solid var(--line); border-radius: 50%; }
.lightbox-caption { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: .8rem; color: var(--text-1); }

.fade-up, .fade-left, .fade-right { opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.fade-up { transform: translateY(26px); }
.fade-left { transform: translateX(-26px); }
.fade-right { transform: translateX(26px); }
.fade-up.visible, .fade-left.visible, .fade-right.visible { opacity: 1; transform: none; }
.stagger-1 { transition-delay: .08s; } .stagger-2 { transition-delay: .16s; } .stagger-3 { transition-delay: .24s; }
.stagger-4 { transition-delay: .32s; } .stagger-5 { transition-delay: .40s; } .stagger-6 { transition-delay: .48s; }
.stagger-7 { transition-delay: .56s; } .stagger-8 { transition-delay: .64s; }

/* ============================================================
   АВТОРИЗАЦИЯ И ФОРМЫ
   ============================================================ */
.fm-field { margin-bottom: 18px; text-align: left; }
.fm-field label { display: block; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.fm-field .req { color: var(--accent); }
.fm-input, .fm-select {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  background: var(--bg-1); color: var(--text-0);
  border: 1px solid var(--line); border-radius: var(--rad-md);
  font-size: .92rem; font-family: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.fm-input:focus, .fm-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--gold-soft); }
.fm-input::placeholder { color: var(--text-2); opacity: .7; }
.fm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 520px) { .fm-grid { grid-template-columns: 1fr; } }
.fm-hint { font-size: .78rem; color: var(--text-2); margin-top: 6px; line-height: 1.5; }
.fm-alert { padding: 12px 14px; border-radius: var(--rad-md); font-size: .86rem; line-height: 1.5; margin-bottom: 16px; border: 1px solid var(--line); }
.fm-alert.err { color: #ff9d9d; background: rgba(255, 84, 84, .12); border-color: rgba(255, 84, 84, .35); }
.fm-alert.ok { color: #9be8b2; background: rgba(70, 200, 120, .12); border-color: rgba(70, 200, 120, .35); }
[data-theme="light"] .fm-alert.err { color: #a22; background: rgba(255,84,84,.1); }
[data-theme="light"] .fm-alert.ok { color: #157a3c; background: rgba(70,200,120,.12); }

.auth-card {
  max-width: 520px; margin: 0 auto; background: var(--bg-2);
  border: 1px solid var(--accent-line); border-radius: var(--rad-lg); padding: 32px;
  box-shadow: var(--shadow-2);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.auth-tab {
  padding: 11px; background: none; border: 1px solid var(--line); border-radius: var(--rad-md);
  color: var(--text-2); font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: all .2s;
}
.auth-tab.active { color: var(--accent); border-color: var(--accent); background: var(--gold-soft); }
.auth-switch { margin-top: 20px; font-size: .86rem; color: var(--text-2); text-align: center; }
.auth-switch a { color: var(--accent); }
.role-pick { display: flex; gap: 12px; margin-bottom: 24px; }
.role-pick label { flex: 1; }

.assign-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--rad-md); margin-bottom: 12px; flex-wrap: wrap; }
.assign-row-info { flex: 1 1 220px; }
.assign-row-info b { color: var(--text-0); font-family: var(--font-head); display: block; margin-bottom: 4px; }
.assign-row-info span { font-family: var(--font-mono); font-size: .72rem; color: var(--text-2); letter-spacing: .04em; }
.assign-tag { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-line); padding: 3px 10px; border-radius: 2px; background: var(--gold-soft); }
.assign-tag.grey { color: var(--text-2); border-color: var(--line); background: none; }
.profile-chip { display: inline-flex; gap: 8px; align-items: center; }
.profile-chip .pc-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--accent); font-size: .72rem; border: 1px solid var(--accent-line); font-family: var(--font-mono); }
.placeholder-note.auth { background: var(--bg-2); }
.loading-dots::after { content: '…'; animation: kmvkDots 1.2s steps(4, end) infinite; }
@keyframes kmvkDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }