/* AI Soft — витрина. Тёмная тема по мотивам design/DESIGN.md:
   полночный фон, стеклянные панели, сетка-чертёж, один фиолетовый акцент. */

:root {
  --canvas: #05060f;
  --steel: #2f343e;
  --text-head: #d8ecf8;
  --text: #d1e4fa;
  --text-muted: #c7d3ea;
  --text-help: #9da7ba;
  --white: #ffffff;
  --violet: #663af3;
  --violet-hover: #7650f5;
  --violet-soft: #b9a5ff;
  --blueprint: #b6d9fc;
  --ok: #7fdcc4;

  --edge: rgba(186, 215, 247, 0.12);
  --edge-strong: rgba(186, 215, 247, 0.24);
  --glass: rgba(186, 214, 247, 0.03);
  --glass-2: rgba(186, 214, 247, 0.06);
  --glass-3: rgba(186, 214, 247, 0.12);

  --shadow-card: inset 0 1px 1px rgba(199, 211, 234, 0.12), inset 0 24px 48px rgba(199, 211, 234, 0.05), 0 24px 32px rgba(6, 6, 14, 0.7);
  --shadow-float: inset 0 1px 1px rgba(216, 236, 248, 0.2), inset 0 24px 48px rgba(168, 216, 245, 0.06), 0 16px 32px rgba(0, 0, 0, 0.3);

  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius-card: 16px;
  --radius-badge: 6px;
  --radius-pill: 999px;
  --page: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: rgba(102, 58, 243, 0.45); color: var(--white); }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--text-help); }
.small { font-size: 13px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 16px; background: var(--violet); color: var(--white); border-radius: var(--radius-pill); }
.skip:focus { left: 16px; }

/* Фон: сетка-чертёж и прожектор сверху */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(186, 215, 247, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 215, 247, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg::after {
  content: ""; position: absolute; left: 50%; top: -30vh; width: 140vw; height: 110vh; transform: translateX(-50%);
  background:
    radial-gradient(ellipse 45% 40% at 62% 45%, rgba(102, 58, 243, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 40% at 35% 50%, rgba(124, 145, 182, 0.18), transparent 70%);
  filter: blur(20px);
}

/* Шапка */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 -1px 0 var(--edge);
}
.topbar__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--violet); color: var(--white); font: 500 13px/1 var(--mono);
  box-shadow: 0 0 18px rgba(102, 58, 243, 0.45);
}
.logo__text { font-weight: 500; font-size: 17px; color: var(--text-head); letter-spacing: -0.01em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 6px 12px; border-radius: var(--radius-pill); text-decoration: none;
  font-size: 14px; color: var(--text-muted); transition: background .2s, color .2s;
}
.nav a:hover, .nav a[aria-current] { color: var(--white); background: var(--glass-2); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border: 0; border-radius: var(--radius-pill);
  font: 500 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.btn--sm { min-height: 36px; padding: 6px 16px; font-size: 14px; }
.btn .icon { flex: none; }
.btn--primary { background: var(--violet); color: var(--white); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 8px 24px rgba(102, 58, 243, 0.35); }
.btn--primary:hover { background: var(--violet-hover); transform: translateY(-1px); }
.btn--ghost { background: var(--glass-2); color: var(--white); box-shadow: inset 0 0 0 1px var(--edge); }
.btn--ghost:hover { background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--edge-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stack { display: grid; gap: 10px; margin-top: 16px; }

/* Надстрочные метки */
.eyebrow {
  margin: 0 0 12px; font: 400 12px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); font-feature-settings: "tnum" on;
}
.eyebrow--lined { display: flex; align-items: center; gap: 16px; }
.eyebrow--lined::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--edge), transparent); }

