/* demo-lab.css - DemoLab секция v2.0: device-frame + 10 multi-screen демо.
   Подключается в BaseLayout.astro (external CSS, не Astro scoped).
   Все цвета через var(--token) из input.css.
   Feedback: feedback_astro_scoped_css_dynamic_dom.md - внешний файл обязателен для JS-DOM. */

/* ============================================================
   1. SECTION WRAPPER
   ============================================================ */
.demo-lab {
  position: relative;
  padding: var(--sp-16) 0;
  background: var(--bg-base);
}
.demo-lab__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.demo-lab__head {
  text-align: center;
  margin-bottom: var(--sp-12);
}
.demo-lab__title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 var(--sp-4);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.demo-lab__sub {
  font-size: 16px;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
}
.demo-lab__usage {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  max-width: 720px;
  margin: var(--sp-6) auto 0;
  padding: var(--sp-4) var(--sp-6);
  background: rgba(var(--brand-rgb), 0.06);
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  border-radius: 12px;
  text-align: left;
}
.demo-lab__usage-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--brand-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.demo-lab__usage-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.demo-lab__usage-text strong {
  color: var(--text-primary);
  font-weight: 700;
}
@media (max-width: 639px) {
  .demo-lab__usage {
    padding: var(--sp-3) var(--sp-4);
  }
  .demo-lab__usage-text { font-size: 13px; }
}

/* ============================================================
   2. TABS
   ============================================================ */
.demo-lab__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-8);
}
.demo-lab__tab {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  min-height: 44px;
  transition: background 150ms, border-color 150ms, color 150ms, transform 150ms;
  white-space: nowrap;
}
.demo-lab__tab:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.demo-lab__tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.demo-lab__tab[aria-selected="true"] {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* mobile: горизонтальный скролл вместо wrap */
@media (max-width: 480px) {
  .demo-lab__tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .demo-lab__tabs::-webkit-scrollbar { display: none; }
}

/* ============================================================
   3. PANEL SWITCHER
   ============================================================ */
.demo-lab__panels {
  display: grid;
  place-items: center;
}
.demo-lab__panel {
  display: none;
  width: 100%;
}
.demo-lab__panel[data-active="true"] {
  display: block;
}

/* ============================================================
   4. PANEL GRID: copy (left) + device-frame (center) + specs (right)
   ============================================================ */
.demo-lab__panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .demo-lab__panel-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: var(--sp-6);
  }
  .demo-lab__panel-grid .demo-lab__specs {
    grid-column: 1 / -1;
    margin-top: var(--sp-4);
  }
}
@media (max-width: 768px) {
  .demo-lab__panel-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .demo-lab__panel-grid .demo-frame-wrap {
    order: -1;
  }
  .demo-lab__panel-grid .demo-lab__specs {
    grid-column: 1;
    margin-top: 0;
  }
}

.demo-lab__copy {
  min-width: 0;
}
.demo-lab__copy-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 var(--sp-3);
}
.demo-lab__copy-what {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-4);
}
.demo-lab__copy-for-who {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: var(--sp-4);
}
.demo-lab__copy-for-who-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subdued);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}
.demo-lab__copy-chip {
  display: inline-flex;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-text);
  background: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.20);
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.demo-lab__copy-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
}
.demo-lab__copy-bullets li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}
.demo-lab__copy-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 6px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

/* === RIGHT COLUMN: SPECS === */
.demo-lab__specs {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: rgba(var(--brand-rgb), 0.04);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  border-radius: 16px;
  min-width: 0;
}
.demo-lab__spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-lab__spec-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subdued);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.demo-lab__spec-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.demo-lab__spec--price .demo-lab__spec-value {
  color: var(--brand-text);
  font-size: 18px;
}
.demo-lab__spec-stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.demo-lab__spec-stack li {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.demo-lab__spec--result {
  padding-top: var(--sp-2);
  border-top: 1px dashed rgba(var(--brand-rgb), 0.20);
}
.demo-lab__spec-result {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: italic;
}

.demo-lab__run {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: var(--r-md);
  padding: 12px 24px;
  cursor: pointer;
  min-height: 48px;
  transition: background 150ms, transform 150ms;
}
.demo-lab__run:hover { background: var(--brand-dim); }
.demo-lab__run:active { transform: translateY(1px); }
.demo-lab__run:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.demo-lab__cta-after {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-4);
  font-size: 14px;
  color: var(--brand-text);
  text-decoration: none;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 300ms, transform 300ms;
  pointer-events: none;
}
.demo-lab__cta-after.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.demo-lab__cta-after::after {
  content: '\2192';
  transition: transform 150ms;
}
.demo-lab__cta-after:hover::after { transform: translateX(3px); }

