/* ==========================================================================
   Hospital 9 de Julho — Layout compartilhado
   Barra de utilidade, cabeçalho, menu, rodapé, abertura das
   páginas internas e componentes de marca usados em mais de uma página.
   ========================================================================== */

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Código "PS" — sinalização de emergência reutilizável */
.code-ps {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  border-radius: var(--r-sign);
  background: var(--emergency);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: var(--fw-heavy);
  letter-spacing: 0.04em;
}

/* ── Abertura ──────────────────────────────────────────────── */
.intro { display: none; }
.js:not(.no-intro) .intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-intro);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.25rem;
  background: var(--blue-500);
  color: var(--white);
  clip-path: inset(0 0 0 0);
  animation: introFailsafe 0s 1.2s forwards;
}

.intro.is-done {
  clip-path: inset(0 0 100% 0);
  transition: clip-path var(--dur-3) var(--ease-in-out);
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes introFailsafe { to { visibility: hidden; } }

/* ── Barra de utilidade ────────────────────────────────────── */
.utility {
  position: relative;
  z-index: calc(var(--z-header) + 1);
  background: var(--navy-950);
  color: var(--on-dark);
  font-size: var(--fs-xs);
}
.utility__inner { display: flex; align-items: center; gap: var(--space-5); min-height: 40px; }
.utility__status { display: flex; align-items: center; gap: 0.55rem; margin-right: auto; }
.utility__status strong { color: var(--white); font-weight: var(--fw-semibold); }
.utility__status a { color: inherit; text-decoration: none; }
.utility__status a:hover { text-decoration: underline; text-underline-offset: 3px; }
.utility__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  position: relative;
  background: var(--live);
  color: var(--live);
}
/* Anel do pulso animado só com transform/opacity (roda na GPU, sem repintar a tela) */
.utility__dot::before,
.here__pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  animation: pulseRing 2.2s var(--ease-out) infinite;
  will-change: transform, opacity;
}
.utility__dot::before { --ring: 2.75; }
.here__pin::before { --ring: 1.55; animation-duration: 2.4s; }
.here:not(.is-visible) .here__pin::before { animation-play-state: paused; }
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(var(--ring)); opacity: 0; }
}
.utility__clock { font-variant-numeric: tabular-nums; }
/* "Porto Velho, RO ·" antes da hora. Ficava escondido abaixo de 1440 px, e aí
   a barra mostrava um número solto, sem dizer de onde era a hora — justamente
   quem está em outro fuso ficava sem a referência. Agora só sai no celular,
   onde não cabe; o <time> leva o lugar no aria-label (core.js), então em
   qualquer largura o leitor de tela anuncia "Hora em Porto Velho". */
.utility__local { display: inline; }
@media (max-width: 599px) { .utility__local { display: none; } }
.utility__clock time { color: var(--white); font-weight: var(--fw-semibold); }
.utility__links { display: flex; align-items: center; gap: 1.25rem; }
.utility__links a { text-decoration: none; }
.utility__links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.utility__a11y {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  min-height: 30px;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: var(--white);
  font-weight: var(--fw-bold);
  font-size: 0.72rem;
  line-height: 1;
  transition: background-color var(--dur-2), color var(--dur-2);
}
.utility__a11y .big { font-size: 1rem; }
.utility__a11y:hover { border-color: var(--white); }
.utility__a11y[aria-pressed="true"] { background: var(--white); color: var(--navy-950); }