/* Первый экран */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding-top: 88px; padding-bottom: 88px;
}
.display {
  margin: 0 0 20px; font-weight: 500; font-size: clamp(40px, 5.6vw, 68px); line-height: 1.06; letter-spacing: -0.025em;
  background: linear-gradient(180deg, #eef7fd 0%, #98c0ef 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.display span { display: block; font-size: 0.62em; letter-spacing: -0.02em; margin-top: 6px; }
.hero__lead { margin: 0 0 32px; max-width: 520px; font-size: 18px; line-height: 1.55; color: var(--text-muted); }

/* ---- Частицы за первым экраном ----
   Проявляются после загрузки (класс is-loaded), чтобы не мешать первому
   показу. Двигаются только transform/opacity — это видеокарта, не процессор. */
/* Обёртка во всю ширину экрана: частицы живут в ней, а не тянутся из узкой
   колонки через 100vw — тот при видимой полосе прокрутки шире страницы */
.hero-shell { position: relative; isolation: isolate; overflow: hidden; }
.particles {
  position: absolute; inset: 0;
  z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent);
}
.is-loaded .particles, html:not(.js) .particles { opacity: 1; }
.pt { position: absolute; display: block; font-style: normal; will-change: transform, opacity;
  animation: pt-float var(--d) ease-in-out var(--t) infinite; }
.pt--dot { width: var(--s); height: var(--s); border-radius: 50%; background: #c9b8ff;
  box-shadow: 0 0 8px rgba(185, 165, 255, 1), 0 0 20px rgba(102, 58, 243, .7); }
.pt--glyph { font: 500 12.5px/1 var(--mono); color: rgba(200, 225, 250, .7); text-shadow: 0 0 10px rgba(140, 111, 247, .9); }
@keyframes pt-float {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translate(var(--sway), calc(var(--rise) / 2)); opacity: .6; }
  85%  { opacity: 1; }
  100% { transform: translate(0, var(--rise)); opacity: 0; }
}

/* ---- Радар в окне терминала ----
   Сетка — SVG, луч — вращающийся conic-gradient. Сигнал вспыхивает, когда
   его проходит луч: задержка = угол / 360 × период (4 с). */
.radar {
  position: absolute; top: 60px; right: 24px; width: 140px; aspect-ratio: 1; border-radius: 50%;
  pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(102, 58, 243, .16), rgba(8, 10, 22, .25) 68%, transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(185, 165, 255, .2), 0 0 28px rgba(102, 58, 243, .2);
}
.radar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar__grid { fill: none; stroke: rgba(185, 215, 247, .18); stroke-width: .6; }
.radar__grid line { stroke: rgba(185, 215, 247, .14); }
.radar__sweep {
  position: absolute; inset: 4%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 280deg, rgba(140, 111, 247, .06) 300deg,
    rgba(185, 165, 255, .42) 356deg, rgba(225, 215, 255, .85) 360deg);
  animation: radar-spin 4s linear infinite; will-change: transform;
}
.radar__sweep::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 1.5px; height: 50%; transform: translateX(-50%);
  background: linear-gradient(to top, rgba(225, 215, 255, .95), rgba(225, 215, 255, 0));
}
@keyframes radar-spin { to { transform: rotate(360deg); } }
.radar__blip {
  position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok), 0 0 16px rgba(127, 220, 196, .5);
  opacity: 0; animation: radar-blip 4s linear infinite;
}
@keyframes radar-blip {
  0%   { opacity: 1; transform: scale(1.6); }
  10%  { opacity: .95; transform: scale(1); }
  70%  { opacity: .08; }
  100% { opacity: 0; transform: scale(1); }
}
.radar__core { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: var(--violet-soft); box-shadow: 0 0 10px var(--violet-soft); }
.radar__label { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%);
  font: 500 9.5px/1 var(--mono); letter-spacing: .14em; color: var(--text-help); white-space: nowrap; }

/* Окно терминала */
.term {
  position: relative; border-radius: var(--radius-card); overflow: hidden;
  background: rgba(8, 10, 22, 0.88); box-shadow: var(--shadow-float), 0 0 0 1px var(--edge);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}
.term::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 90%;
  background: radial-gradient(closest-side, rgba(102, 58, 243, 0.28), transparent);
  pointer-events: none;
}
.term__bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; box-shadow: inset 0 -1px 0 var(--edge); }
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--steel); }
.term__bar i:first-child { background: #ff5f57; opacity: .8; }
.term__bar i:nth-child(2) { background: #febc2e; opacity: .8; }
.term__bar i:nth-child(3) { background: #28c840; opacity: .8; }
.term__bar span { margin-left: 8px; font: 12px/1 var(--mono); color: var(--text-help); }
.term__body {
  position: relative; margin: 0; padding: 22px 24px 26px; min-height: 290px;
  font: 13.5px/1.75 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere;
}
.t-dim { color: var(--text-help); }
.t-acc { color: var(--violet-soft); }
.t-dot { color: var(--blueprint); }
.t-hi { color: var(--white); background: rgba(102, 58, 243, 0.35); border-radius: 4px; padding: 0 4px; }
.t-ok { color: var(--ok); }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--violet-soft); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Раскладка: лента + боковая панель */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; padding-bottom: 120px; }
.layout--page { padding-top: 32px; }
.list-head { display: grid; gap: 16px; margin-bottom: 24px; }
.list-head .eyebrow { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.list-head .chips { margin-bottom: 0; }
.chip {
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: 14px; text-decoration: none;
  color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--edge); transition: background .2s, color .2s;
}
.chip:hover { color: var(--white); background: var(--glass-2); }
.chip.is-on { color: var(--white); background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--edge-strong); }