/* ============================================================
   5. DEVICE FRAME WRAPPER
   ============================================================ */
.demo-frame-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ============================================================
   6. PHONE FRAME (375×812 iPhone 13 proportions)
   ============================================================ */
.device-phone {
  position: relative;
  width: 260px;
  min-width: 260px;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 8px #111,
    0 0 0 10px rgba(255,255,255,0.06),
    0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
  /* aspect: 375/812 ≈ 0.462, high enough to scroll  */
  height: 540px;
}

/* status bar */
.device-phone__statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #e5e7eb;
  background: #111;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.device-phone__statusbar-time {
  font-variant-numeric: tabular-nums;
}
.device-phone__statusbar-icons {
  display: flex;
  gap: 5px;
  align-items: center;
}
.device-phone__statusbar-icons svg {
  fill: currentColor;
  opacity: 0.9;
}
/* notch pill */
.device-phone__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}

/* scrollable inner area */
.device-phone__screen {
  height: calc(540px - 28px - 24px); /* total - statusbar - home indicator */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #0f0f0f;
  /* scroll-snap для multi-screen */
  scroll-snap-type: y mandatory;
  /* Scroll containment: при достижении конца внутреннего скролла
     не передавать событие странице (мышь не должна скроллить лендинг
     когда курсор на телефоне). */
  overscroll-behavior: contain;
}
.device-phone__screen::-webkit-scrollbar { display: none; }

/* home indicator */
.device-phone__home {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  flex-shrink: 0;
}
.device-phone__home-bar {
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
}

/* ============================================================
   7. DESKTOP FRAME (600×375, 16:10 ratio)
   ============================================================ */