/* ── Cabeçalho ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--ice);
  transition: transform var(--dur-3) var(--ease-out), background-color var(--dur-2), box-shadow var(--dur-2);
}
.header.is-scrolled {
  background: var(--white);
  box-shadow: 0 1px 0 var(--line-soft), 0 12px 30px -26px rgba(6, 38, 77, 0.4);
}
.header.is-hidden { transform: translateY(-100%); }
.header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-5);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex: none;
  color: var(--ink);
  text-decoration: none;
}

.brand--light { color: var(--white); }

.brand__logo { display: block; width: auto; height: 46px; transition: opacity var(--dur-2); }
.brand:hover .brand__logo { opacity: 0.82; }
.footer .brand__logo { height: 56px; }

.nav { justify-self: center; min-width: 0; }
.nav__list { display: flex; justify-content: center; gap: clamp(0.85rem, 1.4vw, 1.75rem); }
.nav__list li { flex: none; }
.nav__link { white-space: nowrap; }
.nav__link {
  position: relative;
  display: inline-flex;
  padding: var(--space-2) 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium-plus);
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--dur-2);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-3) var(--ease-out);
}
.nav__link:hover { color: var(--blue-500); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.header__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 0.6rem; }
.header__portal,
.header__cta,
.menu-btn { flex: none; }

/* Área do cliente: o mesmo botão em todas as páginas (leva ao hub interno) */
.header__portal { gap: 0.45rem; min-height: 48px; padding: 0 1.05rem; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--white); color: var(--ink); font-weight: var(--fw-semibold-plus); text-decoration: none; }
.header__portal:hover,
.header__portal[aria-current="page"] { border-color: var(--blue-500); color: var(--blue-500); }
.header__portal .ico { font-size: 1.1rem; flex: none; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 0.45rem 0 1.15rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: border-color var(--dur-2);
}
.menu-btn:hover { border-color: var(--ink); }
.menu-btn__bars {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
}
.menu-btn__bars span {
  position: absolute;
  width: 15px;
  height: 1.75px;
  border-radius: 2px;
  background: var(--white);
  transition: transform var(--dur-3) var(--ease-out);
}
.menu-btn__bars span:first-child { transform: translateY(-3.5px); }
.menu-btn__bars span:last-child { transform: translateY(3.5px); }
.menu-btn:hover .menu-btn__bars span:first-child { transform: translateY(-3.5px) scaleX(0.55) translateX(-5px); }
.menu-btn:hover .menu-btn__bars span:last-child { transform: translateY(3.5px) scaleX(0.55) translateX(5px); }

/* ── Menu em tela cheia ────────────────────────────────────── */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  overflow-y: auto;
  background: var(--navy);
  color: var(--white);
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.85s var(--ease-in-out), visibility 0s linear 0.85s;
}
.menu.is-open {
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.85s var(--ease-in-out), visibility 0s;
}
.menu__inner { display: flex; flex-direction: column; min-height: 100%; padding-bottom: var(--space-6); }
.menu__top { display: flex; align-items: center; justify-content: space-between; min-height: calc(var(--header-h) + 24px); }
.menu-close {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 0.45rem 0 1.15rem;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.menu-close:hover { border-color: var(--white); }
.menu-close__x {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-size: 1rem;
  transition: transform var(--dur-3) var(--ease-out);
}
.menu-close:hover .menu-close__x { transform: rotate(90deg); }

.menu__grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-5);
}
.menu__list li { overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.4rem 0;
  color: var(--white);
  text-decoration: none;
  transform: translateY(105%);
  transition: transform var(--dur-4) var(--ease-out), opacity var(--dur-2);
}
.menu.is-open .menu__list a { transform: none; transition-delay: calc(var(--i) * 55ms + 280ms), 0ms; }
.menu__num {
  min-width: 2ch;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--sky);
}
.menu__label {
  font-size: clamp(2rem, 0.8rem + 2.8vw + 1.6vh, 4.25rem);
  font-weight: var(--fw-semibold-plus);
  font-stretch: 108%;
  letter-spacing: -0.03em;
  line-height: 1.05;
  transition: transform var(--dur-3) var(--ease-out), color var(--dur-2);
}
.menu__sub {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  font-stretch: 100%;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--sky);
}
.menu__list a:hover .menu__label,
.menu__list a:focus-visible .menu__label { transform: translateX(14px); color: var(--sky); }
@media (hover: hover) {
  .menu__list:hover a:not(:hover) { opacity: 0.5; }
}
.menu__aside { display: grid; gap: var(--space-6); align-content: center; }
.menu__preview { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
.menu__preview img { transition: opacity 0.5s var(--ease-out), transform 1.2s var(--ease-out); }
.menu__preview img.is-swapping { opacity: 0 !important; transform: scale(1.05); }
.menu__preview figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-sign);
  background: var(--white);
  color: var(--navy);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold-plus);
  letter-spacing: 0.06em;
}
.menu__info { display: grid; gap: var(--space-2); }
.menu__info-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold-plus);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.menu__phone {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold-plus);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  text-decoration: none;
}
.menu__phone:hover { color: var(--sky); }
.menu__info p:last-child { color: var(--on-dark); font-size: var(--fs-sm); }

