/* =========================================================
   HINEX — тёмная тема в пастельных голубо-пурпурных тонах.
   Цвета взяты из логотипа. Оформление плоское и сдержанное.
   ========================================================= */

:root {
  color-scheme: dark;

  --bg:        #0d0d1f;
  --bg-2:      #121327;
  --surface:   #181a33;
  --surface-2: #1f2140;
  --line:        rgba(184, 188, 255, .13);
  --line-strong: rgba(184, 188, 255, .28);

  --text:   #eceeff;
  --muted:  #a9add8;
  --faint:  #7e83b0;

  --accent:       #8c9eff;   /* васильковый из логотипа */
  --accent-hover: #a9b6ff;
  --lav:          #b8bcff;   /* лавандовый из логотипа */
  --purple:       #c9a8ff;   /* фиолетовый оттенок */
  --blue:         #556fff;   /* синий из логотипа */

  --mint:  #a6e6c6;
  --peach: #ffd9a3;
  --rose:  #ffa6bb;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 14px;
  --header-h: 62px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scrollbar-color: #3a3f78 transparent;
}

main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--lav); text-decoration-color: rgba(184, 188, 255, .4); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: currentColor; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
button { font: inherit; color: inherit; cursor: pointer; }
code, .mono { font-family: var(--font-mono); }

:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(140, 158, 255, .4); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: #0d0d1f; padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.narrow-col, .container > .prose { max-width: 780px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 31, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: #fff; }
.brand img { border-radius: 8px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .06em; }

