/* =========================================================
   MEDFOCO • EMERGÊNCIA & UTI — CSS DOS ARTIGOS (mesmo modelo dos artigos de Oftalmologia, paleta vermelha)
   Vale para todos os artigos (modelos "completo" e "compacto").
   Escopo: .mfea (página) e .mfea-modal (popups, criados no <body>).
   Identidade: hero verde-azulado do atlas (#c62828 → #9b1c1c → #7a1414),
   títulos azul-marinho (#163256), abas e lateral no padrão dos artigos antigos.
   ========================================================= */

.mfea,
.mfea-modal {
  --mfea-pri: #c62828;
  --mfea-pri-l: #fdecec;
  --mfea-pri-b: #f6c6c6;
  --mfea-pri-d: #9b1c1c;
  --mfea-pri-dd: #7a1414;
  --mfea-pri-s: #fca5a5;
  --mfea-navy: #2b4c7e;
  --mfea-navy-l: #eef4fb;
  --mfea-head: #163256;
  --mfea-body: #3f4b5b;
  --mfea-muted: #6b7280;
  --mfea-bg: #fff;
  --mfea-bg-s: #f8fafc;
  --mfea-border: #dce6f2;
  --mfea-border-l: #e8eef6;

  --mfea-ok: #0f8f5f;      --mfea-ok-bg: #e9f8f0;      --mfea-ok-b: #bfe8d3;
  --mfea-alt: #1f6fb2;     --mfea-alt-bg: #eaf3fc;     --mfea-alt-b: #c4dcf3;
  --mfea-warn: #a86800;    --mfea-warn-bg: #fff7e6;    --mfea-warn-b: #f5dcaa;
  --mfea-dang: #c0392b;    --mfea-dang-bg: #fdeeee;    --mfea-dang-b: #f4c5c0;
  --mfea-prova: #6b47c2;   --mfea-prova-bg: #f3effc;   --mfea-prova-b: #dccff6;

  --mfea-r: 20px;
  --mfea-r-s: 12px;
  --mfea-sh: 0 8px 30px rgba(43, 76, 126, .07);
  --mfea-sh-h: 0 2px 4px rgba(43, 76, 126, .06), 0 14px 32px rgba(43, 76, 126, .13);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--mfea-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.mfea { width: 100%; max-width: 1400px; margin: 0 auto; }

.mfea *, .mfea *::before, .mfea *::after,
.mfea-modal *, .mfea-modal *::before, .mfea-modal *::after { box-sizing: border-box; }

/* Reset de controles (o Astra estiliza button/input globalmente) */
.mfea button, .mfea-modal button {
  font-family: inherit; font-size: inherit; line-height: 1.3; color: inherit;
  background: none; border: 0; border-radius: 0; padding: 0; margin: 0;
  box-shadow: none; text-transform: none; letter-spacing: normal; cursor: pointer;
  touch-action: manipulation;
}
.mfea button:focus-visible, .mfea-modal button:focus-visible,
.mfea summary:focus-visible { outline: 3px solid var(--mfea-pri-s); outline-offset: 2px; }

.mfea h1, .mfea h2, .mfea h3, .mfea h4,
.mfea-modal h2, .mfea-modal h3, .mfea-modal h4 {
  font-family: inherit; color: var(--mfea-head); margin: 0; line-height: 1.25; letter-spacing: -.01em;
}
.mfea p, .mfea-modal p { margin: 0 0 .75em; }
.mfea p:last-child, .mfea-modal p:last-child { margin-bottom: 0; }
.mfea a { color: var(--mfea-pri-d); }
.mfea strong, .mfea b, .mfea em,
.mfea-modal strong, .mfea-modal b, .mfea-modal em { display: inline; }
.mfea strong, .mfea-modal strong { color: var(--mfea-head); font-weight: 700; }
.mfea code, .mfea-modal code { font-size: .85em; background: #eef3f8; padding: 1px 5px; border-radius: 4px; }

/* =========================================================
   BREADCRUMBS + HERO
   ========================================================= */
.mfea-bc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 13px; color: var(--mfea-muted); padding: 4px 0 14px;
}
.mfea-bc a { color: var(--mfea-muted); text-decoration: none; }
.mfea-bc a:hover { color: var(--mfea-pri); }
.mfea-bc i { font-size: 9px; opacity: .6; }
.mfea-bc strong { color: var(--mfea-head); font-weight: 600; }

.mfea-hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 34px 32px 30px;
  background: linear-gradient(135deg, #c62828 0%, #9b1c1c 52%, #7a1414 100%);
  box-shadow: 0 14px 40px rgba(122, 20, 20, .22);
}
.mfea-hero::before {
  content: ""; position: absolute; top: -90px; right: -80px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 165, 165, .32), transparent 70%); pointer-events: none;
}
.mfea-hero::after {
  content: ""; position: absolute; left: -100px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 28, 28, .45), transparent 70%); pointer-events: none;
}
.mfea-hero-in { position: relative; z-index: 1; max-width: 860px; }
.mfea-compacto .mfea-hero-in { max-width: none; }
.mfea-hero-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); padding: 6px 14px; border-radius: 999px;
}
.mfea-hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mfea-pri-s); animation: mfea-pulso 1.4s infinite; }
@keyframes mfea-pulso { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .mfea-hero-dot { animation: none; } }
.mfea .mfea-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -1px; line-height: 1.06; margin: 14px 0 6px; }
.mfea-hero-alt { font-size: 14.5px; color: #c9f5ee; margin: 0 0 6px; }
.mfea-hero-sub { font-size: 15.5px; line-height: 1.65; color: rgba(255,255,255,.9); max-width: 720px; margin: 8px 0 0; }
.mfea .mfea-hero-sub strong, .mfea .mfea-hero-alt strong, .mfea .mfea-hero-sub em { color: #fff; }
.mfea-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mfea-hero-pills span {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 7px 13px; border-radius: 999px;
}
.mfea-hero-pills i { color: var(--mfea-pri-s); }
.mfea-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 12.5px; color: #c9f1eb; }
.mfea-hero-meta:empty { display: none; }
.mfea-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Ficha do modelo compacto (4 itens no hero) */
.mfea-hero-ficha { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; }
.mfea-hero-ficha > div { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mfea-hero-ficha dt { display: flex; align-items: center; gap: 6px; margin: 0 0 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mfea-pri-s); }
.mfea-hero-ficha dd { margin: 0; font-size: 14px; font-weight: 800; color: #fff; line-height: 1.35; }

/* =========================================================
   CARDS-RESUMO
   ========================================================= */
.mfea-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: -22px 18px 0; position: relative; z-index: 2; }
.mfea .mfea-resumo-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  background: var(--mfea-bg); border: 1px solid var(--mfea-border); border-radius: var(--mfea-r);
  padding: 18px; box-shadow: var(--mfea-sh); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mfea .mfea-resumo-card:hover { transform: translateY(-3px); box-shadow: var(--mfea-sh-h); border-color: var(--mfea-pri-b); background: var(--mfea-bg); }
.mfea-resumo-ic {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--mfea-pri-l); color: var(--mfea-pri); font-size: 17px;
}
.mfea-resumo-card > strong { font-size: 15.5px; }
.mfea-resumo-txt { font-size: 13.5px; color: var(--mfea-body); line-height: 1.5; flex: 1; }
.mfea-resumo-mais { font-size: 13px; font-weight: 600; color: var(--mfea-pri); display: inline-flex; gap: 6px; align-items: center; }
.mfea-resumo-card:hover .mfea-resumo-mais i { transform: translateX(3px); }
.mfea-resumo-mais i { transition: transform .18s; }


/* =========================================================
   LAYOUT
   ========================================================= */
.mfea-page { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; margin-top: 18px; }
.mfea-resumo + .mfea-page { margin-top: 22px; }
.mfea-main { min-width: 0; }
.mfea-side { display: flex; flex-direction: column; gap: 16px; }

/* =========================================================
   ABAS — barra branca no padrão dos artigos do atlas
   ========================================================= */
.mfea-tabs {
  display: grid; grid-template-columns: repeat(var(--mfea-col, 6), minmax(0, 1fr)); gap: 6px; padding: 8px; margin: 0 0 18px;
  background: #fff; border: 1px solid var(--mfea-border); border-radius: 14px; box-shadow: var(--mfea-sh);
}
.mfea .mfea-tab {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 10px; border-radius: 11px;
  font-size: 12.8px; font-weight: 700; color: #64748b; background: #fff; text-align: center; line-height: 1.2; transition: background .2s, color .2s;
}
.mfea .mfea-tab i { font-size: 13px; flex: 0 0 auto; }
.mfea .mfea-tab:hover { color: var(--mfea-pri-d); background: var(--mfea-bg-s); }
.mfea .mfea-tab.mfea-on { color: var(--mfea-pri-dd); background: var(--mfea-pri-l); }
.mfea .mfea-tab.mfea-on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 50px; background: var(--mfea-pri); }
.mfea .mfea-tab.mfea-on i { color: var(--mfea-pri); }

.mfea-aba { display: none; flex-direction: column; gap: 16px; }
.mfea-aba.mfea-on { display: flex; animation: mfea-in .25s ease; }
@keyframes mfea-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mfea .mfea-quickbtn { display: none; }
.mfea-ref-web { background: var(--mfea-pri-l); color: var(--mfea-pri-d); }

/* =========================================================
   CARD DE SEÇÃO
   ========================================================= */
