/* ============================================================
   /cases/china-minsk — «сайт как кейс».
   Дизайн-система клиента (china-next/src/app/globals.css: светлый портал
   + тёмный раздел «Для бизнеса»), перенесённая из Tailwind-токенов в
   ванильный CSS и изолированная под .chm. Две темы — как два раздела
   сайта: data-theme на корне ставит переключатель из шапки.
   Анимации — только transform/opacity.
   ============================================================ */
.chm {
  /* палитра клиента */
  --chm-canvas: #edf0f6;
  --chm-card: #ffffff;
  --chm-ink-c: #16181d;
  --chm-body-c: #363b46;
  --chm-muted-c: #79808f;
  --chm-line-c: #e3e7ee;
  --chm-accent: #1c66e5;
  --chm-accent-soft: #e9f1fe;
  --chm-brand: #c41e3a;
  --chm-brand-dark: #a01730;
  --chm-brand-soft: #fceef1;
  --chm-hl: #f6e9c0;
  --chm-night-c: #0f131b;
  --chm-night-soft: #141a24;
  --chm-night-card: #182031;
  --chm-night-line: #263048;
  --chm-night-ink: #f2f4f9;
  --chm-night-body: #c7cedd;
  --chm-night-muted: #a8b2c7;
  --chm-gold: #e5b54a;
  --chm-gold-dark: #d3a136;
  --chm-ease: cubic-bezier(0.22, 0.8, 0.35, 1);

  /* семантика — светлый раздел «Авто» */
  --chm-bg: var(--chm-canvas);
  --chm-surface: var(--chm-card);
  --chm-surface-line: transparent;
  --chm-soft: var(--chm-canvas);
  --chm-line: var(--chm-line-c);
  --chm-ink: var(--chm-ink-c);
  --chm-body: var(--chm-body-c);
  --chm-muted: var(--chm-muted-c);
  --chm-link: var(--chm-accent);
  --chm-cta: var(--chm-brand);
  --chm-cta-hover: var(--chm-brand-dark);
  --chm-cta-ink: #fff;
  --chm-num: var(--chm-brand);
  --chm-chip-bg: var(--chm-brand-soft);
  --chm-chip-ink: var(--chm-brand);
  --chm-chip-line: transparent;
  --chm-chip-radius: 6px;
  --chm-hl-bg: var(--chm-hl);
  --chm-hl-ink: var(--chm-ink-c);
  --chm-header-bg: var(--chm-card);
  --chm-thumb: var(--chm-card);
  --chm-thumb-ink: var(--chm-ink-c);

  position: relative;
  background: var(--chm-bg);
  color: var(--chm-body);
  font-family: var(--chm-font-golos), 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  overflow-x: clip;
}

/* семантика — тёмный раздел «Для бизнеса» (вся страница или отдельная зона) */
.chm[data-theme='night'],
.chm .chm-night {
  --chm-bg: var(--chm-night-c);
  --chm-surface: var(--chm-night-card);
  --chm-surface-line: var(--chm-night-line);
  --chm-soft: var(--chm-night-soft);
  --chm-line: var(--chm-night-line);
  --chm-ink: var(--chm-night-ink);
  --chm-body: var(--chm-night-body);
  --chm-muted: var(--chm-night-muted);
  --chm-link: var(--chm-gold);
  --chm-cta: var(--chm-gold);
  --chm-cta-hover: var(--chm-gold-dark);
  --chm-cta-ink: var(--chm-night-c);
  --chm-num: var(--chm-gold);
  --chm-chip-bg: rgba(229, 181, 74, 0.1);
  --chm-chip-ink: var(--chm-gold);
  --chm-chip-line: rgba(229, 181, 74, 0.4);
  --chm-chip-radius: 999px;
  --chm-hl-bg: rgba(229, 181, 74, 0.12);
  --chm-hl-ink: var(--chm-gold);
  --chm-header-bg: rgba(15, 19, 27, 0.85);
  --chm-thumb: var(--chm-gold);
  --chm-thumb-ink: var(--chm-night-c);
  color-scheme: dark;
}
.chm .chm-night { background-color: var(--chm-bg); color: var(--chm-body); }

