/* Medrecords AI — shared responsive layer for the static v3 build.
   The prototypes are desktop-authored with inline styles; this layer adapts
   them below 1080px (nav) / 760px (layout) without touching page markup.
   Page-specific fixes belong in that page's own <style> block. */

img { max-width: 100%; height: auto; }

/* mobile menu (built by /scripts/site.js from the desktop nav) */
.mnav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: none; background: none; cursor: pointer;
  color: #16140F; border-radius: 10px; flex: 0 0 auto;
}
.mnav-toggle:hover { background: rgba(22,20,15,.06); }
.mnav-panel {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #FAF9F5; z-index: 200; overflow-y: auto;
  padding: 18px 22px 40px; -webkit-overflow-scrolling: touch;
}
.mnav-panel.is-open { display: block; }
.mnav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mnav-group { border-bottom: 1px solid #E7E3D9; padding: 14px 0; }
.mnav-group > .mnav-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: #2F6B50; margin-bottom: 8px;
}
.mnav-group a { display: block; padding: 9px 0; font-size: 16px; font-weight: 500; color: #16140F; text-decoration: none; }
.mnav-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mnav-cta a {
  display: flex; align-items: center; justify-content: center; padding: 13px 18px;
  border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.mnav-cta .mnav-primary { background: #16140F; color: #F7F5F0; }
.mnav-cta .mnav-secondary { border: 1.5px solid #2F6B50; color: #2F6B50; }

@media (max-width: 1080px) {
  /* hide desktop nav links + secondary CTAs; keep logo, primary CTA, burger */
  div:has(> .mm) { display: none !important; }
  a[href="https://app.medrecords.ai/login"] { display: none !important; }
  div:has(> a[href="https://app.medrecords.ai/login"]) > a[href="/test-a-file/"] { display: none !important; }
  .mnav-toggle { display: inline-flex; }
}

@media (max-width: 480px) {
  /* top bar: logo + burger only; demo CTA lives in the menu and page body */
  div:has(> a[href="https://app.medrecords.ai/login"]) > a[href="/demo/"] { display: none !important; }
}

@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  /* multi-column inline grids are collapsed by scripts/site.js (track-count
     heuristic — CSS attribute selectors can't parse the templates safely) */
  [style*="grid-template-columns"] > * { min-width: 0; }
  [style*="display: flex"] > *, [style*="display:flex"] > * { min-width: 0; }
  /* display-size headings shrink to fit (covers 50-79px inline sizes) */
  [style*="font-size: 7"][style*="px"]:is(h1,h2,h3,div,span),
  [style*="font-size: 6"][style*="px"]:is(h1,h2,h3,div,span),
  [style*="font-size: 58px"], [style*="font-size: 56px"],
  [style*="font-size: 54px"], [style*="font-size: 52px"],
  [style*="font-size: 50px"] { font-size: 38px !important; line-height: 1.1 !important; letter-spacing: -0.015em !important; }
  [style*="font-size: 48px"], [style*="font-size: 46px"],
  [style*="font-size: 44px"], [style*="font-size: 42px"],
  [style*="font-size: 40px"] { font-size: 32px !important; line-height: 1.15 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
