/* Cognovat — responsive layer (loaded on every page).
   Overrides inline styles with !important at breakpoints.
   Selectors match BOTH spaced and unspaced style serializations. */

/* ---------- Mobile nav chrome (built by motion.js) ---------- */
.cgv-burger{ display:none; }
.cgv-mobile-menu{ display:none; }

@media (max-width: 900px){
  /* hide desktop nav links, show hamburger */
  .cgv-navlinks{ display:none !important; }
  .cgv-burger{ display:inline-flex !important; }

  /* multi-column grids → two-up */
  [style*="repeat(5"]{ grid-template-columns: repeat(2,1fr) !important; }
  [style*="repeat(4"]{ grid-template-columns: repeat(2,1fr) !important; }
  [style*="repeat(3"]{ grid-template-columns: repeat(2,1fr) !important; }

  /* asymmetric two-column content → stack */
  [style*="340px 1fr"],[style*="300px 1fr"],
  [style*="1.05fr"],[style*="1.1fr"],[style*="1.6fr"],
  [style*="grid-template-columns: 1fr 1fr"],[style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.05fr"],[style*="grid-template-columns:1fr 1.05fr"]{
    grid-template-columns: 1fr !important;
  }

  /* trim oversized side + vertical padding on main containers */
  [style*="max-width:1280px"],[style*="max-width: 1280px"],
  [style*="max-width:960px"],[style*="max-width: 960px"],
  [style*="max-width: 760px"],[style*="max-width:760px"]{
    padding-left: 26px !important; padding-right: 26px !important;
  }

  /* big section vertical rhythm → tighter */
  [style*="104px 40px"]{ padding-top: 64px !important; padding-bottom: 64px !important; }

  /* dark CTA / inner blocks */
  [style*="72px 56px"],[style*="64px 56px"],[style*="60px 56px"],[style*="64px 40px"]{
    padding: 40px 26px !important;
  }

  /* hero gets less top gap under fixed nav */
  header[style*="160px"]{ padding-top: 120px !important; }
}

@media (max-width: 600px){
  /* everything to a single column */
  [style*="repeat(5"],[style*="repeat(4"],[style*="repeat(3"],[style*="repeat(2"],
  [style*="grid-template-columns: 1fr auto"],[style*="grid-template-columns:1fr auto"]{
    grid-template-columns: 1fr !important;
  }
  [style*="max-width:1280px"],[style*="max-width: 1280px"],
  [style*="max-width:960px"],[style*="max-width: 960px"],
  [style*="max-width: 760px"],[style*="max-width:760px"]{
    padding-left: 20px !important; padding-right: 20px !important;
  }

  /* large display type → phone scale (spaced + unspaced) */
  [style*="font-size:60px"],[style*="font-size: 60px"]{ font-size: 36px !important; }
  [style*="font-size:58px"],[style*="font-size: 58px"]{ font-size: 35px !important; }
  [style*="font-size:54px"],[style*="font-size: 54px"]{ font-size: 34px !important; }
  [style*="font-size:48px"],[style*="font-size: 48px"]{ font-size: 32px !important; }
  [style*="font-size:46px"],[style*="font-size: 46px"]{ font-size: 34px !important; }
  [style*="font-size:44px"],[style*="font-size: 44px"]{ font-size: 30px !important; }
  [style*="font-size:40px"],[style*="font-size: 40px"]{ font-size: 29px !important; }
  [style*="font-size:38px"],[style*="font-size: 38px"]{ font-size: 28px !important; }
  [style*="font-size:36px"],[style*="font-size: 36px"]{ font-size: 27px !important; }
  [style*="font-size:34px"],[style*="font-size: 34px"]{ font-size: 26px !important; }
  [style*="font-size:32px"],[style*="font-size: 32px"]{ font-size: 25px !important; }
  [style*="font-size:30px"],[style*="font-size: 30px"]{ font-size: 24px !important; }

  /* large body / lead text → readable */
  [style*="font-size:24px"],[style*="font-size: 24px"]{ font-size: 20px !important; }
  [style*="font-size:21px"],[style*="font-size: 21px"]{ font-size: 18px !important; }
  [style*="font-size:20px"],[style*="font-size: 20px"]{ font-size: 17px !important; }
  [style*="font-size:19px"],[style*="font-size: 19px"]{ font-size: 17px !important; }

  /* stat / fact dividers read better without vertical borders when stacked */
  [style*="repeat(4"] > [style*="border-right"]{ border-right: none !important; }
}
