/* ─── Info button + popover (Steel v2.1) — formula tooltips ─── */
.zp-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  margin-left: 4px;
  background: transparent;
  border: 1px solid var(--rnp-text-muted);
  border-radius: 50%;
  color: var(--rnp-text-muted);
  font-family: var(--rnp-font); font-size: 9px; font-weight: 600;
  line-height: 1; cursor: pointer;
  opacity: .55;
  transition: opacity 180ms cubic-bezier(.22,1,.36,1), border-color 180ms, color 180ms;
  vertical-align: middle;
  user-select: none;
}
.zp-info:hover, .zp-info.is-active {
  opacity: 1;
  border-color: var(--rnp-primary);
  color: var(--rnp-primary);
}
.zp-info-popover {
  position: fixed;
  max-width: 320px; min-width: 200px;
  padding: 11px 13px;
  background: var(--rnp-surface);
  border: 1px solid var(--rnp-primary);
  border-radius: var(--rnp-radius-sm);
  box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(122,167,194,.15);
  font-family: var(--rnp-font);
  font-size: 11px; line-height: 1.55;
  color: var(--rnp-text);
  z-index: 1100;
  animation: zp-info-pop 180ms cubic-bezier(.22,1,.36,1);
}
.zp-info-popover b { color: var(--rnp-primary); font-weight: 600; }
.zp-info-popover .warn { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rnp-border); color: var(--rnp-yellow); font-size: 10px; }
@keyframes zp-info-pop {
  from { opacity: 0; transform: translateY(-4px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── DDS Cohort panel (Steel v2.1) — break down completed deals by creation month ─── */
.zp-dds-cohort {
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--rnp-surface);
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-md);
  animation: zp-cell-enter 280ms cubic-bezier(.22,1,.36,1);
}
.zp-dds-cohort-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.zp-dds-cohort-title { font-size: 13px; font-weight: 600; color: var(--rnp-text); }
.zp-dds-cohort-sub { font-size: 11px; color: var(--rnp-text-muted); }
.zp-dds-cohort-rows { display: flex; flex-direction: column; gap: 6px; }
.zp-dds-cohort-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; font-size: 12px; }
.zp-dds-cohort-row .month { color: var(--rnp-text); font-weight: 500; }
.zp-dds-cohort-bar {
  height: 8px; background: var(--rnp-surface-2);
  border-radius: 2px; overflow: hidden; position: relative;
}
.zp-dds-cohort-bar > div {
  height: 100%;
  transition: width 600ms cubic-bezier(.16,1,.3,1);
  border-radius: 2px;
}
.zp-dds-cohort-meta {
  font-family: var(--rnp-font); font-size: 11px;
  color: var(--rnp-text-muted); white-space: nowrap;
}
.zp-dds-cohort-meta strong { color: var(--rnp-text); font-weight: 600; }

/* ─── Expenses modal (Steel v2.0 — port from /analytics) ─── */
.zp-exp-modal-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(8px);
  display: none; justify-content: center; align-items: flex-start;
  padding-top: 6vh;
}
.zp-exp-modal-overlay.open { display: flex; animation: zp-cmdk-fade 180ms cubic-bezier(.22,1,.36,1); }
.zp-exp-modal {
  width: 90%; max-width: 860px;
  max-height: 88vh;
  background: var(--rnp-surface);
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  animation: zp-cmdk-rise 220ms cubic-bezier(.22,1,.36,1);
}
.zp-exp-modal-head, .zp-exp-modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
}
.zp-exp-modal-head { border-bottom: 1px solid var(--rnp-border); }
.zp-exp-modal-foot { border-top: 1px solid var(--rnp-border); gap: 12px; flex-wrap: wrap; }
.zp-exp-modal-title { font-size: 15px; font-weight: 600; }
.zp-exp-modal-close {
  background: transparent; border: 0; color: var(--rnp-text-muted);
  font-size: 22px; cursor: pointer; padding: 0 4px;
  transition: color 180ms cubic-bezier(.22,1,.36,1);
}
.zp-exp-modal-close:hover { color: var(--rnp-text); }
.zp-exp-modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.zp-exp-section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rnp-text-muted); margin-bottom: 8px;
}
.zp-exp-section-title.mt { margin-top: 22px; }

.zp-exp-row {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 32px;
  gap: 8px; padding: 6px 0; align-items: center;
}
.zp-exp-row.head {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--rnp-text-muted); padding: 0 0 6px;
  border-bottom: 1px solid var(--rnp-border);
}
.zp-exp-row input, .zp-exp-row select {
  padding: 7px 9px;
  background: var(--rnp-surface-2);
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-sm);
  color: var(--rnp-text);
  font-family: var(--rnp-font);
  font-size: 12px;
  transition: border-color 180ms cubic-bezier(.4,0,.2,1);
}
.zp-exp-row input:focus, .zp-exp-row select:focus {
  outline: 0; border-color: var(--rnp-primary);
}
.zp-exp-del-btn {
  background: transparent; border: 1px solid var(--rnp-border);
  color: var(--rnp-text-muted); font-size: 14px; line-height: 1;
  width: 28px; height: 28px;
  border-radius: var(--rnp-radius-sm);
  cursor: pointer;
  transition: color 180ms, border-color 180ms;
}
.zp-exp-del-btn:hover { color: var(--rnp-red); border-color: var(--rnp-red); }

