/* Gerador de ficha de anamnese (sanoria.care/ferramentas/anamnese/). Marca fixa do brandbook, como o e-book e o
   quiz: a página não muda com o tema do aparelho (a folha da ficha é branca de qualquer jeito). Celular primeiro. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/montserrat-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/montserrat-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --navy: #12263B; --navy-2: #0c1b2b; --petroleo: #037C9B; --turquesa: #14B4B5; --agua: #2FC9BD; --menta: #8EF4CD;
  --nevoa: #F3F7F7; --branco: #FFFFFF; --ardosia: #5B6B78; --linha: #d9e4e6; --erro: #b3261e; --acento: #e6f6f6;
  --grad: linear-gradient(120deg, #036F92 0%, #0AA3B0 55%, #2FCABD 100%);
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--nevoa); color: var(--navy); font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
a { color: var(--petroleo); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--agua); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Topo ── */
.top { position: relative; background: var(--navy); color: var(--branco); overflow: hidden; padding-bottom: 30px; }
.top::before { content: ""; position: absolute; right: -220px; top: -140px; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(20,180,181,.28), rgba(20,180,181,0) 65%); pointer-events: none; }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand img { display: block; height: 30px; width: auto; }
.top-cta { color: var(--menta); font-weight: 700; font-size: 14px; text-decoration: none; }
.hero { position: relative; }
.crumbs { font-size: 13px; color: #9fb4c3; }
.crumbs a { color: #b8c9d6; }
.eyebrow { margin: 14px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--agua); }
.hero h1 { margin: 8px 0 0; font-size: clamp(28px, 7.4vw, 46px); font-weight: 800; line-height: 1.08; max-width: 22em; }
.hero .sub { margin: 12px 0 0; font-size: clamp(15px, 4vw, 18px); color: #d3e0e9; max-width: 40em; }
.trust { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.trust li { position: relative; padding-left: 26px; font-size: 14px; color: #e6eef4; }
.trust li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); }
.trust li::after { content: ""; position: absolute; left: 5px; top: 6px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chips { display: flex; gap: 8px; margin-top: 20px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid #2c4560; color: #d3e0e9; text-decoration: none; font-size: 14px; font-weight: 700; }
.chips a[aria-current] { background: var(--turquesa); border-color: var(--turquesa); color: var(--navy); }

/* ── Ferramenta ── */
.tool { display: grid; gap: 16px; margin-top: -10px; position: relative; }
.panel { background: var(--branco); border: 1px solid var(--linha); border-radius: 18px; padding: 20px 16px; box-shadow: 0 10px 30px rgba(18,38,59,.06); }
.editor { display: grid; gap: 16px; min-width: 0; }
.panel h2 { margin: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.step { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--navy); color: var(--menta); display: inline-grid; place-items: center; font-size: 14px; }
.hint { margin: 6px 0 0; font-size: 14px; color: var(--ardosia); }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
label small, legend small { font-weight: 500; color: var(--ardosia); }
input[type=text], input[type=email], input[type=tel], select {
  width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 16px; /* 16px: o iOS não dá zoom no foco */
  color: var(--navy); background: var(--nevoa); border: 1.5px solid var(--linha); border-radius: 12px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ardosia) 50%), linear-gradient(135deg, var(--ardosia) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { outline: none; border-color: var(--turquesa); box-shadow: 0 0 0 3px rgba(20,180,181,.22); background-color: #fff; }
.grid2 { display: grid; gap: 14px; margin-top: 16px; }
.logo-row { margin-top: 14px; }
.logo-row input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
.logo-prev { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.logo-prev img { max-height: 48px; max-width: 140px; border: 1px solid var(--linha); border-radius: 8px; padding: 4px; background: #fff; }
.link { font: inherit; font-size: 14px; font-weight: 700; color: var(--petroleo); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

.sec { border: 0; border-top: 1px solid var(--linha); margin: 18px 0 0; padding: 14px 0 0; min-width: 0; }
.sec legend { float: left; width: 100%; padding: 0; font-size: 15px; font-weight: 800; }
.sec legend .count { font-size: 12px; font-weight: 700; color: var(--ardosia); margin-left: 4px; }
.sec .toggle-all { float: none; clear: both; display: inline-block; margin: 4px 0 2px; font: inherit; font-size: 13px; font-weight: 700; color: var(--petroleo); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.sec ul { clear: both; list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.sec li label { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 14.5px; line-height: 1.45; margin: 0; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.sec li label:hover { background: var(--nevoa); }
.sec li input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--petroleo); }
.sec li small { display: block; margin-top: 2px; font-weight: 500; font-size: 12.5px; color: var(--ardosia); }
.sec li input:not(:checked) + span { color: var(--ardosia); }
.custom .add { clear: both; display: grid; gap: 8px; margin-top: 8px; }
.custom li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; background: var(--nevoa); border-radius: 10px; font-size: 14px; font-weight: 600; }
.custom li small { display: block; color: var(--ardosia); font-weight: 500; }
.custom li button { flex: none; }

.btn-p, .btn-s { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .12s, opacity .12s; }
.btn-p { border: 0; background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(3,111,146,.25); }
.btn-s { border: 1.5px solid var(--linha); background: var(--branco); color: var(--navy); }
.btn-p:hover, .btn-s:hover { transform: translateY(-1px); }
.btn-p[disabled] { opacity: .6; cursor: progress; transform: none; }
.wide { width: 100%; }
.msg { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--erro); }
.msg:empty { display: none; }
.safe { margin: 10px 0 0; font-size: 12.5px; color: var(--ardosia); text-align: center; }

.preview-col { min-width: 0; scroll-margin-top: 12px; }
.sheets { margin-top: 14px; display: grid; gap: 12px; background: #e3eaec; border-radius: 12px; padding: 12px; max-height: 70vh; overflow-y: auto; }
.sheets svg { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(18,38,59,.15); border-radius: 2px; }
.sheets:empty { min-height: 200px; }
.actions { display: grid; gap: 10px; margin-top: 14px; }

/* ── Conteúdo ── */
.content { max-width: 820px; padding-block: 36px 24px; }
.content h2 { font-size: clamp(22px, 5.4vw, 28px); font-weight: 800; line-height: 1.15; margin: 36px 0 10px; }
.content p, .content li { color: #2c3e50; }
.content ul { padding-left: 20px; }
.content li { margin: 6px 0; }
.cta { margin-top: 36px; background: var(--navy); color: #d3e0e9; border-radius: 18px; padding: 24px 20px; }
.cta h2 { margin-top: 0; color: #fff; font-size: 22px; }
.cta p { color: #c3d3de; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btns.col { flex-direction: column; align-items: stretch; }
.cta .btn-s { background: transparent; color: #fff; border-color: #36526e; }
.faq details { border: 1px solid var(--linha); background: var(--branco); border-radius: 12px; padding: 0 16px; margin-top: 10px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style-position: outside; }
.faq details p { margin: 0 0 14px; }
.cards { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.cards a { display: block; padding: 14px 16px; border: 1px solid var(--linha); border-radius: 12px; background: var(--branco); text-decoration: none; color: var(--navy); font-weight: 800; }
.cards a:hover { border-color: var(--turquesa); }
.cards span { display: block; margin-top: 2px; font-weight: 500; font-size: 14px; color: var(--ardosia); }
.note { margin-top: 26px; font-size: 13px; color: var(--ardosia) !important; }
.foot { background: var(--navy-2); color: #8da5b6; padding-block: 24px 96px; font-size: 13px; line-height: 1.7; text-align: center; }
.foot a { color: #b8c9d6; }

/* Barra fixa no celular: a pré-visualização fica longe das perguntas. */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--linha); box-shadow: 0 -6px 20px rgba(18,38,59,.08); }
.mbar .btn-p, .mbar .btn-s { min-height: 46px; padding: 0 12px; }

/* ── Cadastro ── */
dialog { width: min(480px, calc(100% - 24px)); max-height: calc(100% - 24px); border: 0; border-radius: 20px; padding: 26px 20px 22px; color: var(--navy); box-shadow: 0 30px 80px rgba(7,18,30,.45); overflow-y: auto; }
dialog::backdrop { background: rgba(12,27,43,.6); }
dialog h2 { margin: 0; font-size: 21px; font-weight: 800; padding-right: 28px; }
dialog form { display: grid; gap: 12px; margin-top: 16px; }
.close { position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--ardosia); cursor: pointer; }
.field-error input, .field-error select { border-color: var(--erro); }
.req { color: var(--erro); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ardosia); }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--petroleo); }
.consent a { font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; }
.done .ok { width: 58px; height: 58px; margin: 4px auto 14px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; }
.done .ok::after { content: ""; width: 12px; height: 22px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg) translate(-2px, -2px); }
.done h2 { padding: 0; }
.done p { color: var(--ardosia); }
.done p b { display: block; color: var(--navy); overflow-wrap: anywhere; }
.done .link { margin-top: 6px; }

@media (min-width: 720px) {
  .panel { padding: 26px 26px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .custom .add { grid-template-columns: 1fr auto auto; }
  .actions { grid-template-columns: 1fr 1fr; }
  .trust { grid-auto-flow: column; justify-content: start; gap: 20px; }
}
@media (min-width: 980px) {
  .top { padding-bottom: 48px; }
  .tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; margin-top: -22px; }
  .sticky { position: sticky; top: 16px; }
  .sheets { max-height: calc(100vh - 290px); }
  .actions { grid-template-columns: 1fr; }
  .mbar { display: none; }
  .foot { padding-bottom: 24px; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1180px) { .actions { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
