html { scroll-behavior: smooth; }
[id="o-sistema"],
[id="a-jornada"],
[id="protocolos"] { scroll-margin-top: 136px; }
html, body { overflow-x: clip; }
img, video { max-width: 100%; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999999;
  padding: 12px 16px;
  background: #f2ede3;
  color: #131210;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.medical-information-notice {
  padding: 24px 56px;
  border-top: 1px solid rgba(200,169,106,.18);
  background: #0b0a09;
  color: #8e8678;
  font: 300 12px/1.7 'Jost', sans-serif;
  text-align: center;
}
.site-nav a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #c8a96a;
  outline-offset: 4px;
}
@media (max-width: 980px) {
  .site-nav {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 16px !important;
    padding: 18px 20px !important;
  }
  .site-nav > div:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    gap: 22px !important;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: none;
  }
  .site-nav > div:nth-child(2)::-webkit-scrollbar { display: none; }
  .site-nav > div:nth-child(2) a { flex: 0 0 auto; }
  .site-nav > div:last-child { justify-content: flex-end; }
  .site-nav > div:last-child a:first-child { display: none; }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:420px 1fr"],
  [style*="grid-template-columns: 420px 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  [style*="padding:110px 56px"],
  [style*="padding:96px 56px"],
  [style*="padding:80px 56px"],
  [style*="padding:72px 56px"] {
    padding: 72px 24px !important;
  }
  [style*="left:56px"] { left: 24px !important; }
  [style*="right:56px"] { right: 24px !important; }
  [style*="font-size:58px"],
  [style*="font-size:54px"],
  [style*="font-size:52px"] { font-size: clamp(38px, 7vw, 52px) !important; }
  [style*="width:660px"], [style*="width: 660px"] { width: min(680px, calc(100% - 48px)) !important; }
}
@media (max-width: 620px) {
  .medical-information-notice { padding: 22px 20px; }
  .site-nav { grid-template-columns: 1fr !important; }
  .site-nav > div:first-child { font-size: 20px !important; letter-spacing: 4px !important; }
  .site-nav > div:last-child { display: none !important; }
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(2,1fr)"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  [style*="padding:110px 56px"],
  [style*="padding:96px 56px"],
  [style*="padding:80px 56px"],
  [style*="padding:72px 56px"],
  [style*="padding:64px 56px"] {
    padding: 56px 20px !important;
  }
  [style*="left:56px"] { left: 20px !important; }
  [style*="right:56px"] { right: 20px !important; }
  [style*="bottom:48px"][style*="display:flex"] {
    gap: 18px !important;
    max-width: calc(100% - 40px);
    overflow-x: auto;
  }
  [style*="height:820px"] { height: 760px !important; }
  [style*="height:640px"] { height: 460px !important; }
  [style*="font-size:46px"], [style*="font-size:40px"] { font-size: 34px !important; }
}

