/* wwwroot/css/site.css — РМК Приёмная кампания.
 * Consolidated production design system (tokens+reset+components+motion).
 * No view-switching, no modal, no dark mode. Russian UI only. */

/* ── 0. Web fonts (self-hosted, SIL OFL 1.1) ──────────── */
/* Inter v4.1 (Inter Project Authors, 2016, OFL-1.1)         */
/*   https://github.com/rsms/inter                          */
/* Geist Mono v1.7.2 (Geist Project Authors, 2024, OFL-1.1)  */
/*   https://github.com/vercel/geist-font                   */
/* License texts in wwwroot/fonts/Inter-OFL.txt and         */
/* wwwroot/fonts/GeistMono-OFL.txt (verbatim upstream).     */
/* Files served as static assets at /fonts/*.woff2; no      */
/* external CDN, no third-party requests.                   */

/* family: Inter — body & UI text */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Inter-Bold.woff2") format("woff2");
}

/* family: Geist Mono — monospaced text (code, SNILS, numeric pads) */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/GeistMono-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/GeistMono-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/GeistMono-Bold.woff2") format("woff2");
}

/* ── 1. Reset ─────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  /* Фикс горизонтальной прокрутки: декоративные absolute-псевдоэлементы
   * с отрицательным inset (например, .hero::before — inset: 0 -360px 0 0)
   * физически выходят за границы body — без overflow-x: hidden на html
   * документ-скроллбар появляется (≈260px при viewport=1440). Sticky на
   * .topbar сохраняется: overflow-x: hidden не превращает html в scroll
   * container (overflow-y остаётся в auto, html остаётся viewport-скроллером).
   * Вертикальный скролл не затрагивается. */
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--c-bg);
  color: var(--c-ink);
}

ul[role="list"],
ol[role="list"],
ul.reset,
ol.reset {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Focus ring — only on keyboard nav. */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection {
  background: var(--c-primary-soft);
  color: var(--c-primary-deep);
}

/* Visually hidden — for screen-reader-only labels. */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — bypasses repeated nav blocks for keyboard users. */
.skip-link {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 100;
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--c-on-primary);
  background: var(--c-primary);
  border: 1px solid var(--c-primary-deep);
  border-radius: var(--r-2);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--d-fast) var(--ease-out);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ── 2. Design tokens (:root) ─────────────────────────── */

:root {
  /* Surfaces */
  --c-bg: #F6F9FA;
  --c-bg-alt: #ECF2F3;
  --c-surface: #FFFFFF;
  --c-surface-2: #F8FAFB;
  --c-surface-tint: #F0FDFA;

  /* Lines */
  --c-line: #E2E8F0;
  --c-line-2: #CBD5E1;
  --c-line-3: #94A3B8;

  /* Ink */
  --c-ink: #0B1220;
  --c-ink-2: #475569;
  --c-ink-3: #64748B;
  --c-ink-4: #94A3B8;
  --c-on-primary: #FFFFFF;
  --c-on-primary-soft: #B8390B;

  /* Brand */
  --c-primary: #E95C20;
  --c-primary-deep: #B8390B;
  --c-primary-soft: #FEE7D6;
  --c-primary-tint: #FFF5EE;
  --c-primary-tint-2: #FFE9D6;
  --c-accent: #DB372C;
  --c-focus: #DB372C;

  /* Semantic */
  --c-success: #059669;
  --c-success-soft: #D1FAE5;
  --c-warning: #D97706;
  --c-warning-soft: #FEF3C7;
  --c-danger: #DC2626;
  --c-danger-soft: #FEE2E2;

  /* Specialty accents — mirrors data, kept in tokens for static reference. */
  --c-spec-pulse: #E63946;
  --c-spec-stethoscope: #2563EB;
  --c-spec-heart: #EC4899;
  --c-spec-pill: #7C3AED;
  --c-spec-flask: #059669;

  /* Type — self-hosted Inter + Geist Mono under SIL OFL 1.1. */
  /*   See wwwroot/fonts/Inter-OFL.txt and                */
  /*        wwwroot/fonts/GeistMono-OFL.txt                */
  /*   for license texts. Inter primary, system fallbacks */
  /*   activate only if woff2 files fail to load.          */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Modular scale, fluid for display. */
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-hero-md: clamp(2.75rem, 6vw, 4.5rem);
  --fs-counter: clamp(2.5rem, 4.5vw, 3.75rem);

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-body: 1.55;

  --ls-tight: -0.025em;
  --ls-snug: -0.01em;
  --ls-normal: 0;
  --ls-wide: 0.02em;

  /* Radii — capped at 20px (no ghost-cards). */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 20px;

  /* Spacing — 4-based scale. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 96px;

  /* Shadows — one layer only by default. */
  --sh-border: inset 0 0 0 1px var(--c-line);
  --sh-1: 0 1px 2px rgba(11, 18, 32, 0.05);
  --sh-2: 0 2px 4px rgba(11, 18, 32, 0.06), 0 1px 2px rgba(11, 18, 32, 0.04);
  --sh-3: 0 8px 20px -8px rgba(233, 92, 32, 0.20), 0 2px 6px rgba(11, 18, 32, 0.06);
  --sh-sticky: 0 4px 12px -6px rgba(11, 18, 32, 0.08);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast: 140ms;
  --d-mid: 220ms;
  --d-slow: 480ms;
  --d-row: 320ms;
  --d-counter: 1400ms;

  /* Layout */
  --container: 1240px;
  --container-pad: clamp(20px, 4vw, 48px);

  /* z-index */
  --z-sticky: 100;
  --z-dropdown: 200;

  color-scheme: light;
}