.chm *,
.chm *::before,
.chm *::after { box-sizing: border-box; }
.chm a { color: inherit; text-decoration: none; }
.chm h1, .chm h2, .chm h3, .chm p, .chm ul { margin: 0; }
.chm ul { padding: 0; list-style: none; }
.chm :where(button) { font: inherit; color: inherit; cursor: pointer; }
.chm [id] { scroll-margin-top: 88px; }
.chm img { display: block; }

.chm[data-theme='night'] .chm-only-light,
.chm:not([data-theme='night']) .chm-only-night { display: none !important; }

.chm-container { width: 100%; max-width: 1184px; margin-inline: auto; padding-inline: 16px; }
.chm-section { padding-block: clamp(40px, 6vw, 64px); }
.chm-band { border-block: 1px solid var(--chm-line); background: color-mix(in srgb, var(--chm-soft) 50%, transparent); }

.chm-h1 {
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--chm-ink);
}
.chm-h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--chm-ink);
}
.chm-sub { margin-top: 8px !important; max-width: 60ch; }

.chm-card {
  background: var(--chm-surface);
  border: 1px solid var(--chm-surface-line);
  border-radius: 16px;
}
.chm-ncard {
  background: var(--chm-surface);
  border: 1px solid var(--chm-line);
  border-radius: 16px;
}

.chm-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--chm-chip-ink);
  background: var(--chm-chip-bg);
  border: 1px solid var(--chm-chip-line);
  border-radius: var(--chm-chip-radius);
}
.chm-tag {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--chm-gold);
  background: var(--chm-night-soft);
  border-radius: 6px;
}

/* Кнопки */
.chm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.chm-btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.chm .chm-btn-primary { background: var(--chm-cta); color: var(--chm-cta-ink); font-weight: 700; }
.chm .chm-btn-primary:hover { background: var(--chm-cta-hover); transform: translateY(-2px); }
.chm .chm-btn-ghost { border-color: var(--chm-line); color: var(--chm-ink); }
.chm .chm-btn-ghost:hover { border-color: var(--chm-link); color: var(--chm-link); }

/* ---------- Лого + переключатель разделов ---------- */
.chm-logo { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chm-logo-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--chm-brand);
  border-radius: 8px;
}
.chm-logo-text { display: block; line-height: 1; }
.chm-logo-word {
  display: block;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--chm-ink);
}
.chm-logo-by { color: var(--chm-brand); }
.chm-logo-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chm-muted);
}
.chm-logo-sub.chm-only-night { font-weight: 700; color: var(--chm-gold); }

.chm-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 116px);
  flex-shrink: 0;
  padding: 4px;
  background: var(--chm-soft);
  border: 1px solid var(--chm-line);
  border-radius: 999px;
}
.chm-switch-thumb {
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  background: var(--chm-thumb);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.12);
  transition: transform 0.34s var(--chm-ease);
  view-transition-name: chm-sswitch-thumb;
}
.chm-switch-thumb[data-pos='night'] { transform: translateX(100%); }
.chm-switch-opt {
  position: relative;
  z-index: 1;
  padding: 6px 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  color: var(--chm-muted) !important;
  background: none;
  border: 0;
  border-radius: 999px;
  transition: color 0.3s;
}
.chm-switch-opt:hover { color: var(--chm-link) !important; }
.chm-switch-opt[aria-pressed='true'] { font-weight: 700; color: var(--chm-thumb-ink) !important; }
::view-transition-group(chm-sswitch-thumb) {
  animation-duration: 340ms;
  animation-timing-function: cubic-bezier(0.22, 0.8, 0.35, 1);
}
::view-transition-old(chm-sswitch-thumb),
::view-transition-new(chm-sswitch-thumb) { height: 100%; }

