/* ==========================================================================
   Cletka — сайт Discord-бота
   Чёрно-красная тема, алые акценты, стеклянные поверхности.
   Все стили внешние: CSP запрещает inline-стили.
   ========================================================================== */

/* ---------- Дизайн-токены ---------- */
:root {
  --bg: #080609;
  --bg-soft: #0d0a0e;
  --bg-elev: #151016;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 96, 112, 0.14);
  --border-strong: rgba(255, 96, 112, 0.28);
  --text: #f7edf0;
  --text-soft: #d8bcc3;
  --muted: #b2969d;
  --dim: #856a71;
  --brand: #ff2e4d;
  --brand-2: #ff5c72;
  --brand-3: #ff8a5c;
  --accent: #ffb347;
  --ok: #4ade80;
  --warn: #ffc46b;
  --danger: #ff6b7d;
  --gradient: linear-gradient(115deg, #ff8a5c 0%, #ff2e4d 46%, #a30f26 100%);
  --gradient-soft: linear-gradient(115deg, rgba(255, 138, 92, 0.18), rgba(255, 46, 77, 0.16));
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow: 0 22px 60px -24px rgba(0, 0, 0, 0.88);
  --shadow-glow: 0 24px 80px -32px rgba(255, 46, 77, 0.6);
  --header-h: 74px;
  --container: 1180px;
  --font: "Inter", "Segoe UI", "SF Pro Text", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
}

/* ---------- Сброс и база ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(255, 46, 77, 0.16), transparent 62%),
    radial-gradient(900px 560px at 92% 2%, rgba(255, 92, 114, 0.12), transparent 60%),
    linear-gradient(180deg, #0d070b 0%, #080609 55%, #050406 100%);
  pointer-events: none;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.14;
  letter-spacing: -0.022em;
  font-weight: 750;
  color: #fff;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

a:hover {
  color: #fff;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

code {
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background: rgba(255, 46, 77, 0.14);
  border: 1px solid rgba(255, 46, 77, 0.2);
  color: #d9d3ff;
  overflow-wrap: anywhere;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

strong {
  color: #fff;
  font-weight: 650;
}

::selection {
  background: rgba(255, 46, 77, 0.45);
  color: #fff;
}

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

[hidden] {
  display: none !important;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: #111;
}

.icon {
  flex: none;
  vertical-align: -0.16em;
}

/* ---------- Декор фона ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}

.glow-1 {
  width: 520px;
  height: 520px;
  top: -220px;
  left: -140px;
  background: rgba(255, 46, 77, 0.4);
  animation: drift 22s ease-in-out infinite alternate;
}

.glow-2 {
  width: 460px;
  height: 460px;
  top: 8%;
  right: -180px;
  background: rgba(56, 121, 255, 0.32);
  animation: drift 28s ease-in-out infinite alternate-reverse;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.6;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(50px, 60px, 0) scale(1.12); }
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 21px;
  border: 1px solid var(--btn-border);
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), border-color 0.18s var(--ease), filter 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 32px -12px rgba(255, 46, 77, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 18px 44px -14px rgba(255, 46, 77, 1), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-inline: 14px;
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.btn-lg {
  padding: 15px 28px;
  border-radius: 14px;
  font-size: 1rem;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: rgba(7, 8, 14, 0.62);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(7, 8, 14, 0.9);
  border-bottom-color: var(--border);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand:hover {
  color: #fff;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--gradient);
  box-shadow: 0 8px 24px -10px rgba(255, 46, 77, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.brand-copy small {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav > a:not(.btn) {
  position: relative;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
}

.nav > a:not(.btn):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav > a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}

.nav-cta {
  margin-left: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
}

.nav-toggle-close {
  display: none;
}

body.nav-open .nav-toggle-open {
  display: none;
}

body.nav-open .nav-toggle-close {
  display: inline-flex;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 76px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-live {
  color: #dcd6ff;
  border-color: rgba(255, 46, 77, 0.35);
  background: rgba(255, 46, 77, 0.12);
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(70, 224, 176, 0.55);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(70, 224, 176, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(70, 224, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(70, 224, 176, 0); }
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-muted {
  color: var(--muted);
}

.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5.4vw, 4.15rem);
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 540px;
  margin-bottom: 28px;
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: var(--text-soft);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  color: var(--dim);
  font-size: 0.86rem;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-points .icon {
  color: var(--accent);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 10px 34px;
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  width: fit-content;
}

.hero-stats div {
  min-width: 70px;
}

.hero-stats dt {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 2px 0 0;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ---------- Визуал hero ---------- */
.hero-visual {
  position: relative;
  min-height: 660px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  isolation: isolate;
}

.orbit-scene {
  position: absolute;
  top: -28px;
  left: 50%;
  width: min(400px, 90vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
}

.orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 14px 3px rgba(255, 92, 114, 0.7);
}

.orbit-a {
  inset: 0;
  animation: spin 26s linear infinite;
}

.orbit-b {
  inset: 44px;
  border-color: rgba(255, 46, 77, 0.16);
  animation: spin 20s linear infinite reverse;
}

.orbit-b::after {
  background: var(--brand-3);
  box-shadow: 0 0 14px 3px rgba(255, 138, 92, 0.7);
}

.orbit-c {
  inset: 92px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.06);
  animation: spin 34s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bot-avatar {
  position: relative;
  z-index: 3;
  width: 152px;
  height: 152px;
  padding: 8px;
  border-radius: 42px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px -22px rgba(255, 46, 77, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.bot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
}

.bot-presence {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  border: 4px solid #0b0c15;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.7);
}

.float-chip {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(16, 18, 29, 0.82);
  backdrop-filter: blur(14px);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: float 6s ease-in-out infinite;
}

.float-chip .icon {
  color: var(--brand-3);
}

.chip-music {
  top: 2%;
  left: 0;
  animation-delay: -0.5s;
}

.chip-shield {
  top: 13%;
  right: 0;
  animation-delay: -2.2s;
}

.chip-shield .icon { color: var(--accent); }

.chip-coins {
  top: 38%;
  left: -3%;
  animation-delay: -3.6s;
}

.chip-coins .icon { color: var(--warn); }

.chip-level {
  top: 28%;
  right: -3%;
  animation-delay: -1.4s;
}

.chip-level .icon { color: var(--brand-2); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Discord mock ---------- */
.discord-mock {
  position: relative;
  z-index: 5;
  width: min(100%, 430px);
  margin-top: 272px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, #1a1c26 0%, #151621 100%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.mock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mock-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
}

.mock-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mock-identity {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.mock-identity strong {
  font-size: 0.92rem;
}

.mock-identity small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--dim);
}

.bot-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: #5865f2;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: middle;
}

.mock-online {
  color: var(--ok);
}

.mock-dots {
  margin-left: auto;
  color: var(--dim);
  letter-spacing: 2px;
}

.mock-body {
  padding: 16px 18px 8px;
}

.mock-author {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.mock-author time {
  color: var(--dim);
  font-size: 0.66rem;
}

.mock-text {
  margin-bottom: 12px;
  color: #dbdee6;
  font-size: 0.88rem;
  line-height: 1.5;
}

.mention {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.28);
  color: #c9d0ff;
  font-weight: 600;
}

.mock-embed {
  padding: 12px 13px;
  border-radius: 8px;
  border-left: 3px solid var(--brand);
  background: rgba(255, 255, 255, 0.04);
}

.mock-embed-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-cover {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--gradient-soft);
  color: var(--brand-3);
  flex: none;
}

