/**
 * TranceX Media — extra-small viewport fixes (320px and below).
 * Loaded in wp_footer so it overrides per-page inline styles.
 */

/* ── Base: prevent horizontal scroll (all viewports) ── */
html,
body {
  overflow-x: clip !important;
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100%;
}

#wpadminbar {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

main,
.page-content,
.cosmic-footer,
.premium-header-wrapper,
.mobile-navigation-bar {
  max-width: 100%;
}

@media (max-width: 991px) {
  .premium-header-wrapper,
  .mobile-navigation-bar {
    overflow-x: clip;
    overflow-x: hidden;
  }
}

@media (min-width: 992px) {
  .premium-header-wrapper,
  .header-container,
  .master-header-hull,
  .primary-operational-tier,
  .desktop-nav-engine,
  .desktop-nav-engine .cosmic-nav-menu {
    overflow: visible !important;
  }
}

.tx-container,
.hero .hero-container,
.services-shell,
.services,
.platform,
.intro,
.challenges,
.why,
.paths,
.cta {
  max-width: 100%;
  box-sizing: border-box;
}

.intro__image-wrap,
.challenges__image-wrap,
.hero__visual,
.hero {
  overflow-x: hidden;
}

/* ── Base: prevent horizontal scroll ── */
@media (max-width: 480px) {
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  img,
  video,
  iframe,
  svg {
    max-width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Shared containers ── */
@media (max-width: 480px) {
  .wrap,
  .tx-container,
  .blog-shell,
  .hero-highlights .wrap,
  .utility-inner,
  .nav-inner,
  .footer-container,
  .legal-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: max(14px, env(safe-area-inset-left)) !important;
    padding-right: max(14px, env(safe-area-inset-right)) !important;
    box-sizing: border-box !important;
  }

  .wrap {
    width: min(100%, calc(100% - 28px)) !important;
  }
}

@media (max-width: 767px) {
  .why__list,
  .paths__grid,
  .metrics__grid,
  .results__grid {
    grid-template-columns: 1fr !important;
  }

  .stats__grid,
  .difference__grid,
  .process__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .testimonials__track {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 16px !important;
  }

  .testimonials__track .testimonial-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .testimonials__viewport {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

/* ── Grids: collapse to single column ── */
@media (max-width: 480px) {
  .capabilities-grid,
  .process-grid,
  .models-grid,
  .models-grid-row2,
  .feature-grid,
  .hero-metrics,
  .solutions-grid,
  .conf-grid,
  .amenities,
  .expertise-matrix,
  .cards,
  .hq-list,
  .form-grid,
  .field-row,
  .metrics__grid,
  .why__list,
  .paths__grid,
  .results__grid,
  .team__grid,
  .intro__grid,
  .challenges__grid,
  .risk-free__grid,
  .why__split,
  .services-split,
  .platform__panel,
  .enterprise-grid,
  .flow-track,
  .partner-grid,
  .hero-grid,
  .mission-lead,
  .mission-pillar,
  .hero-layout,
  .story-grid,
  .journey-grid,
  .cowork-grid {
    grid-template-columns: 1fr !important;
  }

  .stats__grid,
  .difference__grid,
  .process__grid,
  .stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .hero-models-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .hero-models-hub {
    width: min(100%, 240px) !important;
    padding: 12px 10px 10px !important;
  }

  .platform__nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }
}

.hero .hero-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.hero__copy,
.hero p,
.hero h1,
.hero__eyebrow {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* ── Homepage bottom CTA: keep button centered on all screens ── */
.cta .cta__actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  text-align: center !important;
}

.cta .cta__actions .tx-btn {
  width: auto !important;
  max-width: min(100%, 320px) !important;
  margin-inline: auto !important;
  box-shadow: none !important;
}

.cta .cta__actions .tx-btn:hover {
  box-shadow: none !important;
}

/* ── Button & tab groups: compact grid (not full-width blocks) ── */
@media (max-width: 767px) {
  .hero .actions,
  .hero-actions,
  .cta-actions,
  .tray-cta-row,
  .platform__nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .services__highlights {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  /* 3-button groups: third centered on its own row */
  .hero-actions > *:nth-child(3):last-child,
  .hero .actions > *:nth-child(3):last-child,
  .cta-actions > *:nth-child(3):last-child {
    grid-column: 1 / -1 !important;
    max-width: min(240px, 72%) !important;
    justify-self: center !important;
  }

  /* 5 platform tabs: last one centered */
  .platform__nav .platform__tab:nth-child(5):last-child {
    grid-column: 1 / -1 !important;
    max-width: min(220px, 72%) !important;
    justify-self: center !important;
  }

  /* Single button: centered, not full bleed */
  .hero-actions > *:only-child,
  .hero .actions > *:only-child,
  .cta-actions > *:only-child {
    grid-column: 1 / -1 !important;
    max-width: min(280px, 85%) !important;
    justify-self: center !important;
  }

  .hero-actions > *,
  .hero .actions > *,
  .cta-actions > *,
  .tray-cta-row > *,
  .hero-cta,
  .hero .btn,
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-mint,
  .btn-ghost,
  .tx-btn,
  .nav-cta,
  .action-cta-button,
  .blog-row__btn,
  .tray-cta {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    padding: 10px 8px !important;
  }

  .platform__nav {
    overflow: visible !important;
    padding-top: 0 !important;
  }

  .platform__tab {
    width: auto !important;
    text-align: center !important;
    padding: 10px 6px !important;
    font-size: 9px !important;
    letter-spacing: 0.2px !important;
    line-height: 1.3 !important;
    border: 1px solid rgba(39, 55, 115, 0.12) !important;
    border-radius: 10px !important;
    border-top: 1px solid rgba(39, 55, 115, 0.12) !important;
    border-bottom: 1px solid rgba(39, 55, 115, 0.12) !important;
  }

  .platform__tab::before {
    display: none !important;
  }

  .platform__tab:hover,
  .platform__tab.active {
    padding-left: 6px !important;
  }

  .services__pill {
    font-size: 8px !important;
    padding: 7px 4px !important;
    border-radius: 8px !important;
    text-align: center !important;
    line-height: 1.35 !important;
  }

  .services__pill i {
    font-size: 8px !important;
    margin-right: 3px !important;
  }

  /* CTA sections with one button beside copy */
  .cta-inner > a[class*="btn"],
  .cta-inner > .btn-primary,
  .cta-inner > .btn-mint,
  .cta-inner > .btn-outline {
    width: auto !important;
    max-width: min(280px, 90%) !important;
    align-self: center !important;
    font-size: 12px !important;
    padding: 12px 16px !important;
  }

  .enterprise-copy .btn-secondary,
  .enterprise-copy .btn-primary {
    width: auto !important;
    max-width: min(280px, 100%) !important;
  }
}

/* ── Homepage hero (mobile-first fallback) ── */
@media (max-width: 767px) {
  .hero .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .hero-cta {
    width: auto !important;
    max-width: 100% !important;
    display: flex !important;
    white-space: normal !important;
    box-sizing: border-box !important;
    font-size: 11px !important;
    padding: 10px 8px !important;
  }
}

.hero__stats {
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

.hero__stat {
  width: 100% !important;
  padding: 16px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.hero__stat:nth-child(2n) { border-right: none !important; }
.hero__stat:nth-last-child(-n+2) { border-bottom: none !important; }
.hero__stat:last-child:nth-child(odd) {
  grid-column: 1 / -1 !important;
  border-right: none !important;
  border-bottom: none !important;
  justify-content: center !important;
}

@media (min-width: 992px) {
  .hero__stats {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    grid-template-columns: none !important;
    border: none !important;
    border-radius: 0 !important;
    gap: 20px 28px !important;
    width: auto !important;
  }
  .hero__stat {
    width: auto !important;
    padding: 0 !important;
    border: none !important;
    grid-column: auto !important;
  }
}

/* ── Hero CTAs & buttons ── */
@media (max-width: 480px) {
  .hero .hero-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: max(14px, env(safe-area-inset-left)) !important;
    padding-right: max(14px, env(safe-area-inset-right)) !important;
    box-sizing: border-box !important;
  }

  .hero__copy,
  .hero p,
  .hero__eyebrow {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .hero__eyebrow {
    font-size: 0.58rem !important;
    letter-spacing: 0.9px !important;
    line-height: 1.55 !important;
  }

  .hero__visual-img {
    width: min(100%, 280px) !important;
    transform: none !important;
    margin-inline: auto !important;
  }

  .hero-cta,
  .hero-actions > *,
  .hero .actions > *,
  .cta-actions > *,
  .tray-cta,
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    font-size: 10px !important;
    padding: 9px 6px !important;
  }

  .platform__tab {
    font-size: 8px !important;
    padding: 9px 4px !important;
  }

  .services__pill {
    font-size: 7px !important;
    padding: 6px 3px !important;
  }
}

/* ── Section spacing ── */
@media (max-width: 480px) {
  .hero,
  .tx-section,
  .section,
  .story-section,
  .journey-section,
  .mission-section,
  .cowork-section,
  .conferences-section,
  .values-strip,
  .strip,
  .form-section,
  .map-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .cta-panel,
  .feature-card,
  .process-step,
  .model-card,
  .hero-panel,
  .path-card,
  .services-shell,
  .form-side,
  .form-main,
  .legal-content-body {
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }

  .hero-collage {
    height: auto !important;
    min-height: 220px !important;
    max-height: 280px !important;
  }

  .conf-card.featured .conf-img {
    min-height: 200px !important;
  }
}

/* ── Why section: compact stats row (match desktop) ── */
@media (max-width: 767px) {
  .why__proof {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-top: 16px !important;
  }

  .why__proof li {
    padding: 8px 4px !important;
    font-size: 8px !important;
    text-align: center !important;
    border-radius: 10px !important;
  }

  .why__proof strong {
    font-size: clamp(0.9rem, 3.4vw, 1.15rem) !important;
    margin-bottom: 2px !important;
  }

  .why__intro .tx-title {
    font-size: clamp(1.25rem, 4.8vw, 1.6rem) !important;
    line-height: 1.2 !important;
  }

  .why__intro .tx-lead {
    font-size: 0.86rem !important;
    line-height: 1.6 !important;
  }

  .why__item {
    padding: 14px 12px 16px !important;
  }

  .why__item-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
  }

  .why__item h3 {
    font-size: 0.9rem !important;
  }

  .why__item p {
    font-size: 12px !important;
    line-height: 1.55 !important;
  }

  .tx-title {
    font-size: clamp(1.12rem, 4vw, 1.45rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }

  .tx-lead {
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
  }

  .intro__body .tx-title {
    font-size: clamp(1.1rem, 3.8vw, 1.32rem) !important;
  }

  .intro__body p,
  .platform__pane p,
  .services-col__head p,
  .challenges__list li span {
    font-size: 0.8rem !important;
    line-height: 1.55 !important;
    margin-bottom: 10px !important;
  }

  .tx-section,
  .tx-section--sm,
  section[id] {
    scroll-margin-top: calc(var(--mobile-header-h, 100px) + 10px) !important;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
}

/* ── Typography ── */
@media (max-width: 480px) {
  .hero h1,
  .hero-title,
  .hero .hero-title {
    font-size: clamp(1.42rem, 6.5vw, 1.85rem) !important;
    line-height: 1.15 !important;
    word-break: break-word;
  }

  .hero p,
  .hero-text,
  .hero-lead {
    font-size: 0.84rem !important;
    max-width: 100% !important;
    line-height: 1.65 !important;
  }

  .mission-mark {
    font-size: 52px !important;
  }

  .conferences-section .section-head h2 {
    font-size: clamp(1.6rem, 8vw, 2rem) !important;
  }
}

/* ── Blog ── */
@media (max-width: 480px) {
  .blog-shell {
    padding-bottom: 40px !important;
  }

  .blog-intro {
    padding: 32px 0 24px !important;
  }

  .blog-row {
    padding: 24px 0 !important;
  }

  .blog-pagination {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .blog-pagination a,
  .blog-pagination span {
    min-width: 32px !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
  }
}

/* ── Legal / terms ── */
@media (max-width: 480px) {
  .ambient-spot {
    display: none !important;
  }

  .legal-document-scope,
  .legal-document-scop {
    padding: 4rem 12px 2rem !important;
    overflow-x: hidden !important;
  }

  .legal-content-body {
    padding: 1.5rem 1rem !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .legal-content-body p {
    font-size: 0.95rem !important;
  }

  .sub-list-block {
    margin-left: 0.5rem !important;
  }
}

/* ── Footer ── */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer-col--newsletter {
    grid-column: auto !important;
  }

  .newsletter-form {
    flex-direction: column !important;
  }

  .newsletter-btn {
    width: 100% !important;
  }

  .footer-bottom-links {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    margin-bottom: 0.85rem !important;
  }

  .newsletter-input {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ── 320px tier ── */
@media (max-width: 320px) {
  .wrap,
  .tx-container,
  .blog-shell,
  .hero-highlights .wrap,
  .utility-inner,
  .nav-inner,
  .footer-container,
  .legal-container {
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }

  .wrap {
    width: min(100%, calc(100% - 24px)) !important;
  }

  .hero h1,
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 1.85rem) !important;
  }

  .hero,
  .tx-section,
  .section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  .cta-panel,
  .feature-card,
  .process-step,
  .model-card,
  .hero-panel,
  .path-card,
  .form-side,
  .form-main {
    padding: 16px 12px !important;
  }

  .hero-models-hub__grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .svc-model-item {
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .svc-model-item__abbr {
    min-width: 40px !important;
    font-size: 0.85rem !important;
    padding: 6px 4px !important;
  }

  .brand-matrix-labels b,
  .mobile-brand-text b,
  .tx-logo-brand-text {
    font-size: 14px !important;
  }

  .architectural-brand .tx-site-logo,
  .mobile-brand-wrapper .tx-site-logo {
    height: 34px !important;
    max-width: 120px !important;
  }

  .mobile-header-container {
    gap: 10px !important;
    min-height: 56px !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .mobile-brand-wrapper {
    max-width: calc(100% - 52px) !important;
  }

  .mobile-brand-wrapper .tx-site-logo {
    max-width: 72px !important;
    height: 32px !important;
  }

  .mobile-top-utility-bar,
  .mobile-utility-inner {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .mobile-utility-item span {
    max-width: 42vw !important;
  }

  .hamburger-toggle-button {
    width: 40px !important;
    height: 40px !important;
  }

  .mobile-utility-item {
    font-size: 9px !important;
  }

  .app-navigation-tray {
    padding: 16px 12px !important;
  }

  .tray-cta {
    font-size: 9px !important;
    padding: 8px 6px !important;
    min-height: 42px !important;
  }

  .map-frame {
    height: 240px !important;
  }

  .utility-contact {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .hero-title {
    max-width: none !important;
  }

  .hero-cta {
    font-size: 12px !important;
    padding: 11px 12px !important;
  }

  .hero__eyebrow {
    font-size: 0.5rem !important;
    letter-spacing: 0.6px !important;
  }

  .hero-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 12px 12px !important;
    border-radius: 14px !important;
  }

  .hero-panel .panel-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 17px !important;
    border-radius: 10px !important;
  }

  .hero-panel h3 {
    font-size: 0.95rem !important;
  }

  .hero-panel p {
    font-size: 0.76rem !important;
    margin-top: 8px !important;
    line-height: 1.5 !important;
  }

  .hero-metrics {
    gap: 6px !important;
    margin-top: 10px !important;
  }

  .metric-card {
    padding: 8px !important;
    border-radius: 10px !important;
  }

  .metric-card strong {
    font-size: 0.88rem !important;
  }

  .metric-card small {
    font-size: 0.62rem !important;
  }
}

@media (min-width: 992px) {
  .hero .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 520px !important;
  }
  .hero-cta {
    width: 100% !important;
    min-height: 52px !important;
    max-width: none !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    padding: 14px 18px !important;
    border-width: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ── Mobile card polish (homepage + inner pages) ── */
@media (max-width: 767px) {
  main.page-content,
  #main-content {
    padding-bottom: 72px !important;
  }

  .results__header,
  .process__header,
  .difference__header,
  .metrics__header,
  .section-head {
    margin-bottom: 24px !important;
  }

  .results__grid,
  .process__grid,
  .difference__grid,
  .stats__grid,
  .result-card,
  .testimonial-card,
  .process-step,
  .diff-card,
  .stats__card,
  .metrics__col,
  .path-card,
  .feature-card,
  .model-card,
  .capability,
  .enterprise-panel {
    gap: 10px !important;
  }

  .result-card,
  .testimonial-card,
  .process-step,
  .diff-card,
  .stats__card,
  .metrics__col,
  .path-card,
  .feature-card,
  .model-card,
  .enterprise-panel {
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }

  .result-card__tag,
  .path-card__tag {
    font-size: 9px !important;
    padding: 4px 8px !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.4px !important;
  }

  .team__masthead {
    gap: 16px !important;
    margin-bottom: 32px !important;
  }

  .team__title {
    font-size: 1.35rem !important;
    line-height: 1.18 !important;
  }

  .team__masthead-right .tx-lead {
    font-size: 0.88rem !important;
    line-height: 1.65 !important;
  }

  .team__photo {
    border-radius: 20px !important;
    margin-bottom: 0 !important;
  }

  .team__media {
    margin-bottom: 16px !important;
    border-radius: 20px !important;
    box-shadow:
      0 4px 12px rgba(17, 17, 17, 0.05),
      0 14px 28px rgba(39, 55, 115, 0.1) !important;
  }

  .team__focus {
    font-size: 0.8rem !important;
    margin-top: 10px !important;
  }

  .team__name {
    font-size: 0.88rem !important;
    letter-spacing: 0.05em !important;
  }

  .team__role {
    font-size: 0.82rem !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    letter-spacing: normal !important;
    background: none !important;
  }

  .result-card h3,
  .path-card h3,
  .process-step h4,
  .feature-card h3,
  .model-card h3 {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }

  .diff-card {
    padding: 14px 10px !important;
    border-radius: 12px !important;
  }

  .diff-card__icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
    margin: 0 auto 6px !important;
    border-radius: 9px !important;
  }

  .diff-card h4 {
    font-size: 0.76rem !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .process__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .process-step {
    padding: 14px 10px !important;
    border-radius: 12px !important;
  }

  .process-step h4 {
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .process-step p {
    font-size: 11px !important;
    line-height: 1.5 !important;
  }

  .difference__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .result-card__metric,
  .stats__num,
  .stat strong {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem) !important;
    line-height: 1.1 !important;
    margin-bottom: 4px !important;
  }

  .result-card__metric span {
    font-size: 0.62em !important;
  }

  .result-card p,
  .testimonial-card blockquote,
  .process-step p,
  .path-card p,
  .feature-card p,
  .model-card p,
  .metrics__col li,
  .enterprise-panel p {
    font-size: 12px !important;
    line-height: 1.58 !important;
  }

  .diff-card p {
    font-size: 0.66rem !important;
    line-height: 1.45 !important;
  }

  .result-card:hover,
  .testimonial-card:hover,
  .process-step:hover,
  .diff-card:hover,
  .stats__card:hover,
  .path-card:hover {
    transform: none !important;
  }

  .process-step__num {
    font-size: 1.35rem !important;
    margin-bottom: 6px !important;
  }

  .testimonial-card blockquote {
    margin-bottom: 12px !important;
  }

  .testimonials__shell {
    border-radius: 18px !important;
    padding: 18px 14px 22px !important;
  }

  .testimonials {
    padding-bottom: 56px !important;
    overflow-x: hidden !important;
  }

  .testimonials__top {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 14px !important;
    gap: 10px !important;
  }

  .testimonials__arrows {
    align-self: flex-start !important;
    gap: 8px !important;
  }

  .testimonials__arrow {
    width: 32px !important;
    height: 32px !important;
    font-size: 11px !important;
  }

  .testimonials__dots {
    margin-top: 14px !important;
  }

  .testimonials__title {
    font-size: clamp(1.15rem, 4.5vw, 1.35rem) !important;
  }

  .testimonials__subtitle {
    font-size: 0.78rem !important;
  }

  .testimonial-card__stars {
    font-size: 10px !important;
  }

  .testimonial-card__avatar {
    width: 34px !important;
    height: 34px !important;
  }

  .testimonial-card__name { font-size: 12px !important; }
  .testimonial-card__role { font-size: 10px !important; }

  .stats__label,
  .stat span {
    font-size: 9px !important;
    letter-spacing: 0.04em !important;
  }

  .tx-back-to-top {
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    left: auto !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 12px !important;
    z-index: 9990 !important;
  }

  .faq__wrap {
    padding: 4px 14px !important;
    border-radius: 14px !important;
  }

  .faq .accordion-button {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    padding: 14px 0 !important;
    gap: 10px !important;
  }

  .faq .accordion-body {
    font-size: 0.78rem !important;
    line-height: 1.55 !important;
    padding: 0 0 14px !important;
  }
}

/* ── Trosidex-style 400px tier ── */
@media (max-width: 400px) {
  .tx-title,
  .section-head h2 {
    font-size: 1.12rem !important;
    line-height: 1.2 !important;
  }

  .hero h1,
  .hero-title {
    font-size: 1.38rem !important;
  }

  .intro__body .tx-title {
    font-size: 1.08rem !important;
  }

  .intro__body p,
  .tx-lead {
    font-size: 0.78rem !important;
  }

  .services__pill,
  .capability,
  .process-step {
    font-size: 12px !important;
  }

  .card-grid,
  .capabilities-grid,
  .process-grid {
    gap: 8px !important;
  }
}

/* ── Services page (page-services.php) ── */
@media (max-width: 768px) {
  body.page-template-page-services-php .hero-split,
  body.page-services .hero-split {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.page-template-page-services-php .hero-actions,
  body.page-services .hero-actions,
  body.page-template-page-services-php .cta-actions,
  body.page-services .cta-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  body.page-template-page-services-php .hero-actions a,
  body.page-services .hero-actions a,
  body.page-template-page-services-php .cta-actions a,
  body.page-services .cta-actions a {
    width: 100% !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.25 !important;
  }

  body.page-template-page-services-php .stats-inner,
  body.page-services .stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.page-template-page-services-php .models-grid,
  body.page-services .models-grid,
  body.page-template-page-services-php .models-grid-row2,
  body.page-services .models-grid-row2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.page-template-page-services-php .service-card,
  body.page-services .service-card {
    min-height: 0 !important;
    clip-path: none !important;
    border-radius: 16px !important;
  }

  body.page-template-page-services-php .hero-ribbon__track,
  body.page-services .hero-ribbon__track {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  body.page-template-page-services-php .hero-ribbon__track::-webkit-scrollbar,
  body.page-services .hero-ribbon__track::-webkit-scrollbar {
    display: none !important;
  }
}

@media (max-width: 480px) {
  body.page-template-page-services-php .services-section,
  body.page-services .services-section,
  body.page-template-page-services-php .models-section,
  body.page-services .models-section,
  body.page-template-page-services-php .why-section,
  body.page-services .why-section,
  body.page-template-page-services-php .cta-section,
  body.page-services .cta-section {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
  }

  body.page-template-page-services-php .stats-inner,
  body.page-services .stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 320px) {
  body.page-template-page-services-php .hero-actions a,
  body.page-services .hero-actions a,
  body.page-template-page-services-php .cta-actions a,
  body.page-services .cta-actions a {
    min-height: 40px !important;
    padding: 10px 6px !important;
    font-size: 10px !important;
    border-radius: 10px !important;
  }

  body.page-template-page-services-php .hero h1,
  body.page-services .hero h1 {
    font-size: 1.35rem !important;
  }

  body.page-template-page-services-php .section-head h2,
  body.page-services .section-head h2 {
    font-size: 1.2rem !important;
  }

  body.page-template-page-services-php .model-card,
  body.page-services .model-card {
    padding: 14px 10px !important;
  }

  body.page-template-page-services-php .model-badge,
  body.page-services .model-badge {
    font-size: 10px !important;
  }
}