/* Карточки */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px;
  border-radius: var(--radius-card); background: var(--glass); box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(186, 214, 247, 0.06);
  transition: transform .25s, box-shadow .25s, background .25s;
}
.card:hover { transform: translateY(-3px); background: var(--glass-2); box-shadow: var(--shadow-card), inset 0 0 0 1px var(--edge-strong); }
.card:focus-within { box-shadow: var(--shadow-card), inset 0 0 0 1px var(--violet-soft); }
.card.is-more { display: none; }
.grid.is-open .card.is-more, .grid.is-filtered .card.is-more { display: flex; }
.grid .card.is-out, .grid.is-filtered .card.is-out { display: none; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-help); }
.card__title { margin: 0; font-weight: 500; font-size: 19px; line-height: 1.3; color: var(--text-head); letter-spacing: -0.01em; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__title a:focus-visible { outline: none; }
.card__lead { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-help);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--text-help); }
.card__more { color: var(--text); transition: color .2s; }
.card:hover .card__more { color: var(--violet-soft); }

.badge {
  display: inline-block; padding: 3px 8px; border-radius: var(--radius-badge);
  font: 500 12px/1.4 var(--font); color: var(--text); background: rgba(199, 211, 234, 0.1);
  box-shadow: inset 0 1px 1px rgba(216, 236, 248, 0.12);
}
.badge--cases { color: #e4dcff; background: rgba(102, 58, 243, 0.28); }
.badge--news { color: #cdeefc; background: rgba(2, 125, 234, 0.2); }

.more { display: flex; justify-content: center; margin-top: 32px; }

/* Боковая панель — один пульт на высоту экрана: прилипает целиком,
   длинное содержимое листается внутри вкладки, подписка всегда видна. */
.aside { position: sticky; top: 88px; display: grid; gap: 16px; }
.panel {
  padding: 24px; border-radius: var(--radius-card); background: var(--glass);
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(186, 214, 247, 0.06);
}
.panel p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.panel--accent { background: linear-gradient(160deg, rgba(102, 58, 243, 0.16), rgba(186, 214, 247, 0.03) 60%); box-shadow: var(--shadow-float), inset 0 0 0 1px var(--edge); }
.panel__title { margin: 0 0 8px; font-weight: 500; font-size: 18px; line-height: 1.3; color: var(--text-head); }
.hl { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hl li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; }
.hl__value { font-weight: 500; font-size: 20px; color: var(--text-head); white-space: nowrap; }
.hl__label { font-size: 13.5px; line-height: 1.45; color: var(--text-help); }
.hl__label a { text-decoration: none; }
.hl__label a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--edge-strong); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat__value { font-weight: 500; font-size: 22px; color: var(--text-head); }
.stat__label { font-size: 12.5px; color: var(--text-help); }

/* Страница раздела и поста */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: 14px; color: var(--text-help); }
.crumbs a { text-decoration: none; color: var(--text-muted); }
.crumbs a:hover { color: var(--white); }
.page-head { margin-bottom: 28px; }
.h1 {
  margin: 0 0 16px; font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.14; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #eef7fd 0%, #a9cbf2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head__lead { margin: 0; max-width: 640px; font-size: 17px; color: var(--text-muted); }

.post { max-width: 740px; }
.post__head { margin-bottom: 32px; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; font-size: 14px; color: var(--text-help); }

.prose { font-size: 17.5px; line-height: 1.72; color: var(--text); }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { margin: 1.9em 0 0.7em; font-weight: 500; font-size: 24px; line-height: 1.25; color: var(--text-head); }
.prose h3 { margin: 1.6em 0 0.6em; font-weight: 500; font-size: 20px; color: var(--text-head); }
.prose strong { font-weight: 600; color: var(--white); }
.prose a { color: var(--text-head); text-decoration: underline; text-decoration-color: rgba(185, 165, 255, 0.55); text-underline-offset: 3px; }
.prose a:hover { color: var(--white); text-decoration-color: var(--violet-soft); }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; margin: 0 0 0.55em; padding-left: 26px; }
.prose ul li::before { content: ""; position: absolute; left: 6px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--violet-soft); box-shadow: 0 0 8px rgba(185, 165, 255, 0.6); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: 0.15em; font: 500 13px/1.8 var(--mono); color: var(--violet-soft); }
.prose code { font: 0.88em var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--edge); }
.prose pre { overflow-x: auto; padding: 18px 20px; border-radius: 12px; background: rgba(8, 10, 22, 0.9); box-shadow: inset 0 0 0 1px var(--edge); }
.prose pre code { padding: 0; background: none; box-shadow: none; font-size: 14px; line-height: 1.6; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; box-shadow: inset 2px 0 0 var(--violet); color: var(--text-muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 32px 0 0; padding: 0; }
.tags li { padding: 4px 10px; border-radius: var(--radius-badge); font-size: 13px; color: var(--text-muted); background: var(--glass-2); }

.cta {
  position: relative; overflow: hidden; margin-top: 48px; padding: 36px 32px; border-radius: 20px;
  background: linear-gradient(150deg, rgba(102, 58, 243, 0.24), rgba(8, 10, 22, 0.6) 55%, rgba(186, 214, 247, 0.04));
  box-shadow: var(--shadow-float), inset 0 0 0 1px var(--edge);
}
.cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(186,215,247,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(186,215,247,.05) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000);
}
.cta > * { position: relative; z-index: 1; }
.cta__title { margin: 0 0 10px; font-weight: 500; font-size: 28px; line-height: 1.2; color: var(--text-head); }
.cta p { margin: 0 0 24px; max-width: 520px; }