/* ── 3. Base styles ───────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-ink);
}

h2, h3, h4 {
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}

a:hover,
a:focus-visible {
  color: var(--c-primary-deep);
}

/* Reduced motion — global rule, kept near base so motion section can extend. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 4. Layout primitives ────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.tabular {
  font-variant-numeric: tabular-nums lining-nums;
}

[hidden] {
  display: none !important;
}

/* ── 5. Topbar ────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklab, var(--c-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--d-mid) var(--ease-out),
              background-color var(--d-mid) var(--ease-out);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
  color: inherit;
}

.brand__mark {
  width: 40px;
  height: 40px;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-14);
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
}

.brand__sub {
  font-weight: var(--fw-medium);
  font-size: var(--fs-12);
  letter-spacing: var(--ls-wide);
  color: var(--c-ink-3);
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-inline-start: auto;
  margin-inline-end: var(--s-3);
}

.topbar__nav a {
  position: relative;
  padding: 6px 2px;
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--c-ink-2);
  transition: color var(--d-fast) var(--ease-out);
}

.topbar__nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-mid) var(--ease-out);
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--c-primary-deep);
}
.topbar__nav a:hover::after,
.topbar__nav a:focus-visible::after {
  transform: scaleX(1);
}

.topbar__nav a[aria-current="page"] {
  color: var(--c-primary-deep);
}
.topbar__nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (max-width: 720px) {
  .topbar__nav { display: none; }
}

@media (max-width: 540px) {
  .topbar__inner { gap: var(--s-3); }
  .brand__text { display: none; }
}

@media (max-width: 360px) {
  .topbar .btn--primary > .btn-icon { display: none; }
}

/* ── 6. Buttons ───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 16px;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: -0.005em;
  border-radius: var(--r-2);
  background: var(--c-surface);
  color: var(--c-ink);
  border: 1px solid var(--c-line);
  transition: background-color var(--d-fast) var(--ease-out),
              color var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              box-shadow var(--d-fast) var(--ease-out),
              transform var(--d-fast) var(--ease-out);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--c-line-2);
  background: var(--c-surface-2);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--c-primary);
  color: var(--c-on-primary);
  border-color: var(--c-primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset,
              0 6px 14px -8px rgba(233, 92, 32, 0.55);
}
.btn--primary:hover {
  background: var(--c-primary-deep);
  border-color: var(--c-primary-deep);
  color: var(--c-on-primary);
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-line);
}
.btn--ghost:hover {
  background: var(--c-primary-tint);
  border-color: var(--c-primary-soft);
  color: var(--c-primary-deep);
}

.btn--sm {
  padding: 6px 12px;
  font-size: var(--fs-13);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Override .btn's display: inline-flex for the topbar rating CTA.
   MUST live AFTER the .btn block (cascade tie-break by source order
   on equal specificity). Hides the link on desktop; reveals it on mobile. */
.topbar__rating-mobile { display: none; }

@media (max-width: 720px) {
  .topbar__rating-mobile { display: inline-flex; }
}

/* ── 7. Chips ─────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
  color: var(--c-ink-2);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  transition: background-color var(--d-fast) var(--ease-out),
              color var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              transform var(--d-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  border-color: var(--c-line-2);
  color: var(--c-ink);
}
.chip:active {
  transform: translateY(1px);
}
.chip--active {
  background: var(--c-primary-soft);
  border-color: var(--c-primary-soft);
  color: var(--c-primary-deep);
}
.chip--active:hover {
  background: var(--c-primary-soft);
  color: var(--c-primary-deep);
}
.chip:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

.chip__count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 0 5px;
  min-width: 20px;
  text-align: center;
  border-radius: 6px;
  background: rgba(233, 92, 32, 0.08);
  color: var(--c-ink-2);
}
.chip--active .chip__count {
  background: rgba(184, 57, 11, 0.18);
  color: var(--c-primary-deep);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.chip-row .chip {
  min-height: 30px;
  padding: 5px 11px;
}

/* ── 8. Hero ──────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-7);
  align-items: end;
  padding-block: clamp(56px, 9vw, 112px);
  isolation: isolate;
}

/* Soft brand-tinted radial wash behind content. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      900px 500px at 78% 35%,
      color-mix(in oklab, var(--c-primary-soft) 70%, transparent) 0%,
      transparent 65%
    ),
    radial-gradient(
      720px 420px at 18% 90%,
      color-mix(in oklab, var(--c-primary-tint) 70%, transparent) 0%,
      transparent 60%
    );
  /* No bleed (inset:0) keeps the wash inside the hero → no horizontal overflow
     on any viewport. A right-edge mask melts the wash to transparent before the
     hero's right border, so there is no hard clip line — the right brand blob
     peaks ~78% then fades out, mirroring the original off-canvas look.
     White→transparent is opaque under both alpha and luminance mask modes. */
  -webkit-mask-image: linear-gradient(to right, #fff 0%, #fff 78%, transparent 100%);
  mask-image: linear-gradient(to right, #fff 0%, #fff 78%, transparent 100%);
  pointer-events: none;
}

/* Hairline bottom edge of the hero. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto var(--container-pad) 0 var(--container-pad);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--c-line) 20%,
    var(--c-line) 80%,
    transparent 100%
  );
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-block: clamp(40px, 8vw, 72px);
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--s-4);
}
.hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero__title {
  font-size: var(--fs-hero-md);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-ink);
  text-wrap: balance;
  margin-bottom: var(--s-4);
  max-width: 18ch;
}

.hero__sub {
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  color: var(--c-ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero__sub strong {
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}

/* ECG motif — QRS line as medical fingerprint. */
.hero__ecg {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 32px;
  color: var(--c-primary);
  opacity: 0.45;
  margin: var(--s-4) 0 var(--s-5);
}
.hero__ecg-beat {
  offset-path: path("M0 16 L90 16 L95 14 L100 4 L105 28 L110 18 L115 16 L240 16");
  offset-rotate: 0deg;
  offset-distance: 39%;
  animation: ecg-sweep 1s linear infinite;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-self: end;
}

@media (max-width: 860px) {
  .hero__stats { gap: var(--s-3); }
}
@media (max-width: 480px) {
  .hero__stats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) and (min-width: 481px) {
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero-stat:nth-child(3) { grid-column: span 2; }
}

.hero-stat {
  position: relative;
  padding: var(--s-4) var(--s-3) var(--s-3);
  border-top: 1px solid var(--c-line);
}
.hero-stat + .hero-stat {
  border-top: 1px solid var(--c-line);
}

.hero-stat__num {
  font-family: var(--font-mono);
  font-size: var(--fs-counter);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-2);
  display: inline-block;
}