/* ── Cartão físico (Cartão Saúde 9) ──────────────────────── */

.pcard {
  position: absolute;
  left: 0; right: 0; top: 50%;
  aspect-ratio: 1.586;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.3vw, 1.9rem);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--sh-3);
  transform-style: preserve-3d;
  transition: transform 1s var(--ease-out), filter 1s var(--ease-out), z-index 0s 0.3s;
}

.pcard.is-front { z-index: 2; transform: translateY(-50%) rotateX(var(--rx)) rotateY(var(--ry)); }
.pcard.is-back { z-index: 1; transform: translateY(calc(-50% - 14%)) translateX(9%) rotate(7deg) scale(0.9); filter: saturate(0.85) brightness(0.92); }

/* ── Formulários em cartão + sucesso ─────────────────────── */
.form {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-soft), var(--sh-1);
}
.form { display: grid; gap: var(--space-5); }

/* ── Rodapé ────────────────────────────────────────────────── */
.footer {
  position: relative;
  overflow: hidden;
  padding-top: var(--section-y);
  background: var(--navy-950);
  color: var(--on-dark);
}
.footer__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer__cta-title {
  max-width: 13ch;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold-plus);
  font-stretch: 106%;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--white);
}
.footer__cta-title em { font-family: var(--font-serif); font-style: italic; font-weight: var(--fw-regular); color: var(--sky); }
.footer__phone { display: grid; gap: var(--space-2); color: var(--white); text-decoration: none; }
.footer__phone-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold-plus);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.footer__phone-num {
  padding-bottom: 0.08em;
  font-size: clamp(2.25rem, 1rem + 3.6vw, 4.5rem);
  font-weight: var(--fw-light);
  font-stretch: 82%;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size var(--dur-3) var(--ease-out);
}
.footer__phone:hover .footer__phone-num { background-size: 100% 2px; }
.footer__cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--space-6);
  padding-block: clamp(3rem, 5vw, 4.5rem);
}
.footer__address { font-style: normal; line-height: 1.6; color: var(--on-dark); }
.footer__address a { color: var(--white); font-weight: var(--fw-semibold-plus); text-decoration: none; }
.footer__disclaimer { max-width: 110ch; margin-top: clamp(2rem, 4vw, var(--space-7)); padding-top: var(--space-5); border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: var(--fs-2xs); line-height: 1.6; color: var(--on-dark-2); }
.footer__about { display: grid; gap: 1.25rem; align-content: start; justify-items: start; max-width: 36ch; font-size: var(--fs-sm); }
.footer__h {
  margin-bottom: var(--space-4);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold-plus);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.footer__links li + li { margin-top: 0.6rem; }
.footer__links a { color: var(--white); font-size: var(--fs-sm); text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
  color: var(--on-dark-2);
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.footer__top:hover { background: var(--white); color: var(--navy-950); }
/* Documentos legais e "Preferências de cookies" (medicao.js) na linha final do rodapé */
.footer__docs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; }
.footer__docs a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.footer__docs a:hover { color: var(--white); }

.footer__map-addr { line-height: 1.6; color: var(--on-dark); }

/* ── Dock mobile + "Você está aqui" ───────────────────────── */
.here {
  position: fixed;
  left: var(--gutter);
  bottom: 22px;
  z-index: var(--z-nav-mark);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem var(--space-4) 0.4rem 0.4rem;
  border-radius: var(--r-pill);
  background: var(--white);
  box-shadow: var(--ring-line), var(--sh-2);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-3), transform var(--dur-3) var(--ease-out);
  pointer-events: none;
}
.here.is-visible { opacity: 1; transform: none; }
.here__pin { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-500); color: var(--blue-500); }
.here__pin::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--white); }
.here__label { display: block; overflow: hidden; height: 1.35em; line-height: 1.35; }
.here__label strong { display: block; color: var(--ink); font-weight: var(--fw-semibold-plus); }
.here__label strong.is-new { animation: hereIn 0.5s var(--ease-out); }
@keyframes hereIn { from { transform: translateY(100%); } to { transform: none; } }