.related { margin-top: 72px; }
.notfound { padding: 120px var(--gutter) 160px; text-align: left; }

/* Подвал */
.footer { box-shadow: inset 0 1px 0 var(--edge); padding: 48px 0 32px; background: rgba(5, 6, 15, 0.6); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer__in p { margin: 12px 0 0; max-width: 380px; font-size: 14px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.footer__nav a { text-decoration: none; color: var(--text-muted); font-size: 14px; }
.footer__nav a:hover { color: var(--white); }
.footer__copy { margin-top: 32px; font-size: 13px; }

/* Адаптив */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}
@media (max-width: 1180px) and (min-width: 961px) {
  .radar { width: 112px; top: 64px; right: 18px; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
  .term { transform: none; }
  .layout { grid-template-columns: 1fr; }
  .aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .topbar .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid, .aside { grid-template-columns: 1fr; }
  .hero__lead { font-size: 16.5px; }
  /* на телефоне радар — справа вверху, рядом с короткими первыми строками */
  .term__body { font-size: 12px; padding: 18px 16px 20px; min-height: 250px; }
  .radar { top: 58px; right: 14px; width: 92px; }
  .radar__label { bottom: -16px; font-size: 8.5px; }
  .prose { font-size: 17px; }
  .cta { padding: 28px 20px; }
  .cta__title { font-size: 24px; }
  .actions .btn { flex: 1 1 100%; }
}

/* Иконки */
.icon { display: inline-block; vertical-align: -3px; }

/* Первый экран: автор и цифры */
.hero__by { margin: -6px 0 16px; font: 500 13px/1.4 var(--mono); letter-spacing: 0.02em; color: var(--violet-soft); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 36px 0 0; padding: 20px 0 0; list-style: none; font-size: 14px; color: var(--text-help); box-shadow: inset 0 1px 0 var(--edge); }
.hero__facts b { display: block; font-weight: 500; font-size: 22px; color: var(--text-head); letter-spacing: -0.01em; }

/* Дашборд канала: стекло + тонкая «приборная» графика */
.panel--hud { position: relative; overflow: hidden; }
.panel--hud::before, .panel--hud::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 1px solid rgba(185, 165, 255, 0.55);
}
.panel--hud::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; }
.panel--hud::after { right: 8px; bottom: 8px; border-left: 0; border-top: 0; border-bottom-right-radius: 4px; }
.dash__scan {
  position: absolute; left: 0; right: 0; top: 0; height: 40%; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(140, 111, 247, 0.12) 80%, rgba(185, 165, 255, 0.35) 100%);
}
.js .dash.is-in .dash__scan { animation: scan 1.4s cubic-bezier(.4, 0, .2, 1) .1s 1 both; }
@keyframes scan { 0% { transform: translateY(-100%); opacity: 1; } 100% { transform: translateY(260%); opacity: 0; } }

.dash__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.dash__head .eyebrow { margin: 0; }
.live { display: inline-flex; align-items: center; gap: 6px; font: 11px/1 var(--mono); color: var(--text-help); white-space: nowrap; }
.live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.live i::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--ok); opacity: 0; }
.js .dash.is-in .live i::after { animation: ping 1.6s ease-out 3; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 12px; overflow: hidden; background: var(--edge); }
.kpi { padding: 12px 14px; background: rgba(8, 10, 22, 0.92); }
.kpi__label { font: 400 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-help); }
.kpi__value { margin-top: 6px; font-weight: 500; font-size: 24px; line-height: 1.1; color: var(--text-head); letter-spacing: -0.01em; }
.kpi__note { margin-top: 4px; font-size: 11.5px; line-height: 1.3; color: var(--text-help); }
.panel .dash__note { margin-top: 12px; font-size: 13px; color: var(--text-help); }
.delta { font-weight: 600; color: var(--ok); }