.hero-stat__label {
  font-size: var(--fs-13);
  line-height: 1.3;
  color: var(--c-ink-3);
  max-width: 16ch;
}

/* Live indicator. */
.live-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  margin-right: var(--s-2);
  flex: 0 0 auto;
  animation: pulse-soft 1800ms ease-in-out infinite;
}

/* ── 9. Sections ──────────────────────────────────────── */

.section {
  padding-block: clamp(56px, 8vw, 96px);
}
.section--alt {
  background: var(--c-bg-alt);
  border-block: 1px solid var(--c-line);
}

.section-head {
  max-width: 70ch;
  margin-bottom: var(--s-7);
}

.section-title {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
  text-wrap: balance;
  margin-bottom: var(--s-3);
}
.section-title--sm {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  margin-bottom: var(--s-5);
}

.section-sub {
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  color: var(--c-ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ── 10. Figures table (КЦП) ─────────────────────────── */

.figures__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.figures__head .section-head {
  margin-bottom: 0;
}

.figures__filters {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  /* min-width:0 lets this flex item shrink inside .figures__head so the chips
     can actually wrap on narrow viewports (inline-flex would size to content
     and overflow on mobile, ignoring flex-wrap). */
  min-width: 0;
}

.figures-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  overflow: hidden;
}

.figures-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.figures-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.figures-table col.col-name   { width: 38%; }
.figures-table col.col-num    { width: 15.5%; }

/* Two-tier thead: group + fin. */
.figures-table thead th {
  text-align: left;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-13);
  color: var(--c-ink-2);
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  padding: 10px 14px;
  vertical-align: middle;
}
.figures-table thead th.figures-th-name {
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  background: var(--c-surface);
  border-right: 1px solid var(--c-line);
  vertical-align: bottom;
}
.figures-table thead th.figures-th-group {
  text-align: center;
  font-size: var(--fs-13);
  color: var(--c-ink);
  background: var(--c-primary-tint);
}
.figures-table thead th.figures-th-group--grade9 {
  background: var(--c-primary-tint);
}
.figures-table thead th.figures-th-group--grade11 {
  background: var(--c-primary-tint-2);
  border-left: 1px solid var(--c-line);
}
.figures-table thead th.figures-th-group .figures-th-grade {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.figures-table thead th.figures-th-group .figures-th-grade::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
}
.figures-table thead th.figures-th-group--grade11 .figures-th-grade::before {
  background: var(--c-accent);
}
.figures-table thead tr + tr th.figures-th-fin {
  font-size: var(--fs-13);
  text-align: center;
  font-weight: var(--fw-semibold);
  color: var(--c-primary-deep);
  background: var(--c-primary-tint);
  padding-block: 12px;
  vertical-align: middle;
}
.figures-table thead tr + tr th.figures-th-fin .figures-th-fin-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c-primary);
  margin-right: 6px;
  vertical-align: 1px;
}
.figures-table thead tr + tr th.figures-th-fin--alt {
  border-left: 1px solid var(--c-line);
  background: color-mix(in oklab, var(--c-accent) 8%, var(--c-surface));
  color: var(--c-accent);
}
.figures-table thead tr + tr th.figures-th-fin--alt .figures-th-fin-dot {
  background: var(--c-accent);
}

/* Body. */
.figures-table tbody td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: middle;
  background: var(--c-surface);
}
.figures-table tbody tr:last-child td {
  border-bottom: none;
}

.figures-tr td:first-child {
  position: relative;
  border-left: 3px solid var(--row-accent, var(--c-primary));
}
.figures-table tbody tr.figures-tr:hover td {
  background: var(--c-primary-tint);
}
.figures-table tbody tr.figures-tr:hover td:first-child {
  border-left-width: 4px;
}
.figures-tr[data-grade-hidden="1"] {
  display: none;
}

.figures-name {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.figures-name__code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--c-primary-deep);
  background: var(--c-primary-soft);
  padding: 4px 8px;
  border-radius: var(--r-1);
  white-space: nowrap;
  flex-shrink: 0;
}
.figures-name__text {
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--c-ink);
  letter-spacing: var(--ls-snug);
}

