/* AureeOne responsive layer */
img, svg, video, iframe { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* Tablet */
@media (max-width: 1024px) {
  [style*="grid-template-columns:repeat(6,1fr)"],
  [style*="grid-template-columns:repeat(6, 1fr)"] { grid-template-columns: repeat(3, 1fr) !important; }
  [style*="grid-template-columns:2fr repeat(5,1fr)"] { grid-template-columns: repeat(3, 1fr) !important; }
  [style*="grid-template-columns:repeat(5,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns:1fr 1.1fr"],
  [style*="grid-template-columns:1fr 1.2fr"] { grid-template-columns: 1fr !important; }
}

/* Phone */
@media (max-width: 760px) {
  section, .section { padding-left: 20px !important; padding-right: 20px !important; }
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="display:flex"][style*="gap"] { flex-wrap: wrap; }

  /* stacked flow diagrams read as a vertical timeline */
  [data-flow-row] { flex-direction: column !important; align-items: stretch !important; }

  /* generous but not wasteful vertical rhythm */
  section { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* keep CTAs full width and tappable */
  a[style*="padding:16px 26px"],
  a[style*="padding:16px 28px"],
  a[style*="padding:16px 24px"] {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    min-height: 48px !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }
  nav a[style*="padding:10px 20px"] { min-height: 44px; display: flex; align-items: center; }

  /* readable type floors */
  p[style*="font-size:11.5px"], p[style*="font-size:12px"], p[style*="font-size:12.5px"] { font-size: 13px !important; }
  p[style*="font-size:13px"] { font-size: 14px !important; }
  h1 { line-height: 1.12 !important; }
  h2 { line-height: 1.2 !important; }

  /* The cube's faces are fixed-pixel 3D geometry, so it must be SCALED,
     never resized — resizing the stage detaches the faces from it. */
  .cube-wrap { overflow: visible !important; }
  .cube-stage {
    width: 360px !important;
    height: 360px !important;
    transform: scale(0.62) !important;
    transform-origin: center center !important;
    margin: -68px -68px !important;
    flex: 0 0 auto !important;
  }

  /* embedded scheduling stays usable */
  .calendly-inline-widget, iframe { min-width: 0 !important; width: 100% !important; }

  /* tables scroll rather than squash */
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 420px) {
  .cube-stage {
    transform: scale(0.48) !important;
    margin: -94px -94px !important;
  }
}