.mfea-card {
  background: var(--mfea-bg); border: 1px solid var(--mfea-border); border-radius: var(--mfea-r);
  padding: 24px; box-shadow: var(--mfea-sh); display: flex; flex-direction: column; gap: 16px;
}
.mfea-card > * { margin: 0; }
.mfea .mfea-card-tit { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.mfea-card-tit > span {
  flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--mfea-pri-l); color: var(--mfea-pri); font-size: 16px;
}
.mfea-card-perigo { border-color: var(--mfea-dang-b); }
.mfea-card-perigo .mfea-card-tit > span { background: var(--mfea-dang-bg); color: var(--mfea-dang); }
.mfea-card-prova .mfea-card-tit > span { background: var(--mfea-prova-bg); color: var(--mfea-prova); }

.mfea .mfea-sub, .mfea-modal .mfea-sub { font-size: 16px; font-weight: 700; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.mfea-sub i { color: var(--mfea-pri); font-size: 14px; }

/* Em 30 segundos */
.mfea-essencial {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--mfea-pri-b);
  border-radius: var(--mfea-r); box-shadow: var(--mfea-sh);
}
.mfea-essencial-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: linear-gradient(135deg, #c62828 0%, #9b1c1c 55%, #7a1414 100%);
}
.mfea-essencial-head > span {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff; font-size: 16px;
}
.mfea .mfea-essencial-head h2 { color: #fff; font-size: 16px; font-weight: 800; margin: 0; }
.mfea-essencial-head p { color: #c9f1eb; font-size: 12.5px; margin: 0; }
.mfea-essencial ol {
  list-style: none; margin: 0; padding: 16px 20px 18px; counter-reset: mfze;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.mfea-essencial li {
  position: relative; counter-increment: mfze; display: block; min-width: 0;
  padding: 12px 14px 12px 50px; border-radius: 12px; background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l);
  font-size: 14px; line-height: 1.5; color: var(--mfea-head);
}
.mfea-essencial li::before {
  content: counter(mfze); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: var(--mfea-pri-l); color: var(--mfea-pri-d); font-weight: 800; font-size: 13px;
}

/* =========================================================
   BLOCOS
   ========================================================= */

/* Frase-chave */
.mfea-chave {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--mfea-r-s);
  background: var(--mfea-head); color: #fff;
}
.mfea-chave i { color: var(--mfea-pri-s); font-size: 18px; margin-top: 3px; }
.mfea-chave p { font-size: 15.5px; font-weight: 600; color: #fff; }
.mfea .mfea-chave strong, .mfea-modal .mfea-chave strong { color: var(--mfea-pri-s); }

/* Alertas */
.mfea-alerta { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--mfea-r-s); border: 1px solid; font-size: 14.5px; }
.mfea-alerta > i { font-size: 16px; margin-top: 3px; flex: 0 0 auto; }
.mfea-alerta > div { min-width: 0; }
.mfea-alerta-tit { display: block; margin-bottom: 2px; }
.mfea-alerta-info    { background: var(--mfea-alt-bg);  border-color: var(--mfea-alt-b); }   .mfea-alerta-info > i    { color: var(--mfea-alt); }
.mfea-alerta-atencao { background: var(--mfea-warn-bg); border-color: var(--mfea-warn-b); }  .mfea-alerta-atencao > i { color: var(--mfea-warn); }
.mfea-alerta-perigo  { background: var(--mfea-dang-bg); border-color: var(--mfea-dang-b); }  .mfea-alerta-perigo > i  { color: var(--mfea-dang); }
.mfea-alerta-ok      { background: var(--mfea-ok-bg);   border-color: var(--mfea-ok-b); }    .mfea-alerta-ok > i      { color: var(--mfea-ok); }
.mfea-alerta-prova   { background: var(--mfea-prova-bg); border-color: var(--mfea-prova-b); } .mfea-alerta-prova > i  { color: var(--mfea-prova); }

/* Rótulo (badge) */
.mfea-rotulo {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.4;
  color: var(--mfea-pri-d); background: var(--mfea-pri-l); padding: 2px 8px; border-radius: 6px;
}
.mfea-rotulo i { font-size: 9px; }

/* Card com imagem */
.mfea-figcard {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: center;
  background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-radius: var(--mfea-r); padding: 18px;
}
.mfea-figcard-sem, .mfea-figcard-largo { grid-template-columns: 1fr; }
.mfea-figcard-largo .mfea-fig img { max-height: 620px; }
.mfea-figcard-txt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mfea .mfea-figcard-txt h3, .mfea-modal .mfea-figcard-txt h3 { font-size: 17.5px; }
.mfea-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mfea .mfea-fig-btn, .mfea-modal .mfea-fig-btn,
.mfea .mfea-gal-img, .mfea-modal .mfea-gal-img {
  position: relative; display: block; width: 100%; border-radius: 12px; overflow: hidden; background: #e9f0f6; cursor: zoom-in;
}
.mfea-fig img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: contain; background: #fff; }
.mfea-fig-zoom {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(6, 63, 60, .78); color: #fff; font-size: 14px; opacity: .9; transition: transform .15s;
}
.mfea-fig-btn:hover .mfea-fig-zoom, .mfea-gal-img:hover .mfea-fig-zoom { transform: scale(1.1); }
.mfea-fig figcaption { font-size: 12.5px; color: var(--mfea-muted); text-align: center; }
.mfea-fig-vazia {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  min-height: 200px; border: 2px dashed #c9d6e3; border-radius: 12px; padding: 18px; color: var(--mfea-muted); font-size: 13px; background: #fff;
}
.mfea-fig-vazia i { font-size: 28px; color: #b6c5d4; }
.mfea-fig-vazia small { font-size: 11px; opacity: .8; }

/* Galeria */
.mfea-galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mfea-gal-n1 { grid-template-columns: minmax(0, 420px); }
.mfea-gal-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mfea-gal-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mfea-gal-item {
  display: flex; flex-direction: column; background: var(--mfea-bg); border: 1px solid var(--mfea-border);
  border-radius: var(--mfea-r); overflow: hidden; transition: box-shadow .18s, transform .18s;
}
.mfea-gal-item:hover { box-shadow: var(--mfea-sh-h); transform: translateY(-2px); }
.mfea .mfea-gal-img, .mfea-modal .mfea-gal-img { border-radius: 0; aspect-ratio: 4 / 3; }
.mfea-gal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mfea-gal-icone {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--mfea-pri-l), #f3f9fd); color: var(--mfea-pri); font-size: 34px;
}
.mfea-gal-icone small { font-size: 11px; color: var(--mfea-muted); padding: 0 10px; text-align: center; }
.mfea-gal-txt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.mfea .mfea-gal-txt h4, .mfea-modal .mfea-gal-txt h4 { font-size: 15.5px; }
.mfea-gal-txt p { font-size: 13.5px; line-height: 1.5; }

/* Mini-cards */
.mfea-cards { display: grid; gap: 12px; }
.mfea-col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mfea-col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mfea-col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mfea-mini {
  background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-left: 3px solid var(--mfea-pri-s);
  border-radius: 12px; padding: 14px 16px; min-width: 0;
}
.mfea-mini-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mfea-mini-head i { color: var(--mfea-pri); font-size: 15px; width: 18px; text-align: center; flex: 0 0 auto; }
.mfea .mfea-mini h4, .mfea-modal .mfea-mini h4 { font-size: 15px; }
.mfea-mini p { font-size: 14px; line-height: 1.55; }
.mfea-mini-perigo { border-left-color: var(--mfea-dang); }  .mfea-mini-perigo .mfea-mini-head i { color: var(--mfea-dang); }
.mfea-mini-atencao { border-left-color: #e3a634; }        .mfea-mini-atencao .mfea-mini-head i { color: var(--mfea-warn); }
.mfea-mini-ok { border-left-color: var(--mfea-ok); }        .mfea-mini-ok .mfea-mini-head i { color: var(--mfea-ok); }

/* Números */
.mfea-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mfea-num {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px;
  background: linear-gradient(160deg, #fff, var(--mfea-pri-l)); border: 1px solid var(--mfea-pri-b);
}
.mfea-num i { color: var(--mfea-pri); font-size: 16px; margin-bottom: 4px; }
.mfea .mfea-num strong, .mfea-modal .mfea-num strong { font-size: 21px; font-weight: 800; color: var(--mfea-pri-dd); line-height: 1.15; }
.mfea-num span { font-size: 13px; line-height: 1.45; color: var(--mfea-body); }

/* Passos */
.mfea-passos { list-style: none; margin: 0; padding: 0; counter-reset: mfzp; display: flex; flex-direction: column; gap: 0; }
.mfea-passos > li { position: relative; display: block; padding: 0 0 18px 50px; counter-increment: mfzp; }
.mfea-passos > li::before {
  content: counter(mfzp); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--mfea-pri);
  box-shadow: 0 0 0 4px var(--mfea-pri-l);
}
.mfea-passos > li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--mfea-pri-b); }
.mfea-passos > li:last-child { padding-bottom: 0; }
.mfea-passos > li:last-child::after { display: none; }
.mfea-passo-tit { display: block; font-size: 15.5px; margin: 4px 0 2px; }
.mfea-passos p { font-size: 14.5px; }
.mfea-passos-fluxo { flex-direction: row; gap: 10px; }
.mfea-passos-fluxo > li { flex: 1; padding: 46px 14px 14px; background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-radius: 12px; }
.mfea-passos-fluxo > li::before { left: 14px; top: 12px; width: 28px; height: 28px; font-size: 13px; }
.mfea-passos-fluxo > li::after { display: none; }

/* Listas */
.mfea-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mfea-lista > li { position: relative; display: block; padding-left: 28px; font-size: 14.5px; line-height: 1.55; }
.mfea-lista > li::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 2px; font-size: 13px;
  width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
}
.mfea-lista-check > li::before { content: "\f00c"; color: var(--mfea-ok); background: var(--mfea-ok-bg); font-size: 10px; }
.mfea-lista-x > li::before { content: "\f00d"; color: var(--mfea-dang); background: var(--mfea-dang-bg); font-size: 10px; }
.mfea-lista-alerta > li::before { content: "\21"; color: var(--mfea-warn); background: var(--mfea-warn-bg); font-size: 10px; }
.mfea-lista-dot > li { padding-left: 20px; }
.mfea-lista-dot > li::before { content: ""; width: 7px; height: 7px; top: 9px; left: 4px; background: var(--mfea-pri); }