.dash__chart { margin: 20px 0 0; }
.dash__chart figcaption { margin-bottom: 8px; font-size: 13px; color: var(--text-muted); }
.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--mono); }
.ch-grid { stroke: rgba(186, 215, 247, 0.1); stroke-width: 1; }
.ch-tick { fill: var(--text-help); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.ch-label { fill: var(--text-head); font-size: 10.5px; font-weight: 500; }
.ch-bar { fill: #8c6ff7; opacity: .75; transition: opacity .2s; transform-box: fill-box; transform-origin: 50% 100%; pointer-events: none; }
.ch-bar.is-peak, .ch-bar.is-hover { opacity: 1; }
.ch-hit { fill: transparent; cursor: pointer; outline: none; }
.ch-hit:focus-visible { stroke: var(--violet-soft); stroke-width: 1; }
.ch-area { fill: #8c6ff7; opacity: .12; }
.ch-line { fill: none; stroke: #8c6ff7; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-end { fill: #8c6ff7; stroke: #0a0c1a; stroke-width: 2; }
.ch-dot { fill: #8c6ff7; stroke: #0a0c1a; stroke-width: 2; opacity: 0; transition: opacity .15s; pointer-events: none; }
.ch-cross { stroke: rgba(186, 215, 247, 0.3); stroke-width: 1; opacity: 0; transition: opacity .15s; pointer-events: none; }
.ch-point:hover .ch-dot, .ch-point:hover .ch-cross, .ch-point:focus-within .ch-dot, .ch-point:focus-within .ch-cross { opacity: 1; }

/* Прячем до анимации только там, где анимация разрешена: иначе при
   «уменьшить движение» графики остались бы пустыми */
@media (prefers-reduced-motion: no-preference) {
  .js .dash .ch-bar { transform: scaleY(0); }
  .js .dash.is-in .ch-bar { animation: grow .6s cubic-bezier(.2, .8, .2, 1) calc(.3s + var(--i) * 40ms) both; }
  .js .dash .ch-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .dash.is-in .ch-line { animation: draw 1.2s cubic-bezier(.4, 0, .2, 1) .5s forwards; }
  .js .dash .ch-area, .js .dash .ch-end, .js .dash .chart--line .ch-label { opacity: 0; }
  .js .dash.is-in .ch-area { animation: fade-area .6s ease 1.3s forwards; }
  .js .dash.is-in .ch-end, .js .dash.is-in .chart--line .ch-label { animation: fade-in .4s ease 1.6s forwards; }
}
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-area { to { opacity: .12; } }
@keyframes fade-in { to { opacity: 1; } }

.ch-table { margin-top: 6px; }
.ch-table summary { cursor: pointer; color: var(--text-help); list-style: none; font: 11px/2 var(--mono); letter-spacing: .04em; }
.ch-table summary::-webkit-details-marker { display: none; }
.ch-table summary::before { content: "+ "; }
.ch-table[open] summary::before { content: "− "; }
.ch-table summary:hover { color: var(--text); }
.ch-table table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 12.5px; }
.ch-table th, .ch-table td { padding: 4px 0; text-align: left; border-bottom: 1px solid var(--edge); color: var(--text-muted); font-weight: 400; vertical-align: top; }
.ch-table th { color: var(--text-help); font: 11px var(--mono); text-transform: uppercase; }
.ch-table td:last-child, .ch-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 8px; }
.panel .dash__src { margin-top: 16px; font-size: 11.5px; line-height: 1.45; color: var(--text-help); }
.dash__src a { color: var(--text-muted); }

/* Подсказка графиков */
.tip {
  position: fixed; z-index: 80; max-width: 260px; padding: 8px 10px; border-radius: 8px; pointer-events: none;
  background: rgba(12, 14, 28, 0.97); box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--edge-strong);
  font-size: 12.5px; line-height: 1.4; color: var(--text-muted);
}
.tip b { display: block; margin-bottom: 2px; font-weight: 500; color: var(--white); }

/* Карточки: просмотры */
.card__stats { display: inline-flex; align-items: center; gap: 12px; }
.views { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }

/* Файлы */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.files--compact { gap: 2px; margin: 12px 0 10px; }
.file__main { display: flex; gap: 10px; align-items: flex-start; padding: 8px; margin: 0 -8px; border-radius: 10px; text-decoration: none; transition: background .2s; }
.file__main:hover { background: var(--glass-2); }
.file__icon { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--violet-soft); background: rgba(102, 58, 243, 0.16); box-shadow: inset 0 0 0 1px rgba(185, 165, 255, .2); }
.file__title { display: block; margin: 0; font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--text-head); }
.file__name { display: block; margin: 2px 0 0; font: 11.5px/1.4 var(--mono); color: var(--text-help); overflow-wrap: anywhere; }
.file--row { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius-card); background: var(--glass); box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(186, 214, 247, 0.06); }
.file--row .file__icon { width: 44px; height: 44px; border-radius: 12px; }
.file--row .file__title { font-size: 17px; }
.file__body { flex: 1; min-width: 0; }
.file__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 0; font-size: 13px; color: var(--text-help); }
.file__meta a { color: var(--text-muted); }
.link-more { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.link-more:hover { color: var(--white); }

/* Пост: автор, Telegram, файлы */
.post__by { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; font-size: 14px; color: var(--text-help); }
.post__by a:not(.btn) { color: var(--text-muted); }
.attach { margin-top: 36px; padding: 24px; border-radius: var(--radius-card); background: rgba(102, 58, 243, 0.08); box-shadow: inset 0 0 0 1px rgba(185, 165, 255, .22); }
.attach .muted { margin: 0 0 16px; font-size: 14.5px; }
.attach__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.attach__list li { display: flex; align-items: center; gap: 12px; }
.attach__list .file__name { flex: 1; margin: 0; font-size: 13px; color: var(--text); }

@media (max-width: 640px) {
  .file--row { flex-wrap: wrap; }
  .file--row .btn, .attach__list .btn { width: 100%; }
  .attach__list li { flex-wrap: wrap; }
}

/* ---- Полоса разделов над лентой: прилипает под шапкой ---- */
.feedbar {
  position: sticky; top: 64px; z-index: 20;
  display: grid; gap: 12px; margin: 0 -12px 20px; padding: 14px 12px 14px;
  border-radius: 0 0 14px 14px;
  transition: background .25s, box-shadow .25s;
}
.feedbar.is-stuck {
  background: rgba(5, 6, 15, 0.86);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .8), inset 0 -1px 0 var(--edge);
}
.feedbar__label { display: flex; align-items: center; gap: 16px; margin: 0; }
.feedbar__label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--edge), transparent); }
.feedbar .chips { margin: 0; }
.feedbar-sentinel { height: 1px; margin-bottom: -1px; }
.empty { padding: 24px 0; }