.figures-td-num {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.figures-td-num--budget {
  font-weight: 500;
}
.figures-td-num--dash {
  color: var(--c-ink-4);
  font-weight: 400;
}
.figures-td-num--alt {
  border-left: 1px solid var(--c-line);
}

.figures-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.figures-cell__bar {
  height: 3px;
  width: 36px;
  background: var(--c-line);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.figures-cell__bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 100%;
  background: var(--c-primary);
  border-radius: 2px;
}
.figures-cell__bar--over > span {
  background: var(--c-warning);
}
.figures-cell__bar--danger > span {
  background: var(--c-danger);
}

/* Branch band row — sticky uppercase band separating филиалы. */
.figures-branch-band th {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary-deep);
  background: color-mix(in oklab, var(--c-primary-soft) 65%, var(--c-surface));
  padding: 10px 12px;
  text-align: left;
  border-block: 1px solid color-mix(in oklab, var(--c-primary) 18%, transparent);
  position: sticky;
  top: var(--topbar-h, 0px);
  z-index: 1;
}
.figures-branch-band.is-hidden,
.figures-branch-band[hidden] {
  display: none;
}

.figures__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-4);
  font-size: var(--fs-13);
  color: var(--c-ink-3);
  line-height: 1.4;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c-line-2);
  flex: 0 0 auto;
}
.legend-dot--budget { background: var(--c-primary); }
.legend-dot--paid   { background: var(--c-accent); }
.legend-dot--dash   { background: var(--c-line-2); }
.legend-sep { color: var(--c-line-2); }

@media (max-width: 540px) {
  .figures-panel { border-radius: var(--r-2); }
  .figures-table thead th { padding: 8px 10px; }
  .figures-table tbody td { padding: 12px 10px; }
  .figures-name { gap: var(--s-2); }
}

/* ── 11. Submitted cards (Подано) ────────────────────── */

.submitted-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}

.submitted-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  overflow: hidden;
  transition: border-color var(--d-fast) var(--ease-out),
              background-color var(--d-fast) var(--ease-out),
              transform var(--d-mid) var(--ease-out),
              box-shadow var(--d-mid) var(--ease-out);
}
.submitted-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--card-accent, var(--c-primary));
  transition: height var(--d-fast) var(--ease-out);
}
.submitted-card:hover {
  border-color: var(--card-accent, var(--c-primary));
  background: color-mix(in oklab, var(--c-surface) 92%, var(--c-bg-alt) 8%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -10px color-mix(in oklab, var(--card-accent, var(--c-primary)) 50%, transparent),
              0 1px 2px rgba(11, 18, 32, 0.04);
}
.submitted-card:hover::before {
  height: 4px;
}

.submitted-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.submitted-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-2);
  background: color-mix(in oklab, var(--c-surface) 60%, var(--card-accent, var(--c-primary)) 18%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--c-primary));
}
.submitted-card__icon svg {
  width: 18px;
  height: 18px;
}
.submitted-card__code {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-ink-3);
  text-transform: uppercase;
}
.submitted-card__name {
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--c-ink);
  letter-spacing: var(--ls-snug);
}

.submitted-card__count {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.submitted-card__count-num {
  font-size: clamp(2rem, 4vw, 2.625rem);
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.04em;
  line-height: 1;
}
.submitted-card__count-unit {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--c-ink-3);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* Meta block: «Бюджет N/M» + «Внебюджет N/M».
 * Генерируется в page-home.js#buildSubmittedCard; тот же макет используется
 * в index.html как статичный placeholder пока API ещё не ответил.
 * 2 строки (label / value), разделитель сверху. */
.submitted-card__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: var(--s-2);
  padding: var(--s-3) 0 0;
  margin-top: auto;
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-13);
}
.submitted-card__meta-row {
  display: contents;
}
.submitted-card__meta-label {
  color: var(--c-ink-3);
  font-weight: 500;
}
.submitted-card__meta-val {
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.submitted-card__meta-val--dash {
  color: var(--c-ink-4);
  font-weight: 400;
}

.submitted-card__branches {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  font-size: var(--fs-12);
  color: var(--c-ink-3);
  flex-wrap: wrap;
}
.submitted-card__branches-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  flex-shrink: 0;
}
.submitted-card__branches-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  color: var(--c-ink-2);
}
.submitted-card__branch {
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--c-ink-2);
  padding: 2px 8px;
  background: color-mix(in oklab, var(--c-bg-alt) 70%, transparent);
  border-radius: var(--r-1);
  white-space: nowrap;
}

/* ── 12. Branches (Филиалы) ──────────────────────────── */

.branches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .branches-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .branches-grid { grid-template-columns: repeat(3, 1fr); }
}

.branch-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color var(--d-fast) var(--ease-out),
              background-color var(--d-fast) var(--ease-out);
}
.branch-card:hover {
  border-color: var(--c-primary);
}

.branch-card__name {
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  letter-spacing: var(--ls-snug);
  line-height: 1.25;
  margin: 0;
}
.branch-card__city {
  font-size: var(--fs-13);
  color: var(--c-ink-3);
  margin: 0;
  line-height: 1.4;
}
.branch-card__props {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px var(--s-3);
  font-size: var(--fs-13);
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line);
}
.branch-card__prop-key {
  color: var(--c-ink-3);
  font-weight: 500;
}
.branch-card__prop-val {
  color: var(--c-ink);
}
.branch-card__prop-val a {
  color: var(--c-primary-deep);
}
.branch-card__prop-val a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 13. Rating toolbar + bands + table ──────────────── */

.rating-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
  background: var(--c-surface);
  border-radius: var(--r-3);
  box-shadow: var(--sh-border), var(--sh-1);
}