/* ---------- HERO ---------- */
.chm-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 152px; /* 72 шапка ЯРЧЕ + 80 шапка клиента */
  overflow: hidden;
}
.chm[data-theme='night'] .chm-hero,
.chm .chm-final {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
.chm-hero-decor { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.chm-glow { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.chm-hero .chm-glow-brand { left: -160px; top: -60px; width: 480px; height: 480px; background: rgba(196, 30, 58, 0.2); }
.chm-hero .chm-glow-gold { right: -128px; top: 200px; width: 420px; height: 420px; background: rgba(229, 181, 74, 0.1); }
.chm-han {
  position: absolute;
  font-size: clamp(120px, 12vw, 180px);
  font-weight: 700;
  line-height: 1;
  color: rgba(242, 244, 249, 0.05);
  animation: chm-float 7s ease-in-out infinite;
}
.chm-han-1 { right: 6%; top: 170px; --chm-rot: -6deg; }
.chm-han-2 { right: 30%; bottom: 70px; --chm-rot: 5deg; animation-delay: 1.2s; }
.chm-han-3 { left: 2%; bottom: 90px; --chm-rot: -4deg; animation-delay: 2.1s; }
@keyframes chm-float {
  0%, 100% { transform: translateY(0) rotate(var(--chm-rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--chm-rot, 0deg)); }
}

.chm-site-header {
  position: absolute;
  inset: var(--site-top, 72px) 0 auto;
  z-index: 2;
  background: var(--chm-header-bg);
  border-bottom: 1px solid var(--chm-line);
}
.chm-site-header-in { display: flex; align-items: center; gap: 20px; height: 80px; }
.chm-site-nav { display: flex; gap: 20px; font-size: 0.875rem; font-weight: 500; color: var(--chm-muted); white-space: nowrap; }
.chm-site-nav a { transition: color 0.2s; }
.chm-site-nav a:hover { color: var(--chm-ink); }
.chm-site-live { margin-left: auto; }

.chm-hero-body { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; padding-block: 20px 28px; }
.chm-back {
  display: inline-block;
  width: fit-content;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--chm-muted) !important;
  transition: color 0.2s;
}
.chm-back:hover { color: var(--chm-link) !important; }
.chm-hero-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background: var(--chm-surface);
  border-radius: 16px;
}
.chm[data-theme='night'] .chm-hero-card { background: none; overflow: visible; }
.chm-hero-grid { display: grid; flex: 1; grid-template-columns: 1.1fr 1fr; }
.chm-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 40px; }
.chm[data-theme='night'] .chm-hero-copy { padding-left: 0; }
.chm-hero-copy .chm-h1 { margin-top: 18px; max-width: 13em; }
.chm-hero-lead { margin-top: 14px !important; max-width: 32em; font-size: 1.0625rem; line-height: 1.6; color: var(--chm-muted); }
.chm[data-theme='night'] .chm-hero-lead { color: var(--chm-body); }
.chm-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.chm-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 24px; margin-top: 34px; }
.chm-stat-num { font-size: 1.625rem; font-weight: 800; line-height: 1.2; color: var(--chm-num); }
.chm-stat-label { margin-top: 2px; font-size: 0.8125rem; line-height: 1.25; color: var(--chm-muted); }
.chm[data-theme='night'] .chm-stat-label { color: var(--chm-body); }

.chm-hero-tiles { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; padding: 16px 16px 16px 0; }
.chm[data-theme='night'] .chm-hero-tiles { padding-right: 0; }
.chm-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  background: var(--chm-soft);
  border: 1px solid var(--chm-line);
  border-radius: 12px;
}
.chm-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.3s;
}
.chm-tile:hover img { transform: scale(1.03); }
.chm-tile-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--chm-ink-c);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: color 0.2s;
}
.chm-tile:hover .chm-tile-label { color: var(--chm-accent); }

.chm-live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 14px 40px;
  font-size: 0.84rem;
  color: var(--chm-muted);
  border-top: 1px solid var(--chm-line);
}
.chm[data-theme='night'] .chm-live { padding-inline: 0; }
.chm-live-main { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--chm-ink); }
.chm-ping { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--chm-num); }
.chm-ping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--chm-num);
  animation: chm-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes chm-ping {
  from { transform: scale(1); opacity: 0.6; }
  75%, to { transform: scale(2.2); opacity: 0; }
}
.chm-live-hint::before { content: '↑ '; color: var(--chm-link); font-weight: 700; }

.chm-marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding-block: 14px;
  background: color-mix(in srgb, var(--chm-soft) 60%, var(--chm-surface));
  border-block: 1px solid var(--chm-line);
}
.chm-marquee-track { display: flex; width: max-content; white-space: nowrap; animation: chm-marquee 32s linear infinite; }
.chm-marquee-track:hover { animation-play-state: paused; }
.chm-marquee-track span { margin-right: 32px; font-size: 0.875rem; font-weight: 600; color: var(--chm-muted); }
.chm-marquee-track .chm-marquee-han { color: var(--chm-num); opacity: 0.75; }
@keyframes chm-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes chm-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.chm-rise { animation: chm-rise 0.7s var(--chm-ease) both; }