.zp-exp-staff-wrap {
  border-bottom: 1px solid var(--rnp-border);
  padding: 10px 0;
}
.zp-exp-staff-row {
  display: grid; grid-template-columns: 1fr 1fr 1.2fr 1.3fr 32px;
  gap: 8px; align-items: center;
}
.zp-exp-staff-row.head {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--rnp-text-muted); padding-bottom: 6px;
  border-bottom: 1px solid var(--rnp-border); margin-bottom: 6px;
}
.zp-exp-staff-scale {
  display: none;
  margin-top: 8px; padding: 10px 12px;
  background: var(--rnp-surface-2);
  border-radius: var(--rnp-radius-sm);
  font-size: 11px; color: var(--rnp-text-muted);
}
.zp-exp-staff-scale.open { display: block; }
.zp-exp-staff-scale-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 4px;
}
.zp-exp-staff-scale-row input {
  width: 80px;
  padding: 4px 6px;
  background: var(--rnp-bg);
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-sm);
  color: var(--rnp-text);
  font-family: var(--rnp-font); font-size: 11px;
}
.zp-exp-add-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px dashed var(--rnp-border);
  border-radius: var(--rnp-radius-sm);
  color: var(--rnp-text-muted);
  font-family: var(--rnp-font); font-size: 11px;
  cursor: pointer;
  transition: border-color 180ms, color 180ms;
}
.zp-exp-add-btn:hover { border-color: var(--rnp-primary); color: var(--rnp-text); }

/* ─── Command palette ⌘K (Steel v1.10) ─── */
.zp-cmdk-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(8px);
  display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh;
  animation: zp-cmdk-fade 180ms cubic-bezier(.22,1,.36,1);
}
@keyframes zp-cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
.zp-cmdk-modal {
  width: 90%; max-width: 600px;
  background: var(--rnp-surface);
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden;
  animation: zp-cmdk-rise 220ms cubic-bezier(.22,1,.36,1);
  max-height: 70vh; display: flex; flex-direction: column;
}
@keyframes zp-cmdk-rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.zp-cmdk-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rnp-border);
}
.zp-cmdk-search-icon { color: var(--rnp-text-muted); flex-shrink: 0; }
.zp-cmdk-search {
  flex: 1; background: transparent; border: 0; outline: 0;
  font-family: var(--rnp-font); font-size: 14px; color: var(--rnp-text);
}
.zp-cmdk-search::placeholder { color: var(--rnp-text-muted); }
.zp-cmdk-kbd {
  padding: 2px 6px; background: var(--rnp-surface-2);
  border: 1px solid var(--rnp-border); border-radius: 4px;
  font-size: 10px; font-family: var(--rnp-font); color: var(--rnp-text-muted);
}
.zp-cmdk-list { overflow-y: auto; max-height: 50vh; padding: 6px 0; }
.zp-cmdk-section-title {
  padding: 8px 18px 4px; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rnp-text-muted);
}
.zp-cmdk-row {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 12px;
  padding: 9px 18px; align-items: center; cursor: pointer;
  font-family: var(--rnp-font);
}
.zp-cmdk-row:hover, .zp-cmdk-row.is-active {
  background: rgba(122,167,194,.12);
}
.zp-cmdk-row.is-active .zp-cmdk-row-label { color: var(--rnp-primary); }
.zp-cmdk-row-icon  { color: var(--rnp-text-muted); font-size: 14px; }
.zp-cmdk-row-label { font-size: 13px; color: var(--rnp-text); }
.zp-cmdk-row-hint  { font-size: 11px; color: var(--rnp-text-muted); }
.zp-cmdk-empty { padding: 30px 18px; text-align: center; color: var(--rnp-text-muted); font-size: 12px; }

/* ─── Sticky KPI rail (Steel v1.10) ─── */
.zp-sticky-rail {
  position: sticky; top: 44px; z-index: 50;
  display: flex; gap: 28px; align-items: center;
  padding: 10px 20px; height: 48px;
  background: rgba(20,20,20,.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rnp-border);
  margin: 0 -20px 16px;
  overflow-x: auto;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 180ms cubic-bezier(.22,1,.36,1), transform 180ms cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.zp-sticky-rail.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.zp-sticky-mini { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; flex-shrink: 0; }
.zp-sticky-mini .k { font-size: 9px; letter-spacing: .1em; color: var(--rnp-text-muted); text-transform: uppercase; }
.zp-sticky-mini .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--rnp-text); }
.zp-sticky-mini .v.green { color: var(--rnp-green); }
.zp-sticky-mini .v.red { color: var(--rnp-red); }