.rating-search {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}
.rating-search .field__input {
  flex: 1 1 240px;
  min-width: 0;
  height: 44px;
  padding: 0 var(--s-4);
  font-size: var(--fs-14);
}
.rating-search .btn {
  height: 44px;
  padding: 0 18px;
}

.rating-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-5);
  align-items: center;
}

.rating-filter {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.rating-filter__label {
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--c-ink-3);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

/* Доп. фильтры: лейбл сверху, тогглы (горизонтальный ряд пиллов) под ним.
 * Зеркалит ритм обычных .rating-filter (Филиал/Специальность/Уровень/Финансирование).
 * На ≤720px лейбл получает display:block + margin-bottom:6px из общей media-query ниже. */
.rating-filter--toggles {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
}
.rating-filter--toggles .rating-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.rating-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              color var(--d-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.rating-toggle:hover {
  background: var(--c-surface-2);
  border-color: var(--c-line-2);
}
.rating-toggle[aria-pressed="true"] {
  background: var(--c-primary-soft);
  border-color: var(--c-primary);
  color: var(--c-primary-deep);
  font-weight: var(--fw-semibold);
}
.rating-toggle[aria-pressed="true"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
}
.rating-toggle:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

/* Reset-действие вынесено из flex-row .rating-filters под все фильтры.
 * Выравниваем по левому краю flex-column родителя (.rating-toolbar). */
.rating-reset {
  align-self: flex-start;
}

.rating-summary {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--c-ink-3);
}

.rating-shell {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.rating-band {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  overflow: hidden;
}

.rating-band__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg-alt);
}
.rating-band__title {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
  margin: 0;
}
.rating-band__count {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--c-ink-3);
  white-space: nowrap;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  /* Fixed-layout: column widths заданы явно → все .rating-table имеют
     идентичную геометрию колонок независимо от контента. Без этого бэнды
     с льготниками ("Преимущественное право" в "Балл") получали широкую
     колонку Балл (343px) и узкие остальные, а бэнды без льготников —
     наоборот (Балл 133px, остальные растянуты до 456px). Колонки
     "прыгали" между бэндами на одной странице. */
  table-layout: fixed;
}
.rating-table thead th {
  padding: 10px var(--s-4);
  text-align: left;
  font-weight: var(--fw-semibold);
  color: var(--c-ink-2);
  font-size: var(--fs-12);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.rating-table tbody td {
  padding: 10px var(--s-4);
  border-bottom: 1px solid var(--c-line);
  vertical-align: middle;
  color: var(--c-ink);
  background: var(--c-surface);
}
.rating-band .rating-table tbody tr:last-child td {
  border-bottom: 0;
}

.rating-td-num {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  width: 6%;
}
.rating-td-num--top {
  color: var(--c-primary-deep);
  font-weight: var(--fw-bold);
}
.rating-td-snils {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.04em;
  white-space: nowrap;
  width: 22%;
}
.rating-td-priority {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--c-ink-2);
  white-space: nowrap;
  width: 10%;
}
.rating-td-score {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-align: left;
  white-space: normal;
  width: 22%;
}
.rating-td-score--top {
  color: var(--c-primary-deep);
  font-weight: var(--fw-bold);
}
.rating-td-cert {
  white-space: nowrap;
  width: 40%;
}

.rating-row {
  transition: background-color var(--d-fast) var(--ease-out);
}
.rating-row:hover td {
  background: var(--c-primary-tint);
}
.rating-row:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -2px;
}
.rating-row--me td {
  background: color-mix(in oklab, var(--c-primary-soft) 70%, var(--c-surface) 30%);
}
.rating-row--me {
  outline: 2px solid var(--c-primary);
  outline-offset: -2px;
}

/* Mobile cards (cards-on-mobile for rating). */
.rating-card-list {
  display: none;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-3);
}

.rating-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-2);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.rating-card--me {
  outline: 2px solid var(--c-primary);
  background: color-mix(in oklab, var(--c-primary-soft) 70%, var(--c-surface) 30%);
}
.rating-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
}
.rating-card__num {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--c-ink-3);
}
.rating-card__num--top {
  color: var(--c-primary-deep);
  font-weight: var(--fw-bold);
}
.rating-card__score {
  font-family: var(--font-mono);
  font-size: var(--fs-20);
  font-weight: 700;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
}
.rating-card__score--top {
  color: var(--c-primary-deep);
}
.rating-card__snils {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-ink);
}
.rating-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-13);
  color: var(--c-ink-2);
  gap: var(--s-3);
}
.rating-card__row-label {
  color: var(--c-ink-3);
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rating-empty {
  padding: var(--s-8) var(--s-5);
  text-align: center;
  color: var(--c-ink-3);
}
.rating-empty p {
  font-size: var(--fs-14);
  margin: 0;
}
.rating-empty .btn {
  margin-top: var(--s-4);
}

/* Rating responsive: cards on mobile, table on desktop. */
@media (max-width: 720px) {
  .rating-search { flex: 1 1 100%; }
  .rating-filters { gap: var(--s-3); }
  .rating-filter__label {
    display: block;
    margin-bottom: 6px;
  }
  .chip-row { gap: 4px; }
  .chip-row .chip { padding: 5px 10px; font-size: var(--fs-13); }
  .rating-toggle { padding: 5px 10px; font-size: var(--fs-13); }
}
@media (max-width: 540px) {
  .rating-band .rating-table-scroll { display: none; }
  .rating-band .rating-card-list { display: flex; }
  .rating-band .rating-table { display: none; }
}

/* ── 14. Cabinet ─────────────────────────────────────── */

.cabinet {
  padding-bottom: var(--s-8);
}

.cabinet-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklab, var(--c-bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--c-line);
  padding-block: var(--s-3);
}
.cabinet-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.cabinet-topbar__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-band {
  position: relative;
  padding-block: clamp(40px, 6vw, 64px);
  background:
    radial-gradient(800px 300px at 80% 0%, color-mix(in oklab, var(--c-primary-soft) 70%, transparent), transparent 65%),
    linear-gradient(180deg, var(--c-primary-tint) 0%, color-mix(in oklab, var(--c-primary-tint) 50%, var(--c-bg)) 100%);
  border-bottom: 1px solid var(--c-line);
  isolation: isolate;
}
.profile-band::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--c-line) 25%,
    var(--c-line) 75%,
    transparent 100%
  );
  pointer-events: none;
}