/* ---------- Шапка секции ---------- */
.chm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.chm-head-link { flex-shrink: 0; font-size: 0.875rem; font-weight: 500; color: var(--chm-link) !important; }
.chm-head-link:hover { text-decoration: underline !important; }

/* ---------- Задача ---------- */
.chm-task { padding: clamp(24px, 4vw, 40px); }
.chm-task-h { margin-top: 14px !important; max-width: 24em; }
.chm-task-text { display: grid; gap: 14px; max-width: 78ch; margin-top: 16px; }
.chm-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chm-pill {
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--chm-body);
  border: 1px solid var(--chm-line);
  border-radius: 999px;
}

/* ---------- Брендбук ---------- */
.chm-bb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-top: 28px;
}
.chm-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.chm-swatch {
  display: grid;
  gap: 3px;
  padding: 8px 8px 12px;
  text-align: left;
  background: var(--chm-surface);
  border: 1px solid var(--chm-line);
  border-radius: 14px;
  transition: border-color 0.2s, transform 0.3s var(--chm-ease);
}
.chm-swatch:hover { border-color: var(--chm-muted); }
.chm-swatch[aria-selected='true'] { border-color: var(--chm-link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chm-link) 18%, transparent); transform: translateY(-3px); }
.chm-swatch-chip { display: block; height: 84px; margin-bottom: 6px; border-radius: 8px; border: 1px solid rgba(22, 24, 29, 0.1); }
.chm-swatch-name { font-size: 0.84rem; font-weight: 600; line-height: 1.25; color: var(--chm-ink); }
.chm-swatch-hex { font-size: 0.74rem; letter-spacing: 0.04em; color: var(--chm-muted); font-variant-numeric: tabular-nums; }

.chm-swatch-roles { position: relative; display: grid; margin-top: 22px; }
.chm-swatch-roles p {
  grid-area: 1 / 1;
  padding-left: 16px;
  border-left: 3px solid var(--chm-link);
  font-size: 1.0625rem;
  line-height: 1.6;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s var(--chm-ease), visibility 0s 0.35s;
}
.chm[data-hl='brand'] [data-role='brand'],
.chm[data-hl='accent'] [data-role='accent'],
.chm[data-hl='hl'] [data-role='hl'],
.chm[data-hl='canvas'] [data-role='canvas'],
.chm[data-hl='card'] [data-role='card'],
.chm[data-hl='ink'] [data-role='ink'],
.chm[data-hl='night'] [data-role='night'],
.chm[data-hl='gold'] [data-role='gold'] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

/* сцена всегда в своих цветах — от темы кейса не зависит */
.chm-bb-stage {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 28px);
  background: var(--chm-canvas);
  border: 1px solid var(--chm-line);
  border-radius: 20px;
  outline: 2px dashed transparent;
  outline-offset: -9px;
  transition: outline-color 0.35s;
}
.chm-bb-stage [data-c],
.chm-bb-stage img { transition: opacity 0.35s, filter 0.35s, outline-color 0.35s; }
.chm-demo-card {
  overflow: hidden;
  background: var(--chm-card);
  border-radius: 16px;
  outline: 2px dashed transparent;
  outline-offset: 4px;
}
.chm-demo-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--chm-canvas); }
.chm-demo-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.chm-demo-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.chm-badge { padding: 2px 8px; font-size: 0.75rem; font-weight: 700; line-height: 1.4; border-radius: 6px; white-space: nowrap; }
.chm-badge-brand { color: #fff; background: var(--chm-brand); }
.chm-badge-new { color: var(--chm-accent); background: var(--chm-card); }
.chm-badge-biz { color: var(--chm-gold); background: var(--chm-night-c); }
.chm-demo-body { padding: 14px; }
.chm-demo-body h3 { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--chm-accent); }
.chm-demo-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 6px; }
.chm-price { position: relative; display: inline-block; padding: 2px 6px; font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.chm-price-bg { position: absolute; inset: 0; background: var(--chm-hl); border-radius: 4px; }
.chm-price-val { position: relative; color: var(--chm-ink-c); }
.chm-demo-muted { font-size: 0.8125rem; line-height: 1.4; color: var(--chm-muted-c); }
.chm-demo-body p { margin-top: 6px; }
.chm-demo-foot { font-size: 0.75rem; }

.chm-demo-night {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--chm-night-c);
  border-radius: 14px;
  outline: 2px dashed transparent;
  outline-offset: 4px;
}
.chm-demo-cap { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chm-night-muted); }
.chm-demo-sum { margin-top: 2px; font-size: 1.75rem; font-weight: 800; line-height: 1.15; color: var(--chm-gold); }
.chm-demo-term { font-size: 0.78rem; color: var(--chm-night-muted); }
.chm-demo-btn { padding: 9px 14px; font-size: 0.875rem; font-weight: 700; color: var(--chm-night-c); background: var(--chm-gold); border-radius: 8px; }