.mock-embed-head div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.mock-embed-head strong {
  font-size: 0.82rem;
}

.mock-embed-head small {
  color: var(--dim);
  font-size: 0.68rem;
}

.mock-live {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 107, 125, 0.16);
  color: #ff9aa6;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.mock-progress {
  height: 4px;
  margin: 13px 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mock-progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient);
}

.mock-controls {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
}

.mock-play {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 0.6rem;
}

.mock-time {
  margin-left: auto;
  font-size: 0.64rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.mock-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px 16px;
}

.mock-commands span {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
}

/* ---------- Секции ---------- */
.section {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0;
}

.section-tight {
  padding-top: clamp(26px, 4vw, 44px);
}

.section-head {
  max-width: 660px;
  margin-bottom: clamp(30px, 4.5vw, 52px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin-bottom: 14px;
}

.section-head p {
  font-size: 1.02rem;
  color: var(--muted);
}

.section-copy h2 {
  margin-bottom: 14px;
}

.section-copy p {
  color: var(--muted);
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.section-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--dim);
}

.section-note .icon {
  margin-top: 3px;
  color: var(--brand-2);
}

.center-cta {
  margin-top: clamp(28px, 4vw, 44px);
  text-align: center;
}

/* ---------- Сетка возможностей ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px 200px at 50% -30%, rgba(255, 46, 77, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 46, 77, 0.4);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(255, 46, 77, 0.13);
  border: 1px solid rgba(255, 46, 77, 0.24);
  color: #c0b4ff;
}

.feature-icon-shield {
  background: rgba(70, 224, 176, 0.1);
  border-color: rgba(70, 224, 176, 0.22);
  color: var(--accent);
}

.feature-icon-coins {
  background: rgba(255, 196, 107, 0.1);
  border-color: rgba(255, 196, 107, 0.22);
  color: var(--warn);
}

.feature-icon-ticket {
  background: rgba(255, 92, 114, 0.12);
  border-color: rgba(255, 92, 114, 0.24);
  color: #ff8a5c;
}

.feature-icon-trending {
  background: rgba(255, 107, 125, 0.1);
  border-color: rgba(255, 107, 125, 0.22);
  color: #ff9aa6;
}

.feature-icon-sparkles {
  background: rgba(255, 138, 92, 0.12);
  border-color: rgba(255, 138, 92, 0.24);
  color: #ffb347;
}

.feature-icon-tools {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.feature-icon-settings {
  background: rgba(255, 92, 114, 0.1);
  border-color: rgba(255, 92, 114, 0.22);
  color: #ff8a5c;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.feature-card p {
  margin-bottom: 18px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-size: 0.71rem;
  font-weight: 600;
}

.tag-row-lg {
  margin-top: 18px;
  gap: 8px;
}

.tag-row-lg li {
  padding: 7px 13px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.tag-row-lg .icon {
  color: var(--brand-3);
}

/* ---------- Split ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
}

.split-top {
  align-items: start;
}

/* ---------- Спотлайт команд ---------- */
.commands-section {
  border-block: 1px solid var(--border);
  background:
    radial-gradient(800px 400px at 15% 50%, rgba(255, 46, 77, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.012);
}

.command-spotlight {
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, #1b1014, #0c080b);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.spotlight-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.spotlight-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(70, 224, 176, 0.7);
}

.spotlight-count {
  margin-left: auto;
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spotlight-list li {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.18s var(--ease);
}

.spotlight-list li:last-child {
  border-bottom: 0;
}

.spotlight-list li:hover {
  background: rgba(255, 255, 255, 0.025);
}

.spotlight-list code {
  background: rgba(255, 46, 77, 0.14);
  border-color: rgba(255, 46, 77, 0.22);
  color: #ffc2cb;
  font-size: 0.8rem;
  white-space: nowrap;
}

.spotlight-list span {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight-list .icon {
  color: var(--dim);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(30px, 4vw, 46px);
}

.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 46, 77, 0.4);
  background: rgba(255, 46, 77, 0.07);
  color: #fff;
}

.category-card > .icon {
  margin-left: auto;
  color: var(--dim);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: rgba(255, 46, 77, 0.12);
  border: 1px solid rgba(255, 46, 77, 0.2);
  color: #ffc2cb;
}

.category-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.category-copy strong {
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-copy small {
  color: var(--dim);
  font-size: 0.72rem;
}

/* ---------- Linked roles карточка ---------- */
.linked-card {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(255, 46, 77, 0.25);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 320px at 0% 0%, rgba(255, 46, 77, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow);
}

.linked-copy p {
  color: var(--muted);
}

.linked-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-step {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(9, 10, 18, 0.55);
}

.flow-num {
  flex: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-3);
  padding-top: 2px;
}

.flow-step strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

.flow-step p {
  margin: 0;
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.5;
}

.flow-result {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid rgba(70, 224, 176, 0.24);
  border-radius: 12px;
  background: rgba(70, 224, 176, 0.07);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 650;
}

/* ---------- Шаги ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.steps-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card {
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.step-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.step-num {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
}

.step-card h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.step-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.step-card small {
  display: block;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
}

.faq-copy {
  position: sticky;
  top: calc(var(--header-h) + 30px);
}

.faq-copy p {
  color: var(--muted);
  margin-bottom: 20px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.faq-item[open] {
  border-color: rgba(255, 46, 77, 0.32);
  background: rgba(255, 46, 77, 0.05);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .icon {
  color: var(--dim);
  transition: transform 0.25s var(--ease), color 0.2s var(--ease);
}

.faq-item[open] summary .icon {
  transform: rotate(180deg);
  color: var(--brand-3);
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- CTA ---------- */
.section-cta {
  padding-top: 0;
}

.cta-card {
  position: relative;
  padding: clamp(40px, 6vw, 68px) clamp(24px, 4vw, 56px);
  border: 1px solid rgba(255, 46, 77, 0.3);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(700px 320px at 50% -20%, rgba(255, 46, 77, 0.28), transparent 70%),
    linear-gradient(180deg, #1a0f13, #0a070a);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cta-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  width: 420px;
  height: 300px;
  transform: translateX(-50%);
  background: rgba(255, 46, 77, 0.35);
  filter: blur(100px);
  pointer-events: none;
}

.cta-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  border-radius: 20px;
  background: var(--gradient);
  box-shadow: 0 18px 44px -14px rgba(255, 46, 77, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.cta-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-card h2 {
  position: relative;
  margin-bottom: 12px;
}

.cta-card p {
  position: relative;
  max-width: 520px;
  margin: 0 auto 24px;
  color: var(--muted);
}

.cta-card .hero-actions {
  position: relative;
  justify-content: center;
}

.cta-card > small {
  position: relative;
  display: block;
  margin-top: 18px;
  color: var(--dim);
  font-size: 0.78rem;
}

/* ---------- Внутренние hero ---------- */
.page-hero {
  position: relative;
  padding: clamp(38px, 5vw, 64px) 0 clamp(26px, 3.5vw, 40px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 400px at 20% -30%, rgba(255, 46, 77, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.014), transparent);
}

.page-hero-compact {
  padding-top: clamp(30px, 4vw, 46px);
}

.page-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
}

.page-lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--dim);
  font-size: 0.78rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: #fff;
}

