/* =========================================================
   Project Bloodlines — стили
   Палитра оригинального сайта: холодный графит, белый, красный.
   Параллакс: JS выставляет на секциях переменные
     --pp   прогресс секции в окне, 0…1
     --q    то же, сдвинутое к центру, −0.5…0.5
     --s    прокрутка первого экрана в px (только [data-hero])
     --read доля прочитанного, 0…1 (только [data-read])
   Всё движение описано ниже в CSS через calc().
   ========================================================= */

:root {
  --c-black: #0D0F16;
  --c-bg: #1A1E28;
  --c-bg-2: #141821;
  --c-card: #232836;
  --c-line: #2E3442;
  --c-line-2: #3D4455;
  --c-line-3: #5A6275;
  --c-red: #B0000E;
  --c-red-2: #E31B23;
  --c-red-3: #F25F67;
  --c-text: #F4F5F7;
  --c-text-2: #B8BDC8;
  --c-muted: #8A91A0;

  --c-kindred: #E31B23;
  --c-hunters: #9BB0C1;
  --c-streets: #D08A2E;
  --c-people: #A7A39E;

  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --k: 1;          /* сила параллакса */
  --pp: 0.5;
  --q: 0;
  --s: 0;
  --read: 0;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--c-text); }
a:hover { color: var(--c-red-3); }
:focus-visible { outline: 2px solid var(--c-red-3); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 600; line-height: 1.05; }
p { margin: 0; }
button { font: inherit; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--c-red); color: #fff; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 16px; }

.container { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }

/* ---------- Типографика ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--c-red-3);
}
.mono { font-family: var(--f-mono); }
.h1 { font-size: clamp(48px, 8vw, 104px); line-height: 0.98; letter-spacing: -0.01em; }
.h1--page { font-size: clamp(44px, 7vw, 88px); line-height: 1; }
.h2 { font-size: clamp(38px, 5vw, 56px); margin-top: 20px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; color: var(--c-text-2); }
.text-2 { color: var(--c-text-2); }
.muted { color: var(--c-muted); }
.accent { color: var(--c-red-2); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px; border-radius: 2px;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--c-red); color: var(--c-text); }
.btn--primary:hover { background: var(--c-red-2); color: #fff; }
.btn--ghost { border-color: var(--c-line-3); color: var(--c-text); font-weight: 600; background: none; }
.btn--ghost:hover { border-color: var(--c-text); color: #fff; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--discord { background: #5865F2; color: #fff; }
.btn--discord:hover { background: #4752C4; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 15, 22, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-text); }
.logo:hover { color: var(--c-text); }
.logo svg { width: 28px; height: 34px; flex: none; }
.logo span { font-family: var(--f-display); font-size: 24px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--c-text-2); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--c-red-2); padding-bottom: 4px; }
.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--c-line-2);
  background: none; color: var(--c-text); cursor: pointer; align-items: center; justify-content: center;
}
.burger svg { width: 22px; height: 22px; }

@media (max-width: 1020px) {
  .burger { display: inline-flex; }
  .site-header__inner > .btn--sm { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-black); border-bottom: 1px solid var(--c-line);
    padding: 8px 24px 24px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--c-line); font-size: 17px; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--c-red-3); }
  .nav .btn { margin-top: 16px; display: inline-flex; }
}
@media (min-width: 1021px) { .nav .btn { display: none; } }
.nav a.btn { padding: 0 20px; border-bottom: 0; color: var(--c-text); align-self: flex-start; }
.nav a.btn:hover { color: #fff; }
@media (max-width: 420px) { .logo span { font-size: 19px; } }

/* ---------- Секции ---------- */
.section { position: relative; padding-block: 140px; }
.section--alt { background: var(--c-bg-2); border-block: 1px solid var(--c-line); }
.section--clip { overflow: hidden; isolation: isolate; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head p { max-width: 380px; }
.split { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.split__side { flex: 1 1 340px; min-width: 0; }
.split__main { flex: 999 1 560px; min-width: 0; }
@media (max-width: 760px) { .section { padding-block: 96px; } .split { gap: 40px; } }

/* Заглушки под арт и скриншоты */
.ph {
  border: 1px dashed var(--c-line-2); background: var(--c-card);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--c-muted);
}

/* ---------- Глубины параллакса ---------- */
.depth-1 { translate: 0 calc(var(--q) * -30px * var(--k)); }
.depth-2 { translate: 0 calc(var(--q) * -80px * var(--k)); }
.depth-3 { translate: 0 calc(var(--q) * -140px * var(--k)); }
.depth-a { translate: 0 calc(var(--q) * -90px * var(--k)); }
.depth-b { translate: 0 calc(var(--q) * 30px * var(--k)); }
.drift-x { translate: calc(var(--q) * -30px * var(--k)) 0; }
.drift-x-rev { translate: calc(var(--q) * 30px * var(--k)) 0; }
[class*="depth-"], .drift-x, .drift-x-rev { will-change: translate; }

/* SVG, которое «прорисовывается» при прокрутке */
.draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: calc((1 - clamp(0, (var(--pp) - 0.1) / 0.5, 1)) * 1000);
}