/* ── Transição entre páginas (melhoria progressiva) ────────── */
@view-transition { navigation: auto; }
.utility { view-transition-name: site-utility; }
.header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vtOut 0.38s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vtIn 0.65s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(26px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ── Linhas que sobem (títulos de abertura) ────────────────── */
.ln { display: block; overflow: hidden; padding: 0.02em 0.12em 0.06em 0; margin-bottom: -0.06em; }
.ln > span { display: block; }
.js .ln > span { transform: translateY(112%); transition: transform 0.7s var(--ease-out) calc(var(--i, 0) * 80ms); }
.js.is-ready .ln > span { transform: none; }

/* ── Abertura das páginas internas ─────────────────────────── */
.phead {
  position: relative;
  overflow: hidden;
  background: var(--ice);
  padding-block: clamp(1.5rem, 3vw, 2.75rem) clamp(3rem, 6vw, var(--space-9));
}
.phead__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
  align-items: end;
}
.phead__top {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.phead__main { grid-column: 1 / span 7; display: grid; gap: var(--space-5); justify-items: start; }
.phead__aside { grid-column: 9 / -1; }
.phead__sign { display: inline-flex; align-items: center; gap: 0.9rem; }
.phead__code {
  display: grid;
  place-items: center;
  min-width: 60px;
  height: 60px;
  padding: 0 0.6rem;
  border-radius: var(--r-sign);
  background: var(--navy);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: var(--fw-heavy);
  font-stretch: 115%;
}
.phead__dir {
  display: grid;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold-plus);
  letter-spacing: 0.16em;
  line-height: 1.55;
  text-transform: uppercase;
  color: var(--ink-3);
}
.phead__dir strong { color: var(--ink); font-weight: var(--fw-bold); }
.phead__title {
  margin-top: var(--space-3);
  font-size: clamp(2.6rem, 0.9rem + 5.2vw, 6.5rem);
  font-weight: var(--fw-extrabold);
  font-stretch: 110%;
  letter-spacing: -0.042em;
  line-height: 0.94;
}
.phead__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--fw-regular);
  font-stretch: 100%;
  letter-spacing: -0.025em;
  color: var(--blue-500);
}
.phead__lead { max-width: 46ch; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.phead__ghost {
  position: absolute;
  right: -1.5vw;
  top: 52%;
  z-index: 0;
  font-size: clamp(16rem, 40vw, 42rem);
  font-weight: var(--fw-black);
  font-stretch: 125%;
  letter-spacing: -0.06em;
  line-height: 0.74;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue-200);
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}
.js .phead__ghost { opacity: 0; translate: 0 30px; transition: opacity 1.4s var(--ease-out) 0.2s, translate 1.6s var(--ease-out) 0.2s; will-change: opacity, translate; }
.js.is-ready .phead__ghost { opacity: 1; translate: 0 0; }

/* Variantes de cor */
.phead--blue { background: var(--blue-500); color: var(--white); }
.phead--blue .phead__lead, .phead--blue .phead__dir { color: var(--on-blue); }
.phead--blue .phead__dir strong { color: var(--white); }
.phead--blue .phead__title em { color: var(--sky-soft); }
.phead--blue .phead__code { background: var(--white); color: var(--blue-500); }
.phead--blue .phead__ghost { -webkit-text-stroke-color: rgba(255, 255, 255, 0.22); }

/* ── Seções internas: cabeçalho padrão ─────────────────────── */
.section { padding-block: var(--section-y); }
.section--ice { background: var(--ice); }
.section--white { background: var(--white); }

.shead {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem var(--space-5);
  align-items: end;
  margin-bottom: clamp(2rem, 3.5vw, var(--space-7));
}
.shead__main { grid-column: 1 / span 7; display: grid; gap: 1.25rem; }
.shead__aside { grid-column: 9 / -1; color: var(--ink-3); font-size: var(--fs-sm); }
.on-dark .shead__aside { color: var(--on-dark); }

/* ==========================================================================
   Responsivo (layout compartilhado)
   ========================================================================== */