.breadcrumbs span {
  color: var(--dim);
}

.doc-meta {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 0.8rem;
}

.doc-meta a {
  color: var(--brand-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Каталог команд ---------- */
.command-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 520px);
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.search-field:focus-within {
  border-color: rgba(255, 46, 77, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 46, 77, 0.16);
}

.search-field .icon {
  color: var(--dim);
}

.search-field input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
}

.search-field input::placeholder {
  color: var(--dim);
}

.search-field input::-webkit-search-cancel-button {
  filter: invert(0.6);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-pills button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 600;
  transition: all 0.18s var(--ease);
}

.filter-pills button span {
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--dim);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.filter-pills button:hover {
  color: #fff;
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.filter-pills button.is-active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(255, 46, 77, 0.9);
}

.filter-pills button.is-active span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.result-count {
  margin-bottom: 24px;
  color: var(--dim);
  font-size: 0.82rem;
}

.command-group {
  margin-bottom: clamp(30px, 4vw, 46px);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.command-group-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.command-group-head > .category-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.command-group-head h2 {
  margin-bottom: 3px;
  font-size: 1.35rem;
}

.command-group-head p {
  margin: 0;
  color: var(--dim);
  font-size: 0.84rem;
}

.command-count {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--dim);
  font-size: 0.72rem;
  white-space: nowrap;
  flex: none;
}

