/* ==========================================================================
   Cynex Stats — The Server Almanac
   Тот же язык, что у панели: Inter, индиго/бирюза, hairline-линии, карточки
   и графики из public/charts.js. Mobile-first: 320 → 1440+.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --line: #e5e9f0;
  --line-strong: #d3dae5;

  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-500: #5b6b82;
  --ink-400: #7b8aa0;

  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;

  --teal-50: #f0fdfa;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;

  --good-fg: #047857;
  --good-bg: #ecfdf5;
  --bad-fg: #b42318;
  --bad-bg: #fef3f2;
  --flat-fg: #475467;
  --flat-bg: #f2f4f7;
  --warn-fg: #b54708;
  --warn-bg: #fffaeb;

  --night: #0b1020;
  --night-2: #101830;
  --night-line: #26314d;
  --night-ink: #e2e8f0;
  --night-muted: #94a3b8;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-md: 0 1px 3px rgb(16 24 40 / 0.06), 0 18px 46px -22px rgb(16 24 40 / 0.22);
  --shadow-lg: 0 30px 80px -42px rgb(15 23 42 / 0.42);

  --font-sans:
    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;

  --gutter: 20px;
  --shell: 1200px;
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 48px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  color: var(--ink-900);
  background: var(--brand-100);
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

a {
  color: var(--brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-600);
}

button,
summary {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink-900);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  margin: 0;
}

img,
svg,
canvas {
  max-width: 100%;
}

main,
header,
footer,
section,
figure {
  min-width: 0;
}

main {
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.plate {
  position: relative;
  padding-block: clamp(64px, 9vw, 116px);
  scroll-margin-top: 88px;
}

.display {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.lede {
  max-width: 62ch;
  color: #475467;
  font-size: 1.0625rem;
  line-height: 1.68;
  letter-spacing: -0.005em;
}

.fine {
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.55;
}

.micro-title {
  margin: 0;
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.muted {
  color: var(--ink-500);
}

.small {
  font-size: 12px;
}

/* ---------- Кнопки и ссылки ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  color: #fff;
  background: var(--brand-600);
  box-shadow:
    0 1px 2px rgb(79 70 229 / 0.3),
    0 12px 26px -14px rgb(79 70 229 / 0.7);
}

.button-primary:hover {
  color: #fff;
  background: var(--brand-700);
}

.button-ghost {
  color: var(--ink-800);
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.button-ghost:hover {
  color: var(--ink-900);
  background: var(--surface-2);
  border-color: var(--ink-400);
}

.button-sm {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.button-paper {
  color: var(--ink-900);
  background: #f8fafc;
  box-shadow: 0 12px 30px -18px rgb(255 255 255 / 0.5);
}

.button-paper:hover {
  color: var(--ink-900);
  background: #fff;
}

.button-outline {
  color: var(--night-ink);
  background: transparent;
  border-color: rgb(226 232 240 / 0.24);
}

.button-outline:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(226 232 240 / 0.4);
}

.icon-discord {
  flex: none;
  width: 17px;
  height: 17px;
}

.icon-arrow {
  flex: none;
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.button:hover .icon-arrow,
.text-link:hover .icon-arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 2px;
  color: var(--brand-700);
  border-bottom: 1px solid var(--brand-200);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.text-link:hover {
  color: var(--brand-600);
  border-color: var(--brand-500);
}

.text-link--light {
  color: #c7d2fe;
  border-color: rgb(199 210 254 / 0.35);
}

.text-link--light:hover {
  color: #fff;
  border-color: rgb(255 255 255 / 0.7);
}

/* ---------- Шапка ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgb(244 246 251 / 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(1.15);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-head.is-scrolled {
  background: rgb(244 246 251 / 0.95);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -22px rgb(15 23 42 / 0.35);
}

.site-head--static {
  position: relative;
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
}

.head-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1.5px;
  overflow: hidden;
  pointer-events: none;
}

.head-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--teal-600));
  transition: width 0.1s linear;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink-900);
}

.brand-mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  box-shadow:
    0 0 0 2px var(--surface),
    0 2px 10px -4px rgb(15 23 42 / 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-text strong {
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.brand-text small {
  display: none;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.head-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}

.head-nav a {
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-700);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.head-nav a:hover {
  color: var(--ink-900);
  background: rgb(255 255 255 / 0.65);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.head-lang.lang-switch {
  display: none;
}

.lang-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 34px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 10px;
}

.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 36px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.lang-option:hover {
  color: var(--ink-900);
}

.lang-option.is-active {
  color: var(--ink-900);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.head-add span {
  display: none;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink-800);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -5px;
}

.menu-icon::after {
  top: 5px;
}

.nav-menu[open] .menu-icon {
  background: transparent;
}

.nav-menu[open] .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-menu[open] .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  width: min(300px, calc(100vw - 32px));
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.menu-nav {
  display: flex;
  flex-direction: column;
}

.menu-nav a {
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--ink-800);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.menu-nav a:hover {
  background: var(--surface-3);
}

.menu-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.menu-foot .button {
  width: 100%;
}

.menu-foot .lang-switch {
  align-self: flex-start;
}

@media (min-width: 480px) {
  .brand-text small {
    display: block;
  }
}

@media (min-width: 640px) {
  .head-lang.lang-switch {
    display: inline-flex;
  }

  .head-add span {
    display: inline;
  }
}

@media (min-width: 1024px) {
  .head-inner {
    min-height: 76px;
  }

  .head-nav {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text strong {
    font-size: 16px;
  }
}

/* ---------- Общие заголовки раздела ---------- */