/* ---------- HERO (главная) ---------- */
.hero {
  position: relative; min-height: 780px; display: flex; align-items: center;
  background: var(--c-bg-2); border-bottom: 1px solid var(--c-line); overflow: hidden; isolation: isolate;
}
.hero__layer { position: absolute; pointer-events: none; will-change: translate; }
.hero__sky { inset: -10% 0 0 0; translate: 0 calc(var(--s) * 0.6px * var(--k)); }
.hero__moon { position: absolute; right: 16%; top: 14%; width: 220px; height: 220px; border-radius: 50%; background: var(--c-text); opacity: 0.07; }
.hero__glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 45%, rgba(176, 0, 14, 0.28), rgba(26, 30, 40, 0) 55%); }
.hero__city { left: 0; bottom: 0; width: 100%; }
.hero__city--back { height: 460px; translate: 0 calc(var(--s) * 0.42px * var(--k)); }
.hero__city--front { height: 380px; translate: 0 calc(var(--s) * 0.2px * var(--k)); }
.hero__vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(13, 15, 22, 0) 45%, rgba(13, 15, 22, 0.85) 100%); pointer-events: none; }
.hero__content {
  position: relative; width: 100%; padding-block: 120px;
  translate: 0 calc(var(--s) * 0.15px * var(--k));
  opacity: clamp(0, 1 - var(--s) * var(--k) / 700, 1);
}
.hero__meta { margin-top: 20px; font-family: var(--f-mono); font-size: 14px; color: var(--c-muted); }
.hero__lead { margin-top: 32px; max-width: 620px; }
.hero .btn-row { margin-top: 44px; }
.stats { margin-top: 72px; display: flex; flex-wrap: wrap; gap: 48px; }
.stat__value { font-family: var(--f-display); font-size: 40px; font-weight: 600; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.stat__label { font-size: 14px; color: var(--c-muted); margin-top: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3FB27F; flex: none; }
.dot--sm { width: 8px; height: 8px; }

/* ---------- О проекте ---------- */
.about { isolation: isolate; overflow: hidden; }
.ghost-word {
  position: absolute; left: -10%; top: 50%; z-index: -1; white-space: nowrap; pointer-events: none;
  font-family: var(--f-display); font-size: clamp(140px, 18vw, 260px); font-weight: 700; line-height: 1;
  color: var(--c-text); opacity: 0.035;
  translate: calc(var(--q) * -360px * var(--k)) -50%;
}
.about__text p + p { margin-top: 24px; }
.about__text { font-size: 18px; line-height: 1.75; color: var(--c-text-2); }

/* ---------- Фракции: родословная + маски ---------- */
.lineage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.55; pointer-events: none; }
.lineage__node { position: absolute; left: 50%; top: 104px; width: 32px; height: 32px; margin-left: -16px; border: 1px solid var(--c-red-2); rotate: 45deg; z-index: -1; opacity: 0.8; }
.mask-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.mask-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 460px; padding: 28px; overflow: hidden;
  background: var(--c-card); border: 1px solid var(--c-line); text-decoration: none; color: var(--c-text);
  transition: border-color .3s;
}
.mask-card:hover { border-color: var(--c-red-3); color: var(--c-text); }
.mask-card__art { position: absolute; top: 20px; left: 20px; right: 20px; height: 220px; }
.mask-card__bar { width: 32px; height: 3px; background: var(--faction); }
.mask-card__tag { margin-top: 16px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--c-muted); }
.mask-card h3 { margin-top: 8px; font-size: 36px; }
.mask-card p { margin-top: 10px; color: var(--c-text-2); font-size: 15px; }
.mask-card__reveal {
  position: absolute; inset: 0; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--reveal); opacity: 0; transition: opacity .35s;
}
.mask-card:hover .mask-card__reveal, .mask-card:focus-visible .mask-card__reveal { opacity: 1; }
.mask-card__reveal .mono { font-size: 12px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.85); }
.mask-card__reveal p { margin-top: 12px; font-family: var(--f-display); font-size: 28px; line-height: 1.2; color: #fff; }
.mask-card__reveal strong { margin-top: 20px; color: #fff; }
.f-kindred { --faction: var(--c-kindred); --reveal: var(--c-red); }
.f-hunters { --faction: var(--c-hunters); --reveal: #2C3A46; }
.f-streets { --faction: var(--c-streets); --reveal: #5A3A12; }
.f-people  { --faction: var(--c-people);  --reveal: #3A3634; }
@media (hover: none) {
  /* на тач-экранах «изнанка» видна сразу под карточкой */
  .mask-card__reveal { position: static; opacity: 1; margin: 20px -28px -28px; }
}

/* ---------- Особенности: досье ---------- */
.stamp {
  margin-top: 56px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 30px; border: 3px solid var(--c-red-2); color: var(--c-red-2);
  font-family: var(--f-mono); font-weight: 500; opacity: 0.9;
  rotate: calc(-8deg - var(--q) * 14deg * var(--k));
  translate: 0 calc(var(--q) * -80px * var(--k));
}
.stamp b { font-weight: 500; font-size: 26px; letter-spacing: 0.24em; }
.stamp small { font-size: 11px; letter-spacing: 0.18em; }
.dossier { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line-2); }
.dossier li { display: flex; gap: 28px; padding: 32px 0; border-bottom: 1px dashed var(--c-line-2); }
.dossier li:nth-child(odd) { translate: calc(var(--q) * -30px * var(--k)) 0; }
.dossier li:nth-child(even) { translate: calc(var(--q) * 30px * var(--k)) 0; }
.dossier__no { flex: none; width: 64px; padding-top: 8px; font-family: var(--f-mono); font-size: 14px; color: var(--c-red-3); }
.dossier h3 { font-size: 30px; }
.dossier p { margin-top: 8px; color: var(--c-text-2); }
.redacted { display: inline-block; width: 140px; height: 14px; background: var(--c-line-2); vertical-align: middle; }
@media (max-width: 560px) { .dossier li { gap: 16px; } .dossier__no { width: 48px; } }

/* ---------- Галерея: камера + доска улик ---------- */
.camera {
  position: relative; margin-top: 56px; aspect-ratio: 16 / 7; background: var(--c-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; overflow: hidden;
}
.camera iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.camera__corner { position: absolute; width: 36px; height: 36px; border: 0 solid var(--c-text); pointer-events: none; }
.camera__corner--tl { top: 20px; left: 20px; border-top-width: 2px; border-left-width: 2px; }
.camera__corner--tr { top: 20px; right: 20px; border-top-width: 2px; border-right-width: 2px; }
.camera__corner--bl { bottom: 20px; left: 20px; border-bottom-width: 2px; border-left-width: 2px; }
.camera__corner--br { bottom: 20px; right: 20px; border-bottom-width: 2px; border-right-width: 2px; }
.camera__rec { position: absolute; top: 30px; left: 72px; display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 13px; }
.camera__rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-red-2); animation: rec 1.4s steps(2, jump-none) infinite; }
@keyframes rec { 50% { opacity: 0.2; } }
.camera__tc { position: absolute; bottom: 30px; right: 72px; font-family: var(--f-mono); font-size: 13px; color: var(--c-muted); }
.camera__play {
  width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--c-text); background: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .2s;
}
.camera__play:hover { background: var(--c-red); border-color: var(--c-red); }
.camera__play svg { width: 24px; height: 24px; fill: var(--c-text); margin-left: 4px; }
.camera__label { font-family: var(--f-mono); font-size: 13px; color: var(--c-muted); padding-inline: 16px; text-align: center; }
@media (max-width: 640px) { .camera { aspect-ratio: 4 / 3; } .camera__rec { left: 32px; } .camera__tc { right: 32px; } }

.board { position: relative; margin-top: 88px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 48px; }
.board__string { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; filter: drop-shadow(0 2px 1px rgba(13, 15, 22, 0.6)); }
.evidence { position: relative; margin: 0; padding: 12px 12px 16px; background: var(--c-card); rotate: var(--tilt, 0deg); }
.evidence::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%; background: var(--c-red-2); box-shadow: 0 2px 0 var(--c-black); z-index: 3;
}
.evidence .ph { aspect-ratio: 4 / 3; background: none; }
.evidence figcaption { margin-top: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--c-muted); }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board__string { display: none; } }
@media (max-width: 560px) { .board { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* ---------- Кровавая нить (шаги) ---------- */
.thread { position: relative; list-style: none; margin: 0; padding: 0 0 0 96px; }
.thread__rail { position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: var(--c-line); }
.thread__fill { width: 100%; height: calc(clamp(0, (var(--pp) - 0.2) / 0.5, 1) * 100%); background: var(--c-red-2); }
.thread__drop { position: absolute; max-width: none; left: -7px; top: calc(clamp(0, (var(--pp) - 0.2) / 0.5, 1) * 100%); margin-top: -4px; width: 16px; height: 22px; }
.thread__step { position: relative; padding-bottom: 64px; }
.thread__step:last-child { padding-bottom: 0; }
.thread__node {
  position: absolute; left: -96px; top: 0; width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--c-line-3); background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 24px; font-weight: 600;
}
.thread__step:last-child .thread__node { background: var(--c-red); border-color: var(--c-red-2); }
.thread h3 { font-size: 34px; line-height: 1.2; }
.thread p { margin-top: 10px; color: var(--c-text-2); }
.thread__step a { display: inline-block; margin-top: 14px; font-weight: 600; }
.thread__step .btn { margin-top: 20px; }
@media (max-width: 560px) { .thread { padding-left: 76px; } .thread__node { left: -76px; width: 48px; height: 48px; font-size: 20px; } .thread__rail { left: 23px; } .thread h3 { font-size: 28px; } }

/* ---------- Хроники: газета ---------- */
.ticker { overflow: hidden; white-space: nowrap; padding: 14px 0; background: var(--c-red); font-family: var(--f-mono); font-size: 14px; letter-spacing: 0.16em; color: #fff; }
.ticker__track { display: inline-block; translate: calc(var(--pp) * -900px * var(--k)) 0; will-change: translate; }
.masthead { border-top: 4px double var(--c-line-3); border-bottom: 1px solid var(--c-line-3); padding: 24px 0 18px; text-align: center; }
.masthead h2 { margin-top: 12px; font-size: clamp(48px, 8vw, 104px); font-weight: 700; line-height: 1; letter-spacing: 0.02em; }
.masthead__line { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--c-muted); }
.masthead__line a { color: var(--c-text); text-decoration: none; }
.paper { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 40px; }
.paper__lead { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.paper__side { flex: 1 1 300px; min-width: 0; border-left: 1px solid var(--c-line-2); padding-left: 40px; display: flex; flex-direction: column; }
.paper__side .article + .article { border-top: 1px solid var(--c-line-2); padding-top: 28px; margin-top: 28px; }
.article { text-decoration: none; color: var(--c-text); display: block; }
.article:hover { color: var(--c-text); }
.article:hover h3 { text-decoration: underline; text-decoration-color: var(--c-red-2); text-underline-offset: 6px; }
.article__meta { display: flex; gap: 12px; font-family: var(--f-mono); font-size: 12px; }
.article__meta span:first-child { color: var(--c-red-3); }
.article__meta span + span { color: var(--c-muted); }
.article h3 { margin-top: 10px; font-size: 28px; line-height: 1.2; }
.article p { margin-top: 8px; color: var(--c-text-2); font-size: 15px; }
.paper__lead .ph { aspect-ratio: 16 / 9; overflow: hidden; }
.paper__lead h3 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.paper__lead p { font-size: 17px; line-height: 1.7; columns: 2 240px; column-gap: 32px; }
@media (max-width: 900px) { .paper__side { border-left: 0; padding-left: 0; border-top: 1px solid var(--c-line-2); padding-top: 28px; } }

/* ---------- Финал: кровавая луна ---------- */
.final { min-height: 760px; display: flex; align-items: center; }
.moon {
  position: absolute; right: -80px; top: 50%; width: 560px; height: 560px; margin-top: -280px; z-index: -1; pointer-events: none;
  translate: 0 calc(var(--q) * -140px * var(--k));
}
.moon__halo { position: absolute; inset: -40px; border-radius: 50%; background: radial-gradient(circle, rgba(176, 0, 14, 0.35), rgba(26, 30, 40, 0) 65%); }
.moon__disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: rgba(176, 0, 14, 0.45); border: 1px solid rgba(227, 27, 35, 0.6); }
.moon__shadow { position: absolute; inset: 0; border-radius: 50%; background: var(--c-bg); translate: calc((0.25 - var(--q)) * 600px * var(--k)) 0; }
.final__inner { position: relative; width: 100%; padding-block: 140px; }
.final h2 { font-size: clamp(44px, 6vw, 80px); line-height: 1; margin-top: 20px; }
.final .btn { margin-top: 40px; }
@media (max-width: 760px) { .moon { width: 380px; height: 380px; margin-top: -190px; right: -160px; top: 30%; } }

/* Виджет Discord */
.widget { background: rgba(13, 15, 22, 0.85); border: 1px solid var(--c-line); padding: 28px; }
.widget__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.widget__name { font-weight: 700; font-size: 17px; }
.widget__online { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-text-2); }
.widget__title { margin-top: 20px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--c-muted); }
.widget__list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--c-text-2); }
.widget__list li { display: flex; justify-content: space-between; gap: 12px; }
.widget__list li span:last-child { color: var(--c-muted); }
.widget__foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-line); font-family: var(--f-mono); font-size: 11px; color: var(--c-muted); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--c-black); border-top: 1px solid var(--c-line); }
.site-footer__grid { padding-block: 64px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.site-footer__brand { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: 0.04em; }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.site-footer__col .mono { font-size: 12px; letter-spacing: 0.1em; color: var(--c-red-3); }
.site-footer__col a { text-decoration: none; color: var(--c-text-2); }
.site-footer__col a:hover { color: var(--c-text); }
.site-footer__legal { margin-top: 56px; padding-block: 24px 40px; border-top: 1px solid var(--c-line); font-size: 12px; line-height: 1.6; color: var(--c-muted); }

/* =========================================================
   Подстраницы
   ========================================================= */
.page-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--c-bg-2); border-bottom: 1px solid var(--c-line); }
.page-hero__deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.page-hero__content {
  position: relative; padding-block: 100px 260px;
  translate: 0 calc(var(--s) * 0.15px * var(--k));
  opacity: clamp(0, 1 - var(--s) * var(--k) / 700, 1);
}
.page-hero__content .lead { margin-top: 28px; max-width: 680px; }
@media (max-width: 760px) { .page-hero__content { padding-block: 72px 200px; } }