.command-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.command-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.command-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.command-main {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.command-main code {
  flex: none;
  min-width: 120px;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(255, 46, 77, 0.13);
  border-color: rgba(255, 46, 77, 0.2);
  color: #ffd2d8;
  font-size: 0.85rem;
  font-weight: 600;
}

.command-name {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.command-badge {
  padding: 2px 7px;
  border: 1px solid rgba(255, 184, 92, 0.32);
  border-radius: 999px;
  background: rgba(255, 184, 92, 0.12);
  color: #ffc46b;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.command-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

.command-sub {
  margin-left: 138px;
  border-left: 2px solid rgba(255, 46, 77, 0.2);
  padding-left: 14px;
}

.command-sub summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-3);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.command-sub summary::-webkit-details-marker {
  display: none;
}

.command-sub summary .icon {
  transition: transform 0.2s var(--ease);
}

.command-sub[open] summary .icon {
  transform: rotate(180deg);
}

.command-sub ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.command-sub li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.command-sub code {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-soft);
  font-size: 0.76rem;
  white-space: nowrap;
}

.command-sub span {
  color: var(--dim);
  font-size: 0.8rem;
  line-height: 1.45;
}

.empty-state {
  padding: clamp(36px, 6vw, 64px) 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(255, 46, 77, 0.12);
  border: 1px solid rgba(255, 46, 77, 0.24);
  color: var(--brand-3);
}

.empty-state h2 {
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.empty-state p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 36px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 92, 114, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 92, 114, 0.06);
}

.info-banner-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: rgba(255, 92, 114, 0.12);
  color: #ff8a5c;
}

.info-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.info-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.info-banner .btn {
  margin-left: auto;
  flex: none;
}

/* ---------- Документы ---------- */
.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.doc-toc > p {
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc-toc nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.doc-toc nav a {
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.4;
}

.doc-toc nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.doc-help {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.doc-help strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.84rem;
}

.doc-help p {
  margin-bottom: 12px;
  color: var(--dim);
  font-size: 0.77rem;
  line-height: 1.5;
}

.prose {
  max-width: 760px;
  min-width: 0;
}

.prose h2 {
  margin-top: 2.1em;
  margin-bottom: 0.55em;
  padding-top: 0.35em;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h2:first-of-type {
  margin-top: 0.6em;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.05rem;
}

.prose p {
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.72;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.5em;
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.65;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--brand-3);
}

.prose a {
  color: var(--brand-3);
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 92, 0.4);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #ffb347;
  text-decoration-color: currentColor;
}

.prose strong {
  color: #fff;
}

.doc-callout {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 46, 77, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 46, 77, 0.07);
}

.doc-callout .icon {
  flex: none;
  margin-top: 2px;
  color: var(--brand-3);
}

.doc-callout p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.doc-note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--dim) !important;
  font-size: 0.82rem !important;
}