/* ---- Кейсы с цифрами: карточки ложатся стопкой ---- */
.cases { padding-bottom: 48px; }
.cases__head { margin-bottom: 24px; }
.cases__head .eyebrow { margin-bottom: 12px; }
.h2 {
  margin: 0; max-width: 720px; font-weight: 500; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #eef7fd 0%, #a9cbf2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cases__stack { display: grid; gap: 20px; }
.case {
  --cover: 0;
  position: sticky; top: calc(84px + var(--i) * 12px);
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 28px; align-items: center;
  min-height: 230px; padding: 24px 28px; border-radius: 18px;
  background:
    radial-gradient(ellipse 60% 90% at 0% 0%, rgba(102, 58, 243, 0.26), transparent 70%),
    linear-gradient(160deg, #12112a 0%, #0a0c1a 55%, #080a16 100%);
  box-shadow: var(--shadow-float), inset 0 0 0 1px var(--edge), 0 -18px 40px -10px rgba(0, 0, 0, .55);
  transform-origin: 50% 0;
  scale: calc(1 - var(--cover) * 0.06);
  filter: brightness(calc(1 - var(--cover) * 0.45));
  transition: box-shadow .25s;
}
.case:hover { box-shadow: var(--shadow-float), inset 0 0 0 1px var(--edge-strong), 0 -18px 40px -10px rgba(0, 0, 0, .55); }
.case__idx { display: block; margin-bottom: 12px; font: 12px/1 var(--mono); letter-spacing: .1em; color: var(--text-help); }
.case__value {
  margin: 0; font-weight: 500; font-size: clamp(40px, 4.4vw, 58px); line-height: 1; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #b9a5ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.case__label { margin: 10px 0 0; max-width: 220px; font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.case__body { display: grid; gap: 10px; }
.case__title { margin: 0; font-weight: 500; font-size: 19px; line-height: 1.25; color: var(--text-head); letter-spacing: -0.01em; }
.case__title a { text-decoration: none; }
.case__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.case__lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-help); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.case__cmp {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 2px; padding: 10px 12px;
  border-radius: 12px; background: rgba(8, 10, 22, 0.7); box-shadow: inset 0 0 0 1px var(--edge);
  font: 13px/1.3 var(--mono);
}
.case__metric { width: 100%; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-help); }
.case__before { color: var(--text-help); text-decoration: line-through; text-decoration-color: rgba(157, 167, 186, .6); }
.case__arrow { color: var(--violet-soft); }
.case__after { padding: 2px 8px; border-radius: 6px; color: var(--white); background: rgba(102, 58, 243, 0.4); }
.case__more { font-size: 14px; color: var(--text); }

/* Счётчики кейса: просмотры и реакции из Telegram. При появлении карточки
   цифры накручиваются с нуля, иконка «щёлкает» */
/* z-index: над растянутой ссылкой карточки, иначе кнопки не нажать */
.case__rx { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rx {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: var(--radius-pill);
  background: rgba(8, 10, 22, .6); box-shadow: inset 0 0 0 1px var(--edge);
  font: 500 13px/1 var(--mono); color: var(--text-head); font-variant-numeric: tabular-nums;
  transition: box-shadow .3s ease;
}
.rx { position: relative; }
.rx .icon { width: 15px; height: 15px; color: var(--text-muted); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1), fill .3s; }
.rx--like .icon { color: var(--blueprint); }
.rx--heart .icon { color: #e08cff; fill: rgba(224, 140, 255, .3); }

/* Лайк и сердечко без цифр: мягко пульсируют, приглашая отметить пост.
   Пульс — transform, свечение — opacity псевдоэлемента: всё на видеокарте */
.rx--icon { width: 30px; height: 26px; padding: 0; justify-content: center; cursor: pointer; user-select: none;
  animation: rx-pulse 2.6s ease-in-out infinite; }
.rx--heart.rx--icon { animation-delay: 1.3s; }
.rx--icon::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 16px rgba(140, 111, 247, .6), inset 0 0 0 1px rgba(185, 165, 255, .55);
  opacity: 0; animation: rx-glow 2.6s ease-in-out infinite; animation-delay: inherit; }
.rx--heart.rx--icon::after { box-shadow: 0 0 16px rgba(224, 140, 255, .55), inset 0 0 0 1px rgba(224, 140, 255, .6); }
@keyframes rx-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes rx-glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.rx--icon:hover, .rx--icon:focus-visible { animation-play-state: paused; transform: scale(1.18); }
.rx--icon:hover::after, .rx--icon:focus-visible::after { opacity: 1; animation-play-state: paused; }
.rx.is-pop { box-shadow: inset 0 0 0 1px rgba(185, 165, 255, .6), 0 0 22px rgba(102, 58, 243, .5); }
.rx.is-pop .icon { transform: scale(1.45) rotate(-10deg); }

/* Цифровой барабан: каждая цифра пролетает 0–9 несколько раз и встаёт на место */
.rx b { display: inline-flex; }
.dg { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.dg__strip { display: flex; flex-direction: column; will-change: transform;
  transition: transform var(--roll, 1.1s) cubic-bezier(.15, .85, .2, 1); }
.dg__strip span { display: block; height: 1em; }

/* Взрыв на финише: частицы разлетаются от капсулы */
.burst { position: absolute; left: 18px; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  pointer-events: none; background: currentColor; opacity: 0;
  animation: burst .75s cubic-bezier(.2, .7, .3, 1) forwards; }
.burst--heart { width: auto; height: auto; margin: -6px; background: none; font-size: 11px; line-height: 1; }
@keyframes burst {
  0%   { opacity: 1; transform: translate(0, 0) scale(.6); }
  100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(1.1); }
}
.case:hover .case__more { color: var(--violet-soft); }

/* ---- Лента: мягкая стопка. Карточка, уходящая под полосу разделов,
   уменьшается и темнеет; новые снизу поднимаются. Только там, где браузер
   умеет анимацию от прокрутки, — остальные листают обычную ленту. ---- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .grid .card {
      animation: card-in linear both, card-out linear both;
      animation-timeline: view(block 150px 0px), view(block 150px 0px);
      animation-range: entry 0% entry 80%, exit 0% exit 100%;
    }
  }
}
/* Уходящая карточка сжимается к своему верху и гаснет, не наезжая на соседей.
   Последние карточки ленты в стопку не уходят: ниже крутить некуда,
   и эффект застыл бы на полпути. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .grid .card.is-tail {
      animation: card-in linear both;
      animation-timeline: view(block 150px 0px);
      animation-range: entry 0% entry 80%;
    }
  }
}
.grid .card { transform-origin: 50% 0; }
@keyframes card-in { from { opacity: 0; translate: 0 36px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes card-out { from { opacity: 1; scale: 1; filter: none; } to { opacity: 0; scale: .9; filter: brightness(.55); } }

/* ---- Плашка поста: появляется вместо ушедшего заголовка ---- */
.post__main { position: relative; padding-bottom: 88px; }
.post > .cta { margin-top: 0; }
.postbar { position: sticky; top: 64px; z-index: 25; height: 0; }
.postbar__box {
  position: absolute; left: -12px; right: -12px; top: 0;
  display: flex; align-items: center; gap: 16px; padding: 10px 12px 12px;
  border-radius: 0 0 14px 14px;
  background: rgba(5, 6, 15, 0.95);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .8), inset 0 -1px 0 var(--edge);
  opacity: 0; translate: 0 -10px; pointer-events: none;
  transition: opacity .22s ease, translate .22s ease;
}
.postbar.is-on .postbar__box { opacity: 1; translate: 0 0; pointer-events: auto; }
.postbar__text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.postbar__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--text-help); }
.postbar__crumbs { display: flex; gap: 6px; }
.postbar__crumbs a { color: var(--text-muted); text-decoration: none; }
.postbar__crumbs a:hover { color: var(--white); }
.postbar__meta { display: inline-flex; align-items: center; gap: 10px; }
.postbar__meta .badge { padding: 1px 6px; font-size: 11px; }
.postbar__title { margin: 0; font-weight: 500; font-size: 16px; line-height: 1.3; color: var(--text-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.postbar__tg { flex: none; }
.postbar__progress { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; overflow: hidden; }
.postbar__progress i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet-soft)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
@media (max-width: 640px) {
  .postbar__box { left: -16px; right: -16px; padding: 8px 16px 10px; border-radius: 0; }
  .postbar__meta time, .postbar__tg span { display: none; }
  .postbar__title { font-size: 15px; }
}

/* ---- Пульт в боковой панели ---- */
.console { display: flex; flex-direction: column; gap: 14px; padding: 20px; max-height: calc(100vh - 112px); }
.console__top { flex: none; }
.console .dash__head { margin-bottom: 12px; }
.console .kpi { padding: 10px 12px; }
.console .kpi__value { font-size: 21px; margin-top: 4px; }
.console .dash__note { margin-top: 10px; }
.tabs { flex: none; display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: rgba(8, 10, 22, 0.85); box-shadow: inset 0 0 0 1px var(--edge); }
.tab {
  flex: 1; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; color: var(--text-help); font: 500 13px/1 var(--font); transition: background .2s, color .2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--white); background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--edge-strong); }
