/* 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; max-width: 100%; overflow-x: auto; }

.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; }

/* The desktop header needs more than 992px once its seven links and CTA are present. */
@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; }

  /* 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 {
    width: 52px;
    height: 52px;
    right: 14px !important;
    bottom: 14px !important;
    padding: 0 !important;
    justify-content: center;
    font-size: 0 !important;
  }
  .floating-whatsapp i { font-size: 22px !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;
}