.prose .table-wrap {
  margin: 20px 0 26px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  vertical-align: top;
  line-height: 1.5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.meta-table code {
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ---------- Панели и настройка ---------- */
.alert {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 16px;
}

.alert-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.alert > div {
  min-width: 0;
}

.alert > div > strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.alert p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.alert ul {
  margin: 6px 0 0;
  padding-left: 1.1em;
  list-style: disc;
}

.alert li {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.alert li::marker {
  color: var(--warn);
}

.alert-warn {
  border-color: rgba(255, 196, 107, 0.28);
  background: rgba(255, 196, 107, 0.06);
}

.alert-warn .alert-icon {
  background: rgba(255, 196, 107, 0.12);
  color: var(--warn);
}

.alert-danger {
  border-color: rgba(255, 107, 125, 0.3);
  background: rgba(255, 107, 125, 0.06);
}

.alert-danger .alert-icon {
  background: rgba(255, 107, 125, 0.12);
  color: var(--danger);
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}

.setup-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.setup-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.panel {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  min-width: 0;
}

.panel-compact {
  padding: 20px;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head .eyebrow {
  margin-bottom: 8px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-compact h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.panel-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.panel-lead code {
  font-size: 0.82em;
}

.url-field {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.url-field:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.url-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.url-field-head h3 {
  margin-bottom: 3px;
  font-size: 0.96rem;
}

.url-field-head p {
  margin: 0;
  color: var(--dim);
  font-size: 0.8rem;
  line-height: 1.5;
}

.copy-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.copy-row code {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border);
  color: #f0dade;
  font-size: 0.79rem;
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 9px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.18s var(--ease);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.copy-btn.is-copied {
  border-color: rgba(70, 224, 176, 0.4);
  background: rgba(70, 224, 176, 0.12);
  color: var(--accent);
}

.copy-btn span {
  white-space: nowrap;
}

.field-current {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 0.77rem;
  line-height: 1.5;
}

.mono {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
  flex: none;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.ok {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.09);
  color: #6ee7a0;
}

.status-pill.warn {
  border-color: rgba(255, 196, 107, 0.28);
  background: rgba(255, 196, 107, 0.09);
  color: var(--warn);
}

.status-pill.danger {
  border-color: rgba(255, 107, 125, 0.3);
  background: rgba(255, 107, 125, 0.09);
  color: #ff8f9d;
}

.status-list {
  display: flex;
  flex-direction: column;
}

.status-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.8rem;
}

.status-list li:last-child {
  border-bottom: 0;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 9px;
  counter-reset: check;
}

.checklist li {
  position: relative;
  padding-left: 25px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  counter-increment: check;
}

.checklist li::before {
  content: counter(check);
  position: absolute;
  left: 0;
  top: 0;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 46, 77, 0.14);
  border: 1px solid rgba(255, 46, 77, 0.26);
  color: #c9bfff;
  font-size: 0.62rem;
  font-weight: 700;
}

.checklist code {
  font-size: 0.74em;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.mini-list .icon {
  margin-top: 2px;
  color: var(--brand-3);
}

.panel-compact > p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.code-block {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.35);
  color: #f0dade;
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-block code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 1em;
}

/* ---------- Auth / статусные страницы ---------- */
.auth-section {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 260px);
  padding-block: clamp(44px, 7vw, 84px);
}

.auth-wrap {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(100%, 620px);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(520px 260px at 50% -20%, rgba(255, 46, 77, 0.18), transparent 70%),
    linear-gradient(180deg, #180f12, #0a070a);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-card-success {
  border-color: rgba(70, 224, 176, 0.3);
}

.auth-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(255, 46, 77, 0.12);
  border: 1px solid rgba(255, 46, 77, 0.3);
  color: var(--brand-3);
}

.auth-icon.success {
  background: rgba(70, 224, 176, 0.1);
  border-color: rgba(70, 224, 176, 0.3);
  color: var(--accent);
}

.auth-icon.danger {
  background: rgba(255, 107, 125, 0.1);
  border-color: rgba(255, 107, 125, 0.3);
  color: var(--danger);
}

.auth-icon.warn {
  background: rgba(255, 196, 107, 0.1);
  border-color: rgba(255, 196, 107, 0.3);
  color: var(--warn);
}

.auth-card h1 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
}

.auth-lead {
  margin: 0 auto 24px;
  max-width: 460px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--dim);
  font-size: 0.77rem;
}

.error-card .error-code {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: clamp(3.4rem, 10vw, 5.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}

.auth-alert {
  text-align: left;
  margin-bottom: 22px;
}

.auth-alert ul {
  margin: 6px 0 0;
}

.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 8px;
  text-align: left;
}

.auth-steps > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.auth-steps > div > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 46, 77, 0.16);
  border: 1px solid rgba(255, 46, 77, 0.28);
  color: #ffc2cb;
  font-size: 0.68rem;
  font-weight: 700;
}

.auth-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.auth-steps code {
  font-size: 0.76em;
  overflow-wrap: anywhere;
}

.linked-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.linked-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.linked-avatar-fallback {
  display: grid;
  place-items: center;
  background: rgba(255, 46, 77, 0.14);
  color: var(--brand-3);
}