/* подсветка: «листовые» цвета гаснут, выбранный светится */
.chm[data-hl] .chm-bb-stage img { opacity: 0.4; }
.chm[data-hl] .chm-bb-stage :is([data-c='brand'], [data-c='accent'], [data-c='hl'], [data-c='ink'], [data-c='gold'], [data-c='mut']) { opacity: 0.16; }
.chm[data-hl='brand'] .chm-bb-stage [data-c='brand'] { opacity: 1; filter: drop-shadow(0 0 10px rgba(196, 30, 58, 0.55)); }
.chm[data-hl='accent'] .chm-bb-stage [data-c='accent'] { opacity: 1; filter: drop-shadow(0 0 8px rgba(28, 102, 229, 0.45)); }
.chm[data-hl='hl'] .chm-bb-stage [data-c='hl'] { opacity: 1; filter: drop-shadow(0 0 10px rgba(229, 181, 74, 0.9)); }
.chm[data-hl='ink'] .chm-bb-stage [data-c='ink'] { opacity: 1; }
.chm[data-hl='gold'] .chm-bb-stage [data-c='gold'] { opacity: 1; filter: drop-shadow(0 0 12px rgba(229, 181, 74, 0.6)); }
.chm[data-hl='canvas'] .chm-bb-stage { outline-color: var(--chm-accent); }
.chm[data-hl='canvas'] .chm-bb-stage :is(.chm-demo-card, .chm-demo-night) { opacity: 0.22; }
.chm[data-hl='card'] .chm-bb-stage .chm-demo-card { outline-color: var(--chm-accent); }
.chm[data-hl='card'] .chm-bb-stage img { opacity: 0.08; }
.chm[data-hl='card'] .chm-bb-stage .chm-demo-night { opacity: 0.22; }
.chm[data-hl='night'] .chm-bb-stage .chm-demo-night { outline-color: var(--chm-gold-dark); }
.chm[data-hl='night'] .chm-bb-stage .chm-demo-card { opacity: 0.22; }
.chm:is([data-hl='brand'], [data-hl='accent'], [data-hl='hl'], [data-hl='ink']) .chm-bb-stage .chm-demo-night { opacity: 0.35; }