/* ─── Actionable insights bar (Steel v1.9) ─── */
.zp-insights-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.zp-insights-bar:empty { display: none; }
.zp-insight {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 16px;
  background: var(--rnp-surface-2);
  border-left: 3px solid;
  border-radius: var(--rnp-radius-sm);
  font-size: 13px;
  animation: zp-cell-enter 280ms cubic-bezier(.22,1,.36,1) backwards;
}
.zp-insight.alert { border-left-color: var(--rnp-red);     background: linear-gradient(90deg, rgba(201,123,99,.07), var(--rnp-surface-2) 50%); }
.zp-insight.warn  { border-left-color: var(--rnp-yellow);  background: linear-gradient(90deg, rgba(201,166,106,.07), var(--rnp-surface-2) 50%); }
.zp-insight.info  { border-left-color: var(--rnp-primary); background: linear-gradient(90deg, rgba(122,167,194,.07), var(--rnp-surface-2) 50%); }
.zp-insight-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.zp-insight.alert .zp-insight-icon { background: rgba(201,123,99,.15); color: var(--rnp-red); }
.zp-insight.warn  .zp-insight-icon { background: rgba(201,166,106,.15); color: var(--rnp-yellow); }
.zp-insight.info  .zp-insight-icon { background: rgba(122,167,194,.15); color: var(--rnp-primary); }
.zp-insight-text { color: var(--rnp-text); line-height: 1.5; min-width: 0; }
.zp-insight-text .t { font-weight: 600; margin-bottom: 2px; }
.zp-insight-text .m { color: var(--rnp-text-muted); font-size: 12px; }
.zp-insight-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.zp-insight-action {
  padding: 6px 12px; background: rgba(255,255,255,.04); border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-sm); font-family: var(--rnp-font); font-size: 11px;
  color: var(--rnp-text); text-decoration: none; cursor: pointer;
  transition: border-color 180ms cubic-bezier(.22,1,.36,1), background 180ms cubic-bezier(.22,1,.36,1);
}
.zp-insight-action:hover { border-color: var(--rnp-primary); background: rgba(122,167,194,.08); }

/* ─── Sparkline (Steel v1.8) — inline SVG trend ─── */
.zp-spark { display: block; }
.zp-spark path.line { fill: none; stroke: var(--rnp-primary); stroke-width: 1.5; }
.zp-spark path.area { fill: var(--rnp-primary); opacity: .12; }
.zp-spark .dot      { fill: var(--rnp-primary); }
.zp-spark.up   path.line { stroke: var(--rnp-green); } .zp-spark.up   path.area { fill: var(--rnp-green); } .zp-spark.up   .dot { fill: var(--rnp-green); }
.zp-spark.down path.line { stroke: var(--rnp-red); }   .zp-spark.down path.area { fill: var(--rnp-red); }   .zp-spark.down .dot { fill: var(--rnp-red); }

/* ─── Delta chip (Steel v1.7) — % изменение vs прошлый период ─── */
.zp-delta {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--rnp-font);
  letter-spacing: .02em;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 6px;
}
.zp-delta.up    { color: var(--rnp-green);      background: rgba(140,167,157,.12); }
.zp-delta.down  { color: var(--rnp-red);        background: rgba(201,123,99,.12); }
.zp-delta.flat  { color: var(--rnp-text-muted); background: rgba(255,255,255,.04); }
.zp-delta-prev  { font-size: 10px; color: var(--rnp-text-muted); margin-left: 6px; font-family: var(--rnp-font); }

/* ─── Threshold zones + alert pulse (Steel v1.6) ───
   Применяется к контейнеру KPI, который должен реагировать на пороги.
   Логика порогов — в JS (window.ZPThresholds.classify), CSS-классы:
   .zp-th-good / .zp-th-warn / .zp-th-alert — стилизуют рамку и фон. */
.zp-th-good   { border-color: rgba(140,167,157,.25); }
.zp-th-warn   {
  border-color: rgba(201,166,106,.3);
  background: linear-gradient(135deg, rgba(201,166,106,.04) 0%, var(--rnp-surface-2) 100%);
}
.zp-th-alert  {
  border-color: rgba(201,123,99,.35);
  background: linear-gradient(135deg, rgba(201,123,99,.06) 0%, var(--rnp-surface-2) 100%);
  animation: zp-alert-pulse 1.8s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes zp-alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,123,99,0); }
  50%      { box-shadow: 0 0 0 4px rgba(201,123,99,.15); }
}

/* Threshold bar — мини-полоска под значением, показывает зоны good/warn/alert
   и положение текущего значения (marker). */
.zp-threshold-bar {
  height: 4px;
  background: var(--rnp-surface);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin-top: 8px;
  display: flex;
}
.zp-threshold-bar > .zone { display: block; height: 100%; }
.zp-threshold-bar .zone-good  { background: rgba(140,167,157,.5); }
.zp-threshold-bar .zone-warn  { background: rgba(201,166,106,.5); }
.zp-threshold-bar .zone-alert { background: rgba(201,123,99,.5); }
.zp-threshold-bar .marker {
  position: absolute; top: -3px; width: 2px; height: 10px;
  background: var(--rnp-text); border-radius: 1px;
  transition: left 600ms cubic-bezier(.16,1,.3,1);
}
.zp-threshold-meta {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--rnp-text-muted); margin-top: 4px;
}

