/* Shared responsive safety net. Loaded by the common shell on every page. */
html { overflow-x: clip; }
body { overflow-x: hidden; }

*, *::before, *::after { min-width: 0; }
img, svg, video, canvas, iframe { max-width: 100%; }
table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}

table::-webkit-scrollbar {
  height: 6px;
}
table::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}
table::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
table::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.hero-trust-mark {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 3px;
  border-radius: 50%;
  background: #f1f5f9;
  box-sizing: border-box;
}

/* The shell already reserves space for its fixed header via body padding. */
body > main { padding-top: 0 !important; }

/* Compact laptop screens (1201px to 1360px) protection against nav/CTA crowding */
@media (min-width: 1201px) and (max-width: 1360px) {
  .site-header.shell-header .shell-wrap { padding: 0 14px !important; }
  .site-header.shell-header .premium-nav { margin: 0 8px !important; gap: 4px !important; }
  .site-header.shell-header .nav-item { padding: 0 8px !important; font-size: 0.85rem !important; }
  .site-header.shell-header .btn-leadership { padding: 0 14px !important; font-size: 0.84rem !important; }
}

/* The desktop header collapses at 1200px. Enable full mobile nav drawer for all tablets & phones. */
@media (max-width: 1200px) {
  .site-header.shell-header .premium-nav,
  .site-header.shell-header .header-actions { display: none !important; }
  .site-header.shell-header .shell-toggle { display: flex !important; }

  /* Mobile navigation drawer accessible & scrollable across all tablets */
  .mobile-nav {
    top: 76px !important;
    height: calc(100dvh - 76px) !important;
    padding: 24px 32px 40px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 6px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
    background: #ffffff !important;
  }
  .mobile-nav-link {
    width: 100%;
    padding: 14px 16px !important;
    font-size: 1.15rem !important;
    line-height: 1.25;
    text-align: left;
    border-radius: 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Portfolio cards need a wider content column than a 50/50 split allows. */
  .venture-card,
  .venture-card.reverse { grid-template-columns: minmax(0, 1fr) !important; }
  .venture-card.reverse .venture-visual { order: 0 !important; }
  .venture-content { padding: 44px !important; }
  .venture-visual { min-height: 220px; }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 68px; }
  body { padding-top: 68px !important; }
  .site-header.shell-header { height: 68px !important; }
  .site-header.shell-header .shell-wrap { padding: 0 16px !important; }
  .site-header.shell-header .shell-toggle { width: 40px !important; height: 40px !important; }

  /* Keep the menu comfortably usable on short phones and allow it to scroll. */
  .mobile-nav {
    top: 68px !important;
    height: calc(100dvh - 68px) !important;
    padding: 20px 24px 32px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 4px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  .mobile-nav-link {
    width: 100%;
    padding: 14px 12px !important;
    font-size: 1.2rem !important;
    line-height: 1.25;
    text-align: left;
  }
  .mobile-nav::after { display: none !important; }

  .container, .container-wide { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section-sm { padding-top: 40px; padding-bottom: 40px; }
  .hero-actions { width: 100%; flex-wrap: wrap; }
  .hero-actions > a, .hero-actions > button { justify-content: center; }
  .tl-hero > .container { padding-top: 96px !important; padding-bottom: 40px !important; }
  .hero-trust-badge {
    width: min(100%, 520px);
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 12px !important;
    padding: 12px 16px 12px 12px !important;
    border-radius: 24px !important;
  }
  .hero-trust-badge > .hero-trust-mark { grid-column: 1; grid-row: 1; }
  .hero-trust-badge > div:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
  .hero-trust-badge > div:nth-child(3),
  .hero-trust-badge > div:nth-child(5) { display: none !important; }
  .hero-trust-badge > div:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: start; }
  .hero-trust-badge > a:nth-child(6) { grid-column: 3; grid-row: 2; justify-self: end; text-align: left; }
  .hero-trust-badge > div:nth-child(4),
  .hero-trust-badge > a:nth-child(6) { white-space: nowrap; }
  .hero-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hero-stats-grid > div:last-child { grid-column: 1 / -1; }
  .tl-hero [style*="repeat(4,1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .venture-content { padding: 32px 24px !important; }
  .venture-visual { min-height: 180px; padding: 20px !important; }
  .v-features { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
  .v-features li { align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .site-header.shell-header .shell-wrap { padding: 0 12px !important; }
  .site-header.shell-header a[aria-label="TweeLabs home"] img { max-width: 128px !important; }
  .container, .container-wide { padding-left: 16px; padding-right: 16px; }
  .hero-actions > a, .hero-actions > button { width: 100%; }
  .tl-hero .section-title { font-size: clamp(2.05rem, 10vw, 2.5rem) !important; line-height: 1.04 !important; }
  .hero-trust-badge {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 10px !important;
  }
  .hero-trust-mark { width: 44px; height: 44px; }
  .hero-trust-badge > div:nth-child(2) > div:last-child { font-size: .9rem !important; }
  .hero-trust-badge > div:nth-child(4) span:last-child,
  .hero-trust-badge > a:nth-child(6) span { font-size: .68rem !important; }
  .hero-stats-grid > div { padding: 16px 10px !important; }
  .floating-whatsapp,
  .wa-float,
  .shell-wa,
  .whatsapp-float {
    width: 50px !important;
    height: 50px !important;
    right: 14px !important;
    bottom: 14px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 0 !important;
  }
  .floating-whatsapp i,
  .wa-float i,
  .shell-wa i,
  .whatsapp-float i { font-size: 22px !important; }
  .floating-whatsapp ~ .wa-float.shell-wa,
  .wa-float.shell-wa ~ .floating-whatsapp { display: none !important; }
  .hub-hero, .insights-hero, .sp-hero { padding-top: 80px !important; padding-bottom: 36px !important; }
  .tl-hero [style*="repeat(4,1fr)"] { grid-template-columns: 1fr !important; }
  .venture-content { padding: 28px 20px !important; }
  .v-features { grid-template-columns: 1fr; }
}

@media (min-width: 601px) and (max-width: 768px) {
  .hero-stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .hero-stats-grid > div:last-child { grid-column: auto; }
}
/* Generated service-page component repairs.
   Keep these overrides shared: the same inline component CSS is emitted on
   hundreds of service pages. */
ul.sp-list li::before {
  content: "\2713" !important;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.08rem;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5 !important;
  font-size: 0.78rem;
  line-height: 1;
  flex: 0 0 1.25rem;
}

/* ── Enhanced Service Page FAQ Accordions ── */
.faq-item {
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  margin-bottom: 12px !important;
  padding: 0 !important;
  overflow: hidden !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

.faq-item:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

.faq-item.is-open {
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08) !important;
}

.faq-item .faq-q {
  font-weight: 700 !important;
  color: #0f172a !important;
  font-size: 1.02rem !important;
  padding: 18px 22px !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  user-select: none !important;
  transition: color 0.2s ease, background 0.2s ease !important;
  background: transparent !important;
}

.faq-item .faq-q:hover {
  color: #2563eb !important;
  background: #f8fafc !important;
}

.faq-item.is-open .faq-q {
  color: #2563eb !important;
  background: #f8fafc !important;
}

.faq-item .faq-q::after {
  content: "" !important;
  display: inline-block !important;
  width: 9px !important;
  height: 9px !important;
  border-right: 2px solid #64748b !important;
  border-bottom: 2px solid #64748b !important;
  transform: rotate(45deg) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s !important;
  flex-shrink: 0 !important;
  margin-right: 4px !important;
}

.faq-item.is-open .faq-q::after {
  transform: rotate(-135deg) !important;
  border-color: #2563eb !important;
}

.faq-item .faq-a {
  display: none !important;
  color: #475569 !important;
  font-size: 0.95rem !important;
  line-height: 1.75 !important;
  padding: 16px 22px 20px 22px !important;
  margin: 0 !important;
  border-top: 1px solid #f1f5f9 !important;
  background: #ffffff !important;
}

.faq-item.is-open .faq-a {
  display: block !important;
  animation: faqSlideDown 0.25s ease forwards !important;
}

@keyframes faqSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .faq-item .faq-q { padding: 15px 16px !important; font-size: 0.96rem !important; }
  .faq-item .faq-a { padding: 14px 16px 18px 16px !important; font-size: 0.9rem !important; }
}

/* Prevent long generated copy and flex/grid children from widening pages. */
.sp-section,
.sp-section > *,
ul.sp-list li,
.faq-item,
.faq-q,
.faq-a {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, h5, h6,
.article-title,
.section-title,
.v-title,
.csc-title {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.article-breadcrumbs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 8px !important;
}

pre, .article-body pre {
  overflow-x: auto !important;
  max-width: 100% !important;
  -webkit-overflow-scrolling: touch !important;
}

code {
  word-break: break-word;
}

pre code {
  word-break: normal;
  white-space: pre;
}

/* ── iOS Safari Input Zoom Prevention ── */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ── Article / Insights Multi-Device Responsiveness ── */
@media (max-width: 960px) {
  .article-container {
    padding: 100px 20px 60px !important;
  }
  .article-layout {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .article-sidebar {
    order: 2 !important;
    position: static !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .article-container {
    padding: 85px 16px 40px !important;
  }
  .article-title {
    font-size: clamp(1.65rem, 5.5vw, 2.2rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 16px !important;
  }
  .article-meta {
    gap: 8px 14px !important;
    font-size: 0.82rem !important;
  }
  .article-badge-row {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .art-badge {
    font-size: 0.74rem !important;
    padding: 3px 10px !important;
  }
  .article-body {
    font-size: 1rem !important;
    line-height: 1.75 !important;
  }
  .article-body h2 {
    font-size: 1.45rem !important;
    margin: 32px 0 14px !important;
    padding-bottom: 8px !important;
  }
  .article-body h3 {
    font-size: 1.2rem !important;
    margin: 24px 0 10px !important;
  }
  .article-body p {
    margin-bottom: 16px !important;
  }
  .article-body ul, .article-body ol {
    margin: 0 0 20px 18px !important;
  }
  .callout-box {
    padding: 16px 14px !important;
    margin: 20px 0 !important;
    border-radius: 0 8px 8px 0 !important;
  }
  .article-body table {
    margin: 20px 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px !important;
  }
  .article-body table th,
  .article-body table td {
    padding: 10px 12px !important;
    font-size: 0.84rem !important;
    min-width: 110px !important;
  }
  .article-body table th:first-child,
  .article-body table td:first-child {
    min-width: 130px !important;
  }
  .article-body pre {
    padding: 14px 16px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
    white-space: pre !important;
    word-break: normal !important;
  }
  .executive-card {
    padding: 22px 18px !important;
    border-radius: 14px !important;
  }
  .executive-card h4 {
    font-size: 1.1rem !important;
  }
  .executive-contacts a {
    word-break: break-all !important;
  }
  .cta-button-exec {
    padding: 12px 14px !important;
    font-size: 0.92rem !important;
  }
  .article-body .faq-item {
    padding: 18px 16px !important;
    margin-bottom: 14px !important;
    border-radius: 10px !important;
  }
  .article-body .faq-item h4 {
    font-size: 1rem !important;
    margin-bottom: 8px !important;
  }
  .article-body .faq-item p {
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
  }
}

@media (max-width: 380px) {
  .article-container {
    padding: 78px 12px 32px !important;
  }
  .article-title {
    font-size: 1.5rem !important;
  }
  .article-body table th,
  .article-body table td {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
    min-width: 95px !important;
  }
  .article-body table th:first-child,
  .article-body table td:first-child {
    min-width: 115px !important;
  }
}

/* ── Insights Hub Grid & Hero ── */
.insights-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)) !important;
  gap: 24px !important;
}
@media (max-width: 640px) {
  .insights-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .insights-grid article {
    padding: 22px 18px !important;
    border-radius: 16px !important;
  }
  .insights-grid article > div:last-child {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
}

/* ── CRO & Tier-1 Global Components ── */
@media (max-width: 600px) {
  .tl-currency-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: 100% !important;
    border-radius: 18px !important;
    padding: 6px 8px !important;
    gap: 6px 4px !important;
  }
  .tl-currency-bar > span {
    width: 100% !important;
    text-align: center !important;
    padding: 0 0 2px 0 !important;
    font-size: 0.72rem !important;
  }
  .tl-currency-btn {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
  }

  .tl-tz-strip {
    padding: 10px 14px !important;
    gap: 8px 10px !important;
    font-size: 0.78rem !important;
  }
  .tl-tz-badge {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
  }

  .tl-estimator-card {
    padding: 20px 14px !important;
    border-radius: 18px !important;
  }
  .tl-opt-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .tl-opt-btn {
    padding: 12px 12px !important;
  }
  .tl-est-summary {
    padding: 20px 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 16px !important;
    border-radius: 16px !important;
  }
  .tl-est-price-val {
    font-size: 1.85rem !important;
  }
  .tl-est-summary button,
  .tl-est-summary a {
    width: 100% !important;
    justify-content: center !important;
  }

  .tl-comp-table-wrap {
    border-radius: 14px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .tl-comp-table th, .tl-comp-table td {
    padding: 10px 12px !important;
    font-size: 0.8rem !important;
  }

  .tl-live-toast {
    left: 12px !important;
    right: 12px !important;
    max-width: calc(100vw - 24px) !important;
    bottom: 76px !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
  }

  .tl-modal-box {
    padding: 24px 16px !important;
    border-radius: 18px !important;
    margin: 10px !important;
    max-height: 94vh !important;
  }
  .tl-modal-close {
    top: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }

  .city-all-services {
    padding: 24px 16px !important;
    margin: 32px 0 !important;
    border-radius: 16px !important;
  }
  .city-all-services h2 {
    font-size: 1.55rem !important;
  }

  .services-master-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px !important;
    gap: 16px !important;
  }
  .service-card-item {
    padding: 20px 16px !important;
  }

  /* Discovery Call Booking Modal 2-column input stack on mobile */
  #tl-modal-booking-form div[style*="grid-template-columns"],
  .tl-modal-box form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Executive Blueprint Magnet single-column */
  #blueprint div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* AI Masterclass Batch Cards single-column */
  .vision-mission-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
  .vm-card {
    padding: 18px 16px !important;
  }

  /* Pricing box in service pages & city pages */
  .pricing-box-sp {
    padding: 28px 16px !important;
    max-width: 100% !important;
    border-radius: 14px !important;
  }
  .pricing-box-sp .price {
    font-size: 2rem !important;
  }
}

/* ── Mobile Stack for Hero Trust Badge (Prevents 375px/390px/414px Overflow) ── */
@media (max-width: 440px) {
  .hero-trust-badge {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 14px 16px !important;
    border-radius: 20px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }
  .hero-trust-badge > div:nth-child(2) {
    text-align: center !important;
  }
  .hero-trust-badge > div:nth-child(4),
  .hero-trust-badge > a:nth-child(6) {
    justify-self: center !important;
    white-space: normal !important;
    text-align: center !important;
  }
}

/* ── Ultra-Narrow Phones (iPhone SE, Galaxy Fold cover, <=380px) ── */
@media (max-width: 380px) {
  .container, .container-wide {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .sp-section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .insights-grid article {
    padding: 18px 14px !important;
  }
  .insights-grid article h2 {
    font-size: 1.15rem !important;
  }
  .article-container {
    padding: 76px 10px 28px !important;
  }
  .article-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
  }
  .tl-hero .section-title {
    font-size: clamp(1.8rem, 8.5vw, 2.15rem) !important;
  }
  .section-title {
    font-size: clamp(1.75rem, 8vw, 2.1rem) !important;
  }
  .floating-whatsapp,
  .wa-float,
  .shell-wa,
  .whatsapp-float {
    width: 44px !important;
    height: 44px !important;
    right: 10px !important;
    bottom: 10px !important;
  }
  .floating-whatsapp i,
  .wa-float i,
  .shell-wa i,
  .whatsapp-float i {
    font-size: 19px !important;
  }
  .tl-live-toast {
    bottom: 62px !important;
    left: 8px !important;
    right: 8px !important;
    max-width: calc(100vw - 16px) !important;
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }
  .article-body table th,
  .article-body table td,
  .tl-comp-table th,
  .tl-comp-table td {
    padding: 7px 9px !important;
    font-size: 0.74rem !important;
    min-width: 85px !important;
  }
  .article-body table th:first-child,
  .article-body table td:first-child,
  .tl-comp-table th:first-child,
  .tl-comp-table td:first-child {
    min-width: 100px !important;
  }
  .tl-currency-bar {
    padding: 4px 4px !important;
    gap: 4px 2px !important;
  }
  .tl-currency-btn {
    padding: 4px 6px !important;
    font-size: 0.68rem !important;
    min-height: 30px !important;
  }
}