/* Comparar */
.mfea-comparar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mfea-comp { border-radius: 14px; padding: 16px; border: 1px solid var(--mfea-border); background: var(--mfea-bg-s); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mfea .mfea-comp h4, .mfea-modal .mfea-comp h4 { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.mfea-comp p { font-size: 14px; }
.mfea-comp-ok      { background: var(--mfea-ok-bg);   border-color: var(--mfea-ok-b); }   .mfea-comp-ok h4 i { color: var(--mfea-ok); }
.mfea-comp-alt     { background: var(--mfea-alt-bg);  border-color: var(--mfea-alt-b); }  .mfea-comp-alt h4 i { color: var(--mfea-alt); }
.mfea-comp-atencao { background: var(--mfea-warn-bg); border-color: var(--mfea-warn-b); } .mfea-comp-atencao h4 i { color: var(--mfea-warn); }
.mfea-comp-perigo  { background: var(--mfea-dang-bg); border-color: var(--mfea-dang-b); } .mfea-comp-perigo h4 i { color: var(--mfea-dang); }
.mfea-comp-neutro h4 i { color: var(--mfea-pri); }

/* Tabelas */
.mfea-tabela-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--mfea-border); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.mfea-tabela { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 14px; margin: 0; background: #fff; }
.mfea-tabela th {
  background: var(--mfea-bg-s); color: var(--mfea-head); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--mfea-border);
}
.mfea-tabela td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--mfea-border-l); vertical-align: top; overflow-wrap: break-word; hyphens: auto; line-height: 1.5; }
.mfea-tabela tbody tr:last-child td { border-bottom: 0; }
.mfea-tabela tbody tr:nth-child(even) td { background: #fbfdff; }
.mfea-tabela td:first-child { font-weight: 600; color: var(--mfea-head); min-width: 130px; }
.mfea-tabela-nota { display: flex; gap: 8px; font-size: 13px; color: var(--mfea-muted); margin: 0; }
.mfea-tabela-nota i { color: var(--mfea-pri); margin-top: 3px; }

/* Selos de prioridade */
.mfea-nivel {
  display: inline-block; margin: 0 0 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; line-height: 1.3;
}
.mfea-nivel + * { display: block; }
.mfea-nivel-ok     { color: var(--mfea-ok);   background: var(--mfea-ok-bg);   border-color: var(--mfea-ok-b); }
.mfea-nivel-alt    { color: var(--mfea-alt);  background: var(--mfea-alt-bg);  border-color: var(--mfea-alt-b); }
.mfea-nivel-perigo { color: var(--mfea-dang); background: var(--mfea-dang-bg); border-color: var(--mfea-dang-b); }
.mfea-nivel-neutro { color: var(--mfea-muted); background: #f1f5f9; border-color: var(--mfea-border); }
.mfea-tx td:first-child .mfea-nivel { display: table; }

/* Medicamento citado no texto: link discreto que abre a ficha */
.mfea .mfea-med, .mfea-modal .mfea-med {
  display: inline; font: inherit; font-weight: 700; color: var(--mfea-pri-d); line-height: inherit; vertical-align: baseline;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--mfea-pri-s); text-underline-offset: 3px;
}
.mfea .mfea-med:hover, .mfea-modal .mfea-med:hover { color: var(--mfea-pri); text-decoration-style: solid; background: none; }
.mfea-essencial-head .mfea-med, .mfea-chave .mfea-med { color: inherit; }

/* Rotas de tratamento */
.mfea-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mfea-rotas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 14px; }
.mfea-rota {
  --rc: var(--mfea-pri); --rc-soft: var(--mfea-pri-l); --rc-ink: var(--mfea-pri-dd);
  position: relative; background: #fff; border: 1px solid var(--mfea-border); border-radius: 16px; min-width: 0; overflow: hidden;
  transition: box-shadow .2s, border-color .2s; scroll-margin-top: 90px;
}
.mfea-rota::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--rc); }
.mfea-rota-blue   { --rc: #2b6cb0; --rc-soft: #eaf2fb; --rc-ink: #1d4f86; }
.mfea-rota-navy   { --rc: var(--mfea-head); --rc-soft: #e7edf6; --rc-ink: var(--mfea-head); }
.mfea-rota-amber  { --rc: #d69e2e; --rc-soft: var(--mfea-warn-bg); --rc-ink: var(--mfea-warn); }
.mfea-rota-red    { --rc: var(--mfea-dang); --rc-soft: var(--mfea-dang-bg); --rc-ink: #9b2c22; }
.mfea-rota-violet { --rc: var(--mfea-prova); --rc-soft: var(--mfea-prova-bg); --rc-ink: #4c3fa3; }
.mfea-rota:hover { border-color: var(--mfea-pri-b); box-shadow: var(--mfea-sh-h); }
.mfea-rota.mfea-aberta { grid-column: 1 / -1; border-color: var(--mfea-pri-b); box-shadow: var(--mfea-sh-h); }
.mfea .mfea-rota-head {
  width: 100%; height: 100%; min-height: 176px; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: 1fr auto;
  column-gap: 14px; row-gap: 12px; padding: 18px 18px 16px 23px; text-align: left; align-items: start;
}
.mfea .mfea-rota-head:hover { background: transparent; }
.mfea-rota.mfea-aberta .mfea-rota-head { min-height: 0; height: auto; background: var(--rc-soft); border-bottom: 1px solid var(--mfea-border); }
.mfea-rota-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--rc-soft); color: var(--rc-ink); display: grid; place-items: center; font-size: 19px; }
.mfea-rota.mfea-aberta .mfea-rota-ic { background: #fff; }
.mfea-rota-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mfea-rota-chip { align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rc-ink); background: var(--rc-soft); border-radius: 999px; padding: 3px 10px; }
.mfea-rota.mfea-aberta .mfea-rota-chip { background: #fff; }
.mfea-rota-t { font-size: 17px; font-weight: 800; color: var(--mfea-head); line-height: 1.3; }
.mfea-rota-d { font-size: 13px; line-height: 1.6; color: var(--mfea-body); }
.mfea-rota-nomes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mfea-rota-nomes span { font-size: 11px; font-weight: 700; color: var(--mfea-head); background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-radius: 7px; padding: 3px 8px; }
.mfea-rota.mfea-aberta .mfea-rota-nomes { display: none; }
.mfea-rota-estado { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--mfea-border); }
.mfea-rota-n { font-size: 12px; font-weight: 700; color: var(--mfea-muted); }
.mfea-rota-go { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--mfea-pri-d); background: var(--mfea-pri-l); border-radius: 9px; padding: 7px 12px; transition: background .2s, color .2s; }
.mfea-rota-go i { transition: transform .25s; font-size: 11px; }
.mfea-rota-head:hover .mfea-rota-go { background: var(--mfea-pri); color: #fff; }
.mfea-rota-fechar { display: none; }
.mfea-rota.mfea-aberta .mfea-rota-abrir { display: none; }
.mfea-rota.mfea-aberta .mfea-rota-fechar { display: inline; }
.mfea-rota.mfea-aberta .mfea-rota-go { background: #fff; }
.mfea-rota.mfea-aberta .mfea-rota-go i { transform: rotate(180deg); }
.mfea-rota-corpo { padding: 20px 22px 22px 25px; display: flex; flex-direction: column; gap: 14px; animation: mfea-in .25s ease; }
.mfea-rota-corpo[hidden] { display: none; }
.mfea-rota-quando { display: flex; align-items: flex-start; gap: 12px; background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-radius: 12px; padding: 12px 14px; }
.mfea-rota-quando > i { margin-top: 4px; color: var(--mfea-pri); }
.mfea-rota-quando b { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfea-head); margin-bottom: 2px; }
.mfea-rota-quando span { display: block; font-size: 13.5px; line-height: 1.65; }
.mfea-rota-pe { display: flex; justify-content: flex-end; }
.mfea .mfea-rota-recolher {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 800; color: var(--mfea-head);
  border: 1px solid var(--mfea-border); background: #fff; border-radius: 10px; padding: 6px 12px 6px 6px;
}
.mfea .mfea-rota-recolher:hover { background: var(--mfea-bg-s); }
.mfea-rota-recolher > span { width: 24px; height: 24px; border-radius: 7px; background: var(--mfea-bg-s); display: grid; place-items: center; font-size: 11px; }

/* Tabela de dose (rotas e aba Posologia do popup) — padrão do bulário */
.mfea-dose { display: grid; gap: 9px; }
.mfea-dose + .mfea-dose { margin-top: 6px; }
.mfea-dose-head { display: flex; align-items: center; gap: 9px; padding: 0 2px; color: var(--mfea-pri-dd); }
.mfea-dose-head > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--mfea-pri-l); color: var(--mfea-pri); font-size: 14px; flex: 0 0 auto; }
.mfea .mfea-dose-head strong, .mfea-modal .mfea-dose-head strong { font-size: 15px; font-weight: 800; color: var(--mfea-pri-dd); }
.mfea-dose-head > span { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--mfea-pri-l); color: var(--mfea-pri-d); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.mfea-dose-nota { margin: 0; font-size: 13px; color: var(--mfea-muted); }
.mfea-dose-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--mfea-border); border-radius: 14px; background: #fff; }
.mfea-dose-tab {
  width: 100%; min-width: 720px; margin: 0; border-collapse: collapse; border-spacing: 0; table-layout: fixed;
  background: #fff; color: var(--mfea-body); font-size: 13.5px;
}
.mfea-dose-tab th {
  padding: 12px 14px; background: #f6f8fa; border: 0; border-bottom: 1px solid var(--mfea-border);
  color: var(--mfea-muted); font-size: 11.5px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .055em;
}
.mfea-dose-tab th:nth-child(1) { width: 20%; }
.mfea-dose-tab th:nth-child(2) { width: 23%; }
.mfea-dose-tab th:nth-child(3) { width: 16%; }
.mfea-dose-tab th:nth-child(4) { width: 16%; }
.mfea-dose-tab th:nth-child(5) { width: 25%; }
.mfea-dose-tab td.mfea-dose-f, .mfea-dose-tab td.mfea-dose-d { padding-left: 12px; padding-right: 10px; }