/* Фракции — четыре нити */
.threads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.threads > div { position: relative; border-left: 1px solid var(--c-line); }
.threads > div:last-child { border-right: 1px solid var(--c-line); }
.threads__line { position: absolute; left: -1px; top: -10%; width: 2px; background: var(--faction); will-change: translate; }
.threads__label { position: absolute; left: 20px; bottom: 28px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--c-muted); }
@media (max-width: 760px) { .threads__label { writing-mode: vertical-rl; left: 10px; bottom: 20px; } }

.chips { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--c-line-2); text-decoration: none; color: var(--c-text-2); font-weight: 600; background: var(--c-bg-2);
}
.chip:hover { border-color: var(--c-text); color: #fff; }
.chip i { width: 10px; height: 10px; background: var(--faction, var(--c-text)); }

.faction { position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--c-line); padding-block: 100px; }
.faction--alt { background: var(--c-bg-2); }
.faction__row { display: flex; flex-wrap: wrap; gap: 56px; }
.faction--reverse .faction__row { flex-wrap: wrap-reverse; }
.faction__text { flex: 1 1 440px; min-width: 0; }
.faction__art { flex: 1 1 480px; min-width: 0; min-height: 520px; align-items: flex-end; justify-content: flex-start; }
.faction__tag { display: flex; align-items: center; gap: 14px; }
.faction__tag i { width: 40px; height: 3px; background: var(--faction); }
.faction__tag span { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--c-muted); }
.faction h2 { margin-top: 20px; font-size: clamp(48px, 6vw, 64px); line-height: 1; }
.faction__text > p { margin-top: 24px; font-size: 18px; line-height: 1.7; color: var(--c-text-2); }
.faction h3.label { margin-top: 40px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--c-red-3); }
.faction h3.label + * { margin-top: 16px; }
.faction ul { padding-left: 20px; color: var(--c-text-2); line-height: 1.9; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.org { padding: 20px; border: 1px solid var(--c-line); background: var(--c-card); }
.org b { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 600; line-height: 1.2; }
.org p { margin-top: 8px; font-size: 14px; color: var(--c-text-2); }
.prof-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.prof-grid .org:nth-child(even) { translate: 0 calc(var(--q) * -90px * var(--k)); }
.prof-grid .org:nth-child(odd) { translate: 0 calc(var(--q) * 30px * var(--k)); }
.prof-grid .org b { font-size: 26px; }
.prof-grid .org--more { border-style: dashed; border-color: var(--c-line-2); display: flex; align-items: center; color: var(--c-muted); background: none; }
.seal { position: absolute; right: 3%; top: 36px; width: 180px; height: 180px; z-index: -1; opacity: 0.7; color: var(--faction); }
.seal__ring { transform-origin: 100px 100px; transform: rotate(calc(var(--pp) * 220deg * var(--k))); }
.seal text { fill: currentColor; }
.seal circle { stroke: currentColor; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--c-line-2); text-decoration: none; color: var(--c-text-2); font-size: 15px; }
.links a:hover { border-color: var(--c-text); color: #fff; }
.cta-band { border-top: 1px solid var(--c-line); padding-block: 100px; }
.cta-band__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.cta-band h2 { font-size: clamp(36px, 4vw, 48px); max-width: 640px; }
@media (max-width: 760px) { .seal { width: 120px; height: 120px; top: 20px; } .faction__art { min-height: 320px; } }

/* Как начать — приглашение */
.invite { position: absolute; right: 6%; top: 250px; width: 460px; height: 290px; border: 1px solid var(--c-line-2); background: var(--c-bg); rotate: -6deg; translate: 0 calc(var(--s) * 0.2px * var(--k)); }
.invite svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.invite span { position: absolute; left: 28px; bottom: 24px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--c-muted); }
.wax { position: absolute; right: calc(6% + 330px); top: 470px; width: 96px; height: 96px; translate: 0 calc(var(--s) * 0.42px * var(--k)); rotate: calc(var(--pp) * 220deg * var(--k)); }
@media (max-width: 1100px) { .invite { right: -120px; top: auto; bottom: 40px; opacity: 0.6; } .wax { right: 120px; top: auto; bottom: 120px; } }
.start-hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.start-hero > div { flex: 1 1 520px; min-width: 0; }
.req { flex: 1 1 360px; min-width: 0; padding: 32px; background: rgba(35, 40, 54, 0.92); border: 1px solid var(--c-line); }
.req h2 { font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--c-red-3); }
.req ul { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; color: var(--c-text-2); }
.req li { display: flex; gap: 12px; }
.req li svg { width: 20px; height: 20px; flex: none; margin-top: 2px; stroke: var(--c-red-2); }

.steps-big { position: relative; list-style: none; margin: 0; padding: 0; }
.steps-big .thread__rail { left: -44px; top: 48px; bottom: 48px; }
.steps-big > li:not(.thread__rail) { display: flex; flex-wrap: wrap; gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--c-line); }
.steps-big > li:last-child { border-bottom: 0; }
.steps-big__no { flex: 0 0 120px; font-family: var(--f-display); font-size: 72px; font-weight: 600; color: var(--c-red-2); line-height: 1; }
.steps-big__body { flex: 1 1 480px; min-width: 0; }
.steps-big h2 { font-size: 36px; }
.steps-big p { margin-top: 12px; font-size: 17px; color: var(--c-text-2); }
@media (max-width: 1340px) { .steps-big .thread__rail { display: none; } }