.plate-head {
  max-width: 780px;
}

.plate-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

.plate-rule {
  display: inline-block;
  flex: none;
  width: 26px;
  height: 1px;
  background: var(--ink-400);
}

.plate-kicker {
  color: var(--brand-700);
}

.plate-kicker::before {
  content: '·';
  margin-right: 9px;
  color: var(--ink-400);
}

.plate-label--center {
  justify-content: center;
}

.kicker {
  margin-top: 20px;
  color: var(--brand-700);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.plate-head .display {
  margin-top: 12px;
  font-size: clamp(2rem, 5.2vw, 3.55rem);
  line-height: 1.05;
}

.plate-head .lede {
  margin-top: 18px;
}

.plate-head .kicker + .display {
  margin-top: 12px;
}

/* ---------- Герой ---------- */

.hero {
  padding-top: clamp(24px, 5vw, 54px);
  padding-bottom: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  inset: -30% -20% auto;
  z-index: -2;
  height: 110%;
  background:
    radial-gradient(55% 60% at 18% 10%, rgb(99 102 241 / 0.16), transparent 70%),
    radial-gradient(44% 52% at 88% 0%, rgb(20 184 166 / 0.12), transparent 70%),
    linear-gradient(180deg, #e9edff 0%, var(--page) 72%);
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 100%;
  background-image: radial-gradient(rgb(79 70 229 / 0.12) 0.7px, transparent 0.8px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(70% 60% at 70% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 38px;
}

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

.hero-title {
  margin-top: clamp(18px, 3vw, 30px);
  font-size: clamp(2.5rem, 6.2vw, 4.55rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-title span {
  display: block;
}

.hero-title-soft {
  margin-top: 0.1em;
  color: var(--ink-500);
}

.hero-lede {
  margin-top: clamp(18px, 3vw, 26px);
  max-width: 54ch;
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  line-height: 1.67;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(24px, 4vw, 34px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 26px 0 0;
  padding: 0;
  color: var(--ink-500);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  list-style: none;
  text-transform: uppercase;
}

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

.hero-meta li::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--brand-600);
  border-radius: 50%;
}

.hero-meta li:nth-child(2)::before {
  background: var(--teal-600);
}

.hero-meta li:nth-child(3)::before {
  background: var(--ink-400);
}

.overview-figure {
  margin: 0;
  min-width: 0;
}

.overview-card {
  margin-top: 0;
}

.overview-caption {
  margin-top: 12px;
  text-align: center;
}

/* Компоненты графиков — как в public/style.css */

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.chart-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.chart-title {
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.figure-label {
  color: var(--brand-700);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--ink-500);
  font-size: 13px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend-bar {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--brand-600);
}

.chart-legend-bar.teal {
  background: var(--teal-600);
}

.chart-legend-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #475569;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.chart-legend-dot.d7 {
  background: var(--teal-600);
  box-shadow: 0 0 0 3px var(--teal-50);
}

.chart-legend-dot.d30 {
  background: #f59e0b;
  box-shadow: 0 0 0 3px var(--warn-bg);
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.chart-stat {
  min-width: 0;
}

.chart-stat dt {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 500;
}

.chart-stat dd {
  margin: 2px 0 0;
  color: var(--ink-900);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.chart-stat-note {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 12px;
}

.chart-canvas {
  position: relative;
  height: 220px;
  min-width: 0;
}

.chart-canvas-main {
  height: 240px;
}

.chart-canvas canvas,
.chart-box > canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.members-panel {
  padding: 14px 14px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.members-title {
  margin-bottom: 4px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.members-panel .chart-canvas {
  height: 96px;
}

.chart-hint {
  padding: 10px 12px;
  color: var(--ink-500);
  font-size: 13px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(36px, 6vw, 58px);
  padding-block: 13px 15px;
  border-top: 1px solid var(--line);
}

.hero-score {
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scroll-cue {
  display: none;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: var(--line-strong);
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 10px;
  background: var(--brand-600);
  animation: cue 2.6s ease-in-out infinite;
}

@keyframes cue {
  0% {
    transform: translateY(-12px);
  }
  60%,
  100% {
    transform: translateY(38px);
  }
}

@media (min-width: 560px) {
  .chart-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .chart-stats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    min-width: 260px;
  }

  .chart-card {
    padding: 22px;
  }

  .chart-canvas-main {
    height: 260px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding-top: clamp(34px, 4.4vw, 64px);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    align-items: center;
    gap: 48px;
  }

  .scroll-cue {
    display: block;
  }
}

@media (min-width: 1120px) {
  .hero-grid {
    gap: 64px;
  }

  .chart-canvas-main {
    height: 280px;
  }
}

/* ---------- Карточки KPI ---------- */

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

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

.cards-3 > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.label {
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 500;
}

.value {
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink-900);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spark {
  position: relative;
  height: 44px;
  margin-top: 12px;
}

.spark canvas {
  width: 100% !important;
  height: 100% !important;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 12px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.delta.good {
  color: var(--good-fg);
  background: var(--good-bg);
}

.delta.bad {
  color: var(--bad-fg);
  background: var(--bad-bg);
}

.delta.flat {
  color: var(--flat-fg);
  background: var(--flat-bg);
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

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

  .cards-3 > :last-child:nth-child(odd) {
    grid-column: auto;
  }

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

  .card {
    padding: 20px;
  }

  .value {
    font-size: 30px;
  }
}

/* ---------- Бар-листы ---------- */

.bar-list {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.bar-list .micro-title {
  margin-bottom: 2px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

.bar-row > .bar-label {
  grid-column: 1;
  grid-row: 1;
}

.bar-row > .bar-value {
  grid-column: 2;
  grid-row: 1;
}

.bar-row > .track {
  grid-column: 1 / -1;
  grid-row: 2;
}

.bar-label {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-value {
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.track {
  height: 8px;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: 999px;
}

.fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-600);
}

.fill.teal {
  background: var(--teal-600);
}

.fill.gray {
  background: var(--ink-400);
}

.w-1 {
  width: 10%;
}
.w-2 {
  width: 20%;
}
.w-3 {
  width: 30%;
}
.w-4 {
  width: 40%;
}
.w-5 {
  width: 50%;
}
.w-6 {
  width: 60%;
}
.w-7 {
  width: 70%;
}
.w-8 {
  width: 80%;
}
.w-9 {
  width: 90%;
}
.w-10 {
  width: 100%;
}

/* ---------- Удержание ---------- */

.plate--retention {
  background:
    radial-gradient(46% 60% at 88% 0%, rgb(99 102 241 / 0.06), transparent 70%),
    var(--page);
}

.retention-layout {
  display: grid;
  gap: 24px;
  margin-top: clamp(28px, 4vw, 42px);
}

.retention-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.retention-card {
  padding: 14px 14px 8px;
}

.retention-card .chart-legend {
  gap: 8px 16px;
  padding: 0 4px;
  color: var(--ink-700);
  font-weight: 500;
}

.retention-card .chart-canvas-main {
  height: 220px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

table {
  width: 100%;
  min-width: 380px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 11px 8px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

th:first-child,
td:first-child {
  padding-left: 14px;
}

th:last-child,
td:last-child {
  padding-right: 14px;
}

th {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface-2);
}

th:nth-child(n + 3) {
  text-align: center;
}

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

td:first-child {
  color: var(--ink-900);
  font-weight: 600;
}

td.cell-heat {
  padding: 6px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  background: var(--surface-3);
  border: 3px solid var(--surface);
  border-radius: var(--r-sm);
}

td.cell-heat.h0 {
  color: var(--ink-400);
  background: transparent;
}

td.cell-heat.h1 {
  color: var(--brand-700);
  background: var(--brand-50);
}

td.cell-heat.h2 {
  color: var(--brand-700);
  background: var(--brand-100);
}

td.cell-heat.h3 {
  color: #fff;
  background: var(--brand-400);
}

td.cell-heat.h4 {
  color: #fff;
  background: var(--brand-600);
}

.retention-table td.cell-heat {
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border-width: 2px;
}

.retention-table td.cell-heat.h0 {
  background: transparent;
  border-color: transparent;
}

.retention-table td:nth-child(2),
.retention-table th:nth-child(2) {
  text-align: center;
}

.newcomers-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.newcomer-text {
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.6;
}

.newcomer-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.newcomer-stats dt {
  color: var(--ink-500);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.newcomer-stats dd {
  margin: 5px 0 0;
  color: var(--ink-900);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.newcomer-buckets {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.newcomer-buckets .bar-list {
  margin-top: 12px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

@media (min-width: 960px) {
  .retention-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: start;
  }

  .newcomers-card {
    padding: 20px;
  }
}

/* ---------- Голос ---------- */

.plate--voice {
  background:
    radial-gradient(48% 60% at 10% 0%, rgb(20 184 166 / 0.07), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--page));
  border-block: 1px solid var(--line);
}

.voice-layout {
  display: grid;
  gap: 24px;
  margin-top: 20px;
}

.voice-main {
  min-width: 0;
}

.voice-main .fine {
  margin-top: 12px;
}

.voice-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.voice-side .bar-list {
  gap: 14px;
}

@media (min-width: 960px) {
  .voice-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: start;
  }
}

/* ---------- Активность ---------- */

.plate--activity {
  background:
    radial-gradient(46% 60% at 82% 10%, rgb(99 102 241 / 0.06), transparent 70%),
    var(--page);
}

.activity-layout {
  display: grid;
  gap: 20px;
  margin-top: clamp(28px, 4vw, 42px);
}

.heatmap-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.heatmap-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
}

.heatmap {
  display: grid;
  grid-template-columns: 30px repeat(24, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
  min-width: 0;
}

.hm-hour {
  color: var(--ink-400);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.hm-day {
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 500;
}

.hm-cell {
  display: block;
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--surface-3);
}

.hm-cell.l0 {
  background: var(--surface-3);
}

.hm-cell.l1 {
  background: var(--brand-100);
}

.hm-cell.l2 {
  background: var(--brand-200);
}

.hm-cell.l3 {
  background: var(--brand-400);
}

.hm-cell.l4 {
  background: var(--brand-600);
}

.hm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  color: var(--ink-500);
  font-size: 11px;
}

.hm-legend .hm-cell {
  width: 14px;
  height: 14px;
  aspect-ratio: auto;
}

.hm-note {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 10px;
}

.activity-top {
  align-content: start;
}

@media (min-width: 960px) {
  .activity-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr);
    gap: 28px;
    align-items: start;
  }
}

/* ---------- Тишина ---------- */

.plate--silence {
  display: flex;
  align-items: center;
  min-height: 66vh;
  overflow: hidden;
  color: var(--night-ink);
  background: #070b14;
  border-block: 1px solid #1a2438;
}

.plate--silence::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 50% at 50% 42%, rgb(99 102 241 / 0.1), transparent 70%),
    radial-gradient(30% 40% at 80% 90%, rgb(20 184 166 / 0.05), transparent 70%);
  pointer-events: none;
}

.silence-inner {
  position: relative;
  width: 100%;
  padding-block: clamp(72px, 12vw, 150px);
  text-align: center;
}

.silence-day {
  margin-top: 20px;
  color: #8a99b3;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.silence-title {
  margin-top: 10px;
  color: #f8fafc;
  font-size: clamp(2.8rem, 8.5vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.silence-text {
  max-width: 580px;
  margin: 24px auto 0;
  color: #93a1b8;
  font-size: 15px;
  line-height: 1.72;
}

.silence-caption {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  color: #8a99b3;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.silence-dot {
  width: 5px;
  height: 5px;
  background: #3f4d67;
  border-radius: 50%;
  animation: silence 4.6s ease-in-out infinite;
}

@keyframes silence {
  0%,
  82%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  88% {
    opacity: 1;
    transform: scale(1);
  }
}

.plate--silence .text-link {
  display: flex;
  width: max-content;
  margin: 20px auto 0;
}

/* ---------- Приватность ---------- */

.plate--quiet {
  background:
    radial-gradient(46% 60% at 8% 20%, rgb(99 102 241 / 0.05), transparent 70%),
    var(--page);
}

.quiet-layout {
  display: grid;
  gap: 34px;
}

.quiet-head,
.quiet-body {
  min-width: 0;
}

.quiet-body .privacy-list {
  margin-top: 0;
}

.quiet-body .text-link {
  margin-top: 24px;
}

.privacy-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-700);
  font-size: 13.5px;
  line-height: 1.55;
}

.icon-check {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  padding: 3px;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: 50%;
}

.privacy-demo {
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

.privacy-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border-radius: 11px;
}

.privacy-tab {
  flex: 1;
  height: 36px;
  padding: 0 8px;
  color: var(--ink-500);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.privacy-tab:hover {
  color: var(--ink-900);
}

.privacy-tab.is-active {
  color: var(--ink-900);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.privacy-panels {
  display: grid;
  margin-top: 14px;
}

.privacy-panels > * {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.privacy-panels > .is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.message-card,
.kept-card {
  position: relative;
  min-height: 172px;
  padding: 15px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--brand-700);
  background: var(--brand-50);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.message-name {
  color: var(--ink-800);
  font-size: 13.5px;
  font-weight: 600;
}

.message-time {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 9px;
}

.message-text {
  margin-top: 14px;
  padding-left: 40px;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.55;
}

.message-meta {
  margin-top: 12px;
  padding-left: 40px;
  color: var(--ink-400);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.redact-bar {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 30px, rgb(255 255 255 / 0.06) 30px 31px),
    linear-gradient(135deg, #0f172a, #1e293b);
  transform: translateY(101%);
  transition: transform 0.6s cubic-bezier(0.3, 0.8, 0.2, 1);
}

.message-card.is-redacted .redact-bar {
  transform: translateY(0);
}

.kept-card {
  background:
    radial-gradient(70% 60% at 100% 0%, rgb(99 102 241 / 0.08), transparent 70%),
    linear-gradient(180deg, #f8fafc, #fff);
}

.kept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
}

.kept-grid dt {
  color: var(--ink-500);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.kept-grid dd {
  margin: 4px 0 0;
  color: var(--ink-900);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.kept-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 11px;
}

.kept-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--ink-400);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kept-end::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.kept-stamp {
  flex: none;
  padding: 3px 6px;
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
  border-radius: 4px;
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

@media (min-width: 560px) {
  .privacy-demo {
    padding: 18px;
  }

  .message-card,
  .kept-card {
    min-height: 190px;
    padding: 18px;
  }

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

@media (min-width: 960px) {
  .quiet-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      'head demo'
      'body demo';
    column-gap: 64px;
    row-gap: 34px;
    align-items: start;
  }

  .quiet-head {
    grid-area: head;
  }

  .quiet-layout .privacy-demo {
    grid-area: demo;
    align-self: center;
  }

  .quiet-body {
    grid-area: body;
  }
}

/* ---------- Инструменты ---------- */

.plate--cabinet {
  background: linear-gradient(180deg, var(--surface-2), var(--page));
  border-block: 1px solid var(--line);
}

.kpi-block {
  margin-top: clamp(28px, 4vw, 42px);
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.kpi-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
  margin-bottom: 14px;
}

.kpi-block .cards {
  gap: 10px;
}

.kpi-block .card {
  padding: 14px;
  box-shadow: none;
}

.kpi-block .value {
  font-size: clamp(18px, 4.6vw, 22px);
  line-height: 1.1;
  white-space: normal;
}

.cards-3 .value {
  font-size: clamp(18px, 4.6vw, 26px);
  line-height: 1.1;
  white-space: normal;
}

.kpi-block .spark {
  height: 34px;
  margin-top: 8px;
}

.kpi-block-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 16px;
}

.kpi-block-foot .fine {
  max-width: 52ch;
}

.feature-grid {
  display: grid;
  gap: 1px;
  margin-top: clamp(32px, 4vw, 46px);
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 18px;
  background: var(--surface);
  transition: background-color 0.2s ease;
}

.feature:hover {
  background: #fdfdff;
}

.feature-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-num {
  color: var(--ink-400);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.feature-viz {
  width: 58px;
  height: 25px;
  color: var(--brand-600);
  opacity: 0.72;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.feature:hover .feature-viz {
  opacity: 1;
  transform: translateY(-2px);
}

.feature-title {
  margin-top: auto;
  padding-top: 26px;
  color: var(--ink-900);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.feature-text {
  margin-top: 6px;
  color: var(--ink-500);
  font-size: 11.5px;
  line-height: 1.55;
}

@media (min-width: 560px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature {
    padding: 22px;
  }
}

@media (min-width: 1180px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Итоги месяца ---------- */

.plate--ritual {
  background:
    radial-gradient(46% 60% at 82% 10%, rgb(99 102 241 / 0.06), transparent 70%),
    var(--page);
}

.ritual-layout {
  display: grid;
  gap: 34px;
}

.ritual-head,
.ritual-body {
  min-width: 0;
}

.ritual-body .ritual-list {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ritual-list {
  margin-top: 0;
}

.ritual-list ul {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.ritual-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 1.55;
}

.ritual-note {
  margin-top: 22px;
}

.wrapped-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding-block: 8px;
}

.wrapped-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 500px);
  height: auto;
  padding: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.wrap-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-500);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark-square {
  display: inline-flex;
  flex: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  width: 22px;
  height: 22px;
  padding: 5px 4px;
  background: var(--brand-600);
  border-radius: 6px;
}

.brand-mark-square i {
  display: block;
  width: 3px;
  background: #fff;
  border-radius: 1px;
}

.brand-mark-square i:nth-child(1) {
  height: 6px;
}

.brand-mark-square i:nth-child(2) {
  height: 9px;
}

.brand-mark-square i:nth-child(3) {
  height: 12px;
}

.wrap-brand {
  color: var(--brand-700);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.wrap-period {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 6.5px;
}

.wrap-title {
  margin-top: 9px;
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.wrap-subtitle {
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 7px;
}

.wrap-divider {
  height: 1px;
  margin: 10px 0;
  background: var(--line);
}

.wrap-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.wrap-tiles > div {
  min-width: 0;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.wrap-tiles span {
  display: block;
  overflow: hidden;
  color: var(--ink-500);
  font-size: 5.8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.wrap-tiles strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-900);
  font-size: 9px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrap-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.wrap-panels > div,
.wrap-nominations {
  min-width: 0;
  padding: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.wrap-panel-title {
  color: var(--ink-500);
  font-size: 5.8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wrap-panels ul,
.wrap-nominations ul {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}

.wrap-panels li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
  color: var(--ink-800);
  font-size: 6.5px;
}

.wrap-panels li strong {
  color: var(--ink-500);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.wrap-nominations {
  margin-top: 6px;
}

.wrap-nominations li {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  border-top: 1px solid var(--line);
}

.wrap-nominations li:first-child {
  border-top: 0;
}

.nom-label {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrap-nominations strong {
  overflow: hidden;
  color: var(--ink-900);
  font-size: 7px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nom-detail {
  color: var(--ink-500);
  font-size: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wrap-chart {
  margin-top: 6px;
  padding: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.wrap-chart-canvas {
  position: relative;
  height: 90px;
  margin-top: 4px;
}

.wrap-chart-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.wrap-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--ink-500);
  font-size: 6px;
  font-weight: 500;
}

.wrap-foot span:first-child {
  color: var(--brand-700);
  font-weight: 600;
}

.wrapped-figure figcaption {
  margin-top: 14px;
  color: var(--ink-400);
  font-size: 10px;
  text-align: center;
}

@media (min-width: 960px) {
  .ritual-layout {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    grid-template-areas:
      'figure head'
      'figure body';
    column-gap: 64px;
    row-gap: 26px;
    align-items: center;
  }

  .ritual-head {
    grid-area: head;
  }

  .wrapped-figure {
    grid-area: figure;
    align-self: center;
  }

  .ritual-body {
    grid-area: body;
  }
}

/* ---------- Метод ---------- */

.plate--method {
  background: linear-gradient(180deg, var(--surface-2), var(--page));
  border-block: 1px solid var(--line);
}

.steps {
  display: grid;
  margin: clamp(30px, 5vw, 46px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.step-num {
  color: var(--brand-600);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  color: var(--ink-900);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  max-width: 62ch;
  margin-top: 5px;
  color: var(--ink-500);
  font-size: 13.5px;
  line-height: 1.65;
}

.command-index {
  margin-top: 36px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.command-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.command-head h3 {
  margin: 0;
}

.command-list {
  display: grid;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.command-list li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

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

.command-list code {
  flex: none;
  color: var(--brand-700);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.command-list .leader {
  flex: 1;
  min-width: 10px;
  border-bottom: 1px dotted var(--line-strong);
  transform: translateY(-3px);
}

.command-list li > span:last-child {
  flex: 0 1 auto;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
}

.method-cta {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

@media (min-width: 700px) {
  .step {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 24px;
    padding: 26px 0;
  }

  .step-num {
    font-size: 28px;
  }

  .command-index {
    padding: 22px;
  }

  .command-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 34px;
  }
}

/* ---------- Вопросы ---------- */

.plate--questions {
  background: var(--page);
}

.split {
  display: grid;
  gap: 44px;
}

.split > * {
  min-width: 0;
}

.faq-intro .text-link {
  margin-top: 26px;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  color: var(--ink-800);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.faq-item summary:hover {
  color: var(--brand-700);
}

.faq-plus {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}

.faq-plus::before,
.faq-plus::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--ink-400);
  transition:
    transform 0.25s ease,
    background-color 0.2s ease;
}

.faq-plus::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-plus::after {
  transform: rotate(0);
}

.faq-item[open] summary {
  color: var(--ink-900);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq-answer > p {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 13.5px;
  line-height: 1.7;
}

.faq-item[open] .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item[open] .faq-answer > p {
  padding-bottom: 20px;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 64px;
    align-items: start;
  }

  .faq-intro {
    position: sticky;
    top: 108px;
    align-self: start;
  }
}

/* ---------- Приглашение ---------- */

.plate--invitation {
  position: relative;
  overflow: hidden;
  padding-block: clamp(76px, 13vw, 160px);
  color: var(--night-ink);
  text-align: center;
  background:
    radial-gradient(50% 60% at 50% 100%, rgb(79 70 229 / 0.34), transparent 70%),
    radial-gradient(40% 50% at 10% 0%, rgb(20 184 166 / 0.12), transparent 70%),
    var(--night);
  border-top: 1px solid #202b42;
}

.invite-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(226 232 240 / 0.26) 0.7px, transparent 0.8px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.plate--invitation .plate-label {
  position: relative;
  color: #8290aa;
}

.plate--invitation .plate-rule {
  background: #53617c;
}

.invite-title {
  position: relative;
  margin-top: 18px;
  color: #f8fafc;
  font-size: clamp(2.8rem, 9vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.invite-lede {
  position: relative;
  max-width: 560px;
  margin: 24px auto 0;
  color: #a7b3c8;
  font-size: 16px;
}

.invite-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.invite-note {
  position: relative;
  margin-top: 26px;
  color: #9aa8c0;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.invite-small {
  position: relative;
  margin-top: 46px;
  color: #7e8ca6;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Подвал ---------- */

.site-foot {
  padding-top: 52px;
  background: var(--page);
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  gap: 32px;
}

.brand--foot .brand-mark {
  width: 42px;
  height: 42px;
}

.brand--foot .brand-text small {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.foot-made {
  max-width: 34ch;
  margin-top: 16px;
  color: var(--ink-500);
  font-size: 12.5px;
  line-height: 1.6;
}

.foot-note {
  max-width: 34ch;
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 10.5px;
  line-height: 1.55;
}

.foot-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.foot-col .micro-title {
  margin-bottom: 4px;
}

.foot-col a {
  color: var(--ink-500);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.foot-col a:hover {
  color: var(--ink-900);
}

.foot-lang {
  margin-top: 8px;
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 36px;
  padding-block: 17px 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: uppercase;
}

@media (min-width: 560px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 960px) {
  .foot-grid {
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

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

/* ---------- Колесо чтения ---------- */

.wheel {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 45;
  display: none;
  place-items: center;
  width: 78px;
  height: 78px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  filter: drop-shadow(0 5px 14px rgb(15 23 42 / 0.1));
  transform: translateY(-50%);
}

.wheel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wheel-track {
  fill: rgb(255 255 255 / 0.94);
  stroke: var(--line-strong);
  stroke-width: 0.8;
}

.wheel-ring {
  fill: none;
  stroke: var(--brand-600);
  stroke-width: 1;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.18s linear;
}

.wheel-step {
  fill: var(--line-strong);
  transition: fill 0.3s ease;
}

.wheel-step.is-on {
  fill: var(--brand-600);
}

.wheel-num {
  position: relative;
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wheel:hover .wheel-num {
  color: var(--brand-700);
}

.wheel::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  padding: 5px 9px;
  color: var(--ink-800);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(4px, -50%);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.wheel:hover::before,
.wheel:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (min-width: 1400px) {
  .wheel {
    display: grid;
  }
}

/* ---------- Появление ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

.js .feature-grid .feature {
  transition-delay: 0ms;
}

.js .feature-grid .feature:nth-child(2) {
  transition-delay: 40ms;
}
.js .feature-grid .feature:nth-child(3) {
  transition-delay: 80ms;
}
.js .feature-grid .feature:nth-child(4) {
  transition-delay: 120ms;
}
.js .feature-grid .feature:nth-child(5) {
  transition-delay: 55ms;
}
.js .feature-grid .feature:nth-child(6) {
  transition-delay: 95ms;
}
.js .feature-grid .feature:nth-child(7) {
  transition-delay: 135ms;
}
.js .feature-grid .feature:nth-child(8) {
  transition-delay: 175ms;
}
.js .feature-grid .feature:nth-child(9) {
  transition-delay: 110ms;
}
.js .feature-grid .feature:nth-child(10) {
  transition-delay: 150ms;
}
.js .feature-grid .feature:nth-child(11) {
  transition-delay: 190ms;
}
.js .feature-grid .feature:nth-child(12) {
  transition-delay: 230ms;
}

/* ---------- 404 ---------- */

.page--404 .site-head {
  background: transparent;
  border-bottom-color: transparent;
}

.error-page {
  padding-block: clamp(64px, 11vw, 130px);
  max-width: 900px;
}

.err-code {
  margin-top: 18px;
  color: transparent;
  background: linear-gradient(135deg, var(--brand-200) 10%, var(--teal-50) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.error-page h1 {
  margin-top: 18px;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
}

.error-page .lede {
  margin-top: 16px;
}

.error-page .hero-actions {
  margin-top: 28px;
}

.page--404 .site-foot {
  border-top-color: transparent;
}

/* ---------- Уменьшенное движение ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

/* ---------- Печать ---------- */

@media print {
  body::before,
  .site-head,
  .wheel,
  .invite-dots,
  .hero-glow,
  .hero::before,
  .scroll-cue {
    display: none !important;
  }

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

  .plate,
  .site-foot {
    padding-block: 24px;
    break-inside: avoid;
  }

  .plate--silence,
  .plate--invitation {
    color: #111;
    background: #fff;
  }

  .plate--silence .silence-title,
  .invite-title {
    color: #111;
  }

  .button {
    box-shadow: none;
  }
}

@media (max-width: 639px) {
  table {
    min-width: 0;
  }

  th,
  td {
    padding: 8px 4px;
    font-size: 12px;
  }

  th:first-child,
  td:first-child {
    padding-left: 10px;
  }

  th:last-child,
  td:last-child {
    padding-right: 10px;
  }

  .wrapped-card {
    padding: 14px;
  }

  .wrap-title {
    font-size: 12px;
  }

  .wrap-chart-canvas {
    height: 60px;
  }

  .wrap-tiles strong {
    font-size: 8.5px;
    white-space: normal;
    overflow: visible;
  }

  .wrap-tiles span {
    font-size: 5.4px;
  }

  .wrap-nominations li {
    padding: 2px 0;
  }
}
