/* Mission Curtis — responsive overrides.
   Page layouts are built with inline styles, so these use !important to win. */

html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
img, svg, video { max-width: 100%; }

/* ---- Header nav switching ---- */
.mc-mobile-toggle { display: none; }
@media (max-width: 940px) {
  .mc-desktop-nav { display: none !important; }
  .mc-mobile-toggle { display: inline-flex !important; }
  .mc-header-cta { display: none !important; }
}

.mc-mobile-panel { border-top: 1px solid var(--border-subtle); background: #fff; }
.mc-mobile-panel a { display: block; padding: 16px var(--gutter); font-family: var(--font-body); font-weight: 600; font-size: 17px; color: var(--text-body); text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.mc-mobile-panel a[aria-current="page"] { color: var(--color-primary); }

/* ---- Tablet ---- */
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  main [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  footer [style*="grid-template-columns"] { grid-template-columns: repeat(2, 1fr) !important; gap: 36px !important; }
}

/* ---- Phone ---- */
@media (max-width: 760px) {
  :root { --gutter: 18px; }

  /* every fixed multi-column layout becomes a single column */
  main [style*="grid-template-columns"],
  footer [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  main [style*="grid-template-columns"] { gap: 20px !important; }

  /* nothing pinned mid-page on a small screen */
  main [style*="position: sticky"] { position: static !important; top: auto !important; }

  /* rows of stats / buttons / chips must wrap instead of squeezing */
  main [style*="display: flex"] { flex-wrap: wrap !important; }

  /* tame desktop-scale vertical rhythm and card insets */
  main > section > div[class="mc-container"],
  main section > .mc-container { padding-top: 44px !important; padding-bottom: 44px !important; }
  main [style*="padding: 48px 52px"] { padding: 32px 24px !important; }
  main [style*="padding: 64px 40px"] { padding: 44px 22px !important; }

  /* full-width primary actions read better on a phone */
  main a[class*="mc-btn"], main button[class*="mc-btn"] { width: 100%; justify-content: center; }

  /* comfortable line length + no runaway headline tracking */
  main p { max-width: 100% !important; }
  main h1, main h2 { letter-spacing: -0.02em !important; }

  /* footer bottom bar stacks */
  footer [style*="justify-content: space-between"] { justify-content: flex-start !important; }
}

/* ---- Small phone ---- */
@media (max-width: 400px) {
  main [style*="display: flex"][style*="gap: 28"] { gap: 16px !important; }
}