.device-desktop {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 20px 60px rgba(0,0,0,0.4);
}
/* mac-style traffic lights */
.device-desktop__titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #111;
  flex-shrink: 0;
}
.device-desktop__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.device-desktop__dot:nth-child(1) { background: #f87171; }
.device-desktop__dot:nth-child(2) { background: #fbbf24; }
.device-desktop__dot:nth-child(3) { background: #4ade80; }
.device-desktop__titlebar-url {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 9px;
  color: #9ca3af;
  text-align: center;
  margin: 0 8px;
}

.device-desktop__screen {
  height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  background: #0f0f0f;
  overscroll-behavior: contain;
}
.device-desktop__screen::-webkit-scrollbar { width: 4px; }
.device-desktop__screen::-webkit-scrollbar-track { background: transparent; }
.device-desktop__screen::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ============================================================
   8. SCREEN SLIDE (snap unit for multi-screen demos)
   ============================================================ */
.demo-screen {
  scroll-snap-align: start;
  min-height: 100%;
  padding: 14px;
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1.5;
  box-sizing: border-box;
  position: relative;
}
/* for desktop - no snap needed, just scrolls */
.device-desktop__screen .demo-screen {
  min-height: auto;
}

/* ============================================================
   9. PLACEHOLDER (lazy-render)
   ============================================================ */
.demo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  gap: 12px;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
  padding: 16px;
}
.demo-placeholder__icon {
  font-size: 28px;
  opacity: 0.5;
}
.demo-placeholder__hint {
  font-size: 11px;
  color: #4b5563;
}
/* Кликабельный placeholder-кнопка (на /demo/ hub-page) */
.demo-placeholder--btn {
  background: transparent;
  border: 2px dashed rgba(22, 163, 74, 0.45);
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: #15803d;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.demo-placeholder--btn:hover,
.demo-placeholder--btn:focus-visible {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.85);
  outline: none;
  transform: scale(1.01);
}
.demo-placeholder--btn .demo-placeholder__icon {
  opacity: 0.85;
}
.demo-placeholder--btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

/* ============================================================
   10. PANEL FADE TRANSITION
   ============================================================ */
@keyframes demo-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.demo-lab__panel[data-active="true"] {
  animation: demo-panel-in 200ms ease forwards;
}

/* ============================================================
   11. CHAT / BOT STYLES (demo 2, 3)
   ============================================================ */
.demo-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 490px;
  background: #0f0f0f;
}
/* chat app header bar */
.demo-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.demo-chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  font-weight: 700;
}
.demo-chat-name {
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
}
.demo-chat-online {
  font-size: 9px;
  color: var(--brand);
  margin-top: 1px;
}
.demo-chat-badge {
  margin-left: auto;
  font-size: 9px;
  color: #9ca3af;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 2px 7px;
}
/* messages area */
.demo-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: none;
}
.demo-chat-messages::-webkit-scrollbar { display: none; }
/* chat bubbles */
.chat-msg {
  max-width: 85%;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 250ms, transform 250ms;
}
.chat-msg.show { opacity: 1; transform: translateY(0); }
.chat-user {
  background: var(--brand);
  color: #ffffff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
  white-space: pre-line;
}
.chat-bot {
  background: #2a2a2a;
  color: #e5e7eb;
  border-bottom-left-radius: 4px;
  white-space: pre-line;
}
/* System message: thin centered italic line, low contrast - не баббл */
.demo-chat-system {
  align-self: center;
  font-size: 10px;
  font-style: italic;
  color: #6b7280;
  text-align: center;
  margin: 4px auto;
  padding: 0 12px;
  opacity: 0.85;
  max-width: 80%;
}
/* typing indicator */
.chat-typing {
  display: inline-flex;
  gap: 4px;
  padding: 8px 12px;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  background: #888;
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-4px); opacity: 1; }
}
/* inline keyboard buttons */
.chat-inline-btn {
  display: inline-block;
  background: rgba(22,163,74,0.15);
  color: var(--brand-text, #15803d);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10px;
  cursor: pointer;
  margin: 3px 3px 0 0;
  transition: background 150ms;
}
.chat-inline-btn:hover {
  background: rgba(22,163,74,0.25);
}
/* mini-app overlay inside phone screen */
.demo-miniapp-overlay {
  position: absolute;
  inset: 0;
  background: #0f0f0f;
  z-index: 10;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 300ms ease;
}
.demo-miniapp-overlay.open {
  transform: translateY(0);
}
.demo-miniapp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.demo-miniapp-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  margin-left: auto;
}
.demo-miniapp-title {
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
}
.demo-miniapp-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: none;
}
.demo-miniapp-body::-webkit-scrollbar { display: none; }

/* ============================================================
   12. CRM STYLES
   ============================================================ */
/* mini-tabs inside device */
.demo-minitabs {
  display: flex;
  gap: 2px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8px 10px 0;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.demo-minitabs::-webkit-scrollbar { display: none; }
.demo-minitab {
  font-size: 10px;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 8px 6px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: color 150ms, border-color 150ms;
}
.demo-minitab[aria-selected="true"] {
  color: var(--brand-text, #15803d);
  border-color: var(--brand);
}
.demo-minitab-panel {
  display: none;
  padding: 10px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.demo-minitab-panel::-webkit-scrollbar { display: none; }
.demo-minitab-panel[data-active="true"] { display: block; }

/* CRM dark theme (как остальные демо) */
.crm-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  min-height: 200px;
}
.crm-col {
  background: #1f1f1f;
  border-radius: 8px;
  padding: 6px;
}
.crm-col-title {
  font-size: 8px;
  color: #9ca3af;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.crm-card {
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 6px;
  margin-bottom: 5px;
  font-size: 9px;
  color: #e5e7eb;
  line-height: 1.4;
  cursor: default;
  transition: transform 150ms, box-shadow 150ms;
}
.crm-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.crm-card__name { font-weight: 600; margin-bottom: 2px; }
.crm-card__tag {
  display: inline-block;
  background: rgba(22,163,74,0.15);
  color: #4ade80;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 8px;
  margin-top: 3px;
}
.crm-card__amount {
  color: #4ade80;
  font-weight: 700;
  margin-top: 2px;
}
.crm-card--won { border-color: rgba(34,197,94,0.2); }
.crm-card--lost { border-color: rgba(239,68,68,0.2); }
/* Adaptive height: device-desktop окно для CRM сжимается под высоту активного таба
   (Канбан больше, Карточка меньше - окно подгоняется, нет пустого места снизу) */
#demo-screen-crm {
  height: auto;
  max-height: 420px;
  min-height: 0;
}
/* Override demos.js inline flex:1 on panelWrap so content drives height */
#demo-screen-crm > div[style*="flex:1"] {
  flex: none !important;
  overflow: visible !important;
}
#demo-screen-crm .demo-minitab-panel {
  flex: none;
  overflow-y: visible;
}
/* Smooth height transition when switching tabs */
.device-desktop {
  transition: max-height 280ms ease;
}