/* ─── Empty states (Steel v1.6) ─── */
.zp-empty {
  padding: 24px 20px;
  background: var(--rnp-surface-2);
  border: 1px dashed var(--rnp-border);
  border-radius: var(--rnp-radius-sm);
  text-align: center;
}
.zp-empty-icon {
  width: 32px; height: 32px;
  margin: 0 auto 10px;
  color: var(--rnp-text-muted); opacity: .5;
}
.zp-empty-text {
  font-size: 13px; color: var(--rnp-text);
  margin-bottom: 4px; font-weight: 500;
}
.zp-empty-hint {
  font-size: 12px; color: var(--rnp-text-muted);
  margin-bottom: 12px; line-height: 1.5;
  max-width: 360px; margin-left: auto; margin-right: auto;
}
.zp-empty-cta {
  display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.zp-empty-cta a, .zp-empty-cta button {
  padding: 7px 14px;
  background: var(--rnp-primary); color: var(--rnp-bg);
  text-decoration: none; border: 0;
  border-radius: var(--rnp-radius-sm);
  font-family: var(--rnp-font); font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: opacity 180ms cubic-bezier(.22,1,.36,1);
}
.zp-empty-cta a:hover, .zp-empty-cta button:hover { opacity: .85; }
.zp-empty-cta a.ghost, .zp-empty-cta button.ghost {
  background: transparent; color: var(--rnp-text);
  border: 1px solid var(--rnp-border);
}
.zp-empty-cta a.ghost:hover, .zp-empty-cta button.ghost:hover {
  border-color: var(--rnp-primary);
}

/* zp-cell-enter — fade-in для свежесмонтированных DOM-узлов после innerHTML.
   Применять к контейнеру: все его дети при mount получат опадание-затем-появление.
   Используется в /rnp cmpTable / traffic-light / funnel при смене структуры. */
@keyframes zp-cell-enter {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.zp-enter > * { animation: zp-cell-enter 280ms cubic-bezier(.22,1,.36,1) backwards; }
.zp-enter > *:nth-child(1) { animation-delay: 20ms; }
.zp-enter > *:nth-child(2) { animation-delay: 50ms; }
.zp-enter > *:nth-child(3) { animation-delay: 80ms; }
.zp-enter > *:nth-child(4) { animation-delay: 110ms; }
.zp-enter > *:nth-child(5) { animation-delay: 140ms; }
.zp-enter > *:nth-child(n+6) { animation-delay: 170ms; }
@media (prefers-reduced-motion: reduce) {
  .zp-enter > * { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   ZP Steel Design System — bundle
   Version: 2.0  ·  Updated: 2026-04-27
   Changelog:
     v2.0 (2026-04-27) — Major: /constructor → /pnl. /analytics deprecated → 301
                         redirect to /pnl. Edit expenses modal портирован
                         (.zp-exp-modal-* CSS + JS из /analytics).
   Changelog:
     v1.10 (2026-04-27) — Command palette ⌘K (.zp-cmdk-* + ZPCmdK.open) + Sticky
                          KPI rail (.zp-sticky-rail). Завершение ideas pack.
     v1.9 (2026-04-27) — Actionable insights bar (.zp-insights-bar + ZPInsights.load).
                         Backend /api/insights с rule engine: CPL/ROMI/lost-rate/pipeline.
     v1.8 (2026-04-27) — Inline sparklines (.zp-spark + ZPSpark.line). Backend
                         /api/weekly возвращает 8-недельный массив снапшотов.
     v1.7 (2026-04-27) — Delta chip (.zp-delta up/down/flat). Backend /api/summary
                         расширен compare_prev=true → prev_period snapshot.
                         ZPDelta.compute() helper для рендеринга чипов.
     v1.6 (2026-04-27) — Thresholds (.zp-th-good/warn/alert + zp-alert-pulse) и
                         Empty states (.zp-empty + CTA buttons). Декларативные
                         пороги через window.ZPThresholds, helper window.zpEmpty.
     v1.5 (2026-04-27) — .zp-enter staggered fade-in для свежесмонтированных
                         DOM-узлов (после innerHTML смены структуры).
     v1.4 (2026-04-27) — Loading skeletons на /constructor (paintWidgetSkeletons)
                         и /rnp (paintRnpSkeletons). Shimmer пока fetch грузится.
     v1.3 (2026-04-27) — Persistent value cache в ZPMotion (Map по data-key),
                         Chart.js animation defaults, /calls smooth expand.
     v1.2 (2026-04-27) — Motion v2 раскатан на все дашборды через общий
                         ZPMotion.autoTween(). Контракт: data-num + data-fmt.
     v1.1 (2026-04-27) — Motion v2 runtime в дашбордах: tweenInto + .zp-flash,
                         .zp-logo--breathing, .zp-reveal, P&L Detailed pattern,
                         /api/summary без lost-стадий в pipeline.
     v1.0 (2026-04-24) — Steel Dark + Muted палитра, JetBrains Mono + Mont,
                         Motion Council motion-spec (без runtime-интеграции).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --rnp-bg: #0a0a0a;
  --rnp-surface: #141414;
  --rnp-surface-2: #1a1a1a;
  --rnp-surface-3: rgba(255,255,255,.02);
  --rnp-border: #222222;
  --rnp-text: #f3f0ea;
  --rnp-text-muted: #8a8a8a;
  --rnp-primary: #7aa7c2;
  --rnp-primary-2: #2b4a7a;
  /* Functional data colors — Muted palette (Variant A, approved 2026-04-24).
     Same tonal register as --rnp-primary steel-blue #7aa7c2. Keep semantic meaning:
     green=good, red=bad, yellow=warn. */
  --rnp-blue:    #8eadc4;  /* dusty steel (neutral data) */
  --rnp-blue-2:  #a8c3d8;  /* lighter dusty (secondary data) */
  --rnp-green:   #8ca79d;  /* sage (growth, positive) */
  --rnp-violet:  #9e8ab0;  /* mauve (extra series) */
  --rnp-yellow:  #c9a66a;  /* mustard (warning) */
  --rnp-red:     #c97b63;  /* terracotta (loss, negative) */
  --rnp-radius-sm: 2px;
  --rnp-radius-md: 4px;
  --rnp-radius-lg: 6px;
  --rnp-shadow: 0 10px 22px rgba(0,0,0,.22);
  --rnp-shadow-hover: 0 20px 44px rgba(0,0,0,.38);
  --rnp-font: 'JetBrains Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
  --rnp-container: 1500px;
  --rnp-gap-xs: 6px;
  --rnp-gap-sm: 10px;
  --rnp-gap-md: 12px;
  --rnp-gap-lg: 16px;
  --rnp-kpi-height: 102px;
  --rnp-chart-h: 250px;
  --rnp-chart-h-sm: 220px;
  /* animation & glass */
  --rnp-ease: cubic-bezier(.4,0,.2,1);
  --rnp-transition: 200ms cubic-bezier(.4,0,.2,1);
  --rnp-glass-blur: 16px;
  --rnp-panel-bg: linear-gradient(145deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.015) 100%);
  --rnp-panel-border: rgba(255,255,255,.075);
  --rnp-glow-primary: rgba(122,167,194,.3);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--rnp-bg);
  color: var(--rnp-text);
  font-family: var(--rnp-font);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Ambient animated background ─────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 700px at 15% 15%,  rgba(122,167,194,.12)  0%, transparent 70%),
    radial-gradient(ellipse 700px 600px at 88% 85%,  rgba(43,74,122,.10) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 60% 40%,  rgba(122,167,194,.06)  0%, transparent 70%);
  animation: rnp-bg-breathe 20s ease-in-out infinite alternate;
}