.linked-user > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.linked-user strong {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-user small {
  color: var(--dim);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linked-user .status-pill {
  margin-left: auto;
}

.auth-table {
  margin-bottom: 4px;
  text-align: left;
}

.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
  text-align: left;
}

.inline-note .icon {
  margin-top: 1px;
  flex: none;
}

.inline-note.ok {
  border-color: rgba(74, 222, 128, 0.26);
  background: rgba(74, 222, 128, 0.07);
  color: #a9f0c4;
}

.inline-note.ok .icon {
  color: var(--ok);
}

.inline-note.warn {
  margin-top: 16px;
  border-color: rgba(255, 196, 107, 0.26);
  background: rgba(255, 196, 107, 0.06);
  color: #ffdda6;
}

.inline-note.warn .icon {
  color: var(--warn);
}

.auth-card > .inline-note {
  margin-bottom: 18px;
}

/* ---------- Linked roles страница ---------- */
.linked-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}

.linked-hero h1 {
  margin-bottom: 14px;
}

.role-preview {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #1c1115, #0b080b);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.role-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.role-swatch {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 22px rgba(255, 46, 77, 0.55);
}

.role-card-head > div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.role-card-head strong {
  font-size: 0.92rem;
}

.role-card-head small {
  color: var(--dim);
  font-size: 0.73rem;
}

.role-card-head .status-pill {
  margin-left: auto;
}

.role-conditions {
  padding: 8px 20px;
}

.role-conditions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.role-conditions li:last-child {
  border-bottom: 0;
}

.role-conditions span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.role-conditions .icon {
  color: var(--brand-3);
}

.role-conditions strong {
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.role-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: rgba(70, 224, 176, 0.05);
  color: #8fe8c9;
  font-size: 0.76rem;
}

.role-card-foot .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(70, 224, 176, 0.8);
}

/* ---------- Подвал ---------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding: clamp(40px, 5vw, 60px) 0 26px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.8fr));
  gap: clamp(26px, 4vw, 54px);
}

.footer-brand p {
  max-width: 330px;
  margin: 16px 0 20px;
  color: var(--dim);
  font-size: 0.84rem;
  line-height: 1.6;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col h3 {
  margin: 0 0 5px;
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col a {
  width: fit-content;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0;
  color: var(--dim);
  font-size: 0.76rem;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

/* ---------- Анимация появления ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  will-change: opacity, transform;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Адаптивность ---------- */
/* ---------- История изменений ---------- */
.changelog {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
}

.changelog-entry {
  position: relative;
  padding: 20px 22px 20px 26px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(255, 46, 77, 0.07), transparent 55%),
    var(--bg-elev);
}

.changelog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.changelog-version {
  padding: 3px 9px;
  border: 1px solid rgba(255, 46, 77, 0.36);
  border-radius: 999px;
  background: rgba(255, 46, 77, 0.13);
  color: #ffd2d8;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.changelog-date {
  color: var(--dim);
  font-size: 0.74rem;
}

.changelog-entry h2 {
  margin: 12px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.changelog-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 46, 77, 0.12);
}

/* ---------- Публичная таблица лидеров ---------- */
.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.leaderboard-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.leaderboard-tabs a:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.leaderboard-tabs a.is-active {
  border-color: rgba(255, 46, 77, 0.5);
  background: rgba(255, 46, 77, 0.14);
  color: #ffd2d8;
}

.leaderboard-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(170deg, rgba(255, 46, 77, 0.1), transparent 52%),
    var(--bg-elev);
  text-align: center;
  overflow: hidden;
}

.podium-card.place-1 {
  border-color: rgba(255, 196, 107, 0.44);
  background:
    linear-gradient(170deg, rgba(255, 196, 107, 0.16), transparent 56%),
    var(--bg-elev);
  box-shadow: var(--shadow-glow);
}

.podium-card.place-2 {
  border-color: rgba(214, 220, 232, 0.28);
}

.podium-card.place-3 {
  border-color: rgba(255, 138, 92, 0.32);
}