/* Анкета */
.case {
  position: relative; margin-top: 34px; padding: 40px; background: var(--c-card); border: 1px solid var(--c-line);
  display: flex; flex-direction: column; gap: 24px;
}
.case__tab {
  position: absolute; left: -1px; top: -34px; height: 34px; padding: 0 20px; display: flex; align-items: center;
  background: var(--c-card); border: 1px solid var(--c-line); border-bottom: 0;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--c-red-3);
}
.case__stamp {
  position: absolute; right: 28px; bottom: 28px; padding: 10px 16px; border: 2px solid var(--c-red-2); color: var(--c-red-2);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.2em; opacity: 0.85; pointer-events: none;
  rotate: calc(-8deg - var(--q) * 14deg * var(--k));
}
.case.is-sent .case__stamp { border-color: #3FB27F; color: #3FB27F; }
@media (max-width: 640px) { .case { padding: 28px 20px 96px; } .case__stamp { right: 20px; bottom: 20px; } .case__tab { font-size: 11px; padding: 0 12px; } }
.discord-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border: 1px solid var(--c-line-2); }
.discord-box.is-connected { border-color: #2E5A45; background: #12201A; justify-content: flex-start; }
.discord-box__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-line-2); object-fit: cover; }
.discord-box__ok { font-size: 13px; color: #9BC8B2; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--c-text-2); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 0 14px; background: var(--c-bg); border: 1px solid var(--c-line-2);
  color: var(--c-text); font: inherit; font-size: 16px; font-weight: 400; border-radius: 0;
}
.field textarea { padding: 14px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--c-red-3); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--c-red-2); }
.field__error { font-size: 13px; font-weight: 500; color: var(--c-red-3); min-height: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; color: var(--c-text-2); }
.check input { width: 20px; height: 20px; accent-color: var(--c-red); }
.form-note { font-size: 13px; color: var(--c-muted); }
.form-status { padding: 16px 20px; border: 1px solid; font-size: 15px; }
.form-status--ok { border-color: #2E5A45; background: #12201A; color: #CFE7DA; }
.form-status--err { border-color: var(--c-red); background: #2A1219; color: #F3B8BF; }

/* FAQ */
.faq { max-width: 880px; }
.faq details { border-top: 1px solid var(--c-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--c-line); }
.faq summary {
  list-style: none; cursor: pointer; min-height: 64px; padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); font-size: 22px; color: var(--c-red-3); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: #fff; }
.faq details p { padding-bottom: 24px; max-width: 720px; color: var(--c-text-2); line-height: 1.7; }

/* Правила — кодекс */
.codex__frame { position: absolute; inset: 28px; border: 1px solid var(--c-line); }
.codex__frame--in { inset: 36px; }
.codex__corner { position: absolute; width: 18px; height: 18px; background: var(--c-red); }
.codex__sign {
  position: absolute; right: 6%; top: -60px; font-family: var(--f-display); font-size: 560px; font-weight: 600; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--c-line-3);
  translate: 0 calc(var(--s) * 0.42px * var(--k));
}
@media (max-width: 760px) { .codex__sign { font-size: 320px; right: -20px; top: auto; bottom: -40px; } .codex__frame { inset: 12px; } .codex__frame--in { inset: 18px; } }
.rules-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.rules-search { flex: 0 1 380px; }
.rules-search input { background: var(--c-card); }
.rules-layout { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; padding-block: 64px 100px; }
.rules-nav { flex: 1 1 240px; max-width: 280px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.rules-nav a { min-height: 40px; display: flex; align-items: center; text-decoration: none; color: var(--c-text-2); }
.rules-nav a:hover { color: #fff; }
.rules-nav a.is-active { color: var(--c-text); font-weight: 600; }
.rules-nav a.is-active::before { content: ""; width: 12px; height: 2px; background: var(--c-red-2); margin-right: 10px; }
.read { margin-bottom: 12px; }
.read__head { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--c-muted); }
.read__bar { margin-top: 8px; height: 2px; background: var(--c-line); }
.read__bar div { height: 100%; width: calc(var(--read) * 100%); background: var(--c-red-2); }
@media (max-width: 860px) { .rules-nav { max-width: none; } }
.rules-body { flex: 999 1 560px; min-width: 0; font-size: 17px; line-height: 1.7; color: var(--c-text-2); }
.rules-body > section { border-top: 1px solid var(--c-line); padding-top: 32px; scroll-margin-top: 96px; }
.rules-body > section + section { margin-top: 64px; }
.rules-body h2 { font-size: 40px; color: var(--c-text); }
.rule-list { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.rule { display: flex; gap: 20px; }
.rule > span { flex: none; width: 48px; padding-top: 3px; font-family: var(--f-mono); font-size: 14px; color: var(--c-red-3); }
.rule strong { color: var(--c-text); }
.rule mark { background: rgba(227, 27, 35, 0.35); color: #fff; }
.callout { margin-top: 28px; padding: 24px; background: var(--c-card); border: 1px solid var(--c-line); }
.callout--law { border-color: var(--c-red); background: #2A1219; color: var(--c-text); }
.callout .mono { font-size: 12px; letter-spacing: 0.12em; color: var(--c-red-3); }
.callout--law .mono { color: #F3B8BF; }
.callout p { margin-top: 10px; }
.table-wrap { margin-top: 24px; overflow-x: auto; border: 1px solid var(--c-line); }
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.table-wrap th { padding: 14px 18px; background: var(--c-card); text-align: left; color: var(--c-text); font-weight: 600; }
.table-wrap td { padding: 14px 18px; border-top: 1px solid var(--c-line); }
.changelog { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.changelog li { display: flex; flex-wrap: wrap; gap: 16px; }
.changelog .mono { color: var(--c-red-3); }
.search-empty { margin-top: 24px; padding: 24px; border: 1px dashed var(--c-line-2); color: var(--c-muted); }
.is-hidden { display: none !important; }

/* На узких экранах карточки идут в одну колонку — разносить их по высоте нельзя */
@media (max-width: 760px) {
  .mask-card.depth-a, .mask-card.depth-b, .prof-grid .org:nth-child(n) { translate: none; }
}
@media (max-width: 560px) {
  .evidence[class*="depth-"] { translate: none; }
}

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root, [data-scene], [data-hero] { --k: 0 !important; --pp: 1 !important; --q: 0 !important; --s: 0 !important; }
  .draw { stroke-dashoffset: 0; }
  .moon__shadow { translate: 150px 0; }
  .camera__rec::before { animation: none; }
}

/* KNOWLEDGE BASE EXTENSION */

/* Knowledge base: shared visual language with the landing page. */
[hidden] { display: none !important; }
.site-header__inner { gap: 20px; }
.nav { gap: 18px; }
.nav a { font-size: 13px; white-space: nowrap; }
.knowledge-intro { position: relative; overflow: hidden; padding: 56px 0 64px; background: var(--c-bg-2); border-bottom: 1px solid var(--c-line); }
.knowledge-intro::before { content: ''; position: absolute; right: -180px; top: -300px; width: 700px; height: 700px; border: 1px solid rgb(227 27 35 / 12%); border-radius: 50%; pointer-events: none; }
.knowledge-intro h1 { max-width: 1000px; margin-top: 24px; font-size: clamp(42px, 5.5vw, 76px); line-height: 1.08; overflow-wrap: break-word; }
.knowledge-intro h1 span { color: var(--c-red-2); }
.knowledge-intro--catalog { padding-top: 88px; }
.knowledge-intro--catalog .lead { max-width: 700px; margin-top: 28px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 36px; color: var(--c-muted); font-size: 12px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs [aria-current] { color: var(--c-text-2); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 32px; color: var(--c-muted); font: 11px/1.8 var(--f-mono); }
.doc-meta a { color: var(--c-text-2); }
.knowledge-search { max-width: 740px; margin-top: 40px; }
.knowledge-search label { display: block; margin-bottom: 10px; color: var(--c-text-2); font-size: 13px; }
.knowledge-search > div { display: flex; gap: 12px; }
.knowledge-search input, .doc-quick-search input { width: 100%; min-width: 0; min-height: 54px; padding: 14px 18px; background: var(--c-card); border: 1px solid var(--c-line-3); border-radius: 2px; color: var(--c-text); font: 15px var(--f-body); }
.knowledge-search input:focus, .doc-quick-search input:focus { outline: 2px solid var(--c-red-3); outline-offset: 2px; }
.knowledge-total { margin-top: 20px; color: var(--c-muted); font: 11px/1.8 var(--f-mono); }
.knowledge-catalog { padding-block: 48px 100px; }
.knowledge-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.knowledge-filters button { padding: 10px 16px; background: transparent; border: 1px solid var(--c-line-2); border-radius: 2px; color: var(--c-text-2); font-size: 13px; cursor: pointer; }
.knowledge-filters button:hover, .knowledge-filters button[aria-pressed=true] { background: var(--c-card); border-color: var(--c-red-3); color: var(--c-text); }
.knowledge-results-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--c-line); }
.knowledge-results-head h2 { font-size: 34px; }
.knowledge-results-head p { color: var(--c-muted); font-size: 12px; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.knowledge-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--c-line); border-top: 2px solid var(--c-line-2); background: var(--c-card); color: var(--c-text); text-decoration: none; transition: border-color .2s, transform .2s; }
.knowledge-card:hover { border-color: var(--c-red-3); color: var(--c-text); transform: translateY(-3px); }
.knowledge-card .eyebrow { font-size: 10px; letter-spacing: .12em; }
.knowledge-card h3 { margin-top: 18px; font-size: 31px; line-height: 1.15; overflow-wrap: break-word; }
.knowledge-card p { margin-block: 16px 28px; color: var(--c-text-2); font-size: 13px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.knowledge-card__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--c-line-2); color: var(--c-text-2); font-size: 12px; }
.knowledge-more { display: flex; margin: 36px auto 0; }
.knowledge-empty { padding: 64px 24px; border: 1px dashed var(--c-line-3); text-align: center; }
.knowledge-empty h3 { font-size: 36px; }
.knowledge-empty p { margin-block: 20px 28px; color: var(--c-text-2); }
.knowledge-note { margin-top: 24px; color: var(--c-muted); font-size: 13px; }
.doc-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 64px; padding-block: 64px 100px; align-items: start; }
.doc-sidebar { position: sticky; top: 24px; min-width: 0; max-height: calc(100dvh - 48px); overflow: auto; padding-right: 12px; }
.doc-sidebar h2 { margin-block: 28px 16px; font: 11px/1.7 var(--f-mono); color: var(--c-muted); letter-spacing: .08em; text-transform: uppercase; }
.doc-sidebar nav { display: flex; flex-direction: column; gap: 12px; }
.doc-sidebar nav a { color: var(--c-text-2); font-size: 12px; text-decoration: none; line-height: 1.7; }
.doc-sidebar nav a:hover { color: var(--c-red-3); }
.doc-back { color: var(--c-red-3); font-size: 12px; text-decoration: none; }
.doc-quick-search { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--c-line-2); }
.doc-quick-search label { display: block; margin-bottom: 10px; color: var(--c-muted); font-size: 11px; }
.doc-quick-search input { min-height: 44px; padding: 10px 12px; font-size: 12px; }
.doc-quick-search button { padding: 12px 0; border: 0; background: transparent; color: var(--c-text); font-size: 12px; cursor: pointer; }
.doc-content { min-width: 0; color: var(--c-text-2); font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.doc-content > section + section { margin-top: 24px; }
.doc-content h2 { margin: 44px 0 24px; color: var(--c-text); font-size: 38px; line-height: 1.15; scroll-margin-top: 24px; }
.doc-content h3 { margin: 32px 0 20px; color: var(--c-text); font-size: 29px; line-height: 1.25; scroll-margin-top: 24px; }
.doc-content h4, .doc-content h5, .doc-content h6 { margin-block: 24px 16px; color: var(--c-text); font: 600 23px/1.3 var(--f-display); }
.doc-content p { margin-block: 16px; }
.doc-content li { margin-block: 10px; }
.doc-content ul, .doc-content ol { padding-left: 26px; margin-block: 24px; }
.doc-content li::marker { color: var(--c-red-3); }
.doc-content a { color: var(--c-red-3); text-underline-offset: 4px; }
.doc-content strong, .doc-content b { color: var(--c-text); }
.doc-content blockquote { padding: 24px; border-left: 2px solid var(--c-red-2); background: var(--c-bg-2); margin: 32px 0; }
.doc-content img { max-width: 100%; width: auto; max-height: 480px; object-fit: contain; margin: 28px auto; }
.doc-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.doc-content td, .doc-content th { padding: 12px; border: 1px solid var(--c-line-2); text-align: left; }
.doc-content .doc-related { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--c-line-2); }
.doc-related .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-related .knowledge-card h3 { font-size: 27px; margin-top: 16px; }
.doc-related .knowledge-card p { margin-block: 12px 20px; }
.doc-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--c-line); font-size: 13px; }
.staff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block: 24px; }
.staff-card { min-width: 0; padding: 20px; border: 1px solid var(--c-line); background: var(--c-card); text-align: center; }
.staff-card img { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; margin: 0 auto 16px; }
.staff-card p { font-size: 12px; line-height: 1.7; margin: 8px 0; }
.knowledge-home__heading { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 48px; }
.knowledge-home__heading .btn { margin-top: 28px; }
.knowledge-home__footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-top: 40px; font-size: 14px; }
.org-link { display: inline-block; margin-top: 20px; color: var(--c-red-3); font-size: 13px; text-decoration: none; }
.faction-extra-links { padding-bottom: 80px; }
.application-choices { display: flex; flex-direction: column; gap: 20px; }
.application-choices h3 { font-size: 36px; }
.application-choices > p { font-size: 15px; line-height: 1.8; color: var(--c-text-2); }
.application-choice { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--c-line-3); color: var(--c-text); font-size: 14px; text-decoration: none; }
.application-choice:hover { border-color: var(--c-red-3); }
.application-instructions { margin-top: 12px; font-size: 14px; }
@media (max-width: 1150px) {
 .nav { gap: 12px; }
 .nav a { font-size: 12px; }
 .logo span { font-size: 21px; }
 .site-header__inner > .btn--sm { padding-inline: 16px; }
}
@media (max-width: 1020px) { .nav a { font-size: 16px; white-space: normal; } }
@media (max-width: 1024px) {
 .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .doc-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
 .doc-related .knowledge-grid { grid-template-columns: minmax(0, 1fr); }
 .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
 .site-header__inner { gap: 12px; }
 .logo { gap: 8px; min-width: 0; }
 .logo span { font-size: clamp(16px, 4.6vw, 19px); }
 .logo svg { width: 23px; flex: none; }
 .knowledge-intro { padding-block: 40px 48px; }
 .knowledge-intro h1 { font-size: clamp(40px, 8vw, 60px); }
 .knowledge-intro--catalog { padding-top: 56px; }
 .breadcrumbs { font-size: 11px; margin-bottom: 28px; }
 .knowledge-grid { grid-template-columns: minmax(0, 1fr); }
 .knowledge-search > div { flex-direction: column; }
 .knowledge-search .btn { align-self: flex-start; }
 .knowledge-card { padding: 24px; }
 .knowledge-filters { margin-bottom: 32px; gap: 8px; }
 .knowledge-filters button { font-size: 11px; padding: 10px 12px; }
 .knowledge-results-head h2 { font-size: 30px; }
 .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 40px 64px; }
 .doc-sidebar { position: static; max-height: none; padding-right: 0; padding-bottom: 28px; border-bottom: 1px solid var(--c-line-2); }
 .doc-sidebar nav { max-height: 200px; overflow-y: auto; padding-right: 12px; }
 .doc-content { font-size: 15px; }
 .doc-content h2 { font-size: 32px; }
 .doc-content h3 { font-size: 27px; }
 .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .staff-card { padding: 16px; }
 .knowledge-home__heading { grid-template-columns: minmax(0, 1fr); gap: 28px; }
 .knowledge-home__heading .lead { font-size: 16px; }
 .knowledge-home__footer { flex-direction: column; }
 .application-choices { padding-bottom: 28px; }
 .application-choice { padding: 16px; font-size: 12px; }
}
@media (max-width: 380px) { .staff-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .knowledge-card { transition: none; } .knowledge-card:hover { transform: none; } }