@keyframes rnp-bg-breathe {
  0%   { opacity: .8;  transform: scale(1)    translate(0,    0); }
  50%  { opacity: 1;   }
  100% { opacity: .9;  transform: scale(1.07) translate(1.5%, 1%); }
}

/* ─── App container (above background) ───────────────────────────── */
.rnp-app {
  position: relative;
  z-index: 1;
  max-width: var(--rnp-container);
  margin: 0 auto;
  padding: 16px;
}

.rnp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--rnp-gap-md);
  margin-bottom: var(--rnp-gap-md);
}

.rnp-h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
}

.rnp-subtitle,
.rnp-status {
  color: var(--rnp-text-muted);
}

.rnp-subtitle { margin-top: 4px; font-size: 13px; }
.rnp-status   { margin-top: 4px; font-size: 12px; }

/* ─── Panel — glassmorphism + hover lift ──────────────────────────── */
.rnp-panel {
  position: relative;
  overflow: hidden;
  background: var(--rnp-panel-bg);
  border: 1px solid var(--rnp-panel-border);
  border-radius: var(--rnp-radius-lg);
  box-shadow: var(--rnp-shadow);
  backdrop-filter: blur(var(--rnp-glass-blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--rnp-glass-blur)) saturate(130%);
  transition:
    transform     var(--rnp-transition),
    box-shadow    var(--rnp-transition),
    border-color  var(--rnp-transition);
  animation: rnp-fade-up .45s var(--rnp-ease) both;
}

/* Top-edge highlight brim (Linear-style inset light) */
.rnp-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.22) 50%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Hover asymmetric in/out (Motion Council 2026-04-24).
   In is faster than out — feels responsive on enter, calm on leave. No translateY. */
.rnp-panel {
  transition:
    border-color 240ms cubic-bezier(.4,0,.2,1),
    box-shadow   240ms cubic-bezier(.4,0,.2,1),
    background   240ms cubic-bezier(.4,0,.2,1);
}
.rnp-panel:hover {
  border-color: rgba(122,167,194,.35);
  box-shadow: var(--rnp-shadow-hover), inset 0 1px 0 rgba(255,255,255,.05);
  transition:
    border-color 180ms cubic-bezier(.22,1,.36,1),
    box-shadow   180ms cubic-bezier(.22,1,.36,1),
    background   180ms cubic-bezier(.22,1,.36,1);
}

.rnp-panel-pad   { padding: 12px; }

.rnp-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 800;
}

.rnp-panel-subtitle {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--rnp-text-muted);
}

/* ─── Grids ───────────────────────────────────────────────────────── */
.rnp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--rnp-gap-md);
  margin-bottom: var(--rnp-gap-md);
}

.rnp-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rnp-gap-sm);
}

.rnp-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--rnp-gap-sm);
}

.rnp-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--rnp-gap-sm);
  margin-bottom: var(--rnp-gap-md);
}

.rnp-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--rnp-gap-sm);
  margin-bottom: var(--rnp-gap-md);
}

/* ─── KPI card ────────────────────────────────────────────────────── */
.rnp-kpi {
  min-height: var(--rnp-kpi-height);
  padding: 12px 14px;
}

/* Shimmer sweep — plays once on page load, then disappears */
.rnp-kpi::after {
  content: '';
  position: absolute;
  top: 0; left: -70%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.11) 50%, transparent 100%);
  animation: rnp-shimmer-sweep 1.1s var(--rnp-ease) both;
  pointer-events: none;
  border-radius: inherit;
}

/* Stagger shimmer across columns */
.rnp-kpis .rnp-kpi:nth-child(1)::after { animation-delay:   0ms; }
.rnp-kpis .rnp-kpi:nth-child(2)::after { animation-delay:  70ms; }
.rnp-kpis .rnp-kpi:nth-child(3)::after { animation-delay: 140ms; }
.rnp-kpis .rnp-kpi:nth-child(4)::after { animation-delay: 210ms; }
.rnp-kpis .rnp-kpi:nth-child(5)::after { animation-delay: 280ms; }
.rnp-kpis .rnp-kpi:nth-child(6)::after { animation-delay: 350ms; }