/* O menu horizontal some só abaixo de 1200px. Entre 1200 e 1439 o botão
   "Área do cliente" fica só com o ícone, para o menu caber com folga:
   num notebook de 1280 ou 1366 a navegação continua visível. */
@media (max-width: 1439px) {
  .header__portal { gap: 0; padding: 0 0.85rem; }
  .header__portal span { display: none; }
  .utility__status .utility__hide-sm { display: none; }
}

@media (max-width: 1199px) {
  .nav { display: none; }
  .header__inner { grid-template-columns: auto auto; }
  .header__actions { justify-self: end; }
}

@media (max-width: 1023px) {
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer__about { grid-column: 1 / -1; }
  .phead__main, .phead__aside { grid-column: 1 / -1; }
  .shead__main, .shead__aside { grid-column: 1 / -1; }
}

/* Barra do topo entre tablet e notebook: textos não quebram; saem os complementos */
.utility__status, .utility__clock, .utility__links li { white-space: nowrap; }
@media (max-width: 1199px) {
  .utility__links li.utility__hide-sm { display: none; }
}

@media (max-width: 899px) {
  :root { --header-h: 66px; }
  .utility__links li:not(:last-child), .utility__hide-sm { display: none; }
  .utility__inner { gap: 0.9rem; }
  
  
  .brand__logo { height: 38px; }
  .footer .brand__logo { height: 48px; }

  .menu { overflow-x: hidden; }
  .menu__top { min-height: calc(var(--header-h) + 8px); }
  .menu__grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; padding-block: var(--space-4) var(--space-6); }
  .menu__preview { display: none; }
  .menu__label { font-size: clamp(1.75rem, 8.4vw, 2.6rem); }
  .menu__list a { gap: var(--space-4); padding: 0.55rem 0; }

  .pcard.is-back { transform: translateY(calc(-50% - 12%)) translateX(4%) rotate(5deg) scale(0.9); }
  

  .phead__ghost { font-size: 78vw; right: -10vw; top: 34%; opacity: 0.7; }
  .phead__code { min-width: 52px; height: 52px; font-size: 1.3rem; }
  .phead__lead { font-size: var(--fs-base); }

  .footer__cols { grid-template-columns: 1fr 1fr; }

  
  .here { display: none; }
  
}

@media (max-width: 1023px) {
  .header__portal { display: none; } /* no celular fica no Menu */
}
@media (max-width: 599px) {
  .header__cta { display: none; }
  .menu-btn { padding-left: var(--space-4); }
  .pcard { border-radius: var(--r-md); }
  
  
  
  .footer__cols { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); }
  .footer__legal { flex-direction: column; align-items: flex-start; }
  
}

/* ── Painel inferior (bottom sheet) no mobile ──────────────── */

@media (max-width: 1023px) {
  .sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: var(--z-sheet);
    max-height: 88vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 var(--gutter) calc(1.25rem + env(safe-area-inset-bottom));
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: var(--white);
    box-shadow: var(--sh-3);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.55s var(--ease-out), visibility 0s linear 0.55s;
  }
  .sheet.is-open { transform: none; visibility: visible; transition: transform 0.55s var(--ease-out), visibility 0s; }
  
  .sheet-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-sheet) - 5);
    background: rgba(3, 22, 48, 0.5);
    animation: fadeIn 0.3s var(--ease-out);
  }
}

/* Nota de desambiguacao no rodape (auditoria SEO 28/10): Porto Velho x Sao Paulo. */
.footer__nota {
  flex: 0 0 100%;
  order: 9;
  margin: 0;
  max-width: 72ch;
  font-size: var(--fs-xs);
  color: var(--on-dark-soft);
}

/* Breadcrumb visivel (auditoria SEO 28/10): o BreadcrumbList do JSON-LD
   existia sem trilha na tela. Usa os tokens de texto secundario. */
.trilha {
  padding-block: var(--space-4) 0;
}
.trilha__lista {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.trilha__lista li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.trilha__lista li + li::before {
  content: "/";
  color: var(--ink-3);
  opacity: 0.55;
}
.trilha__lista a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trilha__lista a:hover { color: var(--blue-600); }
.trilha__lista [aria-current="page"] { color: var(--ink-2); font-weight: var(--fw-semibold); }