.profile-band__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--s-5);
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
  color: var(--c-ink-3);
  padding: 4px 8px 4px 6px;
  margin-left: -8px;
  border-radius: var(--r-1);
  transition: color var(--d-fast) var(--ease-out),
              background-color var(--d-fast) var(--ease-out);
}
.profile-band__back:hover {
  color: var(--c-primary-deep);
  background: color-mix(in oklab, var(--c-primary-soft) 50%, transparent);
}
.profile-band__back svg {
  width: 14px;
  height: 14px;
}

.profile-greeting {
  font-size: clamp(1.625rem, 3.6vw, 2.5rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
  text-wrap: balance;
  margin: 0 0 var(--s-2);
  max-width: 22ch;
}

.profile-snils {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--c-ink-3);
  letter-spacing: 0.06em;
  margin: 0 0 var(--s-6);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-snils__label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-band__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px dashed color-mix(in oklab, var(--c-primary-deep) 24%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--c-ink-3);
  letter-spacing: 0.02em;
}

.live-dot--ink {
  background: var(--c-primary-deep);
  margin-right: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
@media (max-width: 720px) {
  .profile-stats { grid-template-columns: 1fr; }
}

.profile-stat {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.profile-stat__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.profile-stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.625rem, 3.2vw, 2rem);
  font-weight: 700;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-stat__value--accent {
  color: var(--c-primary-deep);
}
.profile-stat__value--sub {
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--c-ink-2);
  letter-spacing: 0;
  font-family: var(--font-ui);
  font-style: normal;
  line-height: 1.3;
}

/* Sub-строка под основным значением profile-stat. §14.1: «Запланировано
 * мест: N» под «Место в рейтинге». Контекст уже задан visually-hidden span'ом
 * в разметке — здесь только визуальный стиль. font-family: UI (не mono) — sub
 * читается как пояснение, не как «число». word-wrap: break-word для длинных
 * значений на ≤360px; max-width: 100% чтобы не вылезало за карточку. */
.profile-stat__sub {
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--c-ink-3);
  letter-spacing: 0;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Override крупной моно-плашки для случая, когда значение скрыто (льготник).
   «Преимущественное право» не влезает в 26-32px mono с nowrap → переключаемся
   на обычный UI-шрифт, разрешаем перенос, уменьшаем размер. */
.profile-stat__value--benefit {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--c-primary-deep);
  font-family: var(--font-ui);
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.profile-band__bonus-grid {
  margin-top: var(--s-5);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .profile-band__bonus-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-4);
  }
}

.profile-bonus {
  background: color-mix(in oklab, var(--c-surface) 80%, transparent);
  border: 1px solid color-mix(in oklab, var(--c-primary-deep) 12%, var(--c-line));
  border-radius: var(--r-3);
  padding: var(--s-4) var(--s-5);
  min-width: 0;
}
.profile-bonus--psych {
  border-left: 3px solid var(--c-primary);
}
.profile-bonus--cert {
  border-left: 3px solid var(--c-primary-deep);
}
.profile-bonus__row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}
.profile-bonus__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--c-primary-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-bonus__icon svg {
  width: 100%;
  height: 100%;
}
.profile-bonus__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.profile-bonus__val {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--c-ink);
  margin-left: auto;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-bonus__val--muted {
  color: var(--c-ink-4);
  font-style: italic;
  font-weight: 500;
}
@media (max-width: 720px) {
  .profile-bonus__val {
    margin-left: 0;
    text-align: left;
    flex-basis: 100%;
  }
}

/* Applications. */
.applications {
  padding-block: clamp(48px, 7vw, 80px);
}

.applications__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.applications__title {
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
  text-wrap: balance;
  margin: 0;
}
.applications__hint {
  font-size: var(--fs-13);
  color: var(--c-ink-3);
}

.applications__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 880px) {
  .applications__list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1120px) {
  .applications__list { grid-template-columns: repeat(3, 1fr); }
}