@keyframes rnp-shimmer-sweep {
  0%   { left: -70%;  opacity: 1; }
  75%  { left: 110%;  opacity: 1; }
  100% { left: 110%;  opacity: 0; }
}

.rnp-kpi-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--rnp-text-muted);
}

.rnp-kpi-value {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 800;
}

.rnp-kpi-delta { margin-top: 6px; font-size: 12px; }

.rnp-up      { color: var(--rnp-green); }
.rnp-down    { color: var(--rnp-red); }
.rnp-neutral { color: var(--rnp-text-muted); }

.rnp-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--rnp-text-muted);
}

/* ─── Form controls ───────────────────────────────────────────────── */
.rnp-input,
.rnp-select,
.rnp-button {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--rnp-radius-sm);
  font-size: 14px;
}

.rnp-input,
.rnp-select {
  border: 1px solid var(--rnp-border);
  background: var(--rnp-surface-2);
  color: var(--rnp-text);
  outline: none;
  transition: border-color var(--rnp-transition), box-shadow var(--rnp-transition);
}

.rnp-input:focus,
.rnp-select:focus {
  border-color: var(--rnp-primary);
  box-shadow: 0 0 0 3px rgba(122,167,194,.12);
}

/* ─── Button — Solid Steel (Variant A, approved 2026-04-24) ────────────
   Flat, no gradient. Primary = solid accent on near-black text for max contrast.
   Pairs with .rnp-button-terminal (Variant B) when you want a secondary,
   more technical action. Pairs with .rnp-button-secondary for ghost outline. */
.rnp-button {
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .02em;
  background: var(--rnp-primary);
  color: #0a0a0a;
  transition:
    background   150ms var(--rnp-ease),
    transform    150ms var(--rnp-ease);
}

.rnp-button:not(.rnp-button-secondary):not(.rnp-button-terminal):hover {
  background: #a8ccdf;
  transform: translateY(-1px);
}

.rnp-button:not(.rnp-button-secondary):not(.rnp-button-terminal):active,
.rnp-button-terminal:active,
.rnp-button-secondary:active {
  transform: scale(.96);
  transition: transform 80ms cubic-bezier(.4,0,1,1);
}

.rnp-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.rnp-button-secondary {
  background: transparent;
  border: 1px solid var(--rnp-border);
  color: var(--rnp-text);
}

.rnp-button-secondary:hover {
  border-color: var(--rnp-primary);
  color: var(--rnp-primary);
  background: transparent;
  transform: none;
}

/* ─── Button — Terminal Bracketed (Variant B, approved 2026-04-24) ──────
   Outlined primary with bracket decorations that slide apart on hover.
   Reads as a command, not a submit. Use alongside .rnp-button for a
   two-tier action hierarchy (primary submit vs technical / export / command). */
.rnp-button-terminal {
  background: transparent;
  color: var(--rnp-text);
  border: 1px solid var(--rnp-primary);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .02em;
  position: relative;
  transition: background 150ms var(--rnp-ease);
  padding: 0 16px;
  cursor: pointer;
}
.rnp-button-terminal::before {
  content: '[';
  color: var(--rnp-primary);
  margin-right: 3px;
  transition: margin 150ms var(--rnp-ease);
}
.rnp-button-terminal::after {
  content: ']';
  color: var(--rnp-primary);
  margin-left: 3px;
  transition: margin 150ms var(--rnp-ease);
}
.rnp-button-terminal:hover {
  background: rgba(122,167,194,.1);
}
.rnp-button-terminal:hover::before { margin-right: 6px; }
.rnp-button-terminal:hover::after  { margin-left: 6px; }

/* ─── Mini grid / card ────────────────────────────────────────────── */
.rnp-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--rnp-gap-sm);
}

.rnp-mini-card {
  padding: 12px;
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-md);
  background: var(--rnp-surface-3);
  transition: border-color var(--rnp-transition), background var(--rnp-transition);
}

.rnp-mini-card:hover {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
}

.rnp-mini-title { margin-bottom: 5px; font-size: 12px; color: var(--rnp-text-muted); }
.rnp-mini-value { font-size: 22px; font-weight: 800; }

/* ─── Charts ──────────────────────────────────────────────────────── */
.rnp-chart    { position: relative; height: var(--rnp-chart-h); }
.rnp-chart-sm { position: relative; height: var(--rnp-chart-h-sm); }

/* ─── Funnel ──────────────────────────────────────────────────────── */
.rnp-funnel { display: grid; gap: var(--rnp-gap-sm); }

.rnp-funnel-row {
  padding: 10px;
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-md);
  background: var(--rnp-surface-3);
  transition: border-color var(--rnp-transition), background var(--rnp-transition);
}

.rnp-funnel-row:hover {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
}

.rnp-funnel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}

/* ─── Progress bar ────────────────────────────────────────────────── */
.rnp-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #0b1118;
}

.rnp-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--rnp-blue), var(--rnp-violet));
  animation: rnp-bar-fill .9s var(--rnp-ease) both;
}

@keyframes rnp-bar-fill {
  from { clip-path: inset(0 100% 0 0 round 999px); }
  to   { clip-path: inset(0 0%   0 0 round 999px); }
}