/* MATERIAL READING AND TEAM DESIGN */
/* Editorial reading system. Keep the line length and type scale consistent. */
.material-page { --reader-size: 18px; --reader-accent: #f25f67; --reader-ink: #d8dce5; }
.material-page--terminal, .material-page--hacker { --reader-accent: #81c5aa; }
.material-intro { padding-block: 40px 48px; }
.material-intro h1 { max-width: 1000px; font-size: clamp(42px,5vw,70px); line-height: 1.08; }
.material-intro .breadcrumbs { margin-bottom: 32px; }
.reader-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 28px; color: #a1a9b9; font-size: 12px; }
.reader-meta__line { width: 32px; height: 2px; background: var(--reader-accent); }
.reader-meta a { margin-left: auto; color: #b8bdc8; text-decoration: none; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 50; pointer-events: none; }
.reading-progress > span { display: block; width: var(--reading-progress,0%); height: 100%; background: var(--reader-accent); }
.reading-layout { grid-template-columns: 216px minmax(0,1fr); gap: 48px; padding-block: 40px 96px; }
.reading-sidebar { padding: 20px 12px 0 0; }
.reading-sidebar .doc-back { color: var(--reader-accent); font-size: 12px; }
.reading-contents { margin-top: 32px; }
.reading-contents summary { display: flex; justify-content: space-between; gap: 16px; color: #e3e6ed; font: 500 12px/1.6 var(--f-mono); cursor: pointer; list-style: none; }
.reading-contents summary::-webkit-details-marker { display: none; }
.reading-contents nav { display: flex; gap: 0; margin-top: 18px; padding-left: 12px; border-left: 1px solid var(--c-line-2); }
.reading-contents nav a { display: block; padding: 9px 0 9px 10px; color: #aeb6c5; line-height: 1.55; font-size: 12px; text-decoration: none; border-left: 2px solid transparent; margin-left: -13px; }
.reading-contents nav a:hover, .reading-contents nav a[aria-current=location] { border-left-color: var(--reader-accent); color: #fff; }
.reading-contents nav .toc-h3 { padding-left: 20px; font-size: 11px; }
.reading-sidebar .doc-quick-search { margin-top: 28px; padding-top: 22px; }
.reading-sidebar .doc-quick-search input { background: #141922; border-color: #3c4558; }
.reading-indicator { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-line-2); color: #9ca6b8; font-size: 11px; }
.reading-indicator strong { color: var(--reader-accent); font: 12px var(--f-mono); }
.reader-paper { min-width: 0; padding: 0 40px 32px; border: 1px solid #303849; border-radius: 3px; background: #1c222e; box-shadow: 0 12px 32px rgb(0 0 0 / 8%); font-size: var(--reader-size); color: var(--reader-ink); line-height: 1.85; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 66px; margin-bottom: 40px; border-bottom: 1px solid #343d4e; }
.reader-toolbar > span { color: #929eb2; font: 10px/1.7 var(--f-mono); letter-spacing: .08em; }
.reader-font { display: flex; flex: none; align-items: center; gap: 3px; }
.reader-font button { min-width: 34px; min-height: 34px; padding: 5px; border: 1px solid transparent; border-radius: 2px; background: none; color: #d4d9e3; font: 13px var(--f-body); cursor: pointer; }
.reader-font button:hover, .reader-font button:focus-visible { background: #2b3445; border-color: #59647a; }
.reader-font button:disabled { opacity: .35; cursor: default; }
.material-flow { max-width: 68ch; margin-inline: auto; overflow-wrap: break-word; }
.material-flow p { margin: 0 0 1.35em; font-size: inherit; line-height: inherit; }
.material-flow .material-lead { color: #edf0f5; font-size: 1.12em; line-height: 1.8; margin-bottom: 1.6em; }
.material-flow strong, .material-flow b { color: #f2f4f8; font-weight: 650; }
.material-flow a { color: var(--reader-accent); text-decoration-color: rgb(242 95 103 / 45%); text-underline-offset: 4px; }
.material-flow a:hover { color: #fff; }
.material-flow h2 { margin: 0 0 26px; color: #f3f4f7; font: 600 38px/1.15 var(--f-display); letter-spacing: -.01em; }
.material-flow h3 { margin: 30px 0 18px; color: #f0f2f6; font: 600 28px/1.25 var(--f-display); }
.material-flow h4 { margin: 24px 0 14px; color: #eff1f6; font: 600 22px/1.4 var(--f-display); }
.material-flow .material-title-echo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.source-anchor { display: block; height: 0; scroll-margin-top: 32px; }
.material-chapter { position: relative; margin-top: 48px; padding-top: 36px; border-top: 1px solid #394253; }
.material-chapter > h2 { padding-right: 42px; }
.material-chapter > h2::after { content: attr(data-index); }
.material-chapter::before { content: attr(data-chapter); position: absolute; right: 0; top: 37px; color: #6f7b90; font: 11px/1.8 var(--f-mono); letter-spacing: .1em; }
.material-chapter:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.material-chapter:first-child::before { top: 3px; }
.material-flow ul, .material-flow ol { margin: 24px 0 30px; padding-left: 24px; }
.material-flow li { margin: 12px 0; padding-left: 6px; }
.material-flow li p { margin-bottom: 12px; }
.material-flow li::marker { color: var(--reader-accent); }
.material-flow .material-note { margin: 28px 0; padding: 22px 24px; border-left: 2px solid var(--reader-accent); background: #141a25; color: #dce1eb; border-radius: 0 3px 3px 0; font-size: .94em; }
.material-flow .mechanic-note { margin: 20px 0 28px; padding: 14px 18px; border: 1px dashed #46516a; color: #bbc6d7; background: #19202c; font-size: .87em; line-height: 1.75; }
.material-flow blockquote { margin: 32px 0; padding: 24px 28px; border-left: 2px solid var(--reader-accent); background: #151b26; font: 500 26px/1.5 var(--f-display); color: #e6eaf1; }
.material-flow code { padding: 3px 6px; border: 1px solid #394759; border-radius: 3px; background: #111721; color: #a2d5bc; font: .85em/1.7 var(--f-mono); overflow-wrap: anywhere; }
.material-flow pre { max-width: 100%; margin: 22px 0; padding: 18px; overflow-x: auto; background: #101720; border: 1px solid #364351; border-radius: 3px; white-space: pre-wrap; font: .8em/1.8 var(--f-mono); color: #b3d9c6; }
.material-flow pre code { padding: 0; border: 0; background: transparent; }
.material-flow hr { margin: 36px 0; border: 0; border-top: 1px solid #394253; }
.material-flow img { max-height: 360px; max-width: 100%; width: auto; object-fit: contain; margin: 24px auto 32px; }
.material-flow table { border-collapse: collapse; font-size: .88em; }
.material-flow td, .material-flow th { padding: 14px; border: 1px solid #485267; }
.material-flow th { background: #121925; color: #f2f4f8; }
.material-directory { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 24px 0 32px; }
.material-directory > p { display: flex; margin: 0; border: 1px solid #3b4557; border-radius: 2px; background: #171e2a; font-size: .86em; line-height: 1.6; }
.material-directory a { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; color: #e0e6ef; text-decoration: none; }
.material-directory a::after { content: '↗'; flex: none; color: var(--reader-accent); }
.material-directory a:hover { background: #242f40; color: #fff; }
.ability-card { margin: 28px 0; overflow: hidden; border: 1px solid #434c60; border-radius: 3px; background: #19202c; }
.ability-card__head { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #3b4557; background: #121924; }
.ability-card__head::before { content: attr(data-level); color: var(--reader-accent); font: 500 22px/1 var(--f-mono); }
.material-flow .ability-card h3 { margin: 0; font-size: 27px; }
.ability-card__body { padding: 24px; }
.ability-card__body > p:last-child { margin-bottom: 0; }
.ability-card__body .mechanic-note { margin-bottom: 0; }
.material-page--rules .material-flow { counter-reset: rule-block; }
.material-flow .rule-stack { list-style: none; padding-left: 0; }
.material-flow .rule-stack > li { position: relative; margin: 0 0 14px; padding: 24px 24px 20px 64px; border: 1px solid #3b4557; background: #171f2b; border-radius: 3px; counter-increment: rule-block; }
.material-flow .rule-stack > li::before { content: counter(rule-block,decimal-leading-zero); position: absolute; top: 28px; left: 22px; color: var(--reader-accent); font: 11px var(--f-mono); }
.material-flow .rule-stack p:last-child { margin-bottom: 0; }
.glossary-tools, .question-tools, .terminal-tools { padding: 24px; margin-bottom: 28px; border: 1px solid #435069; border-radius: 3px; background: #151d29; }
.glossary-tools label, .question-tools label, .terminal-tools label { display: block; margin-bottom: 10px; font: 12px/1.7 var(--f-mono); color: #d1d9e6; }
.glossary-tools input, .question-tools input, .terminal-tools input, .team-search input { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 13px 16px; border: 1px solid #52607a; border-radius: 3px; background: #101722; color: #edf2f8; font: 14px/1.6 var(--f-body); }
.glossary-tools > p, .question-tools > p, .terminal-tools > p { margin: 12px 0 0; color: #9facc0; font-size: 12px; }
.glossary-alphabet { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.glossary-alphabet a { min-width: 34px; padding: 7px 8px; border: 1px solid #3f4b60; border-radius: 2px; background: #161e2b; text-align: center; font-size: 13px; text-decoration: none; }
.glossary-group { margin-top: 36px; }
.material-flow .glossary-group > h2 { color: var(--reader-accent); font-size: 44px; margin-bottom: 18px; }
.glossary-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
.glossary-entry { padding: 24px 26px; background: #151d29; border: 1px solid #3d485b; border-left: 2px solid #69768d; border-radius: 2px; }
.material-flow .glossary-entry h3 { margin: 0 0 12px; color: #f0f3f9; font-size: 28px; }
.material-flow .glossary-entry p { margin: 0; font-size: .95em; }
.question-tools > div { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; }
.question-tools button { padding: 0; border: 0; background: transparent; color: var(--reader-accent); font: 12px var(--f-body); cursor: pointer; }
.question-card { margin-bottom: 14px; border: 1px solid #3b475c; border-radius: 3px; background: #171f2c; }
.question-card > summary { position: relative; padding: 24px 48px 24px 24px; color: #ebeff6; font: 600 19px/1.55 var(--f-body); cursor: pointer; list-style: none; }
.question-card > summary::-webkit-details-marker { display: none; }
.question-card > summary::after { content: '+'; position: absolute; right: 22px; top: 23px; color: var(--reader-accent); font: 22px var(--f-mono); }
.question-card[open] > summary::after { content: '−'; }
.question-card[open] > summary { border-bottom: 1px solid #3b475c; }
.question-card__answer { padding: 24px; font-size: .95em; }
.question-card__answer > p:last-child { margin-bottom: 0; }
.hacker-notice { padding: 22px 24px; margin-bottom: 32px; border: 1px solid #3e655b; border-radius: 3px; background: #142523; }
.hacker-notice .eyebrow { color: var(--reader-accent); font-size: 10px; }
.hacker-notice p { margin: 12px 0; font-size: 16px; }
.hacker-notice a { font-size: 13px; }
.terminal-tools { border-color: #3e5a55; background: #111d20; }
.terminal-tools__status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; color: #a7e1c3; font: 12px/1.6 var(--f-mono); }
.terminal-tools__status > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: #81c5aa; }
.terminal-tools__status > span:last-child { margin-left: auto; color: #91a8a3; font-size: 9px; }
.material-flow .terminal-context { color: #a6b9b3; font-size: 12px; }
.command-card { margin: 20px 0; border: 1px solid #3e5657; border-radius: 3px; background: #151f28; overflow: hidden; }
.command-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #35484e; background: #0f171e; }
.material-flow .command-card__head h3 { min-width: 0; margin: 0; font: 15px/1.6 var(--f-mono); }
.material-flow .command-card__head code { padding: 0; border: 0; background: transparent; color: #a9e3c5; font-size: 1em; }
.copy-command { flex: none; min-height: 34px; padding: 7px 10px; border: 1px solid #3e5c56; border-radius: 2px; background: #152725; color: #bce2d0; font: 10px/1.6 var(--f-body); cursor: pointer; }
.copy-command:hover { border-color: #84ba9e; }
.command-card__body { padding: 22px; font-size: .92em; }
.command-card__body > p:last-child { margin-bottom: 0; }
.command-category.material-chapter { margin-top: 12px; padding: 0; border: 1px solid #3d5757; border-radius: 3px; background: #121d25; overflow: hidden; }
.command-category.material-chapter::before { content: none; }
.command-category > summary { display: flex; align-items: center; gap: 16px; padding: 22px 24px; list-style: none; cursor: pointer; }
.command-category > summary::-webkit-details-marker { display: none; }
.material-flow .command-category > summary > h2 { flex: 1; margin: 0; padding: 0; font: 600 25px/1.3 var(--f-display); color: #dcece5; }
.command-category__count { flex: none; color: #8eaca1; font: 10px var(--f-mono); }
.command-category > summary::after { content: '+'; color: #a6d4bd; font: 20px var(--f-mono); }
.command-category[open] > summary::after { content: '−'; }
.command-category[open] > summary { border-bottom: 1px solid #354d4e; }
.command-category > .command-card { margin: 18px; }
.command-category > :is(h3,p,ul,ol,pre) { margin-left: 22px; margin-right: 22px; }
.terminal-expand { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 16px; }
.terminal-expand button { padding: 0; border: 0; background: none; color: #a4d5bd; font: 11px/1.6 var(--f-body); cursor: pointer; }
.reader-related { margin-top: 48px; }
.reader-related > h2 { font-size: 32px; margin-top: 16px; }
.reader-related__list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 24px; }
.reader-related__list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 18px; border: 1px solid #414b60; background: #151d29; color: #dbe2ed; text-decoration: none; font-size: 14px; line-height: 1.6; }
.reader-related__list a:hover { border-color: var(--reader-accent); color: #fff; }
.reader-hub-grid { align-items: stretch; }
.reader-related__list .reader-hub { display: flex; flex-direction: column; align-items: stretch; justify-content: start; gap: 0; padding: 0; overflow: hidden; }
.reader-hub__image { display: flex; align-items: center; justify-content: center; height: 155px; padding: 24px; border-bottom: 1px solid #3b465a; background: #c3c9cf; }
.reader-hub__image img { width: auto; height: auto; max-width: 100%; max-height: 112px; object-fit: contain; margin: 0; }
.reader-hub__text { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.reader-hub__text > strong { margin-bottom: 14px; font: 600 27px/1.2 var(--f-display); }
.reader-hub__text > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #b4bfd0; font-size: 12px; line-height: 1.8; }
.reader-hub__text > small { margin-top: auto; padding-top: 22px; color: var(--reader-accent); font: 10px var(--f-body); }
.reader-paper .doc-bottom { padding-top: 26px; margin-top: 40px; border-color: #3e4758; font-size: 12px; }

/* Team directory: one profile per person, with all roles and areas of work. */
.team-intro { position: relative; padding: 40px 0 0; background: #141923; border-bottom: 1px solid #343c4b; overflow: hidden; }
.team-intro__grid { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 80px; align-items: center; padding-block: 20px 64px; }
.team-intro h1 { margin: 22px 0 26px; font: 600 clamp(56px,6vw,88px)/1.02 var(--f-display); }
.team-intro h1 em { color: #e5313d; font-weight: 500; }
.team-intro .lead { max-width: 650px; font-size: 18px; }
.team-seal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; width: 240px; height: 270px; border: 1px solid #66333d; outline: 1px solid #343c4b; outline-offset: 10px; text-align: center; }
.team-seal img { width: 36px; height: 44px; }
.team-seal > span { font: 600 28px/1.1 var(--f-display); letter-spacing: .1em; }
.team-seal small { padding-top: 18px; border-top: 1px solid #57323a; color: #a78f98; font: 9px var(--f-mono); letter-spacing: .14em; }
.team-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 48px; padding: 30px 0; border-top: 1px solid #353d4d; }
.team-facts > div { display: flex; align-items: center; gap: 16px; }
.team-facts strong { font: 600 36px/1 var(--f-display); }
.team-facts span { max-width: 120px; color: #9ea8ba; font-size: 12px; line-height: 1.7; }
.team-facts > a { margin-left: auto; font-size: 13px; color: #efb1b8; text-decoration: none; }
.team-directory { padding-block: 72px 96px; }
.team-directory__head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 36px; }
.team-directory__head h2 { margin-top: 16px; font: 600 46px/1.05 var(--f-display); }
.team-search { flex: 0 1 370px; }
.team-search label { display: block; margin-bottom: 10px; color: #b9c0ce; font-size: 12px; }
.team-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 28px; border-bottom: 1px solid #343d50; }
.team-filters button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 10px 14px; border: 1px solid #424d61; background: transparent; border-radius: 2px; color: #bec7d6; font: 12px var(--f-body); cursor: pointer; }
.team-filters button > span { color: #7e8ba1; font: 10px var(--f-mono); }
.team-filters button[aria-pressed=true] { background: #38212a; border-color: #a74250; color: #f4d9de; }
.team-filters button[aria-pressed=true] > span { color: #efb3bf; }
.team-result { padding-block: 22px; color: #a0acbf; font: 11px var(--f-mono); }
.member-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.member-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid #3b4558; border-top: 2px solid #576075; background: #202735; border-radius: 3px; }
.member-card--lead { border-top-color: #d03b4e; background: #252632; }
.member-card__top { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 22px; }
.member-avatar { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; flex: none; border-radius: 50%; outline: 1px solid #505a6d; outline-offset: 5px; background: #101722; overflow: hidden; }
.member-card--lead .member-avatar { outline-color: #a54c59; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-avatar__initials { color: #d3a0aa; font: 600 26px var(--f-display); }
.member-id { padding: 5px 8px; border: 1px solid #465065; border-radius: 2px; color: #aab5c8; font: 10px/1.6 var(--f-mono); }
.member-card h2 { margin: 0 0 18px; color: #f3f5fa; font: 650 22px/1.3 var(--f-body); overflow-wrap: anywhere; }
.member-roles { display: flex; flex-wrap: wrap; gap: 7px; }
.member-role { padding: 5px 8px; border: 1px solid #4a566d; border-radius: 2px; color: #c3cede; font-size: 10px; line-height: 1.7; }
.member-role--lead { background: #412530; border-color: #75404d; color: #f3b4bf; }
.member-role--curators { border-color: #706044; color: #d8c49f; }
.member-role--developers { border-color: #3a665d; color: #a4d2c3; }
.member-role--watchers { border-color: #4f5c7f; color: #bac6e9; }
.member-factions { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #3c4556; }
.member-factions > p { flex: 1 0 100%; margin-bottom: 4px; color: #8e9bb0; font: 9px/1.7 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.member-factions > span { color: #c6d0df; font-size: 12px; line-height: 1.7; }
.member-divider { flex: 1; margin-top: 24px; border-top: 1px solid #3c4556; }
.team-empty { padding: 64px 24px; border: 1px dashed #536077; text-align: center; }
.team-empty h3 { margin-bottom: 16px; font-size: 36px; }
.team-empty p { color: #b8c0cf; }
.team-empty button { margin-top: 20px; padding: 12px 20px; border: 1px solid #a34c5b; background: #3b242c; color: #f2d5db; cursor: pointer; }
.team-join { padding-block: 64px; border-top: 1px solid #343b4d; background: #141923; }
.team-join > .container { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 32px; }
.team-join h2 { margin-top: 18px; font: 600 48px/1.1 var(--f-display); }
.reader-image-dialog { width: min(1200px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 48px 20px 20px; border: 1px solid #53617b; background: #151c28; color: #fff; }
.reader-image-dialog::backdrop { background: rgb(0 0 0 / 85%); }
.reader-image-dialog img { display: block; max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; margin: auto; }
.reader-image-dialog > button { position: absolute; top: 8px; right: 12px; width: 34px; height: 34px; border: none; background: transparent; color: #fff; font-size: 28px; cursor: pointer; }
.material-figure { margin: 24px 0 32px; padding: 20px; border: 1px solid #39465c; background: #131b27; border-radius: 3px; }
.material-figure > button { display: block; width: 100%; padding: 0; border: 0; background: none; color: #bdc8da; cursor: zoom-in; }
.material-figure img { margin: 0 auto; max-height: 300px; }
.material-figure figcaption { margin-top: 14px; color: #8799b1; font: 10px/1.6 var(--f-mono); text-align: right; }
@media (max-width: 1024px) {
 .reading-layout { grid-template-columns: 180px minmax(0,1fr); gap: 28px; }
 .reader-paper { padding-inline: 28px; }
 .material-directory { grid-template-columns: minmax(0,1fr); }
 .team-intro__grid { gap: 48px; grid-template-columns: minmax(0,1fr) 190px; }
 .team-seal { width: 180px; height: 230px; }
 .team-seal > span { font-size: 22px; }
 .member-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
 .material-page { --reader-size: 17px; }
 .material-intro { padding-block: 28px 36px; }
 .material-intro h1 { font-size: clamp(36px,8.4vw,56px); }
 .material-intro .breadcrumbs { font-size: 10px; margin-bottom: 24px; }
 .reader-meta { font-size: 11px; gap: 10px 16px; }
 .reader-meta a { margin-left: 0; }
 .reading-layout { display: block; padding: 24px 16px 64px; }
 .reading-sidebar { padding: 0 4px 20px; border: 0; }
 .reading-contents { margin-top: 20px; padding: 16px; border: 1px solid #3e485c; background: #171e2a; border-radius: 2px; }
 .reading-contents nav { margin-top: 16px; max-height: 280px; overflow-y: auto; }
 .reading-sidebar .doc-quick-search, .reading-indicator { display: none; }
 .reader-paper { padding: 0 20px 24px; }
 .reader-toolbar { min-height: 58px; gap: 8px; margin-bottom: 28px; }
 .reader-toolbar > span { font-size: 8px; max-width: 160px; }
 .reader-font button { min-width: 30px; min-height: 34px; font-size: 12px; }
 .material-flow { line-height: 1.85; }
 .material-flow p { margin-bottom: 1.3em; }
 .material-flow .material-lead { font-size: 1.05em; }
 .material-flow h2 { font-size: 32px; padding-right: 26px; }
 .material-flow h3 { font-size: 26px; }
 .material-chapter { margin-top: 36px; padding-top: 28px; }
 .material-chapter::before { top: 29px; font-size: 9px; }
 .material-flow .material-note { padding: 18px; }
 .material-flow .mechanic-note { padding: 14px; }
 .material-directory { grid-template-columns: minmax(0,1fr); }
 .material-directory a { padding: 14px 16px; }
 .ability-card__head { grid-template-columns: 24px minmax(0,1fr); gap: 10px; padding: 18px; }
 .material-flow .ability-card h3 { font-size: 24px; }
 .ability-card__body { padding: 18px; }
 .material-flow .rule-stack > li { padding: 20px 16px 18px 44px; }
 .material-flow .rule-stack > li::before { top: 24px; left: 14px; font-size: 9px; }
 .glossary-tools, .question-tools, .terminal-tools { padding: 18px; }
 .glossary-tools input, .question-tools input, .terminal-tools input { padding: 12px; font-size: 13px; }
 .glossary-entry { padding: 20px; }
 .question-card > summary { padding: 20px 42px 20px 18px; font-size: 16px; }
 .question-card > summary::after { right: 16px; top: 20px; }
 .question-card__answer { padding: 18px; }
 .command-card__head { flex-wrap: wrap; padding: 16px; gap: 12px; }
 .material-flow .command-card__head h3 { font-size: 13px; flex: 1 0 100%; }
 .command-card__body { padding: 18px; }
 .command-category > summary { padding: 18px; gap: 10px; }
 .material-flow .command-category > summary > h2 { font-size: 23px; }
 .command-category > .command-card { margin: 12px; }
 .terminal-tools__status > span:last-child { margin-left: 0; flex: 1 0 100%; }
 .reader-related__list { grid-template-columns: minmax(0,1fr); }
 .reader-related > h2 { font-size: 29px; }
 .material-figure { padding: 16px; }
 .team-intro { padding-top: 28px; }
 .team-intro__grid { grid-template-columns: minmax(0,1fr); padding: 8px 0 36px; gap: 0; }
 .team-intro h1 { font-size: clamp(50px,12vw,72px); margin-top: 20px; }
 .team-intro .lead { font-size: 16px; }
 .team-seal { display: none; }
 .team-facts { gap: 24px; padding-block: 24px; }
 .team-facts > div { gap: 12px; }
 .team-facts strong { font-size: 30px; }
 .team-facts span { font-size: 10px; max-width: 98px; }
 .team-facts > a { flex: 1 0 100%; margin-left: 0; font-size: 12px; }
 .team-directory { padding-block: 48px 64px; }
 .team-directory__head { display: block; margin-bottom: 24px; }
 .team-directory__head h2 { font-size: 38px; }
 .team-search { margin-top: 28px; }
 .team-filters { gap: 7px; padding-bottom: 20px; }
 .team-filters button { padding: 9px 11px; font-size: 10px; gap: 8px; }
 .member-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
 .member-card { padding: 24px; }
 .member-card__top { margin-bottom: 20px; }
 .member-card h2 { font-size: 22px; }
 .member-avatar { width: 72px; height: 72px; }
 .team-join { padding-block: 48px; }
 .team-join h2 { font-size: 38px; }
}