.podium-place {
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.podium-card.place-1 .podium-place {
  background: linear-gradient(135deg, #ffd76b, #ff8a5c);
  color: #2a1206;
}

.podium-card.place-2 .podium-place {
  background: linear-gradient(135deg, #eef1f7, #a7afc2);
  color: #1a1a22;
}

.podium-card.place-3 .podium-place {
  background: linear-gradient(135deg, #ffb08a, #b4552c);
  color: #2a1206;
}

.podium-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 6px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-2);
  overflow: hidden;
}

.podium-card.place-1 .podium-avatar {
  border-color: rgba(255, 196, 107, 0.7);
  box-shadow: 0 0 0 5px rgba(255, 196, 107, 0.12);
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-initial {
  color: var(--text-soft);
  font-size: 1.3rem;
  font-weight: 800;
}

.podium-card h2 {
  margin: 8px 0 0;
  max-width: 100%;
  font-size: 1rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-title {
  margin: 0;
  color: #ffb347;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.podium-points {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.podium-points span {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 650;
}

.podium-meta {
  margin: 0;
  color: var(--dim);
  font-size: 0.72rem;
}

.leaderboard-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-row:hover {
  background: rgba(255, 46, 77, 0.045);
}

.leaderboard-rank {
  flex: none;
  width: 24px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.leaderboard-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  overflow: hidden;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-initial {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.leaderboard-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.leaderboard-main strong {
  color: var(--text);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-main span {
  color: var(--dim);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  flex: none;
  gap: 2px;
}

.leaderboard-score strong {
  color: #ffd2d8;
  font-size: 0.95rem;
  font-weight: 800;
}

.leaderboard-score span {
  color: var(--dim);
  font-size: 0.7rem;
}

@media (max-width: 720px) {
  .leaderboard-podium {
    grid-template-columns: minmax(0, 1fr);
  }

  .podium-card.place-1 {
    order: -1;
  }

  .leaderboard-row {
    padding: 10px 12px;
  }

  .leaderboard-main span {
    white-space: normal;
  }
}

/* ---------- Страница состояния ---------- */
.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-banner.is-ok {
  border-color: rgba(74, 222, 128, 0.24);
  background:
    linear-gradient(120deg, rgba(74, 222, 128, 0.1), transparent 62%),
    var(--surface);
}

.status-banner.is-warn {
  border-color: rgba(255, 196, 107, 0.26);
  background:
    linear-gradient(120deg, rgba(255, 196, 107, 0.1), transparent 62%),
    var(--surface);
}

.status-banner strong {
  display: block;
  font-size: 0.98rem;
}

.status-banner p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-banner > .status-pill {
  margin-left: auto;
  padding: 5px 11px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.status-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 46, 77, 0.055), transparent 46%),
    var(--bg-elev);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.status-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.status-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.status-card-head h2 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.status-card-head p {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 0.75rem;
}

.status-card-head .status-dot {
  margin-left: auto;
  margin-top: 5px;
}

.status-card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 46, 77, 0.22);
  border-radius: 12px;
  background: rgba(255, 46, 77, 0.12);
  color: #ff8a5c;
}

.status-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.status-metrics > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.status-metrics dt {
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-metrics dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-note {
  margin: auto 0 0;
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.5;
}

.status-note code {
  font-size: 0.9em;
}

.status-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}

.status-dot.is-ok {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}

.status-dot.is-warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(255, 196, 107, 0.14);
}

.status-dot.is-danger {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 107, 125, 0.14);
}

.status-dot.is-idle {
  background: var(--dim);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.status-checks {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.status-checks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.status-checks-head h2 {
  margin: 0;
  font-size: 1rem;
}

.status-checks-list li {
  gap: 14px;
  padding: 10px 0;
  font-size: 0.82rem;
}

.status-check-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-weight: 550;
}

.status-check-value {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-align: right;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-grid .status-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .status-banner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .status-banner > .status-pill {
    margin-left: 22px;
  }

  .status-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-grid .status-card:last-child {
    grid-column: auto;
  }

  .status-checks-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .status-check-value {
    padding-left: 17px;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .status-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-visual {
    min-height: 640px;
  }

  .setup-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 66px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 9, 16, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.8);
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav > a:not(.btn) {
    padding: 12px 12px;
    font-size: 0.98rem;
  }

  .nav-cta {
    margin: 8px 0 0;
    justify-content: center;
  }

  .hero-grid,
  .split,
  .linked-card,
  .linked-hero,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 28px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-stats {
    gap: 10px 28px;
  }

  .hero-visual {
    min-height: 640px;
    margin-top: 10px;
  }

  .discord-mock {
    margin-top: 238px;
  }

  .faq-copy {
    position: static;
  }

  .faq-grid {
    gap: 26px;
  }

  .split-top .panel {
    order: 2;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-toc {
    position: static;
    order: 2;
  }

  .doc-toc nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prose {
    max-width: none;
  }

  .setup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .setup-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .linked-card {
    padding: 30px 24px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .hero h1 {
    font-size: clamp(2.15rem, 8.5vw, 2.9rem);
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  .hero-stats dd {
    font-size: 1.35rem;
  }

  .hero-points {
    gap: 7px 14px;
    font-size: 0.8rem;
  }

  .hero-actions {
    gap: 9px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-actions .btn-ghost {
    border-color: var(--border);
  }

  .hero-visual {
    min-height: 600px;
  }

  .orbit-scene {
    width: min(330px, 92vw);
  }

  .bot-avatar {
    width: 122px;
    height: 122px;
    border-radius: 34px;
  }

  .bot-avatar img {
    border-radius: 27px;
  }

  .discord-mock {
    margin-top: 205px;
  }

  .float-chip {
    font-size: 0.7rem;
    padding: 6px 10px;
  }

  .chip-shield,
  .chip-level {
    right: 0;
  }

  .chip-coins,
  .chip-music {
    left: 0;
  }

  .chip-coins,
  .chip-level {
    display: none;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .feature-card {
    padding: 22px 20px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .category-card {
    padding: 12px;
  }

  .category-copy strong {
    font-size: 0.82rem;
  }

  .steps-grid,
  .steps-grid-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .step-card {
    padding: 22px 20px;
  }

  .step-num {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .split {
    gap: 28px;
  }

  .spotlight-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    padding: 11px 14px;
  }

  .spotlight-list code {
    grid-column: 1;
  }

  .spotlight-list span {
    grid-column: 1 / -1;
    white-space: normal;
    font-size: 0.77rem;
  }

  .spotlight-list .icon {
    grid-row: 1;
    grid-column: 2;
  }

  .command-toolbar {
    margin-top: 20px;
  }

  .filter-pills {
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .filter-pills button {
    flex: none;
  }

  .command-main {
    flex-direction: column;
    gap: 7px;
  }

  .command-main code {
    min-width: 0;
    width: fit-content;
  }

  .command-name {
    align-items: center;
  }

  .command-sub {
    margin-left: 0;
    padding-left: 12px;
  }

  .command-group-head {
    flex-wrap: wrap;
  }

  .command-count {
    margin-left: 58px;
  }

  .info-banner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }

  .info-banner .btn {
    margin-left: 0;
    width: 100%;
  }

  .doc-toc nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-layout {
    gap: 22px;
  }

  .prose p,
  .prose li {
    font-size: 0.91rem;
  }

  .table-wrap {
    border-radius: 10px;
  }

  thead th,
  tbody td {
    padding: 9px 11px;
    font-size: 0.8rem;
  }

  .setup-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    padding: 18px;
  }

  .panel-head {
    flex-direction: column;
    gap: 10px;
  }

  .url-field-head {
    flex-direction: column;
    gap: 7px;
  }

  .copy-row {
    flex-direction: column;
  }

  .copy-btn {
    justify-content: center;
    padding: 10px;
  }

  .copy-row code {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.74rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-brand {
    grid-column: auto;
  }

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

  .auth-card {
    padding: 26px 20px;
    border-radius: var(--radius-lg);
  }

  .auth-actions .btn {
    flex: 1 1 100%;
  }

  .linked-user {
    flex-wrap: wrap;
  }

  .linked-user .status-pill {
    margin-left: 0;
  }

  .cta-card {
    padding: 36px 20px;
  }

  .cta-card .hero-actions .btn {
    flex: 1 1 100%;
  }

  .linked-card {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }

  .role-card-head,
  .role-conditions,
  .role-card-foot {
    padding-inline: 16px;
  }
}

@media (max-width: 420px) {
  .brand-copy small {
    display: none;
  }

  .hero-visual {
    min-height: 560px;
  }

  .orbit-scene {
    width: min(280px, 94vw);
  }

  .bot-avatar {
    width: 104px;
    height: 104px;
  }

  .discord-mock {
    margin-top: 180px;
  }

  .float-chip {
    font-size: 0.66rem;
    padding: 5px 9px;
    gap: 5px;
  }

  .mock-commands {
    display: none;
  }

  .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stats {
    padding-top: 20px;
  }
}

/* ---------- Доступность и печать ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .bg-decor,
  .doc-toc,
  .hero-actions,
  .auth-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  body::before {
    display: none;
  }

  .prose p,
  .prose li,
  .prose h2,
  strong {
    color: #111;
  }

  .container {
    width: 100%;
  }
}

/* ---------- Публичный профиль игрока ---------- */
.player-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.player-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.player-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.player-metric span {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.player-metric strong {
  font-size: 24px;
  color: var(--text);
}

.player-metric small {
  font-size: 11px;
  color: var(--text-dim);
}

.player-heat {
  margin-top: 18px;
}

.heat-table {
  display: grid;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.heat-row {
  display: grid;
  grid-template-columns: 30px repeat(24, minmax(12px, 1fr));
  gap: 3px;
  align-items: center;
}

.heat-head {
  margin-bottom: 2px;
}

.heat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  padding-right: 4px;
}

.heat-hour {
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
  overflow: hidden;
}

.heat-cell {
  aspect-ratio: 1;
  min-width: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.heat-1 { background: rgba(255, 46, 77, 0.28); }
.heat-2 { background: rgba(255, 46, 77, 0.48); }
.heat-3 { background: rgba(255, 46, 77, 0.72); }
.heat-4 { background: rgba(255, 46, 77, 1); }

@media (max-width: 720px) {
  .heat-hour { display: none; }
  .heat-row { grid-template-columns: 24px repeat(24, minmax(8px, 1fr)); }
}

.podium-card,
a.leaderboard-row {
  color: inherit;
  text-decoration: none;
}
