/* === STRICT VISIBILITY & BUTTON ISOLATION === */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #27272A;
  background: #FFFFFF;
  border: 1px solid #E4E2DC;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.btn-icon-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid #E4E2DC;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  cursor: pointer;
  flex-shrink: 0;
  color: #3f3f46;
}
.btn-icon-nav:hover {
  background: #FAFAFA;
  border-color: #D4D0C5;
  color: #18181B;
}

/* Force 44px touch targets globally (mobile-first) */
.btn-pill,
.btn-icon-nav,
.btn-primary,
.btn-accent,
.btn-emerald,
.nav-pill-item,
.nav-mobile-toggle {
  height: 44px !important;
  min-height: 44px !important;
}
.btn-icon-nav {
  width: 44px !important;
  min-width: 44px !important;
}
.btn-pill {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
.card-footer-auto > a[href^="tel:"],
.card-footer-auto > a[href^="https://t.me/"] {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Ensure mobile drawer links are 44px */
@media (max-width: 767px) {
  #mobileMenuDrawer a,
  #mobileMenuDrawer button {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }
}

/* Nav pill items: 44px minimum height on all viewports */
.nav-pill-item {
  height: 44px !important;
  min-height: 44px !important;
  font-size: 14px !important;
  padding: 0 16px !important;
}

/* Modal Overlay Strict Rules */
#leadModal, #universalModal { display: none !important; }
#leadModal.active-modal, #universalModal.active-modal { display: flex !important; opacity: 1 !important; pointer-events: auto !important; }

/* Strict Desktop vs Mobile Header Rules */
@media (min-width: 1024px) {
  .nav-desktop {
    display: inline-flex !important;
  }
  .nav-mobile-toggle,
  button.nav-mobile-toggle {
    display: none !important;
  }
  #mobileMenuDrawer {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .nav-desktop {
    display: none !important;
  }
  .nav-mobile-toggle,
  button.nav-mobile-toggle {
    display: inline-flex !important;
  }
}

@media (min-width: 768px) {
  .phone-desktop {
    display: inline-flex !important;
  }
  .phone-mobile,
  a.phone-mobile {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .phone-desktop {
    display: none !important;
  }
  .phone-mobile,
  a.phone-mobile {
    display: inline-flex !important;
  }
}



/* === RESPONSIVE VISIBILITY GUARDS === */
.hidden {
  display: none !important;
}

/* Phone pill rules: text on desktop/tablet, compact icon on small mobile */
@media (max-width: 767px) {
  .phone-desktop {
    display: none !important;
  }
  .phone-mobile {
    display: inline-flex !important;
  }
}
@media (min-width: 768px) {
  .phone-desktop {
    display: inline-flex !important;
  }
  .phone-mobile {
    display: none !important;
  }
}

/* Nav rules: pill menu on desktop, hamburger on mobile/tablet */
@media (max-width: 1023px) {
  .nav-desktop,
  nav.nav-desktop,
  .nav-desktop.nav-pill-container,
  header nav.nav-desktop,
  header .nav-pill-container {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    pointer-events: none !important;
  }
  .nav-mobile-toggle,
  button.nav-mobile-toggle,
  header .nav-mobile-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
}

@media (min-width: 1024px) {
  .nav-desktop,
  nav.nav-desktop,
  .nav-desktop.nav-pill-container,
  header nav.nav-desktop,
  header .nav-pill-container {
    display: inline-flex !important;
  }
  .nav-mobile-toggle,
  button.nav-mobile-toggle,
  header .nav-mobile-toggle {
    display: none !important;
  }
  #mobileMenuDrawer {
    display: none !important;
  }
}

/* Header Action Bar Calibration on compact screens (<= 639px) */
@media (max-width: 639px) {
  header .btn-primary {
    display: none !important;
  }
  header .btn-icon-nav {
    min-width: 40px !important;
    min-height: 40px !important;
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* === PIXEL-PERFECT NAVIGATION & SOLID DROPDOWNS === */
.nav-pill-container {
  align-items: center !important;
  gap: 2px !important;
  background-color: #ECEAE5 !important;
  padding: 4px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(228, 226, 220, 0.9) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
@media (min-width: 1024px) {
  .nav-pill-container {
    display: inline-flex !important;
  }
}

.nav-pill-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 9px !important;
  border-radius: 9999px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #4b5563 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  cursor: pointer !important;
  border: none !important;
  background: transparent !important;
  line-height: 1 !important;
}

@media (min-width: 1536px) {
  .nav-pill-item {
    gap: 4px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
  }
}

.nav-pill-item:hover {
  color: #111827 !important;
  background-color: rgba(255, 255, 255, 0.85) !important;
}

.nav-pill-item.active {
  color: #111827 !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  font-weight: 600 !important;
}

.nav-pill-item.active-calc {
  color: #4338ca !important;
  font-weight: 600 !important;
}

.nav-pill-item.active-cases {
  color: #047857 !important;
  font-weight: 600 !important;
}

.nav-dropdown-wrapper {
  position: relative !important;
  display: inline-flex !important;
}

.nav-chevron {
  width: 12px !important;
  height: 12px !important;
  color: #9ca3af !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.nav-dropdown-wrapper:hover .nav-chevron {
  transform: rotate(180deg) !important;
  color: #4b5563 !important;
}

.nav-dropdown-flyout {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(6px) !important;
  width: 285px !important;
  min-width: 285px !important;
  max-width: 285px !important;
  background: #ffffff !important;
  border: 1px solid #e4e2dc !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.14), 0 6px 16px -2px rgba(0, 0, 0, 0.06) !important;
  padding: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  z-index: 100 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s !important;
}

/* Invisible bridge so mouse does not lose hover over the 8px gap */
.nav-dropdown-flyout::before {
  content: "" !important;
  position: absolute !important;
  top: -12px !important;
  left: 0 !important;
  right: 0 !important;
  height: 14px !important;
  background: transparent !important;
}

.nav-dropdown-wrapper:hover .nav-dropdown-flyout,
.nav-dropdown-wrapper:focus-within .nav-dropdown-flyout {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

.nav-dropdown-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  transition: background-color 0.15s ease, transform 0.15s ease !important;
  background: #ffffff !important;
  color: #18181b !important;
  border: 1px solid transparent !important;
}

.nav-dropdown-card:hover {
  background: #f8f8fa !important;
  border-color: #e4e2dc !important;
  transform: translateX(2px) !important;
}

.nav-dropdown-card.card-active {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
}

.nav-dropdown-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
}

.nav-dropdown-info {
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.nav-dropdown-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #18181b !important;
  line-height: 1.25 !important;
}

.nav-dropdown-subtitle {
  font-size: 11px !important;
  color: #71717a !important;
  line-height: 1.3 !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}



/* === DROPDOWN MICRO-INTERACTION TOKENS === */
.nav-dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.group:hover .nav-dropdown-menu,
.group:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}



/* === VIRUZ 10/10 DESIGN SYSTEM TOKENS === */
.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  background: linear-gradient(180deg, #27272A 0%, #141416 100%) !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #3F3F46 0%, #202024 100%) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  transform: translateY(-1px) !important;
}
.btn-primary:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.btn-accent {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  background: linear-gradient(180deg, #6366F1 0%, #4338CA 100%) !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.btn-accent:hover {
  background: linear-gradient(180deg, #818CF8 0%, #4F46E5 100%) !important;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px) !important;
}
.btn-accent:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25) !important;
}

.btn-emerald {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  background: linear-gradient(180deg, #10B981 0%, #047857 100%) !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.btn-emerald:hover {
  background: linear-gradient(180deg, #34D399 0%, #059669 100%) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px) !important;
}
.btn-emerald:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
}

.btn-pill {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 500 !important;
  color: #27272A !important;
  background: #FFFFFF !important;
  border: 1px solid #E4E2DC !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.btn-pill:hover {
  background: #FAFAFA !important;
  border-color: #D4D0C5 !important;
  color: #18181B !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07) !important;
  transform: translateY(-0.5px) !important;
}
.btn-pill:active {
  transform: scale(0.97) !important;
  background: #F4F4F5 !important;
}

.btn-nav-active {
  background: #FFFFFF !important;
  color: #18181B !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.group:hover .group-hover-arrow {
  transform: translateX(3px) !important;
}
.group-hover-arrow {
  transition: transform 0.2s ease !important;
}


    svg {
      max-width: 100%;
      box-sizing: border-box;
    }
    :root {
      --bg: #F8F7F4;
      --card-bg: #FFFFFF;
      --ink: #161616;
      --ink-muted: #6B6A66;
      --line: #E4E2DC;
      --line-soft: #EFECE6;
      --pill: #ECEAE5;
      --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    }

    body {
      background-color: var(--bg);
      color: var(--ink);
      font-family: 'Onest', system-ui, -apple-system, sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
    }

    .tnum {
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum" 1;
    }

    /* Subtle grid pattern background */
    .bg-grid-pattern {
      background-size: 32px 32px;
      background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    }

    .dark-grid-pattern {
      background-size: 28px 28px;
      background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    }

    /* Custom range slider styling */
    input[type=range] {
      -webkit-appearance: none;
      appearance: none;
      height: 6px;
      border-radius: 999px;
      background: #E2DFD7;
      outline: none;
    }
    input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: #18181B;
      cursor: pointer;
      border: 3px solid #FFFFFF;
      box-shadow: 0 1px 4px rgba(0,0,0,0.25);
      transition: transform 0.15s ease, background 0.15s ease;
    }
    input[type=range]::-webkit-slider-thumb:hover {
      transform: scale(1.15);
      background: #4F46E5;
    }
    input[type=range]::-moz-range-thumb {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: #18181B;
      cursor: pointer;
      border: 3px solid #FFFFFF;
      box-shadow: 0 1px 4px rgba(0,0,0,0.25);
      transition: transform 0.15s ease, background 0.15s ease;
    }

    /* Custom scrollbars */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    ::-webkit-scrollbar-track {
      background: #F1EFEA;
    }
    ::-webkit-scrollbar-thumb {
      background: #D4D0C5;
      border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: #B6B1A4;
    }

    /* Animation utility */
    @keyframes pulseSlow {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.7; transform: scale(1.02); }
    }
    .animate-pulse-slow {
      animation: pulseSlow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

/* ==========================================================================
   VIRUZ 2026 RESPONSIVE & ADAPTIVE SYSTEM (LEBEDEV DESIGN + CLEAN ENGINE)
   Target Diagonals:
   - Mobile Compact: 360px - 375px (Samsung A-series, Redmi, iPhone SE)
   - Mobile Standard: 390px - 430px (iPhone 12-16 Pro Max, Pixel, Galaxy S24)
   - Tablet Portrait: 768px - 834px (iPad Mini, iPad 10.2", iPad Air, Tab M10)
   - Tablet Landscape / Small Laptop: 1024px - 1280px (iPad Pro 11"/12.9", Laptops)
   ========================================================================== */

/* 1. Touch Targets (WCAG 2.1 AA & Lebedev DoD Rule 7: minimum 44x44px touch bounding boxes) */
@media (max-width: 1023px) {
  .btn-icon-nav,
  button.nav-mobile-toggle,
  .nav-mobile-toggle,
  a.phone-mobile,
  .modal-close-btn,
  .theme-toggle-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .nav-pill-item {
    min-height: 44px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
  }

  a.inline-flex.w-full,
  a[href^="/kaluga"],
  a[href^="/tula"],
  a[href^="/bryansk"],
  .btn-calc-option,
  #nicheGrid button {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* 2. iOS Safari Form Zoom Prevention (font-size >= 16px) */
@media (max-width: 1023px) {
  input,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  input[type="range"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* 3. Smooth Horizontal Scroll Containers for Tables & Pricing Matrices */
.table-responsive-wrapper,
.table-scroll-container {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  overscroll-behavior-x: contain !important;
  padding-bottom: 8px !important;
}

/* 4. Tablet Layout Calibration (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  header .max-w-7xl {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .grid-tablet-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
}

/* 5. Global & Mobile Viewport Calibration */
html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative !important;
}

/* Safe Area Insets & Floating Action Bar for iPhone / Android */
.safe-area-bottom {
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
}

#floatingBar {
  padding-bottom: max(12px, env(safe-area-inset-bottom, 16px)) !important;
}

/* Touch Targets for Interactive Workbench (Lebedev Rule >= 44x44px) */
#nicheGrid button,
.btn-calc-option {
  min-height: 44px !important;
}

@media (max-width: 767px) {
  .container,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  h1 {
    font-size: clamp(24px, 6.5vw, 32px) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em !important;
  }
  h2 {
    font-size: clamp(20px, 5.5vw, 26px) !important;
    line-height: 1.25 !important;
  }
  h3 {
    font-size: clamp(17px, 4.5vw, 20px) !important;
    line-height: 1.3 !important;
  }

  .btn-primary,
  .btn-accent,
  .btn-emerald {
    min-height: 46px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    font-size: 15px !important;
  }

  #mobileMenuDrawer {
    max-height: calc(100vh - 64px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px !important;
  }
  
  #mobileMenuDrawer a,
  #mobileMenuDrawer button {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }

  .hero-section-wrapper {
    padding-top: 32px !important;
    padding-bottom: 40px !important;
  }
}

/* 6. Ultra-compact screens (<= 375px: iPhone SE, older Androids) */
@media (max-width: 375px) {
  .btn-primary,
  .btn-accent,
  .btn-emerald {
    font-size: 14px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  
  .badge-compact {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
}

/* ==========================================================================
   STRICT MOBILE & TABLET NAVIGATION ENGINE (LEBEDEV DOD & HIG COMPLIANCE)
   ========================================================================== */
@media (max-width: 1023px) {
  /* 1. Complete elimination of desktop nav pills from layout */
  html body header nav.nav-desktop,
  html body header .nav-desktop,
  html body header .nav-pill-container,
  html body .nav-desktop.nav-pill-container,
  .nav-desktop,
  .nav-pill-container.nav-desktop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }

  /* 2. Burger Button: Always visible, properly sized, prominent */
  html body header .nav-mobile-toggle,
  html body header button.nav-mobile-toggle,
  .nav-mobile-toggle,
  button.nav-mobile-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    z-index: 50 !important;
    background-color: #FFFFFF !important;
    border: 1px solid #E4E2DC !important;
    border-radius: 12px !important;
    color: #18181B !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }

  html.dark body header .nav-mobile-toggle,
  html.dark body header button.nav-mobile-toggle {
    background-color: #141620 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
  }

  /* 3. Header Action Bar: Zero overflow on small screens */
  header .max-w-7xl {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
}

@media (max-width: 639px) {
  /* On compact screens (< 640px), keep header clean: Logo, Phone, Burger */
  header #themeToggleBtn {
    display: none !important;
  }
  header a[data-header-cabinet],
  header a[aria-label="Личный кабинет"] {
    display: none !important;
  }
  header .btn-primary {
    display: none !important;
  }
  header a.phone-mobile {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #mobileMenuDrawer {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

/* ==========================================================================
   TYPOGRAPHY & GRID UTILITIES (SYSTEM PROMPT ENFORCEMENT)
   ========================================================================== */

/* Text wrapping: prevent orphans & balance headlines */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Prevent line breaks in prices, numbers + units */
.nowrap { white-space: nowrap; }
.nowrap-nbsp { white-space: nowrap; } /* alias for clarity */

/* Equal height cards in grid */
.card-equal-height {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-equal-height > .card-body,
.card-equal-height > .card-content {
  flex: 1 1 auto;
}
.card-equal-height > .card-footer,
.card-equal-height > .card-actions,
.card-equal-height > .card-footer-auto {
  margin-top: auto;
}

/* 8px grid spacing utilities (use instead of arbitrary values) */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }   /* 4px */
.p-2 { padding: var(--space-2) !important; }   /* 8px */
.p-3 { padding: var(--space-3) !important; }   /* 12px */
.p-4 { padding: var(--space-4) !important; }   /* 16px */
.p-5 { padding: var(--space-5) !important; }   /* 24px */
.p-6 { padding: var(--space-6) !important; }   /* 32px */
.p-7 { padding: var(--space-7) !important; }   /* 48px */
.p-8 { padding: var(--space-8) !important; }   /* 64px */
.p-9 { padding: var(--space-9) !important; }   /* 96px */

.m-0 { margin: 0 !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-5 { margin: var(--space-5) !important; }
.m-6 { margin: var(--space-6) !important; }
.m-7 { margin: var(--space-7) !important; }
.m-8 { margin: var(--space-8) !important; }
.m-9 { margin: var(--space-9) !important; }

.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-5 { gap: var(--space-5) !important; }
.gap-6 { gap: var(--space-6) !important; }
.gap-7 { gap: var(--space-7) !important; }
.gap-8 { gap: var(--space-8) !important; }
.gap-9 { gap: var(--space-9) !important; }

/* Explicit line heights (never rely on browser default) */
.lh-tight { line-height: 1.15 !important; }
.lh-snug { line-height: 1.25 !important; }
.lh-normal { line-height: 1.5 !important; }
.lh-relaxed { line-height: 1.6 !important; }

/* Minimum font sizes (prevent micro-text) */
.text-base-min { font-size: max(1rem, 14px) !important; }
.text-input-min, input, select, textarea { font-size: max(1rem, 16px) !important; }

/* Touch target minimums */
.touch-target {
  min-width: 44px !important;
  min-height: 44px !important;
}
.touch-target-comfortable {
  min-width: 48px !important;
  min-height: 48px !important;
}

/* Focus visible for keyboard nav (reinforce) */
:focus-visible {
  outline: 2px solid #4338ca !important;
  outline-offset: 2px !important;
}

/* Dark mode: calculator & modal coverage */
html.dark input[type="range"] {
  background: #3F3F46 !important;
}
html.dark input[type="range"]::-webkit-slider-thumb {
  background: #FFFFFF !important;
  border-color: #E4E2DC !important;
}
html.dark input[type="range"]::-webkit-slider-thumb:hover {
  background: #818CF8 !important;
}
html.dark input[type="range"]::-moz-range-thumb {
  background: #FFFFFF !important;
  border-color: #E4E2DC !important;
}

/* iOS Safari auto-zoom prevention for range inputs (all viewports) */
input[type="range"] {
  font-size: 16px !important;
}

@media (max-width: 1023px) {
  input[type="range"],
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

html.dark #leadModal .modal-content,
html.dark #universalModal .modal-content {
  background: #141620 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #F4F4F5 !important;
}
html.dark #leadModal .modal-close,
html.dark #universalModal .modal-close {
  color: #A1A1AA !important;
}
html.dark #leadModal .modal-close:hover,
html.dark #universalModal .modal-close:hover {
  color: #FFFFFF !important;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: #4338ca;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Mobile tariff carousel (P1) - Extended to 767px for all mobile/tablet */
@media (max-width: 767px) {
  .tariff-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: var(--space-4) !important;
    padding-bottom: var(--space-3) !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }
  .tariff-carousel > * {
    flex: 0 0 85% !important;
    scroll-snap-align: start !important;
    min-width: 280px !important;
  }
  .tariff-carousel::-webkit-scrollbar {
    height: 6px;
  }
  .tariff-carousel::-webkit-scrollbar-track {
    background: transparent;
  }
  .tariff-carousel::-webkit-scrollbar-thumb {
    background: #D4D0C5;
    border-radius: 3px;
  }
}

/* Mobile niche/services carousel (P1) - Extended to 767px */
@media (max-width: 767px) {
  .niche-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: var(--space-4) !important;
    padding-bottom: var(--space-3) !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }
  .niche-carousel > * {
    flex: 0 0 85% !important;
    scroll-snap-align: start !important;
    min-width: 280px !important;
  }
  .niche-carousel::-webkit-scrollbar {
    height: 6px;
  }
  .niche-carousel::-webkit-scrollbar-track {
    background: transparent;
  }
  .niche-carousel::-webkit-scrollbar-thumb {
    background: #D4D0C5;
    border-radius: 3px;
  }
}

/* Accordion fallback for tariffs/services (P1) */
.accordion-summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-color, #e4e2dc);
  border-radius: var(--space-4);
}
.accordion-summary::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6A66' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s ease;
}
.accordion[open] .accordion-summary::after {
  transform: rotate(180deg);
}
.accordion-details {
  padding: var(--space-4);
  border-top: 1px solid var(--border-color, #e4e2dc);
  animation: slide-down 0.2s ease;
}

html.dark .accordion-summary {
  background: #141620;
  border-color: rgba(255, 255, 255, 0.12);
}
html.dark .accordion-details {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Scroll animation for client logos strip */
@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.animate-scroll-logos {
  display: flex;
  width: max-content;
  animation: scroll-logos 30s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .animate-scroll-logos { animation: none; }
}

/* === HERO HIT BADGE (fallback) === */
.hero-hit-badge {
  position: absolute !important;
  top: -8px !important;
  right: 6px !important;
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  font-size: 8.5px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  line-height: 1 !important;
  padding: 2.5px 5.5px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.04em !important;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.4) !important;
  pointer-events: none !important;
  white-space: nowrap !important;
  z-index: 10 !important;
}

/* === ART-DIRECTOR & TYPOGRAPHY ENHANCEMENTS === */
h1, h2, h3 {
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
}

/* Ensure tariff & service cards always align bottom action buttons */
.card-equal-height,
.tariff-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.card-equal-height > .card-footer,
.card-equal-height > .card-actions,
.card-equal-height > .card-footer-auto,
.card-equal-height > .btn-pill:last-child,
.card-equal-height > .btn-primary:last-child,
.tariff-card > *:last-child,
.card-footer-auto {
  margin-top: auto !important;
}

/* iOS Safari auto-zoom prevention */
@media (max-width: 767px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Scrollbar hide utility */
.scrollbar-hide {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none !important;
}

/* Hero plan buttons active state (consistent border width, no layout shift) */
.hero-plan-btn {
  border-width: 2px !important;
  transition: all 0.15s ease !important;
}
.hero-plan-btn--active {
  border-color: #4338ca !important;
  background-color: #4338ca !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.3), 0 4px 12px rgba(67, 56, 202, 0.25) !important;
}
.hero-plan-btn--active .text-zinc-500,
.hero-plan-btn--active .text-zinc-700,
.hero-plan-btn--active .text-indigo-700,
.hero-plan-btn--active .text-zinc-800 {
  color: #ffffff !important;
}
.hero-plan-btn--active:hover {
  background-color: #3730a3 !important;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.4), 0 6px 16px rgba(67, 56, 202, 0.3) !important;
}

/* === TOUCH TARGETS: Mobile Drawer === */
@media (max-width: 767px) {
  #mobileMenuDrawer a,
  #mobileMenuDrawer button {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }
}

/* === STANDARDIZED TOUCH TARGETS: 44px minimum (Apple HIG / Google Material) === */
.btn-primary,
.btn-accent,
.btn-emerald,
.btn-pill {
  min-height: 44px !important;
}

.btn-icon-nav {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
}

.nav-pill-item,
.nav-pill-item.active,
.nav-pill-item.active-calc,
.nav-pill-item.active-cases {
  min-height: 44px !important;
}

.card-footer-auto > a,
.card-footer-auto > button {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Niche card buttons in interactive calculator: allow full natural height */
.calc-niche-btn {
  height: auto !important;
  min-height: 110px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Mobile drawer links */
@media (max-width: 767px) {
  #mobileMenuDrawer a,
  #mobileMenuDrawer button {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
  
  /* Fixed: card height restored */
}

/* Tariff carousel on mobile */
/* === TARIFF CAROUSEL MOBILE === */
@media (max-width: 639px) {
  .tariff-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 1.5rem !important;
    padding-bottom: 1rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }
  .tariff-carousel > * {
    flex: 0 0 85% !important;
    scroll-snap-align: start !important;
    min-width: 280px !important;
  }
  .tariff-carousel::-webkit-scrollbar {
    height: 6px !important;
  }
  .tariff-carousel::-webkit-scrollbar-track {
    background: transparent !important;
  }
  .tariff-carousel::-webkit-scrollbar-thumb {
    background: #D4D0C5 !important;
    border-radius: 3px !important;
  }
}

/* === ACCORDION FALLBACK FOR TARIFFS/SERVICES === */
.accordion-summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px !important;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-color, #e4e2dc);
  border-radius: 16px !important;
  min-height: 44px !important;
}

.accordion-summary::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6A66' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform 0.2s ease;
}

.accordion[open] .accordion-summary::after {
  transform: rotate(180deg);
}

.accordion-details {
  padding: 16px !important;
  border-top: 1px solid var(--border-color, #e4e2dc);
  animation: slide-down 0.2s ease;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.accordion[open] .accordion-summary::after {
  transform: rotate(180deg);
}

.accordion-details {
  padding: 16px !important;
  border-top: 1px solid var(--border-color, #e4e2dc);
  animation: slide-down 0.2s ease;
}

html.dark .accordion-summary {
  background: #141620;
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark .accordion-details {
  border-color: rgba(255, 255, 255, 0.12);
}

/* === RESPONSIVE DISPLAY & NAVIGATION UTILITIES === */
.hidden { display: none !important; }

@media (max-width: 639px) {
  .max-sm\:hidden { display: none !important; }
}

@media (min-width: 640px) {
  .sm\:hidden { display: none !important; }
  .sm\:inline-flex { display: inline-flex !important; }
  .sm\:flex { display: flex !important; }
  .sm\:inline { display: inline !important; }
  .sm\:block { display: block !important; }
}

@media (max-width: 1023px) {
  .max-lg\:hidden { display: none !important; }
  .phone-mobile {
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

@media (min-width: 1024px) {
  .lg\:inline { display: inline !important; }
  .lg\:inline-flex { display: inline-flex !important; }
  .lg\:flex { display: flex !important; }
  .lg\:block { display: block !important; }
  .lg\:hidden { display: none !important; }
  .nav-mobile-toggle { display: none !important; }
}

@media (min-width: 1280px) {
  .xl\:inline { display: inline !important; }
  .xl\:inline-flex { display: inline-flex !important; }
  .xl\:flex { display: flex !important; }
  .xl\:block { display: block !important; }
  .xl\:hidden { display: none !important; }
}

@media (min-width: 1536px) {
  .\32 xl\:inline { display: inline !important; }
  .\32 xl\:inline-flex { display: inline-flex !important; }
  .\32 xl\:flex { display: flex !important; }
  .\32 xl\:block { display: block !important; }
  .\32 xl\:hidden { display: none !important; }
}


/* === CARD EQUAL HEIGHT & FOOTER AUTO PATTERN === */
.card-equal-height,
.tariff-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 100% !important;
}

.card-footer-auto,
.mt-auto {
  margin-top: auto !important;
}

.card-footer-auto > .btn-pill,
.card-footer-auto > .btn-primary,
.card-footer-auto > button,
.card-footer-auto > a {
  min-height: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* === HERO NICHE CHIPS RESPONSIVE PATTERN === */
.hero-niche-chips {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 8px !important;
}
.hero-niche-chips::-webkit-scrollbar {
  display: none !important;
}
@media (min-width: 1024px) {
  .hero-niche-chips {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
  }
}