/* KPI cards */
.crm-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.crm-kpi {
  background: #1f1f1f;
  border-radius: 8px;
  padding: 8px;
}
.crm-kpi__label {
  font-size: 8px;
  color: #6b7280;
  margin-bottom: 4px;
}
.crm-kpi__value {
  font-size: 16px;
  font-weight: 700;
  color: #e5e7eb;
  line-height: 1;
}
.crm-kpi__delta {
  font-size: 8px;
  color: #4ade80;
  margin-top: 2px;
}

/* leads table */
.crm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}
.crm-table th {
  color: #6b7280;
  text-align: left;
  padding: 4px 6px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.crm-table td {
  padding: 5px 6px;
  color: #d4d4d4;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.crm-status {
  display: inline-block;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 7px;
  font-weight: 600;
}
.crm-status--new { background: rgba(96,165,250,0.15); color: #60a5fa; }
.crm-status--in  { background: rgba(250,191,36,0.15);  color: #fbbf24; }
.crm-status--won { background: rgba(34,197,94,0.15);  color: #4ade80; }

/* client timeline */
.crm-timeline { padding: 4px 0; }
.crm-event {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  position: relative;
}
.crm-event::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: -6px;
  width: 1px;
  background: rgba(255,255,255,0.07);
}
.crm-event:last-child::before { display: none; }
.crm-event__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.crm-event__body { flex: 1; }
.crm-event__title {
  font-size: 9px;
  color: #e5e7eb;
  font-weight: 600;
  margin-bottom: 1px;
}
.crm-event__time { font-size: 8px; color: #6b7280; }

/* ============================================================
   13. BAR CHART (funnel + dashboard)
   ============================================================ */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 70px;
  margin: 8px 0;
  padding: 0 2px;
}
.bar-chart__bar {
  flex: 1;
  background: rgba(22,163,74,0.3);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 1s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.bar-chart__bar:hover {
  background: rgba(22,163,74,0.5);
}
.bar-chart__bar--accent { background: rgba(22,163,74,0.55); }

/* funnel bars */
.funnel-row {
  margin-bottom: 6px;
}
.funnel-row__meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  margin-bottom: 2px;
  color: #9ca3af;
}
.funnel-row__value { font-weight: 700; }
.funnel-row__conv { color: #6b7280; font-size: 8px; }
.funnel-bar-track {
  height: 16px;
  background: #1f1f1f;
  border-radius: 4px;
  overflow: hidden;
}
.funnel-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* pie chart (SVG-based) */
.pie-chart-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.pie-legend { flex: 1; }
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #d4d4d4;
  margin-bottom: 4px;
}
.pie-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   14. CONTENT / CALENDAR STYLES
   ============================================================ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 6px;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f1f1f;
  border-radius: 4px;
  font-size: 9px;
  color: #6b7280;
  position: relative;
}
.cal-cell.has-post  { background: rgba(22,163,74,0.2);  color: #4ade80; font-weight: 700; }
.cal-cell.has-reels { background: rgba(168,85,247,0.2); color: #c084fc; font-weight: 700; }
.cal-cell.has-story { background: rgba(250,191,36,0.2); color: #fbbf24; font-weight: 700; }
.cal-cell.today { outline: 1px solid rgba(22,163,74,0.5); }

/* instagram post card */
.ig-post {
  background: #1f1f1f;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.ig-post__img {
  height: 80px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.ig-post__body { padding: 8px 10px; }
.ig-post__caption { font-size: 9px; color: #d4d4d4; line-height: 1.4; margin-bottom: 4px; }
.ig-post__tags { font-size: 8px; color: #4ade80; line-height: 1.6; }
.ig-post__stats {
  display: flex;
  gap: 8px;
  font-size: 8px;
  color: #6b7280;
  margin-top: 4px;
}

/* video thumbnail */
.video-thumb {
  position: relative;
  background: #1f1f1f;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 9/16;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-thumb__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-thumb__play {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #000;
  padding-left: 2px;
}
.video-thumb__duration {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

/* ============================================================
   15. VOICE CALL STYLES
   ============================================================ */
.voice-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 490px;
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  padding: 20px 16px 16px;
  align-items: center;
}
.voice-caller-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f2937, #374151);
  border: 2px solid rgba(22,163,74,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 8px;
}
.voice-caller-name {
  font-size: 16px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 4px;
  text-align: center;
}
.voice-call-status {
  font-size: 12px;
  color: var(--brand);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-call-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: voice-pulse 1.6s infinite;
}
.voice-call-status--ended::before {
  animation: none;
  background: #6b7280;
}
@keyframes voice-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.voice-call-timer {
  font-size: 11px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
/* waveform */
.voice-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 36px;
  margin-bottom: 14px;
}
.voice-wave-bar {
  display: inline-block;
  width: 3px;
  height: 6px;
  background: var(--brand);
  border-radius: 2px;
  animation: voice-wave 1.2s infinite;
  animation-delay: calc(var(--bar-i, 0) * 80ms);
}
@keyframes voice-wave {
  0%, 100% { height: 6px; }
  50% { height: 24px; }
}
.voice-waveform--ended .voice-wave-bar {
  animation: none;
  height: 3px;
  opacity: 0.3;
}
/* transcript */
.voice-transcript {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  font-size: 10px;
  scrollbar-width: none;
  margin-bottom: 8px;
}
.voice-transcript::-webkit-scrollbar { display: none; }
.voice-line {
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 250ms, transform 250ms;
}
.voice-line.show { opacity: 1; transform: translateY(0); }
.voice-line-label {
  font-size: 8px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.voice-line--client .voice-line-label { color: var(--brand); }
.voice-line-text {
  font-size: 10px;
  color: #e5e7eb;
  line-height: 1.4;
}
/* call end status */
.voice-end-status {
  width: 100%;
  background: rgba(22,163,74,0.1);
  border: 1px solid rgba(22,163,74,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 10px;
  color: #4ade80;
  text-align: center;
  opacity: 0;
  transition: opacity 400ms;
}
.voice-end-status.show { opacity: 1; }

/* ============================================================
   16. MINI-APP (MAX messenger) STYLES
   ============================================================ */
.max-messenger {
  background: #0f0f0f;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 490px;
}
.max-topbar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  gap: 10px;
}
.max-topbar__logo {
  font-size: 13px;
  font-weight: 700;
  color: #e5e7eb;
}
.max-topbar__logo span { color: var(--brand); }
.max-topbar__icons {
  margin-left: auto;
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: #9ca3af;
}
.max-chatlist { flex: 1; overflow-y: auto; scrollbar-width: none; }
.max-chatlist::-webkit-scrollbar { display: none; }
.max-chat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 150ms;
}
.max-chat-item:hover { background: rgba(255,255,255,0.04); }
.max-chat-item.active { background: rgba(22,163,74,0.08); }
.max-chat-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  position: relative;
}
.max-chat-ava__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: var(--brand);
  border-radius: 50%;
  border: 2px solid #0f0f0f;
  font-size: 7px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.max-chat-info { flex: 1; min-width: 0; }
.max-chat-name { font-size: 11px; font-weight: 600; color: #e5e7eb; }
.max-chat-preview { font-size: 9px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.max-chat-meta { text-align: right; }
.max-chat-time { font-size: 8px; color: #6b7280; }

/* mini-app screens inside MAX */
.max-miniapp {
  position: absolute;
  inset: 0;
  background: #0f0f0f;
  z-index: 20;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 320ms ease;
}
.max-miniapp.open { transform: translateY(0); }
.max-miniapp-nav {
  display: flex;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.max-miniapp-nav-btn {
  flex: 1;
  padding: 10px 4px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 9px;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color 150ms, border-color 150ms;
}
.max-miniapp-nav-btn span:first-child { font-size: 14px; }
.max-miniapp-nav-btn[aria-selected="true"] {
  color: var(--brand-text, #15803d);
  border-color: var(--brand);
}
.max-miniapp-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: none;
}
.max-miniapp-content::-webkit-scrollbar { display: none; }
.max-miniapp-page { display: none; }
.max-miniapp-page.active { display: block; }

/* service card */
.svc-card {
  background: #1f1f1f;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.svc-card__img {
  height: 60px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.svc-card__body { padding: 8px 10px; }
.svc-card__name { font-size: 11px; font-weight: 600; color: #e5e7eb; margin-bottom: 2px; }
.svc-card__price { font-size: 10px; color: #4ade80; }
.svc-card__btn {
  display: block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  width: 100%;
  font-family: inherit;
}

/* loyalty card */
.loyalty-card {
  background: linear-gradient(135deg, #1a2a1a, #1f3020);
  border: 1px solid rgba(22,163,74,0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.loyalty-card__pts {
  font-size: 28px;
  font-weight: 700;
  color: #4ade80;
  line-height: 1;
}
.loyalty-card__label { font-size: 9px; color: #6b7280; margin-bottom: 8px; }
.loyalty-card__bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.loyalty-card__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #4ade80);
  border-radius: 3px;
  width: 63%;
}

/* ============================================================
   17. N8N WORKFLOW STYLES
   ============================================================ */
.n8n-canvas {
  background: #0a0a0a;
  padding: 16px;
  min-height: 200px;
  position: relative;
}
.n8n-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
}
.n8n-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 56px;
  position: relative;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 300ms, transform 300ms;
}
.n8n-node.visible { opacity: 1; transform: scale(1); }
.n8n-node__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.n8n-node__label {
  font-size: 7px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.2;
}
/* connector arrow between nodes */
.n8n-arrow {
  width: 16px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  position: relative;
  flex-shrink: 0;
  margin-bottom: 18px; /* align with node icon center */
}
.n8n-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid rgba(255,255,255,0.15);
}
/* animated data packet */
.n8n-packet {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  top: -3px;
  left: 0;
  box-shadow: 0 0 6px rgba(22,163,74,0.6);
}
@keyframes n8n-flow-anim {
  0%   { left: 0; opacity: 1; }
  90%  { left: calc(100% - 8px); opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
.n8n-arrow.active .n8n-packet {
  animation: n8n-flow-anim 0.6s ease forwards;
}
.n8n-stats {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.n8n-stat {
  text-align: center;
  background: #1f1f1f;
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 70px;
}
.n8n-stat__val { font-size: 14px; font-weight: 700; color: #4ade80; }
.n8n-stat__lbl { font-size: 8px; color: #6b7280; }

/* ============================================================
   18. PERSONAL CABINET (LKAB) STYLES
   ============================================================ */
.lkab-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.lkab-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.lkab-name { font-size: 12px; font-weight: 600; color: #e5e7eb; }
.lkab-sub  { font-size: 9px; color: #6b7280; }
.lkab-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 12px;
}
.lkab-kpi {
  background: #1f1f1f;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background 150ms;
}
.lkab-kpi:hover { background: #252525; }
.lkab-kpi__icon { font-size: 18px; }
.lkab-kpi__val {
  font-size: 18px;
  font-weight: 700;
  color: #e5e7eb;
  line-height: 1;
}
.lkab-kpi__label { font-size: 8px; color: #6b7280; text-align: center; }

/* booking row */
.booking-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.booking-row__date {
  background: rgba(22,163,74,0.12);
  color: #4ade80;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  min-width: 34px;
  flex-shrink: 0;
}
.booking-row__info { flex: 1; }
.booking-row__svc { font-size: 10px; color: #e5e7eb; font-weight: 600; }
.booking-row__master { font-size: 8px; color: #6b7280; }

/* ============================================================
   19. SITE CONSTRUCTOR (multi-screen inside phone)
   ============================================================ */
.site-screen {
  padding: 14px;
  min-height: 488px;
  scroll-snap-align: start;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-screen__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.site-screen__hint {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--brand);
  text-align: center;
  font-weight: 600;
  margin-top: auto;
}
/* nav bar inside mock site */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-nav__logo { font-size: 12px; font-weight: 700; color: var(--brand); }
.site-nav__links { display: flex; gap: 8px; }
.site-nav__link { font-size: 8px; color: #9ca3af; }
/* hero block */
.site-hero {
  background: linear-gradient(135deg, #181818, #1f1f1f);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  margin-bottom: 10px;
  border: 1px solid rgba(22,163,74,0.08);
}
.site-hero__tag {
  display: inline-block;
  background: rgba(22,163,74,0.12);
  color: #4ade80;
  font-size: 8px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.site-hero__h1 { font-size: 14px; font-weight: 700; color: #e5e7eb; margin-bottom: 4px; }
.site-hero__sub { font-size: 9px; color: #9ca3af; margin-bottom: 10px; line-height: 1.4; }
.site-hero__btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 8px;
}
/* service cards grid */
.site-services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.site-svc-card {
  background: #1f1f1f;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.site-svc-card__icon { font-size: 18px; margin-bottom: 4px; }
.site-svc-card__name { font-size: 9px; color: #e5e7eb; font-weight: 600; margin-bottom: 2px; }
.site-svc-card__price { font-size: 9px; color: #4ade80; }
/* case card */
.site-case {
  background: #1f1f1f;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.site-case__tag {
  font-size: 8px;
  color: var(--brand-text, #15803d);
  font-weight: 600;
  margin-bottom: 4px;
}
.site-case__title { font-size: 12px; color: #e5e7eb; font-weight: 700; margin-bottom: 6px; }
.site-case__metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.site-case__m { text-align: center; }
.site-case__m-val { font-size: 14px; font-weight: 700; color: #4ade80; }
.site-case__m-label { font-size: 7px; color: #6b7280; }
/* footer form */
.site-footer-form { background: #1f1f1f; border-radius: 10px; padding: 12px; }
.site-footer-form__title { font-size: 11px; font-weight: 700; color: #e5e7eb; margin-bottom: 8px; }
.site-form-input {
  width: 100%;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 9px;
  color: #e5e7eb;
  margin-bottom: 6px;
  box-sizing: border-box;
  font-family: inherit;
}
.site-form-btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* scroll indicators for phone demo */
.demo-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  animation: scroll-hint-bounce 2s infinite;
  z-index: 5;
}
@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-50%) translateY(-3px); opacity: 0.8; }
}

/* ============================================================
   20. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .chat-msg,
  .voice-line,
  .n8n-node,
  .funnel-bar-fill,
  .bar-chart__bar,
  .demo-lab__panel,
  .demo-miniapp-overlay,
  .max-miniapp,
  .voice-wave-bar,
  .chat-typing span,
  .voice-call-status::before,
  .demo-scroll-hint {
    transition: none !important;
    animation: none !important;
  }
  .demo-lab__panel[data-active="true"] { animation: none !important; }
}

/* ============================================================
   21. /demo/ HUB-PAGE
   ============================================================ */
.demo-hub {
  padding: var(--sp-16) 0 var(--sp-32);
  background: var(--bg-base);
  overflow-x: hidden;
}
.demo-hub__header {
  max-width: 1100px;
  margin: 0 auto var(--sp-12);
  padding: 0 var(--sp-6);
  text-align: left;
}
.demo-hub__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subdued);
  margin: 0 0 var(--sp-3);
}
.demo-hub__h1 {
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--sp-4);
  max-width: 720px;
}
.demo-hub__lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-6);
  max-width: 620px;
}
.demo-hub__hero-cta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.demo-hub__hero-cta .btn-magnetic {
  min-height: 48px;
}
@media (max-width: 480px) {
  .demo-hub__hero-cta { flex-direction: column; align-items: stretch; }
  .demo-hub__hero-cta .btn-magnetic { width: 100%; justify-content: center; }
}
.demo-hub__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-12);
}
@media (max-width: 1023px) {
  .demo-hub__inner { grid-template-columns: 1fr; }
}
.demo-hub__nav {
  position: sticky;
  top: 100px;
  align-self: start;
}
@media (max-width: 1023px) {
  .demo-hub__nav { position: relative; top: 0; }
}
.demo-hub__nav h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-subdued);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--sp-4);
}
.demo-hub__nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-hub__nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: background 150ms, color 150ms;
}
.demo-hub__nav-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.demo-hub__nav-link[aria-current="true"] {
  background: var(--brand);
  color: #ffffff;
}
.demo-hub__sections {
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
}
.demo-hub__section {
  scroll-margin-top: 100px;
}
.demo-hub__section h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.02em;
}
.demo-hub__price-plate {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}
.demo-hub__price-plate strong {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
}

/* На /demo текст должен быть СВЕРХУ во всю ширину, device-frame под ним.
   Юзер сказал: 'не как в газете'. На главной (DemoLab) остаётся horizontal grid.
   2026-05-06. */
.demo-hub__section .demo-lab__panel-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  max-width: 720px;
  margin: 0 auto;
  align-items: stretch;
}
.demo-hub__section .demo-lab__copy {
  order: 0; /* текст выше */
}
.demo-hub__section .demo-frame-wrap {
  order: 1; /* device-frame ниже */
  display: flex;
  justify-content: center;
}
@media (min-width: 1024px) {
  .demo-hub__section .demo-lab__panel-grid {
    max-width: 920px;
  }
}

/* Для кого + bullets + результат - 2026-05-06 */
.demo-hub__forwho {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-4);
  font-size: 13px;
}
.demo-hub__forwho-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 4px;
}
.demo-hub__chip {
  display: inline-flex;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}
.demo-hub__bullets {
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-hub__bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.demo-hub__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  background: rgba(22, 163, 74, 0.12);
  border: 1.5px solid var(--brand, #16a34a);
  border-radius: 50%;
}
.demo-hub__bullets li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--brand, #16a34a);
  border-bottom: 2px solid var(--brand, #16a34a);
  transform: rotate(-45deg);
}
.demo-hub__result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 var(--sp-6);
  padding: 12px 14px;
  background: rgba(22, 163, 74, 0.07);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-left: 3px solid var(--brand, #16a34a);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.demo-hub__result-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--brand, #16a34a);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}
.demo-hub__result strong {
  color: var(--brand-text, #146b33);
  font-weight: 600;
}

.demo-hub__sticky {
  position: sticky;
  bottom: 0;
  background: var(--bg-base);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: center;
  z-index: 5;
}
.demo-greeting {
  background: var(--bg-elevated);
  border: 1px solid var(--brand);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.demo-greeting strong {
  color: var(--brand-text);
  font-weight: 600;
}

/* legacy .demo-frame (старые компоненты DemoFrame.astro) */
.demo-frame {
  position: relative;
  margin: 0 auto;
  background: #1E1E1E;
  border-radius: 22px;
  padding: 18px 12px 16px;
  box-shadow:
    0 1px 2px rgba(20, 17, 11, 0.04),
    0 8px 24px rgba(20, 17, 11, 0.10),
    0 24px 48px rgba(20, 17, 11, 0.08);
  max-width: 320px;
  width: 100%;
}
.demo-frame--desktop {
  max-width: 480px;
  border-radius: 14px;
  padding: 22px 14px 14px;
}
.demo-frame__notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #0f0f0f;
  border-radius: 4px;
}
.demo-frame--desktop .demo-frame__notch { display: none; }
.demo-frame--desktop .demo-frame__dots {
  position: absolute;
  top: 8px;
  left: 12px;
  display: flex;
  gap: 5px;
}
.demo-frame--desktop .demo-frame__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #555;
}
.demo-frame--desktop .demo-frame__dots span:first-child { background: #f87171; }
.demo-frame--desktop .demo-frame__dots span:nth-child(2) { background: #fbbf24; }
.demo-frame--desktop .demo-frame__dots span:nth-child(3) { background: #4ade80; }
.demo-body {
  background: #181818;
  border-radius: 12px;
  min-height: 260px;
  padding: 12px;
  color: #e5e7eb;
  font-size: 11px;
  line-height: 1.5;
  overflow: hidden;
}