/* Шрифты */
.chm-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(28px, 4vw, 44px); }
.chm-type { padding: 22px; }
.chm-type-sample { display: flex; align-items: flex-end; min-height: 2.5em; color: var(--chm-ink); }
.chm-type-display { font-size: clamp(1.5rem, 2.3vw, 1.9rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
.chm-type-text { font-size: clamp(1rem, 1.4vw, 1.15rem); font-weight: 500; line-height: 1.35; font-variant-numeric: tabular-nums; }
.chm-type-han { font-size: clamp(1.8rem, 2.6vw, 2.2rem); font-weight: 700; line-height: 1.1; letter-spacing: 0.1em; color: var(--chm-num); }
.chm-type-name { margin-top: 14px; font-weight: 700; color: var(--chm-ink); }
.chm-type-role { margin-top: 4px; font-size: 0.875rem; line-height: 1.5; color: var(--chm-muted); }

/* ---------- Экраны: чипсы марок + карточки объявлений ---------- */
.chm-brandchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chm-brandchip {
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--chm-body) !important;
  background: var(--chm-surface);
  border: 1px solid var(--chm-line);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.chm-brandchip span { color: var(--chm-muted); }
.chm-brandchip:hover { border-color: var(--chm-link); color: var(--chm-link) !important; }

.chm-listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.chm-listing { display: block; overflow: hidden; }
.chm-listing:hover { box-shadow: 0 10px 15px -3px rgba(22, 24, 29, 0.06); }
.chm-listing-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--chm-soft); }
.chm-listing-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.3s; }
.chm-listing:hover .chm-listing-photo img { transform: scale(1.03); }
.chm-listing-body { padding: 14px; }
.chm-listing-body h3 { overflow: hidden; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; color: var(--chm-link); }
.chm-listing:hover h3 { text-decoration: underline; }
.chm-price-path { font-size: 0.9375rem; color: var(--chm-hl-ink); background: var(--chm-hl-bg); border-radius: 4px; font-variant-numeric: tabular-nums; }
.chm-listing-meta { margin-top: 6px !important; min-height: 2.8em; font-size: 0.8125rem; line-height: 1.4; color: var(--chm-muted); }
.chm-listing-foot { margin-top: 6px !important; font-size: 0.75rem; color: var(--chm-muted); }

/* ---------- Тёмная зона «Для бизнеса» ---------- */
.chm-parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.chm-part { display: flex; flex-direction: column; padding: 20px; transition: transform 0.3s, border-color 0.3s; }
.chm-part:hover,
.chm-city:hover { transform: translateY(-4px); border-color: rgba(229, 181, 74, 0.5); }
.chm-part-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.chm-part-char { font-size: 1.875rem; font-weight: 700; line-height: 1.2; color: var(--chm-gold); opacity: 0.85; }
.chm-part h3 { margin-top: 12px; font-size: 1rem; font-weight: 700; color: var(--chm-ink); transition: color 0.2s; }
.chm-part:hover h3 { color: var(--chm-gold); }
.chm-part p { flex: 1; margin-top: 6px; font-size: 0.84rem; line-height: 1.6; }
.chm-more { display: inline-block; margin-top: 12px; font-size: 0.8125rem; font-weight: 600; color: var(--chm-gold); transition: transform 0.3s; }
.chm-part:hover .chm-more { transform: translateX(4px); }

.chm-calc-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: start; }
.chm-calc-text { margin-top: 12px !important; max-width: 28em; }
.chm-dots { display: grid; gap: 10px; margin-top: 20px !important; font-size: 0.9rem; }
.chm-dots li { position: relative; padding-left: 16px; }
.chm-dots li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--chm-gold); }

.chm-calc { padding: clamp(20px, 3vw, 32px); background: var(--chm-night-card); border: 1px solid var(--chm-night-line); border-radius: 16px; }
.chm-calc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chm-calc-top h3 { font-size: 1.25rem; font-weight: 800; color: var(--chm-night-ink); }
.chm-calc .chm-tag { background: rgba(229, 181, 74, 0.1); }
.chm-calc-sub { margin-top: 4px !important; font-size: 0.84rem; }
.chm-calc-label { display: block; margin: 16px 0 6px; font-size: 0.875rem; font-weight: 500; }
.chm-input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--chm-ink-c);
  background: var(--chm-card);
  border: 1px solid var(--chm-line-c);
  border-radius: 10px;
  outline: none;
}
.chm-input:focus-visible { border-color: var(--chm-accent); box-shadow: 0 0 0 3px rgba(28, 102, 229, 0.35); }
.chm-calc-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chm-preset {
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--chm-night-muted) !important;
  background: none;
  border: 1px solid var(--chm-night-line);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.chm-preset:hover { border-color: rgba(229, 181, 74, 0.4); color: var(--chm-night-ink) !important; }
.chm-preset[aria-pressed='true'] { border-color: rgba(229, 181, 74, 0.6); color: var(--chm-gold) !important; }
.chm-calc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--chm-night-soft);
  border-radius: 12px;
}
.chm-calc-cap { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chm-night-muted); }
.chm-calc-sum { margin-top: 4px; font-size: 1.875rem; font-weight: 800; line-height: 1.2; color: var(--chm-gold); font-variant-numeric: tabular-nums; }
.chm-calc-term { margin-top: 2px; font-size: 0.78rem; color: var(--chm-night-muted); }
.chm-calc-note { margin-top: 12px !important; font-size: 0.75rem; line-height: 1.6; color: var(--chm-night-muted); opacity: 0.85; }