.mfea-dose-tab td { padding: 12px 14px; border: 0; border-bottom: 1px solid #edf1f4; vertical-align: top; line-height: 1.48; overflow-wrap: break-word; background: #fff; }
.mfea-dose-tab tbody + tbody tr:first-child td { border-top: 2px solid #d5dde3; }
.mfea-dose-tab tbody:last-child tr:last-child td, .mfea-dose-tab tbody:last-child td[rowspan] { border-bottom: 0; }
.mfea-dose-tab tbody { --ind: #2f7a62; --ind-soft: #edf7f3; }
.mfea-dose-tab tbody.mfea-ind-1 { --ind: #396f9b; --ind-soft: #edf4f9; }
.mfea-dose-tab tbody.mfea-ind-2 { --ind: #765e9b; --ind-soft: #f3f0f8; }
.mfea-dose-tab tbody.mfea-ind-3 { --ind: #9a6b27; --ind-soft: #fbf4e9; }
.mfea-dose-tab tbody.mfea-ind-4 { --ind: #9a4e49; --ind-soft: #fbefee; }
.mfea-dose-tab tbody.mfea-ind-5 { --ind: #4b7180; --ind-soft: #eef5f7; }
.mfea-dose-tab td.mfea-dose-ind { background: var(--ind-soft); color: var(--ind); border-right: 1px solid #e3e9ee; }
.mfea-dose-tab td.mfea-dose-obs { border-left: 1px solid #edf1f4; color: var(--mfea-muted); }
.mfea-dose-ind-t { display: block; font-weight: 800; line-height: 1.35; color: var(--ind); }
.mfea-dose-ind-t strong, .mfea-dose-ind-t em { color: inherit; }
.mfea-dose-badge {
  display: inline-block; margin: 0 0 7px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid; line-height: 1.3; white-space: normal;
  max-width: 100%; overflow-wrap: anywhere;
}
.mfea-dose-sub { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--mfea-muted); line-height: 1.4; }
.mfea-dose-main strong { display: block; color: var(--mfea-head); font-weight: 800; }
.mfea-dose-farm { display: block; font-size: 11.5px; font-weight: 600; color: var(--mfea-muted); margin-bottom: 1px; }
.mfea-fichas { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 10px; }
/* Ficha do medicamento: ícone ao lado do nome do fármaco */
.mfea .mfea-ficha.mfea-ficha-ic {
  display: inline-grid; place-items: center; vertical-align: middle; position: relative; top: -1px; width: 20px; height: 20px; padding: 0; margin-left: 5px;
  border-radius: 50%; border: 1px solid transparent; background: #fff; color: var(--ind, var(--mfea-pri));
  box-shadow: 0 1px 2px rgba(15,23,42,.12); font-size: 12px; line-height: 1; cursor: pointer;
}
.mfea .mfea-ficha.mfea-ficha-ic i { font-size: 12px; line-height: 1; color: inherit; display: block; }
.mfea .mfea-ficha.mfea-ficha-ic:hover { background: var(--ind, var(--mfea-pri)); border-color: var(--ind, var(--mfea-pri)); color: #fff; }
.mfea .mfea-ficha.mfea-ficha-ic:hover i { color: #fff; }
/* Associação: uma célula por fármaco, mesma família de cor + etiqueta */
.mfea-dose-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
.mfea-dose-tags .mfea-dose-badge { margin: 0; }
.mfea-dose-assoc { display: inline-flex; max-width: 100%; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px dashed var(--ind); color: var(--ind); font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.mfea-dose-assoc i { font-size: 9px; }
.mfea-nowrap { white-space: nowrap; }
/* Associação (célula mesclada): um fármaco por linha, "+" entre eles, ícone à direita */
.mfea-dose-lista { display: flex; flex-direction: column; gap: 2px; }
.mfea-dose-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 800; line-height: 1.3; color: var(--ind); }
.mfea-dose-item .mfea-ficha.mfea-ficha-ic { flex: 0 0 auto; margin-left: 0; top: 0; }
.mfea-dose-sep { align-self: flex-start; display: grid; place-items: center; width: 18px; height: 18px; margin: 1px 0; border-radius: 50%; background: var(--ind); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.mfea .mfea-ficha {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--mfea-head); background: var(--mfea-head);
  color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1.25; transition: background .15s, border-color .15s;
}
.mfea .mfea-ficha span { white-space: normal; text-align: left; }
.mfea .mfea-ficha i { font-size: 8px; flex: 0 0 auto; }
.mfea .mfea-ficha:hover { background: var(--mfea-pri); border-color: var(--mfea-pri); color: #fff; }
.mfea .mfea-ficha i { color: var(--mfea-pri-s); }
.mfea .mfea-ficha:hover i { color: #fff; }

/* Detalhes recolhíveis */
.mfea-det { border: 1px solid var(--mfea-border); border-radius: 12px; background: #fff; overflow: hidden; }
.mfea-det > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  font-weight: 700; color: var(--mfea-head); font-size: 15px; background: var(--mfea-bg-s);
}
.mfea-det > summary::-webkit-details-marker { display: none; }
.mfea-det > summary > i:first-child { color: var(--mfea-pri); }
.mfea-det > summary > span { flex: 1; }
.mfea-det > summary > i:last-child { color: var(--mfea-muted); font-size: 12px; transition: transform .2s; }
.mfea-det[open] > summary > i:last-child { transform: rotate(180deg); }
.mfea-det[open] > summary { border-bottom: 1px solid var(--mfea-border-l); }
.mfea-det-corpo { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

/* Ferramentas */
.mfea-tool { border: 1px solid var(--mfea-alt-b); background: linear-gradient(180deg, #f5f9fe, #fff); border-radius: var(--mfea-r); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.mfea-tool-head { display: flex; gap: 12px; align-items: flex-start; }
.mfea-tool-head > i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--mfea-alt-bg); color: var(--mfea-alt); flex: 0 0 auto; }
.mfea-tool-head strong { font-size: 16px; display: block; }
.mfea-tool-head p { font-size: 13.5px; color: var(--mfea-muted); margin-top: 2px; }
.mfea-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mfea-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mfea-campo label { font-size: 13px; font-weight: 700; color: var(--mfea-head); margin: 0; }
.mfea .mfea-campo select, .mfea .mfea-campo input,
.mfea-modal .mfea-campo select, .mfea-modal .mfea-campo input,
.mfea .mfea-calc-conc, .mfea-modal .mfea-calc-conc {
  width: 100%; min-height: 48px; font-size: 16px; font-family: inherit; color: var(--mfea-head);
  padding: 10px 38px 10px 12px; border: 1px solid var(--mfea-border); border-radius: 10px; background-color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: manipulation; margin: 0; box-shadow: none;
}
.mfea .mfea-campo input, .mfea-modal .mfea-campo input { padding-right: 12px; }
.mfea-tool-res {
  padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px dashed var(--mfea-border); font-size: 14.5px; color: var(--mfea-muted);
}
.mfea-tool-res.mfea-res-info    { border: 1px solid var(--mfea-alt-b);  background: var(--mfea-alt-bg);  color: var(--mfea-body); }
.mfea-tool-res.mfea-res-ok      { border: 1px solid var(--mfea-ok-b);   background: var(--mfea-ok-bg);   color: var(--mfea-body); }
.mfea-tool-res.mfea-res-atencao { border: 1px solid var(--mfea-warn-b); background: var(--mfea-warn-bg); color: var(--mfea-body); }
.mfea-tool-res.mfea-res-perigo  { border: 1px solid var(--mfea-dang-b); background: var(--mfea-dang-bg); color: var(--mfea-body); }
.mfea-tool-nota { display: flex; gap: 8px; font-size: 12.5px; color: var(--mfea-muted); margin: 0; }
.mfea-tool-nota i { color: var(--mfea-warn); margin-top: 3px; }
.mfea-calc-lista { display: flex; flex-direction: column; gap: 8px; }
.mfea-calc-item {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 12px; align-items: center;
  padding: 12px 14px; background: #fff; border: 1px solid var(--mfea-border-l); border-radius: 12px;
}
.mfea-calc-nome { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mfea-calc-nome > span { font-size: 12.5px; color: var(--mfea-muted); }
.mfea .mfea-calc-conc, .mfea-modal .mfea-calc-conc { min-height: 40px; font-size: 16px; padding: 6px 30px 6px 10px; margin-top: 4px; max-width: 220px; }
.mfea-calc-saida { text-align: right; display: flex; flex-direction: column; }
.mfea-calc-dose { font-size: 20px; font-weight: 800; color: var(--mfea-pri-dd); }
.mfea-calc-sub { font-size: 12.5px; color: var(--mfea-muted); }
.mfea-calc-sub b { color: var(--mfea-warn); }

/* Referências */
.mfea-refs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mfea-ref {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 14px 16px; border: 1px solid var(--mfea-border); border-radius: 14px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.mfea-ref:hover { border-color: var(--mfea-pri-b); box-shadow: var(--mfea-sh); }
.mfea-ref-n { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--mfea-head); color: #fff; font-weight: 800; font-size: 13px; }
.mfea-ref-c { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mfea-ref-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mfea-ref-tipo { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.mfea-ref-of  { background: var(--mfea-ok-bg); color: var(--mfea-ok); }
.mfea-ref-dir { background: var(--mfea-alt-bg); color: var(--mfea-alt); }
.mfea-ref-man { background: var(--mfea-prova-bg); color: var(--mfea-prova); }
.mfea-ref-art { background: var(--mfea-warn-bg); color: var(--mfea-warn); }
.mfea-ref-ano { font-size: 12px; font-weight: 700; color: var(--mfea-muted); }
.mfea-ref-txt { font-size: 13.5px; line-height: 1.6; color: var(--mfea-body); overflow-wrap: anywhere; }
.mfea-ref-txt strong { display: inline; color: var(--mfea-head); }
.mfea-ref-txt a { color: var(--mfea-pri-d); font-weight: 600; }
.mfea-aviso { background: var(--mfea-bg); }

/* =========================================================
   LATERAL
   ========================================================= */
.mfea-side-card { background: var(--mfea-bg); border: 1px solid var(--mfea-border); border-radius: var(--mfea-r); padding: 18px; box-shadow: var(--mfea-sh); }
.mfea .mfea-side-card h3, .mfea-modal .mfea-side-card h3 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mfea-side-card h3 i { color: var(--mfea-pri); }
.mfea-side-card.mfea-side-info { padding: 0; overflow: hidden; }
.mfea .mfea-side-info .mfea-side-head, .mfea-modal .mfea-side-info .mfea-side-head {
  margin: 0; padding: 15px 18px; border-bottom: 1px solid var(--mfea-border); font-size: 13.5px; font-weight: 800;
  letter-spacing: .03em; text-transform: uppercase; color: var(--mfea-navy);
}
.mfea-side-info dl { margin: 0; }
.mfea-side-info dl > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--mfea-border-l); }
.mfea-side-info dl > div:last-child { border-bottom: 0; }
.mfea-side-info dl > div > i { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--mfea-pri-l); color: var(--mfea-pri-d); font-size: 12px; }
.mfea-side-info dt { font-size: 12px; font-weight: 800; color: var(--mfea-navy); line-height: 1.4; }
.mfea-side-info dd { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--mfea-body); }
.mfea-side-list { display: flex; flex-direction: column; gap: 10px; }
.mfea-side-item { display: flex; gap: 10px; align-items: flex-start; }
.mfea-side-item > i {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--mfea-warn-bg); color: var(--mfea-warn); font-size: 13px;
}
.mfea-side-item strong { display: block; font-size: 13.5px; }
.mfea-side-item p { font-size: 13px; line-height: 1.45; margin: 0; }
.mfea-rel-off {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  border: 1px dashed var(--mfea-border); color: var(--mfea-muted);
}
.mfea-rel-off > i { width: 16px; text-align: center; }
.mfea-rel-off > span { flex: 1; }
.mfea-rel-off small { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.mfea-rel { display: flex; flex-direction: column; gap: 8px; }
.mfea-rel a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--mfea-border-l); background: var(--mfea-bg-s); color: var(--mfea-head); font-size: 13.5px; font-weight: 600; transition: all .15s;
}
.mfea-rel a:hover { border-color: var(--mfea-pri-b); background: var(--mfea-pri-l); }
.mfea-rel a > i:first-child { color: var(--mfea-pri); width: 16px; text-align: center; }
.mfea-rel a > span { flex: 1; }
.mfea-rel a > i:last-child { font-size: 10px; color: var(--mfea-muted); }
.mfea-prova { background: linear-gradient(160deg, #fff, var(--mfea-prova-bg)); border-color: var(--mfea-prova-b); }
.mfea .mfea-prova h3 i, .mfea-modal .mfea-prova h3 i { color: var(--mfea-prova); }
.mfea-prova p { font-size: 13.5px; }
.mfea-prova-dest { font-weight: 600; color: var(--mfea-head); }
.mfea .mfea-btn-quiz, .mfea-modal .mfea-btn-quiz {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; min-height: 44px;
  border-radius: 12px; background: var(--mfea-prova); color: #fff; font-weight: 700; font-size: 14px; transition: filter .15s;
}
.mfea .mfea-btn-quiz:hover, .mfea-modal .mfea-btn-quiz:hover { filter: brightness(1.1); background: var(--mfea-prova); color: #fff; }

.mfea-footer {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mfea-muted);
  border-top: 1px solid var(--mfea-border); padding: 18px 4px 6px; margin-top: 6px;
}
.mfea-footer i { color: var(--mfea-pri); margin-top: 3px; }

/* =========================================================
   MODAIS
   ========================================================= */
.mfea-modal {
  position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(6, 25, 45, .55); backdrop-filter: blur(3px);
}
.mfea-modal.mfea-aberto { display: flex; animation: mfea-fade .18s ease; }
@keyframes mfea-fade { from { opacity: 0; } to { opacity: 1; } }
.mfea-caixa {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  overflow-y: auto; overscroll-behavior: contain; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: mfea-sobe .22s ease;
}
@keyframes mfea-sobe { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.mfea-caixa-barra { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: flex-start; gap: 8px; height: 0; padding: 0 12px; overflow: visible; }
.mfea-caixa-barra > button { margin-top: 12px; }
.mfea-modal .mfea-x, .mfea-modal .mfea-voltar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.95); color: var(--mfea-head); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 16px;
}
.mfea-modal .mfea-voltar[hidden] { display: none; }
.mfea-modal .mfea-x:hover, .mfea-modal .mfea-voltar:hover { background: #fff; color: var(--mfea-pri); }
.mfea-conteudo { padding: 0; }

/* Popup de resumo */
.mfea-pop { display: flex; flex-direction: column; gap: 16px; padding: 0 26px 26px; }
.mfea-pop-head {
  margin: 0 -26px; padding: 30px 112px 24px 26px;
  background: linear-gradient(135deg, #c62828 0%, #9b1c1c 50%, #7a1414 100%); color: #fff;
}
.mfea-pop-kicker { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c9f1eb; margin-bottom: 6px; }
.mfea-modal .mfea-pop-head h2 { color: #fff; font-size: 23px; font-weight: 800; }
.mfea-modal .mfea-pop-head strong { color: #fff; }

/* Popup de medicamento */
.mfea-caixa.mfea-caixa-med { overflow: hidden; display: flex; flex-direction: column; max-width: 860px; height: min(780px, calc(100dvh - 40px)); }
.mfea-caixa-med .mfea-conteudo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mfea-medpop { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mfea-medpop-head { flex: 0 0 auto; display: flex; gap: 14px; align-items: center; padding: 18px 112px 14px 20px; border-bottom: 1px solid var(--mfea-border-l); }
.mfea-medpop-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: var(--mfea-pri); color: #fff; }
.mfea-medpop-classe { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mfea-pri-d); }
.mfea-modal .mfea-medpop-head h2 { font-size: 19px; font-weight: 800; margin: 1px 0; }
.mfea-medpop-head p { font-size: 12.5px; color: var(--mfea-muted); margin: 0; }
.mfea-medpop-hl { flex: 0 0 auto; margin: 14px 20px 0; display: flex; flex-direction: column; gap: 4px; background: var(--mfea-dang-bg); border: 1px solid var(--mfea-dang-b); border-radius: 12px; padding: 11px 14px; }
.mfea-medpop-hl > span { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mfea-dang); }
.mfea-modal .mfea-medpop-hl > strong { font-size: 15px; font-weight: 800; color: var(--mfea-dang); line-height: 1.5; }
.mfea-mtabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 10px 20px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--mfea-border); }
.mfea-mtabs::-webkit-scrollbar { display: none; }
.mfea-modal .mfea-mtab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; margin-bottom: -1px;
  font-size: 13px; font-weight: 700; color: #64748b; border-bottom: 3px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s;
}
.mfea-modal .mfea-mtab:hover { color: var(--mfea-head); background: none; }
.mfea-modal .mfea-mtab.mfea-on { color: var(--mfea-head); border-bottom-color: var(--mfea-pri); }
.mfea-mtab.mfea-on i { color: var(--mfea-pri); }
.mfea-mpanes { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 22px; }
.mfea-mpane { display: none; flex-direction: column; gap: 12px; }
.mfea-mpane.mfea-on { display: flex; animation: mfea-in .2s ease; }
.mfea-mpane > * { margin: 0; }
.mfea-modal .mfea-lead { font-size: 15px; line-height: 1.7; color: var(--mfea-head); font-weight: 500; }
.mfea-modal .mfea-msub {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mfea-head); padding-bottom: 6px; border-bottom: 1px solid var(--mfea-border-l); margin-top: 6px;
}
.mfea-msub i { color: var(--mfea-pri); }
.mfea-kv { margin: 0; display: grid; border: 1px solid var(--mfea-border-l); border-radius: 12px; overflow: hidden; }
.mfea-kv > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--mfea-border-l); background: #fff; }
.mfea-kv > div:nth-child(even) { background: var(--mfea-bg-s); }
.mfea-kv > div:last-child { border-bottom: 0; }
.mfea-kv dt { font-size: 13px; font-weight: 800; color: var(--mfea-head); line-height: 1.5; }
.mfea-kv dd { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--mfea-body); }

/* Modal rápido (celular) */
.mfea-quick .mfea-side-card { box-shadow: none; }

/* Zoom de imagem */
.mfea-zoom .mfea-caixa { max-width: 1100px; background: #0b1622; }
.mfea-zoom img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 120px); object-fit: contain; }
.mfea-zoom figcaption { color: #c9d8ea; font-size: 13px; text-align: center; padding: 10px 16px 14px; }

/* Quiz */
.mfea-quiz { padding: 0 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.mfea-quiz .mfea-pop-head { background: linear-gradient(135deg, #7b56d6, #5534a8); }
.mfea-quiz-corpo { display: flex; flex-direction: column; gap: 16px; }
.mfea-quiz-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--mfea-muted); }
.mfea-quiz-nivel { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: var(--mfea-prova-bg); color: var(--mfea-prova); }
.mfea-quiz-barra { height: 6px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.mfea-quiz-barra span { display: block; height: 100%; background: var(--mfea-prova); transition: width .3s; }
.mfea-modal .mfea-quiz-perg { font-size: 18px; font-weight: 700; line-height: 1.45; }
.mfea-quiz-ops { display: flex; flex-direction: column; gap: 10px; }
.mfea-modal .mfea-quiz-op {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--mfea-border); background: #fff; font-size: 15px; line-height: 1.45; transition: all .15s;
}
.mfea-modal .mfea-quiz-op:hover:not(:disabled) { border-color: var(--mfea-prova-b); background: var(--mfea-prova-bg); }
.mfea-quiz-letra { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #eef1f6; color: var(--mfea-head); }
.mfea-modal .mfea-quiz-op.mfea-certa { border-color: var(--mfea-ok); background: var(--mfea-ok-bg); }
.mfea-modal .mfea-quiz-op.mfea-certa .mfea-quiz-letra { background: var(--mfea-ok); color: #fff; }
.mfea-modal .mfea-quiz-op.mfea-errada { border-color: var(--mfea-dang); background: var(--mfea-dang-bg); }
.mfea-modal .mfea-quiz-op.mfea-errada .mfea-quiz-letra { background: var(--mfea-dang); color: #fff; }
.mfea-modal .mfea-quiz-op:disabled { cursor: default; }
.mfea-quiz-exp { padding: 14px 16px; border-radius: 12px; background: var(--mfea-bg-s); border-left: 4px solid var(--mfea-prova); font-size: 14.5px; }
.mfea-quiz-exp small { display: block; margin-top: 8px; color: var(--mfea-muted); font-size: 12.5px; }
.mfea-modal .mfea-quiz-btn {
  align-self: flex-end; min-height: 46px; padding: 10px 22px; border-radius: 12px; background: var(--mfea-prova); color: #fff; font-weight: 700; font-size: 15px;
}
.mfea-modal .mfea-quiz-btn:disabled { opacity: .4; cursor: not-allowed; }
.mfea-quiz-placar { text-align: center; padding: 10px 0; }
.mfea-quiz-placar strong { display: block; font-size: 44px; font-weight: 800; color: var(--mfea-prova); line-height: 1.1; }
.mfea-quiz-rev { display: flex; flex-direction: column; gap: 10px; }
.mfea-quiz-rev > div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--mfea-border); font-size: 14px; }
.mfea-quiz-rev > div.mfea-certa { border-color: var(--mfea-ok-b); background: var(--mfea-ok-bg); }
.mfea-quiz-rev > div.mfea-errada { border-color: var(--mfea-dang-b); background: var(--mfea-dang-bg); }

html.mfea-trava, html.mfea-trava body { overflow: hidden; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1100px) {
  .mfea-page { grid-template-columns: minmax(0, 1fr) 236px; gap: 18px; }
  .mfea-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfea-col-4, .mfea-gal-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .mfea-page { grid-template-columns: 1fr; }
  .mfea-side, .mfea-resumo { display: none; }
  .mfea-hero { padding: 28px 22px 24px; border-radius: 18px; }
  .mfea-hero-sub { font-size: 15px; }
  .mfea .mfea-quickbtn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-bottom: 12px;
    border-radius: 14px; background: var(--mfea-head); color: #fff; font-weight: 700; font-size: 15px;
  }
  .mfea .mfea-quickbtn i { color: var(--mfea-pri-s); }
  .mfea-tabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mfea .mfea-tab { flex: 0 0 156px; }
  .mfea-rotas { grid-template-columns: minmax(0, 1fr); }
  .mfea .mfea-rota-head { min-height: 0; }
  .mfea-tabs::-webkit-scrollbar { display: none; }
  .mfea-figcard { grid-template-columns: 1fr; }
  .mfea-col-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfea-essencial ol { grid-template-columns: 1fr; }
  .mfea-passos-fluxo { flex-direction: column; gap: 8px; }
  .mfea-passos-fluxo > li { padding: 10px 14px 10px 52px; }
  .mfea-passos-fluxo > li::before { left: 12px; top: 50%; transform: translateY(-50%); }
  .mfea-passos-fluxo .mfea-passo-tit { margin-top: 0; }
  .mfea-kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (max-width: 700px) {
  .mfea-card { padding: 18px 16px; border-radius: 14px; }
  .mfea .mfea-card-tit { font-size: 18px; }
  .mfea-col-2, .mfea-col-3, .mfea-col-4 { grid-template-columns: 1fr; }
  .mfea-galeria, .mfea-gal-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mfea-gal-n1 { grid-template-columns: 1fr; }
  .mfea-gal-txt { padding: 10px 12px 12px; }

  /* tabelas viram cartões */
  .mfea-tabela-wrap { border: 0; overflow: visible; }
  .mfea-tabela, .mfea-tabela tbody, .mfea-tabela tr, .mfea-tabela td { display: block; width: 100%; }
  .mfea-tabela thead { display: none; }
  .mfea-tabela tr { border: 1px solid var(--mfea-border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: #fff; }
  .mfea-tabela tbody tr:nth-child(even) td { background: #fff; }
  .mfea-tabela td { padding: 8px 14px; border-bottom: 1px solid var(--mfea-border-l); }
  .mfea-tabela td::before {
    content: attr(data-label); display: block; font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .05em; color: var(--mfea-muted); margin-bottom: 2px;
  }
  .mfea-tabela td:first-child { background: var(--mfea-bg-s); padding-top: 12px; }
  .mfea-tabela tbody tr:nth-child(even) td:first-child { background: var(--mfea-bg-s); }
  .mfea-tabela td:first-child::before { display: none; }
  .mfea-calc-item { grid-template-columns: 1fr; }
  .mfea-calc-saida { text-align: left; }

  .mfea-modal { padding: 0; align-items: flex-end; }
  .mfea-caixa.mfea-caixa-med { height: 92dvh; }
  .mfea-caixa { max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; }
  .mfea-pop, .mfea-quiz { padding: 0 18px 22px; }
  .mfea-pop-head { margin: 0 -18px; padding: 26px 104px 20px 18px; }
  .mfea-medpop-head { padding: 16px 100px 12px 16px; }
  .mfea-medpop-hl { margin: 12px 16px 0; }
  .mfea-mtabs { padding: 8px 16px 0; }
  .mfea-mpanes { padding: 16px 16px 20px; }
  .mfea-rota-corpo { padding: 16px 14px 18px 18px; }
  .mfea-ref { grid-template-columns: 1fr; gap: 8px; }
  .mfea-dose-wrap { border: 0; overflow: visible; background: none; }
  .mfea-dose-tab, .mfea-dose-tab tbody { display: block; width: 100%; min-width: 0; }
  .mfea-dose-tab thead { display: none; }
  .mfea-dose-tab tbody { display: flex; flex-wrap: wrap; border: 1px solid var(--mfea-border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; background: #fff; }
  .mfea-dose-tab tr { display: contents; }
  .mfea-dose-tab td { display: block; padding: 8px 14px; border: 0; border-bottom: 1px solid #edf1f4; }
  .mfea-dose-tab tbody + tbody tr:first-child td { border-top: 0; }
  .mfea-dose-tab td.mfea-dose-ind { order: 0; width: 100%; border-right: 0; padding: 11px 14px; }
  .mfea-fichas { flex-direction: row; flex-wrap: wrap; }
  .mfea-dose-tab td.mfea-dose-main { order: 1; width: 100%; padding-bottom: 2px; border-bottom: 0; }
  .mfea-dose-tab td.mfea-dose-f, .mfea-dose-tab td.mfea-dose-d { order: 1; width: 50%; padding-top: 2px; }
  .mfea-dose-tab td.mfea-dose-obs { order: 2; width: 100%; border-left: 0; border-bottom: 0; }
  .mfea-dose-tab td.mfea-dose-f::before, .mfea-dose-tab td.mfea-dose-d::before, .mfea-dose-tab td.mfea-dose-obs::before {
    content: attr(data-label); display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--mfea-muted);
  }
  .mfea-dose-main strong { font-size: 15px; }
  .mfea-zoom { align-items: center; padding: 10px; }
  .mfea-zoom .mfea-caixa { border-radius: 14px; }
}

/* =========================================================
   COMPONENTES DO ATLAS (imagem principal, estrutura em destaque,
   visor, vídeo, imagem pendente, diferencial, registro)
   ========================================================= */

/* Imagem principal (Visão geral do modelo completo) */
.mfea-principal { display: flex; flex-direction: column; gap: 8px; }
.mfea .mfea-principal .mfea-fig-btn { border-radius: 18px; border: 1px solid var(--mfea-border); background: #fff; }
.mfea-principal .mfea-fig-btn img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; background: #f4f7fa; transition: transform .3s; }
.mfea-principal .mfea-fig-btn:hover img { transform: scale(1.015); }
.mfea-principal .mfea-pend { min-height: 280px; }

/* "Principais achados" + "Estrutura em destaque" */
.mfea-destaque { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.mfea-destaque-pe { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.mfea-achados { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: mfeaa; display: flex; flex-direction: column; gap: 8px; }
.mfea-achados li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.55; counter-increment: mfeaa; }
.mfea-achados li::before {
  content: counter(mfeaa); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; background: var(--mfea-pri-l); color: var(--mfea-pri-d); font-size: 12px; font-weight: 800;
}
.mfea .mfea-estrutura .mfea-fig-btn { border: 1px solid var(--mfea-border); background: #fff; }
.mfea-estrutura .mfea-fig-btn img { display: block; width: 100%; height: auto; }
.mfea-estrutura p { font-size: 14px; }

/* Imagem / mídia genérica */
.mfea .mfea-fig-btn img, .mfea-modal .mfea-fig-btn img { display: block; width: 100%; height: auto; }

/* Imagem pendente: visitante vê ícone discreto; editor vê a descrição */
.mfea-pend {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 190px; padding: 18px; border-radius: 14px; color: #8aa0b3; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(135deg, var(--mfea-pri-l), #f4f8fc); border: 1px solid var(--mfea-border-l);
}
.mfea-pend > i { font-size: 30px; color: #9fd6cf; }
.mfea-pend-adm { border: 2px dashed #e3a634; background: #fffaf0; color: #7a5a14; align-items: stretch; text-align: left; }
.mfea-pend-adm > i { color: #e3a634; align-self: center; }
.mfea .mfea-pend-adm strong, .mfea-modal .mfea-pend-adm strong { color: #7a4b00; text-align: center; font-size: 14px; display: block; }
.mfea-pend-adm span { font-size: 12px; font-weight: 500; line-height: 1.5; }
.mfea-pend-adm em { display: block; font-style: normal; font-weight: 500; font-size: 12.5px; line-height: 1.55; color: #4b3a12; background: #fff; border: 1px solid #f5dcaa; border-radius: 10px; padding: 8px 10px; }
.mfea-pend-adm small { font-size: 10.5px; text-align: center; opacity: .8; }

/* Visor (imagem clínica ↔ esquema, com leitura guiada) */
.mfea-visor { display: flex; flex-direction: column; gap: 12px; }
.mfea-seg { display: inline-flex; align-self: flex-start; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--mfea-bg-s); border: 1px solid var(--mfea-border); border-radius: 12px; max-width: 100%; }
.mfea .mfea-seg-btn, .mfea-modal .mfea-seg-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px;
  font-size: 12.8px; font-weight: 700; color: #64748b; transition: all .2s; white-space: nowrap;
}
.mfea .mfea-seg-btn:hover { color: var(--mfea-pri-d); }
.mfea .mfea-seg-btn.mfea-on { background: #fff; color: var(--mfea-pri-dd); box-shadow: 0 2px 8px rgba(43, 76, 126, .12); }
.mfea-vista { display: flex; flex-direction: column; gap: 10px; animation: mfea-in .25s ease; }
.mfea-vista[hidden] { display: none; }
.mfea-visor-frame { position: relative; }
.mfea .mfea-visor-frame .mfea-fig-btn { border-radius: 18px; border: 1px solid var(--mfea-border); background: #fff; }
.mfea-visor-frame .mfea-fig-btn img { max-height: 600px; object-fit: contain; background: #f4f7fa; }
.mfea-visor-frame .mfea-pend { min-height: 260px; }
.mfea-visor-tag {
  position: absolute; left: 14px; top: 14px; z-index: 2; background: rgba(15, 23, 42, .72); color: #fff; pointer-events: none;
  border-radius: 999px; padding: 5px 11px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.mfea-visor-cap { font-size: 13px; line-height: 1.6; color: var(--mfea-muted); margin: 0; }
.mfea-leitura { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.mfea-leitura-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfea-navy); }
.mfea-leitura-t i { color: var(--mfea-pri); }
.mfea-leitura-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mfea-leitura-lista li { display: flex; gap: 11px; align-items: flex-start; background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-radius: 12px; padding: 12px 13px; min-width: 0; }
.mfea-leitura-n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; background: var(--mfea-pri); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.mfea .mfea-leitura-lista b { display: block; font-size: 13.5px; color: var(--mfea-head); margin-bottom: 2px; }
.mfea-leitura-lista span { display: block; font-size: 13px; line-height: 1.6; }
/* número do roteiro: centralizado (a regra acima também pega este span) */
.mfea-leitura-lista .mfea-leitura-n { display: grid; place-items: center; text-align: center; font-size: 11.5px; line-height: 1; }
/* texto que acompanha uma vista do visor (ex.: Estrutura em destaque no modelo completo) */
.mfea-visor-txt { display: flex; flex-direction: column; gap: 8px; background: var(--mfea-bg-s); border: 1px solid var(--mfea-border-l); border-radius: 12px; padding: 12px 14px; }
.mfea-visor-txt p { margin: 0; font-size: 14px; line-height: 1.65; }

/* Vídeo */
.mfea-video { border-radius: 16px; overflow: hidden; background: #0b1622; border: 1px solid var(--mfea-border); }
.mfea-video video { display: block; width: 100%; max-height: 560px; background: #0b1622; }
.mfea-fig-video .mfea-pend { min-height: 220px; }

/* Galeria (fotos com legenda longa) */
.mfea-gal-midia { position: relative; }
.mfea-gal-midia .mfea-pend { aspect-ratio: 4 / 3; min-height: 0; border-radius: 0; border: 0; }
.mfea-gal-midia .mfea-video { border-radius: 0; border: 0; }
.mfea-gal-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mfea-gal-tags span { font-size: 11px; font-weight: 700; color: var(--mfea-pri-dd); background: var(--mfea-pri-l); border-radius: 7px; padding: 3px 8px; }
.mfea-gal-n2 .mfea-gal-txt p, .mfea-gal-n1 .mfea-gal-txt p { font-size: 13.8px; line-height: 1.6; }

/* Intro de aba */
.mfea-intro { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--mfea-r-s); background: var(--mfea-navy-l); border: 1px solid var(--mfea-border); font-size: 14.5px; }
.mfea-intro > i { color: var(--mfea-navy); margin-top: 4px; }

/* Diagnóstico diferencial */
.mfea-dif { border: 1px solid var(--mfea-border); border-radius: 14px; overflow: hidden; background: #fff; }
.mfea-dif-head, .mfea-dif-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.3fr); }
.mfea-dif-head span { padding: 11px 14px; background: var(--mfea-bg-s); border-bottom: 1px solid var(--mfea-border); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfea-muted); }
.mfea-dif-row > div { padding: 12px 14px; border-bottom: 1px solid var(--mfea-border-l); font-size: 14px; line-height: 1.55; min-width: 0; }
.mfea-dif-row:last-child > div { border-bottom: 0; }
.mfea-dif-row > div small { display: none; }
.mfea-dif-nome { display: flex; gap: 10px; align-items: flex-start; background: #fbfdff; }
.mfea-dif-nome > i { color: var(--mfea-pri); margin-top: 4px; width: 16px; text-align: center; flex: 0 0 auto; }
.mfea .mfea-dif-nome a { font-weight: 700; color: var(--mfea-pri-d); text-decoration: none; }
.mfea-dif-nome a i { font-size: 10px; margin-left: 6px; }
.mfea .mfea-dif-nome a:hover { text-decoration: underline; }
.mfea-dif-perigo .mfea-dif-nome > i { color: var(--mfea-dang); }
.mfea-dif-atencao .mfea-dif-nome > i { color: var(--mfea-warn); }
.mfea-dif-atual .mfea-dif-nome { background: var(--mfea-pri-l); }

/* Registro (modelo de prontuário) */
.mfea-registro { border: 1px solid var(--mfea-pri-b); border-radius: 14px; overflow: hidden; background: #fff; }
.mfea-registro-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--mfea-pri-l); color: var(--mfea-pri-dd); }
.mfea-registro-head b { flex: 1; font-size: 14px; }
.mfea .mfea-copiar { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: #fff; color: var(--mfea-pri-dd); border: 1px solid var(--mfea-pri-b); }
.mfea .mfea-copiar:hover { background: var(--mfea-pri); color: #fff; }
.mfea .mfea-registro-txt { padding: 14px 16px; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; color: var(--mfea-head); }
.mfea-registro-pe { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px dashed var(--mfea-border); font-size: 12.5px; color: var(--mfea-muted); }
.mfea-registro-pe i { color: var(--mfea-pri); margin-top: 3px; }

/* Botão "Informações rápidas" (celular) e cards-resumo dentro do modal */
.mfea-quick-resumo { display: flex; flex-direction: column; gap: 8px; }
.mfea-modal .mfea-quick-resumo button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--mfea-border); background: #fff; }
.mfea-modal .mfea-quick-resumo button:hover { border-color: var(--mfea-pri-b); background: var(--mfea-pri-l); }
.mfea-quick-resumo button > i:first-child { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mfea-pri-l); color: var(--mfea-pri); }
.mfea-quick-resumo button > span { flex: 1; font-size: 13px; line-height: 1.45; }
.mfea-quick-resumo button > span strong { display: block; font-size: 14px; }
.mfea-quick-resumo button > i:last-child { color: var(--mfea-muted); font-size: 11px; }
.mfea-quick .mfea-side-card { box-shadow: none; }
.mfea .mfea-quickbtn > span { flex: 1; text-align: left; }

/* Zoom: setas para navegar entre as imagens da aba */
.mfea-zoom .mfea-caixa { position: relative; }
.mfea-zoom figure { margin: 0; }
.mfea-modal .mfea-zoom-nav {
  display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 44px; height: 44px; border-radius: 50%;
  place-items: center; background: rgba(255,255,255,.92); color: var(--mfea-head); box-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: 16px;
}
.mfea-modal.mfea-zoom-multi .mfea-zoom-nav { display: grid; }
.mfea-zoom-ant { left: 10px; }
.mfea-zoom-prox { right: 10px; }

/* =========================================================
   RESPONSIVO DOS COMPONENTES DO ATLAS
   ========================================================= */
@media (max-width: 1100px) {
  .mfea-destaque { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .mfea .mfea-quickbtn { justify-content: space-between; background: var(--mfea-navy-l); color: var(--mfea-navy); border: 1px solid var(--mfea-border); font-weight: 800; font-size: 14px; padding: 0 16px; }
  .mfea .mfea-quickbtn i { color: var(--mfea-pri); }
  .mfea-destaque, .mfea-destaque-pe { grid-template-columns: 1fr; }
  .mfea-hero-ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfea-leitura-lista { grid-template-columns: 1fr; }
  .mfea .mfea-tab { flex: 0 0 auto; min-width: 132px; padding: 10px 14px; }
}
@media (max-width: 700px) {
  .mfea-hero { padding: 24px 18px 22px; }
  .mfea-hero-tag { font-size: 10px; letter-spacing: .06em; }
  .mfea-hero-ficha dd { font-size: 13px; }
  .mfea-galeria.mfea-gal-n2, .mfea-galeria.mfea-gal-n3 { grid-template-columns: 1fr; }
  .mfea-dif-head { display: none; }
  .mfea-dif-row { grid-template-columns: 1fr; border-bottom: 1px solid var(--mfea-border); }
  .mfea-dif-row:last-child { border-bottom: 0; }
  .mfea-dif-row > div { border-bottom: 0; padding: 8px 14px; }
  .mfea-dif-row > div:first-child { padding-top: 12px; }
  .mfea-dif-row > div:last-child { padding-bottom: 14px; }
  .mfea-dif-row > div small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mfea-muted); }
  .mfea .mfea-seg { display: flex; align-self: stretch; }
  .mfea .mfea-seg-btn { flex: 1 1 0; justify-content: center; padding: 8px; }
  .mfea-modal .mfea-zoom-nav { width: 38px; height: 38px; }
}

/* =========================================================
   EMERGÊNCIA — calculadoras com conta própria (bloco 'calculadora')
   ========================================================= */
.mfea-calcx { border-color: var(--mfea-pri-b); background: linear-gradient(180deg, #fff7f7, #fff); }
.mfea-calcx .mfea-tool-head > i { background: var(--mfea-pri-l); color: var(--mfea-pri); }
.mfea-campo-largo { grid-column: 1 / -1; }
.mfea-score-tit { font-size: 13px; font-weight: 800; color: var(--mfea-head); margin: 2px 0 -4px; }
.mfea-score { display: flex; flex-direction: column; gap: 8px; }
.mfea .mfea-score-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; border: 1.5px solid var(--mfea-border-l); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; margin: 0; }
.mfea .mfea-score-item:hover { border-color: var(--mfea-pri-b); }
.mfea .mfea-score-item.mfea-on { border-color: var(--mfea-pri); background: var(--mfea-pri-l); }
.mfea .mfea-score-item input { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: var(--mfea-pri); cursor: pointer; }
.mfea-score-text { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--mfea-body); font-weight: 600; }
.mfea-score-text small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--mfea-muted); }
.mfea-score-pts { flex: 0 0 auto; background: var(--mfea-pri); color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 3px 10px; white-space: nowrap; }
.mfea-score-pts.mfea-score-neg { background: var(--mfea-ok); }
.mfea-calc-resultados { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mfea-calc-res { border: 1px solid var(--mfea-border); background: #fff; border-radius: 12px; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; }
.mfea-calc-res span { font-size: 11px; font-weight: 800; color: var(--mfea-muted); text-transform: uppercase; letter-spacing: .05em; }
.mfea-calc-res strong { font-size: 22px; font-weight: 800; color: var(--mfea-head); line-height: 1.15; overflow-wrap: anywhere; }
.mfea-calc-res-dest { border-color: var(--mfea-pri-b); background: linear-gradient(135deg, var(--mfea-pri-l), #fff); }
.mfea-calc-res-dest strong { color: var(--mfea-pri-d); font-size: 26px; }
.mfea-calc-leitura { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--mfea-pri-b); background: var(--mfea-pri-l); }
.mfea-calc-leitura > span { font-size: 11px; font-weight: 800; color: var(--mfea-pri-d); text-transform: uppercase; letter-spacing: .05em; }
.mfea-calc-leitura strong { font-size: 15px; color: var(--mfea-head); }
.mfea-calc-leitura small { font-size: 13px; color: var(--mfea-body); }
.mfea-calc-leitura small:empty { display: none; }
.mfea-destaque-pe.mfea-destaque-um { grid-template-columns: 1fr; }
@media (max-width: 600px) {
  .mfea-calc-resultados { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfea-calc-res strong { font-size: 18px; }
  .mfea-calc-res-dest strong { font-size: 21px; }
  .mfea .mfea-campo input, .mfea .mfea-campo select { font-size: 16px; }
}

/* =========================================================
 * BLOCO ECG (traçados gerados por ecg.js)
 * ========================================================= */
:is(.mfea, .mfea-modal) .mfea-ecg { border: 1px solid var(--mfea-border); border-radius: var(--mfea-r-s); background: var(--mfea-bg); padding: 16px; margin: 14px 0; }
:is(.mfea, .mfea-modal) .mfea-ecg-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
:is(.mfea, .mfea-modal) .mfea-ecg-top strong { display: block; color: var(--mfea-head); font-size: 15.5px; font-weight: 800; line-height: 1.3; }
:is(.mfea, .mfea-modal) .mfea-ecg-top p { margin: 3px 0 0; font-size: 13.5px; color: var(--mfea-muted); line-height: 1.5; }
:is(.mfea, .mfea-modal) .mfea-ecg-ico { flex: 0 0 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--mfea-pri-l); color: var(--mfea-pri); }
:is(.mfea, .mfea-modal) .mfea-ecg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
:is(.mfea, .mfea-modal) .mfea-ecg-chip { border: 1px solid var(--mfea-border); background: var(--mfea-bg-s); color: var(--mfea-body); border-radius: 999px; padding: 6px 12px; font: 600 12.5px/1.2 Inter, sans-serif; cursor: pointer; transition: .15s; }
:is(.mfea, .mfea-modal) .mfea-ecg-chip:hover { border-color: var(--mfea-pri-b); color: var(--mfea-pri-d); }
:is(.mfea, .mfea-modal) .mfea-ecg-chip.mfea-on { background: var(--mfea-pri); border-color: var(--mfea-pri); color: #fff; }
:is(.mfea, .mfea-modal) .mfea-ecg-item { margin: 0; }
:is(.mfea, .mfea-modal) .mfea-ecg-item[hidden] { display: none; }
:is(.mfea, .mfea-modal) .mfea-ecg-papel { position: relative; border: 1px solid #f2c9cf; border-radius: 10px; overflow: hidden; background: #fff8f8; }
:is(.mfea, .mfea-modal) .mfea-ecg-rol { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
:is(.mfea, .mfea-modal) .mfea-ecg-svg { min-width: 560px; }
:is(.mfea, .mfea-modal) .mfea-ecg-svg.mfea-ecg-12 { min-width: 720px; }
:is(.mfea, .mfea-modal) .mfea-ecg-svg svg { display: block; width: 100%; height: auto; }
:is(.mfea, .mfea-modal) .mfea-ecg-zoom { position: absolute; right: 8px; top: 8px; z-index: 2; border: 1px solid var(--mfea-pri-b); background: rgba(255, 255, 255, .92); color: var(--mfea-pri-d); border-radius: 8px; padding: 5px 10px; font: 700 12px/1 Inter, sans-serif; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
:is(.mfea, .mfea-modal) .mfea-ecg-zoom:hover { background: var(--mfea-pri); color: #fff; }
:is(.mfea, .mfea-modal) .mfea-ecg-item figcaption { margin-top: 10px; font-size: 14px; color: var(--mfea-body); line-height: 1.55; }
:is(.mfea, .mfea-modal) .mfea-ecg-item figcaption p { margin: 4px 0; }
:is(.mfea, .mfea-modal) .mfea-ecg-nome { color: var(--mfea-pri-d); font-size: 14px; }
:is(.mfea, .mfea-modal) .mfea-ecg-ach { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
:is(.mfea, .mfea-modal) .mfea-ecg-ach li { position: relative; padding-left: 18px; font-size: 13.5px; }
:is(.mfea, .mfea-modal) .mfea-ecg-ach li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--mfea-pri); }
:is(.mfea, .mfea-modal) .mfea-ecg-nota { margin: 12px 0 0; font-size: 12px; color: var(--mfea-muted); display: flex; gap: 6px; align-items: flex-start; line-height: 1.45; }
:is(.mfea, .mfea-modal) .mfea-ecg-nota i { margin-top: 2px; }
:is(.mfea, .mfea-modal) .mfea-ecg-erro { padding: 16px; color: var(--mfea-dang); font-size: 13px; }
.mfea-ecg-ov { position: fixed; inset: 0; z-index: 1000001; background: rgba(15, 23, 42, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mfea-ecg-ov-box { background: #fff; border-radius: 14px; width: min(1400px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.mfea-ecg-ov-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f1d5d9; font: 700 14px/1.3 Inter, sans-serif; color: #7a1414; }
.mfea-ecg-ov-x { border: 0; background: #fdecec; color: #9b1c1c; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.mfea-ecg-ov-scroll { overflow: auto; padding: 10px; }
.mfea-ecg-ov-scroll svg { display: block; width: 100%; min-width: 900px; height: auto; }
.mfea-ecg-ov-12 .mfea-ecg-ov-scroll svg { min-width: 1100px; }
html.mfea-ecg-trava { overflow: hidden; }
@media (max-width: 640px) {
  :is(.mfea, .mfea-modal) .mfea-ecg { padding: 12px; }
  :is(.mfea, .mfea-modal) .mfea-ecg-chip { font-size: 12px; padding: 6px 10px; }
}