.application-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-3);
  padding: var(--s-5) var(--s-4) var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  overflow: hidden;
  transition: border-color var(--d-fast) var(--ease-out),
              background-color var(--d-fast) var(--ease-out),
              transform var(--d-mid) var(--ease-out),
              box-shadow var(--d-mid) var(--ease-out);
}
.application-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--card-accent, var(--c-primary));
  transition: height var(--d-fast) var(--ease-out);
}
.application-card:hover {
  border-color: var(--card-accent, var(--c-primary));
  background: color-mix(in oklab, var(--c-surface) 92%, var(--c-bg-alt) 8%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -10px color-mix(in oklab, var(--card-accent, var(--c-primary)) 50%, transparent),
              0 1px 2px rgba(11, 18, 32, 0.04);
}
.application-card:hover::before {
  height: 4px;
}

.application-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  min-width: 0;
}
.application-card__id {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.application-card__code {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--c-primary-deep);
  text-transform: uppercase;
}
.application-card__name {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  letter-spacing: var(--ls-snug);
  line-height: 1.25;
  text-wrap: balance;
}
.application-card__city {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--c-ink-3);
  line-height: 1.3;
  text-transform: none;
  margin-top: 2px;
}
.application-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.application-card__place {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line);
}
.application-card__place-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--c-ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.application-card__place-value {
  /* Стек без разделителя: rank (крупный mono) — первой строкой, places
   * (UI-шрифт, secondary muted) — строкой ниже. Раньше был U+00B7 MIDDLE DOT
   * в одной строке через flex-wrap — убран mini-fix'ом 2026-07-09: «12 / 14 ·»
   * воспринималось как оборванная строка на пустых льготных карточках.
   * align-items: flex-start выравнивает левый край; маленький gap задаёт
   * иерархическую связку rank↔sub без визуальной путаницы. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25em;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.4vw, 1.75rem);
  font-weight: 700;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
/* Применяется к <span>-обёртке rank'а внутри flex-контейнера (см. §14.1:
 * --top акцент только на ранге, не на places). color: var(--c-primary-deep)
 * остаётся единственным семантическим сигналом top-5. */
.application-card__place-value--top {
  color: var(--c-primary-deep);
}
/* Sub-фрагмент «Запланировано мест: N» внутри flex-строки. UI-шрифт, размер
 * ниже rank'а — иерархия «главное число + пояснение», а не две равные строки.
 * muted color сохраняет «вторичность» числа. */
.application-card__place-places {
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--c-ink-2);
  letter-spacing: 0;
  line-height: 1.3;
}

.application-card__psych {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-ink-3);
  margin-top: auto;
  padding-top: 2px;
  letter-spacing: 0;
  line-height: 1.4;
}
.application-card__psych svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.85;
}
.application-card__psych-muted {
  color: var(--c-ink-4);
  font-style: italic;
}
.application-card__psych:has(.application-card__psych-muted) {
  opacity: 0.62;
  color: var(--c-ink-4);
}

/* ── 15. Form + SNILS input ──────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.field__label {
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  color: var(--c-ink-2);
}
.field__input {
  width: 100%;
  height: 48px;
  padding: 0 var(--s-4);
  font-family: var(--font-ui);
  font-size: var(--fs-16);
  font-weight: var(--fw-medium);
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line-2);
  border-radius: var(--r-2);
  transition: border-color var(--d-fast) var(--ease-out),
              box-shadow var(--d-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder {
  color: var(--c-ink-4);
  font-weight: var(--fw-regular);
}
.field__input:hover {
  border-color: var(--c-line-3);
}
.field__input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-primary) 18%, transparent);
}
.field__hint {
  font-size: var(--fs-12);
  color: var(--c-ink-3);
  line-height: 1.4;
}
.field__error {
  display: none;
  font-size: var(--fs-12);
  color: var(--c-danger);
  font-weight: var(--fw-medium);
  line-height: 1.4;
}
.field--error .field__input {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--c-danger) 14%, transparent);
}
.field--error .field__error {
  display: flex;
  align-items: center;
  gap: 6px;
}
.field--error .field__hint {
  display: none;
}
.field--shake {
  animation: shake 360ms var(--ease-in-out);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(2px); }
}

/* SNILS input — mono, large, tabular, centered. */
.snils-input {
  font-family: var(--font-mono);
  font-size: var(--fs-20);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  height: 56px;
  padding: 0 var(--s-3);
}
.snils-input::placeholder {
  color: var(--c-ink-4);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ── 16. Badges + Pills ──────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge--primary {
  background: var(--c-primary);
  color: var(--c-on-primary);
}
.badge--outline {
  background: var(--c-surface);
  color: var(--c-ink-2);
  border: 1px solid var(--c-line-2);
}
.badge--benefit {
  background: var(--c-warning-soft);
  color: var(--c-warning);
  border: 1px solid color-mix(in oklab, var(--c-warning) 22%, transparent);
}
.badge--success {
  background: var(--c-success-soft);
  color: var(--c-success);
}
.badge__dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge--numbered {
  padding-left: 5px;
  gap: 6px;
}
.badge__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 16px;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 4px;
  background: color-mix(in oklab, currentColor 22%, transparent);
  text-transform: none;
}
.badge--outline .badge__num {
  color: var(--c-ink-2);
  background: var(--c-bg-alt);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-ink-2);
  background: var(--c-bg-alt);
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}
.pill--budget {
  background: var(--c-primary-soft);
  color: var(--c-primary-deep);
}
.pill--paid {
  background: color-mix(in oklab, var(--c-accent) 10%, var(--c-surface));
  color: var(--c-accent);
}
.pill--original {
  background: var(--c-success-soft);
  color: var(--c-success);
  border: 1px solid color-mix(in oklab, var(--c-success) 22%, transparent);
  cursor: help;
}
.pill--copy {
  background: var(--c-warning-soft);
  color: var(--c-warning);
  border: 1px solid color-mix(in oklab, var(--c-warning) 22%, transparent);
  cursor: help;
}
.pill--branch {
  background: var(--c-primary-soft);
  color: var(--c-primary-deep);
  border: 1px solid color-mix(in oklab, var(--c-primary) 22%, transparent);
}
.pill--mixed {
  background: var(--c-primary-soft);
  color: var(--c-primary-deep);
  border: 1px solid color-mix(in oklab, var(--c-primary) 22%, transparent);
  font-style: italic;
}