.chm-cities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.chm-city {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 16px 40px 16px 18px;
  transition: transform 0.3s, border-color 0.3s;
}
.chm-city-name { font-weight: 700; color: var(--chm-ink); transition: color 0.2s; }
.chm-city:hover .chm-city-name { color: var(--chm-gold); }
.chm-city-region { font-size: 0.8125rem; color: var(--chm-muted); }
.chm-city-go { position: absolute; right: 16px; top: 50%; font-weight: 600; color: var(--chm-gold); transform: translateY(-50%); transition: transform 0.3s; }
.chm-city:hover .chm-city-go { transform: translate(4px, -50%); }

.chm-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 28px; }
.chm-step { padding: 20px; }
.chm-step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-weight: 800;
  color: var(--chm-gold);
  background: rgba(229, 181, 74, 0.15);
  border-radius: 8px;
}
.chm-step h3 { margin-top: 12px; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--chm-ink); }
.chm-step p { margin-top: 6px; font-size: 0.84rem; line-height: 1.6; }
.chm-steps-note { margin-top: 24px !important; font-size: 0.875rem; }

/* ---------- FAQ ---------- */
.chm-faq { margin-top: 28px; border-color: var(--chm-line); }
.chm-faq details { padding: 16px 24px; }
.chm-faq details + details { border-top: 1px solid var(--chm-line); }
.chm-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  color: var(--chm-ink);
  list-style: none;
  cursor: pointer;
}
.chm-faq summary::-webkit-details-marker { display: none; }
.chm-faq summary:hover { color: var(--chm-link); }
.chm-faq-plus { font-size: 1.25rem; line-height: 1; color: var(--chm-link); transition: transform 0.2s; }
.chm-faq details[open] .chm-faq-plus { transform: rotate(45deg); }
.chm-faq details p { max-width: 44em; margin-top: 8px; font-size: 0.9rem; line-height: 1.65; }

/* ---------- Финал: тёмная витрина ---------- */
.chm-final-wrap { padding-top: 0; }
.chm-final {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--chm-surface-line);
  border-radius: 16px;
}
.chm-final .chm-glow-brand { left: -96px; top: -96px; width: 288px; height: 288px; background: rgba(196, 30, 58, 0.2); }
.chm-final .chm-glow-gold { right: -64px; bottom: -96px; width: 288px; height: 288px; background: rgba(229, 181, 74, 0.1); }
.chm-final-han {
  position: absolute;
  right: -16px;
  top: 50%;
  font-size: 200px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: rgba(242, 244, 249, 0.05);
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}
.chm-final-grid { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding: clamp(24px, 4vw, 48px); }
.chm-final-h { margin-top: 14px !important; font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.chm-final-text { margin-top: 12px !important; max-width: 34em; }
.chm-final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.chm-final-nums { display: grid; align-content: center; gap: 20px; padding-left: 32px; border-left: 1px solid var(--chm-line); }
.chm-final-num { font-size: 1.875rem; font-weight: 800; line-height: 1.2; color: var(--chm-gold); font-variant-numeric: tabular-nums; }
.chm-final-label { margin-top: 2px; font-size: 0.875rem; }
.chm-made {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: clamp(28px, 4vw, 44px) !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--chm-line);
  font-size: 0.84rem;
  color: var(--chm-muted);
}