.site-nav { display: flex; align-items: center; gap: 2px; }
.nav-a {
  padding: 8px 13px; border-radius: 8px; text-decoration: none;
  color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.nav-a:hover { color: #fff; background: rgba(184, 188, 255, .08); }
.nav-a.is-active { color: #fff; background: rgba(140, 158, 255, .16); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: 1px solid var(--line);
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px clamp(16px, 4vw, 32px) 16px;
    background: #0f1024; border-bottom: 1px solid var(--line);
  }
  .site-header.is-open .site-nav { display: flex; }
  .nav-a { padding: 13px 12px; font-size: 17px; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font); font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn .mono { font-size: 15px; font-weight: 500; }
.btn-primary { background: var(--accent); color: #0d0d1f; }
.btn-primary:hover { background: var(--accent-hover); color: #0d0d1f; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--lav); background: rgba(184, 188, 255, .08); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn.is-copied { border-color: var(--mint); color: var(--mint); }

/* ---------- Главная: верх ---------- */
.hero {
  position: relative; display: grid; place-items: center; text-align: center; overflow: hidden;
  min-height: clamp(380px, 62vh, 540px); padding: 56px 0 60px; border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 13, 31, .35) 0%, rgba(13, 13, 31, .6) 60%, var(--bg) 100%);
}
.hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.hero-logo { margin: 8px 0 4px; }
.hero-logo img { width: min(460px, 80vw); }
.hero .lead { margin: 12px auto 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.eyebrow { margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.lead { color: #cfd1f3; font-size: 18px; max-width: 40em; }

/* ---------- Шапка внутренних страниц ---------- */
.page-head { position: relative; overflow: hidden; padding: clamp(36px, 7vw, 68px) 0 clamp(28px, 5vw, 48px); border-bottom: 1px solid var(--line); }
.page-head-sm { padding: clamp(24px, 4.5vw, 38px) 0 clamp(20px, 3.5vw, 30px); }
.page-head-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.page-head::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 13, 31, .3), var(--bg) 100%); }
.page-head-in { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); }
.page-head-sm h1 { font-size: clamp(26px, 4vw, 34px); }
.page-head .lead { margin: 10px 0 0; }

/* ---------- Секции ---------- */
.section { padding: clamp(40px, 6vw, 68px) 0; }
.section-alt { background: rgba(24, 26, 51, .5); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(20px, 3.5vw, 30px); max-width: 44em; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 30px); }
.section-head p { margin: 8px 0 0; color: var(--muted); }
.section-note { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.section-cta { margin: 26px 0 0; }

.grid { display: grid; gap: 16px; }

/* ---------- Серверы ---------- */
.grid-servers { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-servers { grid-template-columns: repeat(2, 1fr); } }

.card-server {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.card-server h3 { font-size: 19px; }
.card-server p { margin: 0; color: var(--muted); font-size: 15px; }

.ip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 10px; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--lav);
  font-size: 15px; transition: background-color .15s, border-color .15s, color .15s;
}
.ip .mono { min-width: 0; overflow-wrap: anywhere; }
.ip:hover { background: rgba(140, 158, 255, .1); border-color: var(--lav); color: #fff; }
.ip-ic { display: inline-flex; flex: none; opacity: .8; }
.ip.is-copied { border-color: var(--mint); color: var(--mint); }

/* ---------- Шаги на главной ---------- */
.grid-steps { list-style: none; counter-reset: s; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-steps { grid-template-columns: repeat(4, 1fr); } }
.step-card {
  counter-increment: s; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.step-card::before {
  content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px;
  border-radius: 8px; background: rgba(140, 158, 255, .18); color: var(--lav); font-weight: 700;
}
.step-card h3 { font-size: 18px; margin-bottom: 4px; }
.step-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Соцсети ---------- */
.grid-social { grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-social { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-social { grid-template-columns: repeat(4, 1fr); } }
.social-card {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  padding: 16px 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.social-card:hover { border-color: var(--lav); background: var(--surface-2); color: var(--text); }
.social-ic { grid-row: span 2; display: grid; place-items: center; color: var(--lav); }
.social-t { font-weight: 600; line-height: 1.25; }
.social-d { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* ---------- Магазин ---------- */
.shop-cat { scroll-margin-top: calc(var(--header-h) + 16px); }
.shop-cat + .shop-cat { margin-top: 40px; }
.cat-title { font-size: 22px; margin-bottom: 14px; }
.grid-products { grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .grid-products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-products { grid-template-columns: repeat(4, 1fr); } }
.product {
  display: flex; flex-direction: row; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s;
}
.product:hover { border-color: var(--line-strong); }
.product-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
/* квадратное фото слева */
.product-img { flex: none; align-self: flex-start; width: 112px; height: 112px; margin: 14px 0 14px 14px; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
/* прозрачные PNG-иконки вписываются целиком, фото (jpg) обрезаются по квадрату */
.product-img.is-icon { background: rgba(140, 158, 255, .08); }
.product-img.is-icon img { object-fit: contain; padding: 8px; }
@media (max-width: 559px) { .product-img { width: 88px; height: 88px; margin: 12px 0 12px 12px; } }
/* с фото карточки шире: две колонки на любом широком экране */
@media (min-width: 560px) { .grid-products.has-img { grid-template-columns: repeat(2, 1fr); } }
.product-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 6px; flex: 1; }
.product-head { display: grid; gap: 2px; }
.product h3 { font-size: 18px; }
.product-price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.product-price strong { color: var(--lav); font-size: 17px; font-weight: 700; }
.product-price span { color: var(--faint); font-size: 13px; }
.product-desc { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.product-buy { padding: 12px 18px 16px; }
.product-buy .btn { width: 100%; padding: 9px 16px; font-size: 15px; }
.ticks { list-style: none; display: grid; gap: 6px; margin-top: 2px; font-size: 14px; color: var(--muted); }
.ticks li { position: relative; padding-left: 20px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .35em; width: 5px; height: 9px;
  border: solid var(--mint); border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.note { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- Заглушка «Скоро» ---------- */
.soon { max-width: 520px; margin: 0 auto; padding: 16px 0; }
.soon h2 { font-size: 30px; margin-bottom: 8px; }
.soon p { color: var(--muted); }

/* ---------- Галерея ---------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.shot {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: #fff;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.shot:hover img { transform: scale(1.03); }
.shot-cap {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 1px; padding: 30px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(13, 13, 31, .85));
}
.shot-t { font-weight: 600; font-size: 16px; line-height: 1.25; }
.shot-d { font-size: 14px; color: #d6d8f6; line-height: 1.35; }

.lb {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; padding: 56px 16px 24px; background: rgba(6, 7, 16, .98);
}
.lb.is-open { display: flex; }
.lb-img { max-width: min(96vw, 1500px); max-height: calc(100vh - 150px); border-radius: 10px; object-fit: contain; }
.lb-cap { text-align: center; max-width: 720px; min-height: 44px; }
.lb-cap strong { display: block; font-size: 18px; font-weight: 600; }
.lb-cap span { color: var(--muted); font-size: 15px; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: rgba(184, 188, 255, .12); border: 1px solid var(--line-strong); color: #fff;
}
.lb-btn:hover { background: rgba(184, 188, 255, .24); }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }
body.lb-lock { overflow: hidden; }

/* ---------- Подвал ---------- */
.site-footer { flex: none; margin-top: 32px; background: var(--bg-2); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding-block: 40px 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.footer-h { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.social-list a { display: inline-flex; align-items: center; gap: 9px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-block: 16px 28px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 14px;
}
.footer-tos { color: var(--lav); }
.footer-note { flex-basis: 100%; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--mint); color: var(--mint);
  font-weight: 600; font-size: 15px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.debug-box { position: fixed; left: 12px; bottom: 12px; z-index: 400; max-width: 90vw; padding: 12px 16px; border-radius: 10px; background: #3a1220; border: 1px solid var(--rose); color: #ffd6df; font: 13px/1.5 var(--font-mono); }

/* =========================================================
   Документация и правила
   ========================================================= */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 26px 52px; align-items: start; }
@media (min-width: 900px) { .doc-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; } }
@media (min-width: 1260px) { .doc-layout { grid-template-columns: 250px minmax(0, 1fr) 210px; } }

.doc-nav-desktop { display: none; }
@media (min-width: 900px) {
  .doc-nav-desktop { display: block; position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; padding-right: 6px; }
  .doc-nav-mobile { display: none; }
}
.doc-nav-mobile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; }
.doc-nav-mobile > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-weight: 600; cursor: pointer; list-style: none; }
.doc-nav-mobile > summary::-webkit-details-marker { display: none; }
.doc-nav-mobile[open] > summary .ic { transform: rotate(180deg); }
.doc-nav-mobile .nav-tree { padding-bottom: 12px; }

.nav-tree { list-style: none; display: grid; gap: 1px; }
.nav-tree .nav-tree { margin: 1px 0 4px 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-link { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 15px; line-height: 1.4; }
.nav-link:hover { color: #fff; background: rgba(184, 188, 255, .07); }
.nav-link.is-current { color: #fff; background: rgba(140, 158, 255, .16); font-weight: 600; }

.search { position: relative; margin-bottom: 14px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--muted); }
.search-field:focus-within { border-color: var(--lav); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.search-field input::placeholder { color: var(--faint); }
.search-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 60vh; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 16px 36px rgba(0, 0, 0, .45); }
.search-results[hidden] { display: none; }
.doc-nav-mobile .search-results { position: static; margin-top: 8px; box-shadow: none; }
.sr-item { display: block; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover, .sr-item:focus { background: rgba(140, 158, 255, .13); color: #fff; }
.sr-t { display: flex; gap: 8px; align-items: baseline; font-weight: 600; font-size: 15px; }
.sr-s { font-size: 12px; color: var(--faint); font-weight: 500; }
.sr-x { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.sr-x mark { background: rgba(201, 168, 255, .3); color: #fff; border-radius: 3px; padding: 0 1px; }
.sr-empty { padding: 14px; color: var(--muted); font-size: 14px; }

.doc-toc { display: none; }
@media (min-width: 1260px) {
  .doc-toc { display: block; position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }
}
.toc-h { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--faint); }
.doc-toc ul { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.doc-toc a { display: block; padding: 4px 12px; color: var(--muted); font-size: 14px; line-height: 1.4; text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; }
.doc-toc a:hover { color: #fff; border-left-color: var(--lav); }
.doc-toc a.is-active { color: #fff; border-left-color: var(--accent); }
.toc-l3 a { padding-left: 24px; font-size: 13.5px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 12px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }

.pager { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 44px; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager-a { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.pager-a:hover { border-color: var(--lav); }
.pager-next { text-align: right; justify-items: end; grid-column: 2; }
@media (max-width: 639px) { .pager-next { grid-column: auto; } }
.pager-k { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); }
.pager-t { color: var(--text); font-weight: 600; }

/* ---------- Текст статьи ---------- */
.prose { font-size: 16.5px; line-height: 1.7; overflow-wrap: break-word; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.doc h1 { font-size: clamp(28px, 4.2vw, 36px); margin-bottom: 10px; }
.doc-lead { color: var(--muted); font-size: 17px; margin-bottom: 1.4em; }
.prose h2 { font-size: clamp(22px, 3vw, 27px); margin: 2em 0 .55em; }
.prose h3 { font-size: 19px; margin: 1.6em 0 .45em; }
.prose h4 { font-size: 17px; margin: 1.4em 0 .4em; }
.prose h2 .anchor, .prose h3 .anchor { margin-left: 10px; font-size: .7em; color: var(--faint); text-decoration: none; opacity: 0; transition: opacity .15s; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--accent); }
.prose strong { color: #fff; font-weight: 600; }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(140, 158, 255, .13); color: var(--lav); font-size: .88em; }
.prose pre.code { margin: 1.2em 0; padding: 16px 18px; overflow: auto; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); line-height: 1.55; }
.prose pre.code code { padding: 0; background: none; color: var(--text); }
.prose blockquote {
  margin: 1.2em 0; padding: 10px 16px; color: #dcdeff; border-radius: 0 10px 10px 0;
  background: rgba(140, 158, 255, .07); border-left: 3px solid var(--accent);
}
.prose blockquote > :last-child { margin-bottom: 0; }

.table-wrap { margin: 1.2em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 460px; }
.prose th { text-align: left; padding: 10px 16px; background: rgba(140, 158, 255, .1); color: var(--lav); font-weight: 600; white-space: nowrap; }
.prose td { padding: 10px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:hover td { background: rgba(184, 188, 255, .03); }

.fig { margin: 1.2em 0; }
.fig img { border-radius: 12px; border: 1px solid var(--line); }
img.recipe { max-width: min(100%, 390px); border-radius: 8px; margin: .4em 0; }
.prose p > img.recipe { display: block; }

/* подсказки */
.hint {
  margin: 1.3em 0; padding: 12px 16px; border-radius: 10px; --c: var(--accent);
  background: rgba(255, 255, 255, .035); border-left: 3px solid var(--c);
}
.hint-info    { --c: var(--accent); }
.hint-success { --c: var(--mint); }
.hint-warning { --c: var(--peach); }
.hint-danger  { --c: var(--rose); }
.hint-body > :last-child { margin-bottom: 0; }
.hint-body p { margin-bottom: .5em; }

/* шаги */
.steps { list-style: none; counter-reset: st; margin: 1.4em 0 !important; padding: 0 !important; }
.steps .step { counter-increment: st; position: relative; padding: 0 0 24px 52px; margin: 0; }
.steps .step:last-child { padding-bottom: 0; }
.steps .step::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; background: rgba(140, 158, 255, .18); color: var(--lav); font-weight: 700; font-size: 17px;
}
.steps .step::after { content: ""; position: absolute; left: 16px; top: 42px; bottom: 6px; width: 2px; background: var(--line); }
.steps .step:last-child::after { display: none; }
.step-title { font-size: 19px !important; margin: 4px 0 .35em !important; }
.step-body > :last-child { margin-bottom: 0; }

/* колонки */
.cols { display: grid; gap: 20px 28px; margin: 1.2em 0; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cols .col > :last-child { margin-bottom: 0; }
.cols .col .fig { margin: 0; }

/* карточки-ссылки в тексте */
.cards { display: grid; gap: 12px; margin: 1.3em 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); }
.card {
  display: grid; align-content: start; gap: 3px; padding: 16px 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background-color .15s;
}
a.card:hover { border-color: var(--lav); background: var(--surface-2); color: var(--text); }
.card-t { font-weight: 600; font-size: 17px; }
.card-d { color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* вопросы (FAQ) */
.faq { margin: 8px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq[open] { border-color: var(--line-strong); }
.faq > summary { position: relative; padding: 14px 48px 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--lav); font-size: 22px; font-weight: 400; line-height: 1;
}
.faq[open] > summary::after { content: "–"; }
.faq-body { padding: 0 16px 4px; color: #dcdeff; }
.faq-body > :last-child { margin-bottom: 12px; }

/* вкладки */
.tabs { margin: 1.3em 0; }
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tab-btn { padding: 7px 14px; border-radius: 8px; background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 500; transition: background-color .15s, color .15s; }
.tab-btn:hover { color: #fff; background: rgba(184, 188, 255, .08); }
.tab-btn[aria-selected="true"] { background: var(--accent); color: #0d0d1f; border-color: transparent; font-weight: 600; }
.js .tab-panel:not(.is-active) { display: none; }
.tab-panel > :last-child { margin-bottom: 0; }

/* схема */
pre.mermaid { margin: 1.4em 0; padding: 20px 12px; overflow-x: auto; text-align: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: pre; }
pre.mermaid[data-processed] { white-space: normal; }
pre.mermaid svg { max-width: 100%; height: auto; }

/* ---------- Сезоны ---------- */
.season-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.season-nav a {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none; font-weight: 500;
  transition: border-color .15s, color .15s, background-color .15s;
}
.season-nav a:hover { border-color: var(--lav); color: #fff; background: rgba(184, 188, 255, .06); }
.season-nav b { color: var(--lav); font-weight: 700; }
.season-nav .is-live::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
@media (max-width: 699px) { .season-nav span { display: none; } }

.seasons { display: grid; gap: 24px; }
.season {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; scroll-margin-top: calc(var(--header-h) + 16px);
}
@media (min-width: 900px) {
  .season { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 34px; padding: 24px; }
  .season-side { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
}
.season-live { border-color: rgba(166, 230, 198, .45); }

.season-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.season-cover img { width: 100%; height: 100%; object-fit: cover; }
.season-cover-ph { display: grid; place-items: center; height: 100%; font-size: clamp(72px, 12vw, 120px); font-weight: 800; letter-spacing: .04em; color: rgba(184, 188, 255, .22); }
.season-badge {
  position: absolute; left: 12px; top: 12px; min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center;
  border-radius: 10px; background: rgba(13, 13, 31, .82); border: 1px solid var(--line-strong);
  color: var(--lav); font-weight: 800; font-size: 18px; letter-spacing: .04em;
}

.facts { display: grid; gap: 0; margin: 14px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--faint); font-size: 14px; }
.facts dd { margin: 0; text-align: right; font-size: 15px; font-weight: 500; }

.season-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 6px; }
.season-kicker { margin: 0; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.status {
  display: inline-flex; align-items: center; gap: 7px; padding: 2px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); font-size: 13px; font-weight: 600;
}
.status-live { color: var(--mint); border-color: rgba(166, 230, 198, .5); }
.status-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.season h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 4px; }
.season h3 { margin: 24px 0 8px; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--faint); }
.season p { color: #dcdeff; }
.season-summary { margin-top: 10px; color: var(--muted) !important; font-size: 17px; }
.fate { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--purple); background: rgba(201, 168, 255, .07); border-radius: 0 10px 10px 0; font-size: 15px; }
.fate strong { color: #fff; font-weight: 600; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 12px; border-radius: 999px; background: rgba(140, 158, 255, .12); border: 1px solid var(--line); font-size: 14.5px; }
.season .season-note { margin: 8px 0 0; color: var(--faint); font-size: 13.5px; }

.events { list-style: none; display: grid; gap: 7px; }
.events li { position: relative; padding-left: 18px; color: #dcdeff; }
.events li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--accent); }
.events a { display: inline-flex; align-items: center; gap: 5px; }
.events .ic { opacity: .7; }

.season-players { margin-top: 22px; }

/* Состав: на широком экране — в левой колонке под обложкой, на телефоне — выпадающий блок внизу */
.players-side { display: none; margin-top: 22px; }
.players-side h3 { margin-top: 0; }
.chips-sm { gap: 6px; }
.chips-sm li { padding: 3px 10px; font-size: 13.5px; }
.chip-more { color: var(--faint); background: transparent !important; border-style: dashed !important; }
@media (min-width: 900px) {
  .players-side { display: block; }
  .season-players { display: none; }
}

/* ---------- Сообщество ---------- */
/* голова игрока */
.head { flex: none; display: block; border-radius: 6px; background: var(--bg-2); object-fit: cover; }
.head.head-3d { border-radius: 0; background: none; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.heads { display: flex; flex: none; }
.heads .head + .head { margin-left: -8px; }

/* персонал: список строками, роль справа */
.people-group + .people-group { margin-top: 36px; }
.group-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.roster { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 44px; }
@media (min-width: 760px) { .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person { display: flex; align-items: center; gap: 14px; padding: 9px 2px; border-top: 1px solid var(--line); min-width: 0; }
.person-info { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 700; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.person-desc { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.person-role { margin-left: auto; padding-left: 12px; color: var(--lav); font-weight: 600; font-size: 15px; white-space: nowrap; }

/* награды игроков */
.event + .event { margin-top: 52px; }
.event-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--accent); }
.event-title { font-size: clamp(22px, 3vw, 28px); }
.event-meta { color: var(--faint); font-size: 14px; white-space: nowrap; }
.sub-title { margin: 28px 0 4px; font-size: 15px; font-weight: 600; color: var(--muted); }

.honors { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 44px; }
@media (min-width: 820px) { .honors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.honor {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0;
  padding: 8px 2px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.honor-name { color: var(--muted); font-size: 15px; line-height: 1.3; }
.honor-wins { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; margin-left: auto; text-align: right; }
.win { display: flex; align-items: center; gap: 10px; min-width: 0; }
.win-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.win-name i { padding: 0 .2em; color: var(--faint); font-style: normal; font-weight: 500; }
.win-note { color: var(--faint); font-size: 14px; }
.honor-go { display: inline-flex; flex: none; color: var(--lav); }
a.honor:hover .honor-name, a.honor:hover .win-name { color: #fff; }
a.honor:hover { background: rgba(184, 188, 255, .04); }

/* главная награда: «Игрок года» */
.honor-top {
  grid-column: 1 / -1; margin-bottom: 8px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--peach); border-radius: var(--radius);
}
.honor-top .honor-name { color: var(--peach); font-weight: 600; font-size: 16px; }
.honor-top .win-name { font-size: 22px; }
@media (max-width: 559px) {
  .honor { flex-direction: column; align-items: flex-start; gap: 4px; }
  .honor-wins { align-items: flex-start; margin-left: 0; text-align: left; }
  .honor-go { display: none; }
  .person-role { font-size: 14px; }
}

/* звёзды 0–10: 10 звёзд-масок, заливка по доле --p */
.stars {
  --p: 0%; display: inline-block; flex: none; width: 170px; height: 17px;
  background: linear-gradient(90deg, var(--peach) var(--p), rgba(184, 188, 255, .18) var(--p));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26'/%3E%3C/svg%3E") 0 0 / 10% 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26'/%3E%3C/svg%3E") 0 0 / 10% 100% repeat-x;
}

/* оценки сезонов */
.rates { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .rates { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .rates { grid-template-columns: repeat(3, 1fr); } }
.rate {
  display: flex; flex-direction: column; overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.rate:hover { color: var(--text); border-color: var(--lav); }
.rate-cover { display: block; aspect-ratio: 16 / 9; background: var(--bg-2); }
.rate-cover img { width: 100%; height: 100%; object-fit: cover; }
.rate-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.rate-award { font-size: 18px; font-weight: 700; line-height: 1.25; }
.rate-season { color: var(--muted); font-size: 15px; }
.rate-crit { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.rate-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.rate-num { color: var(--peach); font-size: 22px; font-weight: 700; line-height: 1; }
.rate-max { margin-left: -6px; color: var(--faint); font-size: 14px; }
.rate-note { color: var(--faint); font-size: 13.5px; }
.rate-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--lav); font-weight: 600; font-size: 15px; }
.rate:hover .rate-go { color: #fff; }

/* ---------- Лента наград на главной ---------- */
.section-tight { padding: clamp(22px, 3.5vw, 32px) 0; }
.section-tight .section-head { margin-bottom: 14px; }
.section-tight .section-head h2 { font-size: clamp(20px, 2.6vw, 24px); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: none; }
.more-link { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--lav); font-weight: 600; text-decoration: none; }
.more-link:hover { color: #fff; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 96s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 12px; padding-right: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.mq {
  display: flex; align-items: center; gap: 12px; flex: none; width: 300px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; transition: border-color .15s;
}
.mq:hover { color: var(--text); border-color: var(--lav); }
.mq-lead { display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; }
.mq-lead.is-box { border: 1px solid var(--line-strong); border-radius: 8px; color: var(--lav); font-weight: 800; font-size: 17px; }
.mq-lead.is-trophy { position: relative; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--peach); }
.mq-theme {
  position: absolute; right: -7px; bottom: -7px; display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: var(--lav); color: var(--bg); border: 2px solid var(--surface);
}
.mq-theme .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.mq-pair { width: auto; min-width: 44px; }
.mq-pair .head + .head { margin-left: -8px; }
.mq-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mq-k { color: var(--faint); font-size: 12.5px; }
.mq-t { color: var(--muted); font-size: 14px; }
.mq-v { font-weight: 700; font-size: 16px; }
.mq-k, .mq-t, .mq-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mq-rate { display: inline-flex; align-items: center; gap: 8px; }
.mq-rate .stars { width: 100px; height: 10px; }
.mq-rate b { color: var(--peach); font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-group[aria-hidden="true"] { display: none; }
}
/* ---------- Движение и печать ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .doc-side, .doc-toc, .pager, .toast { display: none !important; }
  body { background: #fff; color: #000; }
}