/* ── 17. Empty state + Skeleton ──────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s-7) var(--s-4);
  gap: var(--s-3);
  max-width: 520px;
  margin-inline: auto;
}
.empty-state__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-primary-tint);
  color: var(--c-primary-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-2);
}
.empty-state__icon svg {
  width: 26px;
  height: 26px;
}
.empty-state__title {
  font-size: var(--fs-32);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  margin: 0;
  text-wrap: balance;
}
.empty-state__sub {
  font-size: var(--fs-14);
  color: var(--c-ink-2);
  line-height: var(--lh-body);
  max-width: 36ch;
  margin: 0;
  text-wrap: pretty;
}
.empty-state__action {
  margin-top: var(--s-3);
}

/* Skeleton — loading placeholder. */
.skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    var(--c-surface-2) 0%,
    var(--c-bg-alt) 50%,
    var(--c-surface-2) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1400ms linear infinite;
  border-radius: var(--r-1);
  color: transparent;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s-7) var(--s-4);
  background: var(--c-danger-soft);
  border: 1px solid color-mix(in oklab, var(--c-danger) 22%, transparent);
  border-radius: var(--r-3);
  gap: var(--s-3);
  max-width: 460px;
  margin-inline: auto;
  color: var(--c-danger);
}
.error-state__title {
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  margin: 0;
  color: var(--c-danger);
}
.error-state__sub {
  font-size: var(--fs-14);
  margin: 0;
  color: var(--c-ink-2);
}

/* ── 18. Footer ──────────────────────────────────────── */

.footer {
  padding-block: var(--s-6);
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer__name {
  display: block;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}
.footer__sub {
  display: block;
  font-size: var(--fs-12);
  color: var(--c-ink-3);
  margin-top: 2px;
}
.footer__meta {
  font-size: var(--fs-12);
  color: var(--c-ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0;
}
.footer__links {
  display: flex;
  gap: var(--s-4);
  font-size: var(--fs-13);
  color: var(--c-ink-2);
}
.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--c-primary-deep);
}

/* ── 19. 404 page (CSS-only, no external assets) ──────── */

.section--404 {
  padding-block: clamp(24px, 4vw, 48px);
}

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-3);
  max-width: 560px;
  margin-inline: auto;
}

/* Mono outlined 404 number, primary stroke — Geist Mono, original sizing. */
.notfound__code {
  font-family: var(--font-mono);
  font-size: clamp(7rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px var(--c-primary);
  text-stroke: 2px var(--c-primary);
  margin: 0;
  user-select: none;
}

.notfound__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
  margin: 0;
  text-wrap: balance;
}

.notfound__sub {
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  color: var(--c-ink-2);
  max-width: 52ch;
  text-wrap: pretty;
  margin: 0;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
  margin-top: var(--s-2);
}

/* Stick the footer to the viewport bottom on short pages (404 has ~520px of
   content; on tall monitors the footer would otherwise float mid-screen). */
.is-404-view {
  display: flex;
  flex-direction: column;
}
.is-404-view main {
  flex: 1;
}

/* ── 20. Motion ──────────────────────────────────────── */

@keyframes fade-up {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes row-in {
  from { opacity: 0; transform: translate3d(-6px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes band-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(233, 92, 32, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(233, 92, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 92, 32, 0); }
}

@keyframes counter-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes ecg-sweep {
  0%   { offset-distance: 0%;   opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* Reveal hooks — content visible by default, .is-in-view triggers reveal. */
[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity var(--d-slow) var(--ease-out),
              transform var(--d-slow) var(--ease-out);
}
[data-reveal].is-revealing {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}
[data-reveal].is-in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

[data-reveal-stagger] > * {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger].is-revealing > * {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity var(--d-mid) var(--ease-out),
              transform var(--d-mid) var(--ease-out);
}
[data-reveal-stagger].is-in-view > * {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger].is-in-view > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-in-view > *:nth-child(2) { transition-delay: 60ms; }
[data-reveal-stagger].is-in-view > *:nth-child(3) { transition-delay: 120ms; }
[data-reveal-stagger].is-in-view > *:nth-child(4) { transition-delay: 180ms; }
[data-reveal-stagger].is-in-view > *:nth-child(5) { transition-delay: 240ms; }
[data-reveal-stagger].is-in-view > *:nth-child(6) { transition-delay: 300ms; }
[data-reveal-stagger].is-in-view > *:nth-child(7) { transition-delay: 360ms; }
[data-reveal-stagger].is-in-view > *:nth-child(8) { transition-delay: 420ms; }

/* Counter bounce-in. */
[data-counter].is-bounce {
  animation: counter-bounce 360ms var(--ease-out) both;
  transform-origin: left center;
  display: inline-block;
}

/* Cabinet entrance. */
.profile-band.is-entering {
  animation: band-in 380ms var(--ease-out) both;
}
.application-card.is-entering {
  animation: band-in 320ms var(--ease-out) both;
  opacity: 1;
}

/* Reduced-motion overrides (extends the global base rule). */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
  [data-counter].is-bounce {
    transform: none !important;
    animation: none !important;
  }
  .profile-band.is-entering,
  .application-card.is-entering {
    animation: none !important;
  }
  .hero__ecg-beat {
    animation: none !important;
  }
  .live-dot {
    animation: none !important;
  }
  .skeleton {
    animation: none !important;
  }
}