/* ─── Segmented control ───────────────────────────────────────────── */
.rnp-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-sm);
  background: var(--rnp-surface-2);
}

.rnp-segmented button {
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--rnp-text);
  cursor: pointer;
  transition: background var(--rnp-transition), color var(--rnp-transition);
}

.rnp-segmented button:hover:not(.is-active) {
  background: rgba(255,255,255,.06);
}

.rnp-segmented button.is-active {
  background: #223249;
}

/* ─── Owner / compare layouts ─────────────────────────────────────── */
.rnp-owner-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--rnp-gap-sm);
}

.rnp-compare-list  { display: grid; gap: var(--rnp-gap-sm); }

.rnp-compare-item {
  padding: 10px;
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-md);
  background: var(--rnp-surface-3);
  transition: border-color var(--rnp-transition);
}

.rnp-compare-item:hover { border-color: rgba(255,255,255,.1); }

.rnp-compare-item h4 { margin: 0 0 6px; font-size: 13px; }

.rnp-compare-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0;
  font-size: 12px;
}

/* ─── Table ───────────────────────────────────────────────────────── */
.rnp-table-wrap {
  max-height: 420px;
  overflow: auto;
}

.rnp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rnp-table th,
.rnp-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--rnp-border);
  text-align: right;
  white-space: nowrap;
}

.rnp-table th:first-child,
.rnp-table td:first-child,
.rnp-table th:nth-child(2),
.rnp-table td:nth-child(2) {
  text-align: left;
}

.rnp-table th {
  position: sticky;
  top: 0;
  background: var(--rnp-surface);
  color: var(--rnp-text-muted);
}

.rnp-table tbody tr {
  transition: background var(--rnp-transition);
}

.rnp-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}

/* ─── Empty state ─────────────────────────────────────────────────── */
.rnp-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--rnp-text-muted);
  font-size: 13px;
}

/* ─── Info / Tooltip ──────────────────────────────────────────────── */
.rnp-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--rnp-border);
  border-radius: 999px;
  color: var(--rnp-text-muted);
  font-size: 11px;
  position: relative;
  cursor: help;
  transition: border-color var(--rnp-transition), color var(--rnp-transition);
}

.rnp-info:hover {
  border-color: rgba(255,255,255,.2);
  color: var(--rnp-text);
}

.rnp-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%) translateY(4px);
  min-width: 220px;
  max-width: 250px;
  padding: 10px 12px;
  border: 1px solid var(--rnp-border);
  border-radius: var(--rnp-radius-sm);
  background: #0d141d;
  box-shadow: var(--rnp-shadow);
  transition: opacity .15s var(--rnp-ease), transform .15s var(--rnp-ease), visibility .15s;
  z-index: 10;
}

.rnp-tooltip-title   { margin-bottom: 3px; font-size: 12px; font-weight: 700; }
.rnp-tooltip-formula { margin-bottom: 3px; font-size: 12px; color: var(--rnp-blue-2); }
.rnp-tooltip-note    { font-size: 11px; line-height: 1.35; color: var(--rnp-text-muted); }

.rnp-info:hover .rnp-tooltip,
.rnp-info.is-open .rnp-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Entry animation ─────────────────────────────────────────────── */
@keyframes rnp-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1150px) {
  .rnp-filters                  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rnp-kpis                     { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rnp-grid-2, .rnp-owner-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .rnp-filters,
  .rnp-kpis,
  .rnp-mini-grid,
  .rnp-grid-4,
  .rnp-grid-6 { grid-template-columns: 1fr; }
}

/* ─── Semantic helpers ────────────────────────────────────────────── */
.rnp-surface   { background: var(--rnp-surface); }
.rnp-surface-2 { background: var(--rnp-surface-2); }
.rnp-text-muted    { color: var(--rnp-text-muted); }
.rnp-accent-blue   { color: var(--rnp-blue); }
.rnp-accent-green  { color: var(--rnp-green); }
.rnp-accent-violet { color: var(--rnp-violet); }
.rnp-accent-yellow { color: var(--rnp-yellow); }
.rnp-accent-red    { color: var(--rnp-red); }
.rnp-mb-sm { margin-bottom: 10px; }
.rnp-mb-md { margin-bottom: 12px; }
.rnp-mb-lg { margin-bottom: 16px; }
.rnp-flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rnp-flex-start   { display: flex; align-items: flex-start; gap: 10px; }
.rnp-hidden       { display: none !important; }

/* ─── Respect prefers-reduced-motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .rnp-panel,
  .rnp-kpi::after,
  .rnp-bar > div {
    animation: none !important;
  }

  .rnp-panel,
  .rnp-button,
  .rnp-input,
  .rnp-select,
  .rnp-mini-card,
  .rnp-funnel-row,
  .rnp-compare-item,
  .rnp-table tbody tr,
  .rnp-segmented button,
  .rnp-info,
  .rnp-tooltip {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   BRAND — "Защитаплёнкой.рф" Logo + Global Navigation
   ═══════════════════════════════════════════════════════════════════ */

/* Логотип (Линза + вордмарк). Использовать в nav, topbar, hero.
   HTML:
   <div class="zp-logo">
     <svg viewBox="0 0 52 52" fill="none" width="20" height="20" aria-hidden="true">
       <circle cx="19" cy="26" r="17" stroke="currentColor" stroke-width="2.5"/>
       <circle cx="33" cy="26" r="17" stroke="#7aa7c2" stroke-width="2.5"/>
       <circle cx="26" cy="26" r="2.8" fill="#7aa7c2"/>
     </svg>
     <span class="zp-wordmark">Защита<em>плёнкой</em>.<span class="zp-tld">рф</span></span>
   </div>
*/
.zp-logo {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--rnp-text);
  letter-spacing: .01em;
  text-decoration: none;
}
.zp-logo svg { flex-shrink: 0; }
.zp-wordmark em { font-style: normal; color: var(--rnp-primary); }
.zp-wordmark .zp-tld { opacity: .5; }