/* Classes aplicadas pelo shell global após ler a anatomia do HTML recebido. */
@media (max-width: 760px) {
  .site-page main { overflow: clip; }
  .site-page main h1,
  .site-page main h2,
  .site-page main h3 {
    max-width: 100% !important;
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  .site-page main h1 { font-size: clamp(36px, 10.5vw, 44px) !important; line-height: 1.08 !important; }
  .site-page main h2 { font-size: clamp(30px, 8.5vw, 38px) !important; line-height: 1.14 !important; }
  .site-page main h3 { font-size: clamp(24px, 7vw, 31px) !important; line-height: 1.18 !important; }
  .site-page main p,
  .site-page main a,
  .site-page main span,
  .site-page main div { min-width: 0; }
  .site-page main a { max-width: 100%; overflow-wrap: anywhere; }

  .ia-mobile-stack-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  .ia-mobile-stack-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
  }
  .ia-mobile-section-pad {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .ia-mobile-absolute-fluid {
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    max-width: none !important;
  }
  .ia-mobile-fixed-stats {
    left: 20px !important;
    right: 20px !important;
    bottom: 24px !important;
    width: auto !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    overflow: visible !important;
  }
  .ia-mobile-fluid {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
  }
  .ia-mobile-sidebar {
    width: 100% !important;
    padding: 0 0 14px !important;
    flex-direction: row !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #c8a96a rgba(200, 169, 106, .12);
    border-right: 0 !important;
    border-bottom: 1px solid rgba(242, 237, 227, .1);
  }
  .ia-mobile-sidebar > * { flex: 0 0 auto; scroll-snap-align: start; }
  .ia-mobile-sidebar::-webkit-scrollbar { height: 6px; }
  .ia-mobile-sidebar::-webkit-scrollbar-track {
    margin-inline: 8px;
    border-radius: 999px;
    background: rgba(200, 169, 106, .12);
  }
  .ia-mobile-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(90deg, #9c7b3f, #d6b76f);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  }
  .ia-mobile-sidebar::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  .ia-mobile-icon-rail { display: none !important; }

  .site-page footer {
    padding: 40px 20px calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Home: a composição desktop usa posicionamento absoluto. No celular ela
     vira uma narrativa vertical, com título, texto, ações e credenciais sem
     sobreposição. */
  .ia-page-home #\31 a > div:nth-child(2) {
    height: 1040px !important;
    min-height: 1040px;
  }
  .ia-page-home #\31 a > div:nth-child(2) > img:first-child {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-position: 58% 20% !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(2) {
    inset: 0 !important;
    background: linear-gradient(180deg, rgba(11,10,9,.18) 0%, rgba(11,10,9,.62) 36%, rgba(11,10,9,.96) 78%) !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(3) {
    top: 42px !important;
    left: 20px !important;
    right: 20px !important;
    bottom: auto !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 17px !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(3) > div:first-child {
    max-width: 260px;
    font-size: 12px !important;
    line-height: 1.55 !important;
    letter-spacing: 3.5px !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) h1 {
    width: min(100%, 390px) !important;
    margin: 0 !important;
    font-size: clamp(39px, 10.7vw, 46px) !important;
    line-height: 1.04 !important;
    text-wrap: balance !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) p {
    max-width: 360px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(3) > div:last-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(3) > div:last-child a {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 13px 15px !important;
    text-align: center;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(4) {
    left: 20px !important;
    right: 20px !important;
    bottom: 24px !important;
    width: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 16px !important;
  }
  .ia-page-home #\31 a > div:nth-child(2) > div:nth-child(4) > div {
    padding: 12px 0 !important;
    border-top: 1px solid rgba(200,169,106,.34);
  }
  .ia-page-home #\31 a > div:nth-child(3),
  .ia-page-home #\31 a > div:nth-child(4),
  .ia-page-home #\31 a > div:nth-child(5),
  .ia-page-home #\31 a > div:nth-child(6),
  .ia-page-home #\31 a > div:nth-child(7) {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }
  .ia-page-home #\31 a > div:nth-child(4) > div:first-child,
  .ia-page-home #\31 a > div:nth-child(5) > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 22px !important;
    margin-bottom: 34px !important;
  }
  .ia-page-home #\31 a > div:nth-child(4) > div:nth-child(2),
  .ia-page-home #\31 a > div:nth-child(5) > div:nth-child(2),
  .ia-page-home #tecnologias > div:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1px !important;
  }
  .ia-page-home #\31 a > div:nth-child(4) > div:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 34px !important;
    margin-top: 58px !important;
  }
  .ia-page-home #\31 a > div:nth-child(5) > div:nth-child(2) > div {
    min-height: 430px !important;
  }
  .ia-page-home #tecnologias > div:nth-child(3) > a {
    min-height: 0 !important;
    padding: 26px 20px !important;
  }
  .ia-page-home #\31 a > div:nth-child(8) h2 {
    font-size: 36px !important;
  }
  .ia-page-home #\31 a > div:nth-child(8) > div:last-child,
  .ia-page-home #\31 a > div:nth-child(8) a {
    box-sizing: border-box;
    width: 100% !important;
  }
}

@media (max-width: 390px) {
  .site-page main h1 { font-size: 35px !important; }
  .site-page main h2 { font-size: 30px !important; }
  .ia-mobile-fixed-stats { grid-template-columns: minmax(0, 1fr) !important; }
}