/* ---------- Появления (только с JS и без reduced-motion) ---------- */
.chm.js-sc [data-sc='reveal'] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--chm-ease), transform 0.7s var(--chm-ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.chm.js-sc [data-sc='reveal'].in-view { opacity: 1; transform: none; }
/* у кликабельных карточек после появления — быстрый hover без задержки */
.chm.js-sc :is(.chm-part, .chm-city, .chm-listing)[data-sc='reveal'].in-view:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
  transition-duration: 0.3s;
}
.chm.js-sc .chm-listing[data-sc='reveal'].in-view:hover { transform: none; }
.chm.js-sc [data-sc='steps'] .chm-step {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s, transform 0.5s var(--chm-ease);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.chm.js-sc [data-sc='steps'].in-view .chm-step { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .chm-rise,
  .chm-han,
  .chm-ping::after,
  .chm-marquee-track { animation: none; }
  .chm-switch-thumb { transition: none; }
  ::view-transition-group(chm-sswitch-thumb) { animation: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1099px) {
  .chm-site-nav { display: none; }
}
@media (max-width: 1023px) {
  .chm-bb { grid-template-columns: 1fr; }
  .chm-bb-stage { max-width: 440px; }
  .chm-listings { grid-template-columns: repeat(2, 1fr); }
  .chm-parts { grid-template-columns: repeat(2, 1fr); }
  .chm-steps { grid-template-columns: repeat(2, 1fr); }
  .chm-cities { grid-template-columns: repeat(3, 1fr); }
  .chm-hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .chm-hero { padding-top: 136px; }
  .chm-site-header-in { height: 64px; gap: 10px; justify-content: space-between; }
  .chm-site-live { display: none; }
  .chm-hero-grid { grid-template-columns: 1fr; }
  .chm-hero-copy { padding: 8px 16px 20px; }
  .chm[data-theme='night'] .chm-hero-copy { padding-inline: 0; }
  .chm-hero-copy .chm-h1 { margin-top: 12px; }
  .chm-hero-lead { font-size: 0.9375rem; }
  .chm-hero-actions { margin-top: 18px; }
  .chm-hero-actions .chm-btn { flex: 1; padding-inline: 16px; }
  .chm-hero-stats { margin-top: 22px; }
  /* как у клиента: на мобиле плитки — свайп-слайдер над текстом */
  .chm-hero-tiles {
    order: -1;
    display: flex;
    grid-template-rows: none;
    gap: 8px;
    padding: 10px 10px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 10px;
    scrollbar-width: none;
  }
  .chm[data-theme='night'] .chm-hero-tiles { padding-inline: 0; scroll-padding-left: 0; }
  .chm-hero-tiles::-webkit-scrollbar { display: none; }
  .chm-tile { flex: 0 0 88%; min-height: 0; aspect-ratio: 16 / 10; scroll-snap-align: start; }
  .chm-live { padding: 12px 16px; }
  .chm-live-hint { display: none; }
  .chm-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .chm-types { grid-template-columns: 1fr; }
  .chm-calc-grid { grid-template-columns: 1fr; }
  .chm-cities { grid-template-columns: repeat(2, 1fr); }
  .chm-final-grid { grid-template-columns: 1fr; }
  .chm-final-nums { grid-template-columns: repeat(3, 1fr); padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--chm-line); }
  .chm-final-han { display: none; }
  .chm-faq details { padding: 14px 16px; }
  .chm-swatch-chip { height: 44px; }
}
@media (max-width: 639px) {
  .chm-swatches { grid-template-columns: repeat(2, 1fr); }
  /* как у клиента: на мобиле карточка — строка «фото слева, инфо справа» */
  .chm-listings { grid-template-columns: 1fr; gap: 10px; }
  .chm-listing { display: flex; }
  .chm-listing-photo { flex: 0 0 38%; align-self: stretch; aspect-ratio: auto; min-height: 112px; }
  .chm-listing-photo .chm-demo-badges { left: 6px; top: 6px; }
  .chm-listing-photo .chm-badge { padding: 2px 6px; font-size: 0.625rem; }
  .chm-listing-body { flex: 1; min-width: 0; padding: 10px; }
  .chm-listing-meta { min-height: 0; }
  .chm-price-path { font-size: 0.8125rem; overflow-wrap: anywhere; }
  .chm-parts, .chm-steps { grid-template-columns: 1fr; }
  .chm-final-actions .chm-btn { flex: 1; }
}
@media (max-width: 479px) {
  .chm-switch { grid-template-columns: repeat(2, 88px); }
  .chm-switch-opt { font-size: 0.75rem; }
  .chm-logo-word { font-size: 1rem; }
  .chm-logo-sub { font-size: 0.5625rem; letter-spacing: 0.14em; }
  .chm-city { padding: 12px 30px 12px 14px; }
  .chm-city-go { right: 12px; }
  .chm-final-nums { gap: 12px; }
  .chm-final-label { font-size: 0.78rem; line-height: 1.3; }
}
