:root {
  --navy: #0f0d59;
  --blue: #461bff;
  --sky: #eeeaff;
  --leaf: #0f4f3a;
  --copper: #a8693f;
  --wa: #0f7f3d;
  --wa-dark: #0b6a32;
  --text: #16154a;
  --muted: #4b4f66;
  --line: #d9d6ee;
  --bg: #ffffff;
  --bg-alt: #f4f2fd;
  --gutter: 16px;
  --bar: calc(72px + env(safe-area-inset-bottom));
  --topbar: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --e: 1;
}
@media (max-width: 359px) { :root { --e: .84; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; scroll-padding-bottom: calc(var(--bar) + 16px); }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  padding-bottom: var(--bar);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; font-weight: 700; }
h2 { font-size: clamp(2.5rem, 11vw, 4.5rem); color: var(--navy); }
h3 { font-size: 1.5rem; letter-spacing: -.015em; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

a, button, summary, label { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, input:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.hero a:focus-visible, .hero button:focus-visible, .viviane a:focus-visible, .uf-input:focus-visible + label { outline: 3px solid #fff; outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; top: -60px; left: 16px; z-index: 30; padding: 10px 18px; color: #fff; background: var(--navy); font-weight: 600; }
.skip:focus { top: 8px; }

/* Plan colours: flat fields, each with an ink that passes contrast on it */
.plan--bronze { --field: #8a5230; --ink: #fff; }
.plan--prata { --field: #b4bccb; --ink: var(--navy); }
.plan--ouro { --field: #c9a136; --ink: #1a1440; }
.plan--platinum { --field: #232c3f; --ink: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  border: 0; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background .15s;
}
.btn:active { transform: scale(.97); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); }

/* Header */
.topbar { display: flex; align-items: center; gap: 28px; min-height: var(--topbar); padding: 0 var(--gutter); background: var(--bg); }
.product-name { display: flex; }
.product-name img { display: block; }
.topnav { display: none; }
.topnav a { color: var(--navy); font-weight: 600; text-decoration: none; }
.topnav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }

/* Hero: the question, the search and the stair */
.hero {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: calc(100svh - var(--topbar) - var(--bar));
  color: #fff; background: var(--blue);
}
.hero__copy { padding: 22px var(--gutter) 18px; }
.hero h1 { font-size: clamp(3.25rem, min(15vw, 9.5svh), 6.5rem); line-height: .95; letter-spacing: -.035em; }
.lead { max-width: 34em; margin: 14px 0 18px; font-size: 1.0625rem; line-height: 1.35; }

.uf-switch { display: inline-flex; margin: 0 0 10px; padding: 0; border: 0; background: var(--navy); }
.uf-input { position: absolute; opacity: 0; pointer-events: none; }
.uf-switch label { display: grid; place-items: center; min-height: 44px; padding: 0 20px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.uf-input:checked + label { color: var(--blue); background: #fff; }
body:has(#uf-sp:checked) .uf-panel--pr, body:has(#uf-pr:checked) .uf-panel--sp { display: none; }

.finder[hidden], .finder__fallback[hidden] { display: none; }
.finder__mural { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.finder__mural[hidden], .finder__all[hidden], .finder__chosen[hidden] { display: none; }
.finder__mural .tile { min-height: 56px; padding: 4px; }
.finder__mural .tile:has(.marca:not(.is-broken)) .tile__nome { display: none; }
.finder__mural .tile:has(.marca:not(.is-ready):not(.is-broken)) .tile__nome { display: block; }
.finder__mural .tile:has(.marca:not(.is-ready):not(.is-broken)) .marca { display: none; }
.finder__all { display: block; width: 100%; min-height: 48px; margin-top: 4px; border: 0; font: inherit; font-weight: 700; color: #fff; background: var(--navy); cursor: pointer; transition: transform .15s var(--ease); }
.finder__all:active { transform: scale(.98); }
.finder__chosen { display: flex; gap: 2px; }
.finder__plate { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 12px; color: var(--navy); background: #fff; }
.finder__nome { min-width: 0; font-weight: 700; line-height: 1.1; }
.finder__clear { flex: none; width: 56px; border: 0; font-size: 1.6rem; line-height: 1; color: #fff; background: var(--navy); cursor: pointer; }
.finder__clear[hidden] { display: none; }
.finder__go { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 4px; font-weight: 700; color: var(--blue); background: #fff; text-decoration: none; transition: transform .15s var(--ease); }
.finder__go:active { transform: scale(.98); }
.finder__go[hidden] { display: none; }

/* Hospital tile: logo on white, shared by the mural and the picker */
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; padding: 12px 8px; border: 0; font: inherit; color: var(--navy); background: #fff; cursor: pointer; transition: transform .15s var(--ease); }
.tile:active { transform: scale(.97); }
.tile__nome { font-size: .9375rem; font-weight: 600; line-height: 1.15; text-align: center; text-wrap: balance; }
.tile .marca { justify-content: center; }

/* Logo mark, sized in app.js by ink area */
.marca { display: flex; align-items: center; height: calc(40px * var(--e)); flex: none; }
.marca.is-broken { display: none; }
.marca img {
  display: block; max-width: none;
  width: calc(var(--w) * var(--e) * 1px); height: calc(var(--h) * var(--e) * 1px);
  margin: calc(var(--mt) * var(--e) * -1px) calc(var(--mr) * var(--e) * -1px) calc(var(--mb) * var(--e) * -1px) calc(var(--ml) * var(--e) * -1px);
}
.marca:not(.is-ready) img { width: 1px; height: 1px; margin: 0; visibility: hidden; }
/* White logos: a tile the size of the logo box */
.marca--escura { justify-content: center; width: calc(112px * var(--e)); height: calc(34px * var(--e)); background: var(--navy); }

.finder__fallback { display: inline-block; padding: 12px 22px; font-weight: 700; color: var(--blue); background: #fff; text-decoration: none; }
.js .finder__fallback { display: none; }

.hero__stair { position: relative; }
.stair__caption { position: absolute; left: var(--gutter); top: 0; z-index: 1; max-width: 48%; margin: 0; font-size: .9375rem; line-height: 1.25; font-weight: 500; }
.stair__caption:empty { display: none; }

/* The stair: one step per plan, taller as the plan climbs */
.stair { display: flex; gap: 2px; align-items: stretch; height: clamp(116px, 20svh, 240px); }
.stair__step {
  position: relative; flex: 1 1 0; min-width: 0; color: var(--ink); text-decoration: none;
}
.stair__fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--h);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 8px;
  background: var(--field); transform-origin: bottom;
  transition: opacity .25s, transform .35s var(--ease);
}
.stair__count { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.stair__name { display: none; padding: 0 4px; font-size: .875rem; font-weight: 600; line-height: 1.1; text-align: center; }
.stair--few .stair__name { display: block; }
.stair--lit .stair__step:not(.is-lit) .stair__fill { opacity: .3; transform: scaleY(.86); }
.js .hero .stair__fill { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes rise { from { transform: scaleY(0); } }

.stair--mini { height: 52px; margin: 22px 0 10px; padding: 0 var(--gutter); }
.stair--mini .stair__count, .stair--mini .stair__name { display: none; }
.stair--mini .stair__fill { padding: 0; }
.stair--mini .stair__step.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px; background: var(--navy); }

/* Plans: swiping sideways climbs the stair, each card starting a step higher */
.planos { padding: 40px 0 72px; }
.intro { max-width: 36em; margin: 14px 0 0; font-size: 1.125rem; }
.planos__find { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 18px; padding: 0 18px; border: 0; font: inherit; font-weight: 700; color: var(--blue); background: var(--sky); cursor: pointer; }
.planos__find[hidden] { display: none; }
.uf-panel { min-width: 0; }

.hospital-result { margin-top: 18px; padding: 16px; background: var(--sky); }
.hospital-result[hidden] { display: none; }
.hospital-result strong { display: block; font-size: 1.25rem; line-height: 1.15; color: var(--navy); }
.hospital-result p { margin: 4px 0 10px; }
.hospital-result__tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.hospital-result:focus { outline: none; }
.hospital-result__trocar { display: block; min-height: 44px; margin-top: 6px; padding: 0; border: 0; font: inherit; font-weight: 700; color: var(--blue); background: none; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.hospital-result__tiers button { min-height: 44px; padding: 4px 12px; border: 0; font: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); background: var(--field); cursor: pointer; }

.plans {
  position: relative; display: flex; gap: 10px;
  padding: 0 var(--gutter) 4px; scroll-padding-inline: var(--gutter);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.plans::-webkit-scrollbar { display: none; }
.plan {
  --ink-soft: var(--ink);
  flex: 0 0 min(84vw, 360px); display: flex; flex-direction: column;
  margin-top: calc(var(--rise, 0) * 8px); padding: 18px 18px 16px;
  scroll-snap-align: start; color: var(--ink); background: var(--field);
}
.plan h3 { font-size: 2.5rem; line-height: 1; letter-spacing: -.03em; }
.plan h4 { margin: 10px 0 12px; font-size: 1.0625rem; font-weight: 600; }
.plan h4:nth-of-type(2) { margin: 14px 0 2px; font-weight: 700; }
.plan ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.plan li { padding: 5px 0; line-height: 1.25; }
.plan ul.is-collapsed li.is-extra { display: none; }
.plan li.is-match { order: -1; margin: 0 -6px 4px; padding: 7px 6px; font-weight: 800; color: var(--navy); background: #fff; }
.plan > p { margin: 0; line-height: 1.3; }
.plan__base { margin: 0 0 4px; font-weight: 700; }
.plan__flag { margin: 8px 0 -2px; font-weight: 700; }
.plan__flag[hidden] { display: none; }
.plan__more { align-self: flex-start; min-height: 44px; margin-top: 2px; padding: 0; border: 0; font: inherit; font-weight: 700; color: inherit; background: none; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.plan__wa { margin-top: auto; }
.plan > p + .plan__wa, .plan .plan__wa { width: 100%; }
.btn--plan { margin-top: 16px; color: var(--navy); background: #fff; transition: transform .15s var(--ease); }
.plan > p:has(+ .btn--plan) { margin-bottom: auto; }

.plans-nav { display: none; }
.uf-more { display: grid; gap: 14px; justify-items: start; margin-top: 40px; }
.uf-more p { max-width: 36em; margin: 0; font-size: 1.125rem; }

.plans-aviso { margin: 12px auto 0; font-size: .8125rem; line-height: 1.25; color: var(--muted); }
.plans-aviso[hidden] { display: none; }
.plans-aviso + .uf-more { margin-top: 28px; }

/* Plates: one white strip per hospital, crossing the plan's colour field */
.plans { align-items: flex-start; }
.js .plan h4 { margin: 6px 0 8px; font-size: 1rem; }
.js .plan h4:nth-of-type(2) { margin: 12px 0 2px; }
.js .plan > p.plan__base { margin-bottom: 8px; font-size: .9375rem; font-weight: 600; line-height: 1.2; }
.js .plan > p { font-size: .9375rem; }
.js .plan .plan__more { margin-top: 0; }
.js .plan .plan__more + h4 { margin-top: 2px; }
.js .plan ul { gap: 2px; margin: 0 -18px; }
.js .plan li, .js .plan li.is-match { margin: 0; padding: 0; font-weight: 400; line-height: 1.15; color: var(--navy); background: none; }
.js .rede__list li.is-match { order: -1; margin-block: 8px; }

.placa {
  position: relative; display: grid; grid-template-columns: calc(128px * var(--e)) minmax(0, 1fr); align-items: center; column-gap: 12px;
  min-height: 52px; padding: 4px 12px 4px var(--placa-x, 18px); color: var(--navy); background: #fff;
}
@media (max-width: 359px) { .placa { column-gap: 10px; padding-right: 10px; } }

/* No logo: the name in the logo's place, at about a logo's weight */
.placa__assinatura { display: block; font-size: 1rem; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.placa__assinatura small { display: block; margin-bottom: 1px; font-size: .8125rem; font-weight: 500; line-height: 1.1; letter-spacing: 0; }
.placa--logo .placa__assinatura { display: none; }
.placa--logo:has(.marca.is-broken) .placa__assinatura { display: block; }
.placa--logo:has(.marca.is-broken) .placa__titulo { display: none; }

.placa__nome { grid-column: 2; position: relative; z-index: 1; font-size: .9375rem; line-height: 1.15; text-align: left; text-wrap: balance; }
.placa__nome:empty { display: none; }
.placa__titulo { display: block; font-weight: 600; }
.placa__detalhe { display: block; font-size: .875rem; color: var(--muted); }
.placa__unidade { display: none; font-size: .875rem; color: var(--muted); }
.placa__rede { display: none; font-weight: 600; }
.placa__nota { grid-column: 1 / -1; padding: 3px 0 5px; font-size: .875rem; font-weight: 700; line-height: 1.2; color: var(--navy); }
.placa__escolha { display: none; }

/* Units of one brand: one logo, centred on its rows, the brand name once and the units below it */
li[data-marca]:not(.is-match, .is-extra) + li[data-marca]:not(.is-match) { margin-top: -2px; }
li[data-marca]:not(.is-match, .is-extra):has(+ li[data-marca]:not(.is-match, .is-extra)) .placa { align-items: end; height: 44px; min-height: 0; padding-block: 0; }
li[data-marca]:not(.is-match, .is-extra):has(+ li[data-marca]:not(.is-match, .is-extra)) :is(.placa__titulo, .placa__detalhe) { display: none; }
li[data-marca]:not(.is-match, .is-extra):has(+ li[data-marca]:not(.is-match, .is-extra)) :is(.placa__unidade, .placa__rede) { display: block; }
li[data-marca]:not(.is-match, .is-extra):has(+ li[data-marca]:not(.is-match, .is-extra)) .marca { position: absolute; z-index: 1; top: 0; left: var(--placa-x, 18px); height: 64px; }
li[data-marca]:not(.is-match, .is-extra):has(+ li[data-marca]:not(.is-match, .is-extra) + li[data-marca]:not(.is-match, .is-extra)) .marca { height: 84px; }
li[data-marca]:not(.is-match, .is-extra) + li[data-marca]:not(.is-match) .placa { align-items: center !important; height: 22px !important; min-height: 0; padding-block: 0; }
li[data-marca]:not(.is-match, .is-extra) + li[data-marca]:not(.is-match) :is(.placa__titulo, .placa__detalhe, .placa__rede) { display: none !important; }
li[data-marca]:not(.is-match, .is-extra) + li[data-marca]:not(.is-match) .placa__unidade { display: block; }
li[data-marca]:not(.is-match, .is-extra) + li[data-marca]:not(.is-match) .marca { display: none !important; }

/* Chosen hospital: a blue bar, set apart from the list, with the name a step larger */
.js .plan ul.is-collapsed li.is-extra.is-match { display: block; }
.js .plan li.is-match { margin-bottom: 8px; }
.is-match .placa { min-height: 62px; padding-block: 7px; }
.is-match .placa::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 8px; background: var(--blue); }
.is-match .placa__titulo { font-size: 1.0625rem; font-weight: 800; line-height: 1.1; }
.is-match .placa__assinatura { font-weight: 800; }
.is-match .placa__nota { padding: 5px 0 0; }
.is-match .placa__escolha { display: block; }
/* A hospital inherited from a lower plan is not one of the additions listed under "mais:" */
.is-match.is-extra .placa__nome::after { content: "Vem dos planos anteriores"; display: block; font-size: .875rem; color: var(--muted); }

/* Stepped edge, the same stair cutting into each dark section */
.edge { position: relative; margin-top: 44px; }
.edge::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 44px; background: inherit;
  clip-path: polygon(0 100%, 0 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 0, 100% 0, 100% 100%);
}

/* Included */
.perks { padding: 28px 0 56px; background: var(--sky); }
.benefits { margin: 20px 0 0; padding: 0; list-style: none; font-size: clamp(1.25rem, 5.4vw, 1.625rem); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--navy); }
.benefits li + li { margin-top: 12px; }
.benefits sup { font-size: .55em; }
.legal { max-width: 70em; margin: 32px 0 0; font-size: .8125rem; line-height: 1.4; color: var(--muted); }

/* Ways to buy */
.formas { padding: 64px 0 88px; }
.formas__grid {
  display: flex; gap: 10px; margin-top: 24px; padding: 0 var(--gutter); scroll-padding-inline: var(--gutter);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.formas__grid::-webkit-scrollbar { display: none; }
.forma { flex: 0 0 min(86vw, 420px); display: flex; flex-direction: column; padding: 24px 18px 18px; scroll-snap-align: start; }
.forma h3 { font-size: 2.25rem; line-height: 1; letter-spacing: -.025em; }
.forma p { max-width: 34em; margin: 12px 0 0; }
.forma > :nth-last-child(2) { margin-bottom: 18px; }
.forma ul { margin: 14px 0 0; padding: 0; list-style: none; }
.forma li { max-width: 34em; padding: 5px 0; }
.forma--adesao { background: var(--sky); }
.forma--empresa { color: #fff; background: var(--blue); }
.forma--empresa h3 { color: #fff; }
.forma--adesao h3 { color: var(--navy); }
.forma__link { display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: auto; font-weight: 700; text-decoration: none; transition: transform .15s var(--ease); }
.forma__link:active { transform: scale(.97); }
.forma__saiba { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 700; }
.forma--adesao .forma__link { color: #fff; background: var(--wa); }
.forma--adesao .forma__link:hover { background: var(--wa-dark); }
.forma--empresa .forma__link { color: var(--blue); background: #fff; }

/* Viviane */
.viviane { padding: 32px 0 64px; color: #fff; background: var(--navy); }
.viviane h2 { color: #fff; }
.viviane p { max-width: 34em; margin: 16px 0 0; font-size: 1.1875rem; line-height: 1.4; }
.viviane__grid { display: grid; gap: 24px; }
.viviane__photo {
  display: block; width: min(50vw, 240px); height: auto; aspect-ratio: 1; object-fit: cover;
  clip-path: polygon(0 0, 70% 0, 70% 10%, 80% 10%, 80% 20%, 90% 20%, 90% 30%, 100% 30%, 100% 100%, 0 100%);
}

/* How it works */
.como { padding: 64px 0; }
.steps { margin: 28px 0 0; padding: 0; list-style: none; }
.steps li + li { margin-top: 22px; }
.steps h3 { color: var(--navy); }
.steps p { max-width: 34em; margin: 6px 0 0; }


/* FAQ */
.duvidas { padding: 64px 0; background: var(--bg-alt); }
.duvidas h2 { margin-bottom: 20px; }
.duvidas details { background: var(--bg); }
.duvidas details + details { margin-top: 4px; }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 12px 16px; font-weight: 700; color: var(--navy); list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--blue); }
details[open] summary::after { content: "−"; }
details p { max-width: 42em; margin: 0; padding: 0 16px 16px; }

/* Footer: the broker's name closes the page */
.footer { padding: 40px var(--gutter) 28px; font-size: .9375rem; color: var(--muted); }
.footer p { margin: 2px 0; }
.footer__name { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px !important; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2.75rem, 13.5vw, 7rem); font-weight: 500; line-height: 1; letter-spacing: -.01em; color: var(--leaf); }
.brand__mark { display: inline-flex; font-size: .9em; }
.brand__mark span:first-child { color: var(--copper); }
.brand__mark span:last-child { margin-left: -.26em; color: var(--leaf); }

/* Landing pages for search: no script, the buttons link to the form on the home page */
.footer__links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 14px 0 0; padding: 0; list-style: none; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); font-weight: 600; }
.guia__topo { padding: 40px 0 44px; color: #fff; background: var(--blue); }
.guia__topo h1 { font-size: clamp(2.75rem, 12vw, 5rem); line-height: .98; }
.guia__topo .lead { color: #fff; }
.guia__topo .btn--wa:focus-visible { outline-color: #fff; }
.guia__secao { padding: 56px 0; }
.guia__lista { max-width: 42em; margin: 20px 0; padding: 0; list-style: none; font-size: 1.125rem; }
.guia__lista li + li { margin-top: 10px; }
.guia__lista a { color: var(--blue); font-weight: 700; min-height: 44px; }
.guia__planos { display: grid; gap: 4px; margin-top: 24px; }
.guia__planos .plan { margin-top: 0; }
.guia__planos .btn--plan { margin-top: auto; }
.guia__planos .plan > p { margin-bottom: 16px; }
@media (min-width: 720px) { .guia__planos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .guia__planos { grid-template-columns: repeat(3, 1fr); } .guia__topo { padding: 72px 0; } }

/* Sticky WhatsApp bar: follows the plan in view */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 2px; height: var(--bar); padding-bottom: env(safe-area-inset-bottom); background: var(--wa-dark);
}
.js .bar { animation: bar-in .5s var(--ease) .5s both; }
@keyframes bar-in { from { transform: translateY(100%); } }
.bar__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); color: #fff; background: var(--wa); text-decoration: none; transition: background .15s; }
.bar__main:hover { background: var(--wa-dark); }
.bar__main img { flex: none; width: 44px; height: 44px; object-fit: cover; }
.bar__main strong { display: block; font-size: 1.0625rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__main small { display: block; font-size: .875rem; line-height: 1.2; }
.bar__main span { min-width: 0; }
.wa-float { flex: none; display: grid; place-items: center; width: 68px; color: #fff; background: var(--wa-dark); }
.wa-float .icon { width: 30px; height: 30px; }
.bar a:focus-visible { outline-color: #fff; outline-offset: -5px; }

/* Dialogs */
dialog { color: var(--text); border: 0; padding: 0; }
dialog::backdrop { background: rgba(15, 13, 89, .6); }
.dialog__close { flex: none; width: 44px; height: 44px; border: 0; font-size: 1.6rem; line-height: 1; color: var(--navy); background: var(--sky); cursor: pointer; }

.busca { width: 100%; max-width: 100%; height: 88dvh; max-height: 88dvh; margin: auto 0 0; background: var(--bg); }
.busca[open] { display: flex; flex-direction: column; animation: sheet-in .28s var(--ease); }
.busca__head { display: flex; align-items: center; gap: 4px; padding: 12px var(--gutter) 10px; }
.busca__head h2 { flex: 1; min-width: 0; margin-right: 8px; font-size: 1.5rem; line-height: 1.05; outline: none; }
.busca__toggle { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; font-size: 1.1rem; color: var(--blue); background: var(--sky); cursor: pointer; }
.busca__toggle.is-on { color: #fff; background: var(--blue); }
.busca__campo { flex: none; padding: 0 var(--gutter) 10px; }
.busca__campo[hidden] { display: none; }
.busca__campo input { width: 100%; min-height: 48px; padding: 0 14px; border: 2px solid var(--blue); border-radius: 0; font: inherit; color: var(--navy); background: #fff; appearance: none; }
.busca__regioes { flex: none; display: flex; gap: 4px; padding: 0 var(--gutter) 10px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.busca__regioes::-webkit-scrollbar { display: none; }
.busca__regioes[hidden] { display: none; }
.busca__regioes button { flex: none; min-height: 44px; padding: 0 14px; border: 0; font: inherit; font-size: 1rem; font-weight: 600; color: var(--navy); background: var(--sky); cursor: pointer; transition: background .15s, color .15s; }
.busca__regioes button[aria-pressed="true"] { color: #fff; background: var(--blue); }
.busca__list { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(100px, auto); align-content: start; gap: 4px; margin: 0; padding: 4px var(--gutter) calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; list-style: none; background: var(--bg-alt); }
.busca__list[hidden] { display: none; }
.busca__empty { flex: 1; padding: 20px var(--gutter); background: var(--bg-alt); }
.busca__empty[hidden] { display: none; }
.busca__empty p { margin: 0 0 14px; }
.busca__empty .btn { width: 100%; }
.busca__alt { display: block; width: 100%; min-height: 52px; margin-bottom: 8px; border: 0; font: inherit; font-weight: 700; color: #fff; background: var(--navy); cursor: pointer; }
.busca__alt[hidden] { display: none; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }

.rede, .quote { width: 100%; max-width: 100%; margin: auto 0 0; background: var(--bg); }
.rede { max-height: 88dvh; }
.rede[open] { display: flex; flex-direction: column; animation: sheet-in .28s var(--ease); }
.rede__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px var(--gutter) 8px; }
.rede h2 { font-size: 1.875rem; line-height: 1.05; }
.rede__list { --placa-x: var(--gutter); flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; background: var(--sky); }
.rede__list li { flex: none; color: var(--navy); }
.rede__list::after { content: "Logos usados só para identificar os hospitais. As marcas são de cada um deles."; flex: none; padding: 10px var(--gutter); font-size: .8125rem; line-height: 1.25; color: var(--muted); }
.rede__labs { margin: 12px var(--gutter) 0; font-size: .9375rem; color: var(--muted); }
.rede .btn { margin: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom)); }

/* Quote form */
.quote { height: min(94dvh, 680px); max-height: 94dvh; overflow: hidden; }
.quote[open] { animation: sheet-in .28s var(--ease); }
.quote__form { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 14px var(--gutter) calc(6px + env(safe-area-inset-bottom)); }
.quote__head, .quote__progress, .quote__bar, .quote__actions, .quote__direct { flex: none; }
/* Questions scroll inside the sheet, so the action button never moves under the thumb */
.quote__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.quote__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.quote h2 { font-size: 1.5rem; line-height: 1.1; }
.quote__plan { margin: 2px 0 0; font-size: .9375rem; font-weight: 600; color: var(--blue); }
.quote__progress { margin: 0 0 -8px; font-size: .875rem; color: var(--muted); }
.quote__bar { height: 6px; overflow: hidden; background: var(--sky); }
.quote__bar span { display: block; height: 100%; background: var(--blue); transform-origin: left; transition: transform .25s var(--ease); width: 100%; }
.quote__step { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.quote__step[hidden], .quote [hidden] { display: none; }
.quote legend { margin-bottom: 8px; padding: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.15; color: var(--navy); }
.quote input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.quote__choice { position: relative; display: block; cursor: pointer; }
.quote__choice > span { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--navy); background: var(--bg-alt); transition: background .15s; }
.quote__choice > span > span { min-width: 0; }
.quote__choice .icon { width: 26px; height: 26px; color: var(--blue); }
.quote__choice strong { display: block; line-height: 1.2; }
.quote__choice small { display: block; font-size: .875rem; line-height: 1.25; color: var(--muted); }
.quote__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quote__chip { position: relative; cursor: pointer; }
.quote__chip span { display: grid; place-items: center; min-width: 48px; min-height: 44px; padding: 6px 16px; font-weight: 700; color: var(--navy); background: var(--bg-alt); transition: background .15s, color .15s; }
.quote input[type=radio]:checked + span { color: #fff; background: var(--blue); }
.quote input[type=radio]:checked + span small, .quote input[type=radio]:checked + span strong, .quote input[type=radio]:checked + span .icon { color: #fff; }
.quote input[type=radio]:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.faixas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.faixa { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-left: 10px; color: var(--navy); background: var(--bg-alt); transition: background .15s; }
.faixa.is-on { background: #d9d2ff; }
.faixa__rotulo { font-size: .9375rem; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.faixa__controle { display: flex; align-items: center; }
.faixa button { width: 40px; height: 48px; padding: 0; border: 0; font: inherit; font-size: 1.375rem; font-weight: 700; line-height: 1; color: var(--blue); background: none; cursor: pointer; touch-action: manipulation; }
.faixa button:disabled { color: #a7a5bd; cursor: default; }
.faixa button:active:not(:disabled) { background: var(--sky); }
.faixa button:focus-visible { outline-offset: -3px; }
.faixa__n { min-width: 1.3em; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.faixas__total { min-height: 2.5em; margin: -4px 0 2px; font-size: .9375rem; font-weight: 600; line-height: 1.25; color: var(--navy); }
.faixas__total.is-erro { color: #b3261e; }
@media (max-width: 350px) { .faixas { grid-template-columns: 1fr; } }
.quote__field { display: grid; gap: 4px; margin-top: 2px; }
.quote__field label { font-weight: 700; color: var(--navy); }
.quote__field small { font-size: .875rem; line-height: 1.25; color: var(--muted); }
.quote__field input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--muted); border-radius: 0; font: inherit; font-size: 1.0625rem; color: var(--navy); background: #fff; }
.quote__cities { margin: 0; padding: 0; list-style: none; background: var(--bg-alt); }
.quote__cities li { min-height: 44px; padding: 10px 12px; color: var(--navy); cursor: pointer; }
.quote__cities li:hover, .quote__cities li.is-active { background: var(--sky); }
.quote__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 2px; }
.quote__back { min-height: 52px; padding: 0 16px; border: 0; font: inherit; font-weight: 700; color: var(--navy); background: none; cursor: pointer; }
.quote__next { flex: 1; min-width: 0; padding-inline: 12px; color: #fff; background: var(--blue); white-space: nowrap; }
.quote__next.btn--wa { background: var(--wa); }
.quote__next.btn--wa:hover { background: var(--wa-dark); }
.quote__direct { align-self: center; display: flex; align-items: center; min-height: 44px; font-size: .9375rem; font-weight: 600; color: var(--wa-dark); }

/* Entrances: only hidden once the script is known to be running */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Short phones: the stair and the question give way so the search stays on the first screen */
@media (max-height: 720px) and (max-width: 999px) {
  .hero h1 { font-size: clamp(2.5rem, 12vw, 3.25rem); }
  .lead { margin: 8px 0 10px; font-size: .9375rem; }
  .hero__copy { padding-block: 12px 12px; }
  .uf-switch { margin-bottom: 6px; }
  .finder__mural .tile { min-height: 48px; }
  .finder__all, .finder__go { min-height: 44px; }
  .hero .stair { height: clamp(84px, 13svh, 120px); }
  .stair__count { font-size: 1.0625rem; }
  .stair__caption:not(.is-answer) { display: none; }
  .quote__head h2 { font-size: 1.25rem; }
}
@media (max-height: 620px) and (max-width: 999px) {
  .finder__mural .tile:nth-child(n + 5), .finder__mural li:nth-child(n + 5) { display: none; }
  .lead { display: none; }
}
@media (max-height: 720px) and (max-width: 999px), (max-width: 350px) {
  .stair__caption { position: static; max-width: none; padding: 0 var(--gutter) 6px; }
}
/* Without the script the first screen is only the heading and the link down */
html:not(.js) .hero { min-height: 0; }
html:not(.js) .hero__stair { display: none; }
@media (max-width: 350px) {
  .quote__back { padding: 0 8px; }
  .quote__next { gap: 6px; padding-inline: 8px; font-size: .9375rem; }
  .bar__main img { display: none; }
  .wa-float { width: 60px; }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .formas__grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1160px; margin-inline: auto; overflow: visible; }
  .forma { padding: 32px; }
  .viviane__grid { grid-template-columns: auto 1fr; gap: 40px; align-items: end; }
  .viviane__photo { width: 240px; }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li + li { margin-top: 0; }
  .benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
  .benefits li + li { margin-top: 0; }
  .quote, .rede { width: min(540px, calc(100% - 32px)); margin: auto; }
  .busca { width: min(620px, calc(100% - 32px)); height: min(720px, 90dvh); margin: auto; }
  .busca__list { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1000px) {
  .topnav { display: flex; gap: 28px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .hero__copy { align-self: center; padding: 48px 48px 48px max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))); }
  .hero__stair { display: flex; flex-direction: column; justify-content: flex-end; }
  .stair__caption { top: 32px; left: 0; max-width: 60%; font-size: 1.0625rem; }
  .hero .stair { height: 76%; }
  .stair__name { display: block; }
  .stair__count { font-size: 1.75rem; }
  .stair--mini { display: none; }
  .finder__mural { grid-template-columns: repeat(3, 1fr); }
  .plans { padding-inline: max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))); scroll-padding-inline: max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))); margin-top: 28px; }
  .plan { flex-basis: 340px; }
  .plans-nav:not([hidden]) { display: flex; gap: 4px; max-width: 1160px; margin: 12px auto 0; padding: 0 var(--gutter); }
  .plans-nav button { width: 52px; height: 52px; border: 0; font: inherit; font-size: 1.25rem; font-weight: 700; color: #fff; background: var(--navy); cursor: pointer; }
  .planos, .perks, .formas, .viviane, .como, .duvidas { padding-block: 112px; }
  .edge { margin-top: 64px; }
  .edge::before { height: 64px; }
  .bar { left: auto; right: 24px; bottom: 24px; width: 420px; height: 72px; padding: 0; }
  body { padding-bottom: 0; }
  .footer { padding-bottom: 112px; max-width: 1160px; margin: 0 auto; }
  .hero { min-height: calc(100svh - var(--topbar)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero .stair__fill, .js .bar { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .stair__fill, .quote__bar span, .faixa, .forma__link, .tile, .finder__all, .finder__go { transition: none; }
  .btn:active, .forma__link:active, .tile:active, .finder__all:active, .finder__go:active { transform: none; }
  .busca[open], .rede[open], .quote[open] { animation: none; }
  .stair--lit .stair__step:not(.is-lit) .stair__fill { transform: none; }
}