.console__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-right: -10px; padding-right: 10px; scrollbar-width: thin; scrollbar-color: rgba(186, 215, 247, .2) transparent; }
.console__body::-webkit-scrollbar { width: 6px; }
.console__body::-webkit-scrollbar-thumb { background: rgba(186, 215, 247, .2); border-radius: 3px; }
.console__panel + .console__panel { margin-top: 20px; }
.js .console__panel[data-inactive] { display: none; }
.console__panel .dash__chart:first-child { margin-top: 4px; }
.console__hint { margin: 0; font-size: 13px; color: var(--text-help); }
.console__block .panel__title { font-size: 16px; }
.console__block p { margin: 0; font-size: 14px; line-height: 1.5; }
.console__block .stack { margin-top: 14px; }
.console__block .btn--sm { margin-top: 12px; }
.console__block + .console__block { margin-top: 20px; padding-top: 20px; box-shadow: inset 0 1px 0 var(--edge); }
.console__foot { flex: none; display: flex; gap: 8px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--edge); }
.console__foot .btn--primary { flex: 1; }
@media (max-height: 620px) {
  .aside { position: static; }
  .console { max-height: none; }
}

@media (max-width: 960px) {
  .aside { position: static; grid-template-columns: 1fr; }
  .console { max-height: none; }
  .case { grid-template-columns: 1fr; gap: 20px; min-height: 0; padding: 28px; }
  /* на телефоне счётчики — в правом верхнем углу карточки, на уровне «01 / 05» */
  .case__num { position: relative; }
  .case__rx { position: absolute; top: -6px; right: 0; margin: 0; justify-content: flex-end; max-width: 62%; }
}
@media (max-width: 640px) {
  .feedbar { top: 64px; margin: 0 -16px 16px; padding: 12px 16px; border-radius: 0; }
  .feedbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .feedbar .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .case { top: calc(76px + var(--i) * 10px); padding: 22px 20px; border-radius: 18px; }
  .case__value { font-size: 52px; }
  .case__title { font-size: 20px; }
  .case__lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* На самых узких телефонах радар меньше, чтобы не наезжать на строки */
@media (max-width: 420px) {
  .radar { width: 70px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