/* Global Navigation — fixed top bar со ссылками между дашбордами */
.zp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  height: 44px;
  background: rgba(10,10,10,.96);
  border-bottom: 1px solid var(--rnp-border);
  backdrop-filter: blur(16px);
  display: flex; align-items: center;
  padding: 0 20px;
  font-family: var(--rnp-font);
}
.zp-nav a {
  color: var(--rnp-text-muted); text-decoration: none;
  font-size: 12px; padding: 0 14px; height: 44px;
  display: flex; align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
  white-space: nowrap;
}
.zp-nav a:hover { color: var(--rnp-text); }
.zp-nav a.is-active { color: var(--rnp-text); border-bottom-color: var(--rnp-primary); }
.zp-nav .zp-logo { margin-right: 8px; }
.zp-nav-spacer { height: 44px; }

/* Legacy alias (backward compat со старыми дашбордами на VPS) */
.ea-global-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; height: 44px; background: rgba(10,10,10,.96); border-bottom: 1px solid var(--rnp-border); backdrop-filter: blur(16px); display: flex; align-items: center; padding: 0 20px; font-family: var(--rnp-font); }
.ea-global-nav a { color: var(--rnp-text-muted); text-decoration: none; font-size: 12px; padding: 0 14px; height: 44px; display: flex; align-items: center; border-bottom: 2px solid transparent; transition: color 150ms, border-color 150ms; white-space: nowrap; }
.ea-global-nav a:hover { color: var(--rnp-text); }
.ea-global-nav a.active { color: var(--rnp-text); border-bottom-color: var(--rnp-primary); }
.ea-global-nav .logo { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--rnp-text); margin-right: 8px; padding-left: 0; border: none !important; letter-spacing: .01em; }
.ea-global-nav .logo svg { flex-shrink: 0; }
.ea-global-nav-spacer { height: 44px; }

/* ═══════════════════════════════════════════════════════════════════
   MOTION v2 — approved primitives (2026-04-24, Motion Council)
   ═══════════════════════════════════════════════════════════════════ */

/* 1. Linz breathing — only on logos 40px+ (hero/cover). Never on nav-sized lens. */
@keyframes zp-lens-breathe {
  0%, 100% { transform: scale(.97); }
  50%      { transform: scale(1.03); }
}
.zp-logo--breathing svg {
  animation: zp-lens-breathe 6s ease-in-out infinite;
  transform-origin: center;
}
.zp-logo--breathing:hover svg { animation-play-state: paused; }

/* 2. Heading reveal — clip-path word slide. Requires .w spans inside target.
   Use via JS util zp-motion.js: ZPMotion.reveal(el) wraps words automatically. */
@keyframes zp-clip-reveal { to { clip-path: inset(0 0 0 0); } }
.zp-reveal .w {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: zp-clip-reveal 600ms cubic-bezier(.22,.61,.36,1) forwards;
}
.zp-reveal .w:nth-child(2) { animation-delay: 150ms; }
.zp-reveal .w:nth-child(3) { animation-delay: 300ms; }
.zp-reveal .w:nth-child(4) { animation-delay: 450ms; }
.zp-reveal .w:nth-child(5) { animation-delay: 600ms; }
.zp-reveal .w:nth-child(n+6) { animation-delay: 750ms; }

/* 5. Number tween — no CSS, driven by zp-motion.js ZPMotion.tweenNumber(el, to).
   Markup: <span class="zp-num" data-num="1245000">1 245 000</span> */

/* 6. Cell flash — text color flash on change (variant B).
   Usage: add .is-hot to the <td> — animation plays once. */
@keyframes zp-cell-flash {
  0%   { color: inherit; }
  30%  { color: var(--rnp-primary); }
  100% { color: inherit; }
}
.zp-flash,
td.is-hot { animation: zp-cell-flash 600ms cubic-bezier(.4,0,.2,1) forwards; }

/* 8. Skeleton shimmer wave — steel-blue blip sliding L→R.
   Usage: <div class="zp-skel zp-skel--lg"></div> while data is loading. */
@keyframes zp-skel-wave { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.zp-skel {
  background: linear-gradient(90deg,
    var(--rnp-surface-2) 0%,
    rgba(122,167,194,.08) 50%,
    var(--rnp-surface-2) 100%);
  background-size: 200% 100%;
  border-radius: var(--rnp-radius-sm);
  animation: zp-skel-wave 2400ms ease-in-out infinite;
}
.zp-skel--lg { height: 32px; width: 80%; margin-bottom: 10px; }
.zp-skel--sm { height: 12px; width: 60%; }

/* 9. Accessibility — prefers-reduced-motion contract (Val Head, mandatory).
   Kills all decorative loops and animations; preserves instant transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
