/* CAMADA-MED V151 · Ultra Premium Contrast + Liquid Glass Audit
   Objetivo: preservar o sistema petróleo/dourado aprovado e recuperar a
   sensação iOS/Liquid Glass original: vidro translúcido, reflexos de safira,
   brilho especular e contraste consistente em todas as páginas públicas. */
:root{
  --cm151-bg:#020907;--cm151-bg2:#061713;--cm151-petrol:#0B2F2E;--cm151-petrol2:#0E5E66;
  --cm151-ivory:#F8F5EC;--cm151-muted:#C4CCC8;--cm151-muted2:#AEB9B5;--cm151-gold:#C6A15B;--cm151-gold2:#E6D09A;
  --cm151-sapphire:#47A9C8;--cm151-line:rgba(248,245,236,.13);--cm151-gold-line:rgba(198,161,91,.32);
  --cm151-glass:linear-gradient(142deg,rgba(255,255,255,.065) 0%,rgba(65,169,200,.035) 24%,rgba(10,47,40,.72) 46%,rgba(198,161,91,.035) 100%);
  --cm151-shadow:inset 0 1px 0 rgba(255,255,255,.11),inset 1px 0 0 rgba(71,169,200,.055),inset -1px 0 0 rgba(198,161,91,.045),0 22px 70px rgba(0,0,0,.27),0 0 34px rgba(38,129,155,.035);
}
html:has(body.cm149-theme),body.cm149-theme{background:var(--cm151-bg)!important;color-scheme:dark!important}
body.cm149-theme{color:var(--cm151-ivory)!important;background:
 radial-gradient(980px 540px at 7% -10%,rgba(14,94,102,.30),transparent 61%),
 radial-gradient(740px 420px at 96% 1%,rgba(198,161,91,.105),transparent 62%),
 radial-gradient(520px 300px at 56% 42%,rgba(32,118,145,.055),transparent 72%),
 linear-gradient(160deg,#020806 0%,#061512 47%,#020806 100%)!important;background-attachment:fixed!important}
body.cm149-theme::after{background:
 radial-gradient(540px 240px at 18% 18%,rgba(71,169,200,.055),transparent 72%),
 radial-gradient(520px 220px at 82% 38%,rgba(198,161,91,.035),transparent 74%)!important;opacity:1!important}

/* Global contrast floor: no low-contrast green/gray text on petrol */
body.cm149-theme :is(p,.lead,.subtitle,.body-text,.lib-sub,.mini-note,.note,.mute,.score-note,.v70-sub,.v73-hero-sub,.v73-microcopy,.v70-offer p,.v87-sub,.v106-profile p,.v106-layer p,.cm-demo__copy){color:rgba(248,245,236,.78)!important}
body.cm149-theme :is(small,.tiny,.meta,.caption,.microcopy,.breadcrumb,.cm-contact-note){color:rgba(248,245,236,.64)!important}
body.cm149-theme :is(h1,h2,h3,h4,h5,h6,.title,.h1,.text-title,.lib-heading,.section-title,strong){color:#FFFBF1}
body.cm149-theme :is(.kicker,.eyebrow,.library-kicker,.cm-demo__eyebrow){color:var(--cm151-gold2)!important}
body.cm149-theme :is(.green,.teal,.petrol-text,.muted-green){color:var(--cm151-muted)!important}

/* Liquid Glass surfaces: transparent enough to feel alive, opaque enough to read */
body.cm149-theme :is(.v70-glass,.v75-panel,.v106-profile,.v106-layer,.cm-demo__panel,.v87-glass,.v70-mini-card,.v70-testimonial-card,.v70-testimonial-strip,
.screen,.card,.result-card,.sticky-inner,.fbox,.score-item,
.glass,.today-hero,.sheet,.tile,.panel,.app-card,.modal-card,.qa-card,.day,.calendar-shell,
.library-intro,.year-card,.sp-banner,.subject-card,.module-card,.module-row,
.hero-card,.book-feature,.result-box,.cm-route-hero,.cm-lead-capture,.offer,.cm-bridge-card){
  background:var(--cm151-glass),linear-gradient(145deg,rgba(8,38,32,.86),rgba(3,17,14,.91))!important;
  border:1px solid var(--cm151-gold-line)!important;
  -webkit-backdrop-filter:blur(27px) saturate(1.28)!important;backdrop-filter:blur(27px) saturate(1.28)!important;
  box-shadow:var(--cm151-shadow)!important;
}
body.cm149-theme :is(.v70-glass,.v75-panel,.v106-profile,.v106-layer,.cm-demo__panel,.v87-glass,.screen,.card,.result-card,.glass,.today-hero,.sheet,.tile,.panel,.app-card,.modal-card,.qa-card,.library-intro,.year-card,.sp-banner,.subject-card,.module-card,.hero-card,.book-feature,.result-box,.cm-route-hero,.cm-lead-capture,.offer,.cm-bridge-card){transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,background .22s ease}
@media(hover:hover){body.cm149-theme :is(.v70-glass,.v75-panel,.v106-layer,.v87-glass,.tile,.app-card,.year-card,.subject-card,.module-card,.book-feature):hover{transform:translateY(-2px);border-color:rgba(230,208,154,.48)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 1px 0 0 rgba(71,169,200,.08),0 28px 78px rgba(0,0,0,.31),0 0 42px rgba(71,169,200,.045)!important}}

/* Header/nav: iOS frosted dark bar */
body.cm149-theme :is(.v70-header,.topbar,.lib-topbar,.nav,.top,.footer){background:linear-gradient(180deg,rgba(2,12,10,.84),rgba(5,28,23,.72))!important;border-color:rgba(230,208,154,.20)!important;-webkit-backdrop-filter:blur(30px) saturate(1.35)!important;backdrop-filter:blur(30px) saturate(1.35)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 16px 44px rgba(0,0,0,.18)!important}

/* Secondary chips and glass controls */
body.cm149-theme :is(.v73-chips span,.v70-chip,.value-pills span,.chip,.pill,.tag,.seg span){background:linear-gradient(145deg,rgba(255,255,255,.07),rgba(71,169,200,.025))!important;color:#F4EFE2!important;border:1px solid rgba(230,208,154,.18)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important}

/* Inputs: raise contrast on glass */
body.cm149-theme input,body.cm149-theme textarea,body.cm149-theme select{background:linear-gradient(145deg,rgba(1,12,10,.78),rgba(9,41,35,.76))!important;color:#FFF9EA!important;border-color:rgba(248,245,236,.17)!important;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}
body.cm149-theme input::placeholder,body.cm149-theme textarea::placeholder{color:rgba(248,245,236,.52)!important}

/* Gold/ivory surfaces always get dark text, never washed-out white */
body.cm149-theme :is(.btn-primary,.btn-gold,.cta-gold,.v70-gold-btn,.sp-btn,.cta-nav,.cm-badge-gold){color:#10221E!important;text-shadow:none!important}

/* Gateway keeps approved composition but gains the sapphire/iOS reflection */
body.cm149-theme.cm-gateway-page :is(.cm-profile-card,.cm-action-card,.cm-stat,.cm-social-card,.cm-case-card,.cm-contact-card,.cm-language-card,.cm-branch-card){
 background:var(--cm151-glass),linear-gradient(145deg,rgba(8,38,32,.89),rgba(3,17,14,.94))!important;
 border-color:rgba(198,161,91,.30)!important;
 -webkit-backdrop-filter:blur(28px) saturate(1.28)!important;backdrop-filter:blur(28px) saturate(1.28)!important;
 box-shadow:var(--cm151-shadow)!important}
body.cm149-theme.cm-gateway-page :is(.cm-profile-copy,.cm-action-card p,.cm-case-card p,.cm-contact-note,.cm-language-sub,.cm-social-card small){color:rgba(248,245,236,.72)!important}
body.cm149-theme.cm-gateway-page .cm-section-title{color:rgba(248,245,236,.68)!important}
body.cm149-theme.cm-gateway-page .cm-section-title b{color:rgba(230,208,154,.70)!important}
body.cm149-theme.cm-gateway-page .cm-status{color:rgba(248,245,236,.76)!important;background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(8,38,32,.72))!important;border-color:rgba(230,208,154,.23)!important}
/* V151 audit pass, round 2 · .cm-branch-card was missed by the conversion
   above (round 1), AND its text was separately already broken before round
   1 ever ran: two broad rules earlier in this same file —
   ":is(h1..strong){color:#FFFBF1}" and ":is(small,...){color:...!important}"
   — target every <strong>/<small> on the page with no awareness of which
   surface they sit on. On a dark card that's correct. On this card, still
   cream from the v3 base at the time, it produced white-on-cream: the
   worst-contrast combination, worse than the plain dark-ink original.
   Round 1 fixed the background but used single-class child selectors for
   the text; that beats the broad rules on !important alone, which is
   sufficient, but doesn't match the belt-and-suspenders pattern the file
   already uses two blocks down for .paper/.cream-card/.light-card — a
   compound ancestor+descendant :is() plus !important, immune to the broad
   rules on specificity AND importance both. This round brings
   .cm-branch-card to that same standard, so there's no ambiguity left. */
body.cm149-theme.cm-gateway-page :is(.cm-branch-card){color:var(--cm151-ivory)!important}
body.cm149-theme.cm-gateway-page .cm-branch-card :is(strong,h1,h2,h3,h4){color:#FFFBF1!important}
body.cm149-theme.cm-gateway-page .cm-branch-card :is(small,p){color:rgba(248,245,236,.72)!important}
body.cm149-theme.cm-gateway-page .cm-branch-card>b{color:var(--cm151-gold2)!important}
body.cm149-theme.cm-gateway-page .cm-branch-no{background:rgba(198,161,91,.16)!important;border-color:rgba(198,161,91,.32)!important;color:var(--cm151-gold2)!important}
@media(hover:hover){body.cm149-theme.cm-gateway-page .cm-branch-card:hover{transform:translateY(-2px);border-color:rgba(230,208,154,.48)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 1px 0 0 rgba(71,169,200,.08),0 28px 78px rgba(0,0,0,.31),0 0 42px rgba(71,169,200,.045)!important}}

/* Some legacy pages had light/beige paper blocks: enforce legibility if one survives. */
body.cm149-theme :is(.paper,.paper-card,.cream-card,.light-card,[data-surface="light"]){background:linear-gradient(150deg,#FBF8F1,#EADFC9)!important;color:#14221F!important;border-color:rgba(198,161,91,.32)!important}
body.cm149-theme :is(.paper,.paper-card,.cream-card,.light-card,[data-surface="light"]) :is(h1,h2,h3,h4,strong,b){color:#10221E!important}
body.cm149-theme :is(.paper,.paper-card,.cream-card,.light-card,[data-surface="light"]) :is(p,small,.note,.muted){color:#52605C!important}

/* Mobile polish: slightly stronger translucency and comfortable radii */
@media(max-width:780px){body.cm149-theme :is(.v70-glass,.v75-panel,.v106-profile,.v106-layer,.cm-demo__panel,.v87-glass,.screen,.card,.result-card,.glass,.today-hero,.sheet,.tile,.panel,.app-card,.library-intro,.year-card,.sp-banner,.hero-card,.book-feature,.result-box,.cm-route-hero,.offer,.cm-bridge-card){border-radius:22px!important}body.cm149-theme{background-attachment:scroll!important}}
@media(prefers-reduced-motion:reduce){body.cm149-theme *,body.cm149-theme *::before,body.cm149-theme *::after{animation:none!important;transition:none!important}}

/* V151 audit pass · targeted legacy contrast repairs ------------------------- */
/* Library/modules used an old cream-paper override with dark green text and
   !important declarations. On the approved petrol surface those became muted.
   The module experience now inherits the same ivory/gold Liquid Glass grammar. */
body.cm149-theme[data-page="modulos"] :is(.lib-logo,.brand,.lib-topbar a,.lib-topbar nav a,.breadcrumb,.lib-heading,.module-item h4,.module-header h4,.module-header strong,.module-header b,.cm-contact-copy strong){color:#FFFBF1!important}
body.cm149-theme[data-page="modulos"] :is(.lib-topbar nav a:hover,.lib-topbar nav a.active,.library-kicker,.module-num,.year-arrow){color:var(--cm151-gold2)!important}
body.cm149-theme[data-page="modulos"] :is(.lib-sub,.module-info p,.cm-contact-copy span){color:rgba(248,245,236,.74)!important}
body.cm149-theme[data-page="modulos"] :is(.module-item,.module-header,.cm-contact-link,.back-btn){
  background:var(--cm151-glass),linear-gradient(145deg,rgba(8,38,32,.88),rgba(3,17,14,.93))!important;
  border:1px solid rgba(198,161,91,.28)!important;color:#FFFBF1!important;border-radius:18px!important;
  -webkit-backdrop-filter:blur(27px) saturate(1.28)!important;backdrop-filter:blur(27px) saturate(1.28)!important;
  box-shadow:var(--cm151-shadow)!important
}
body.cm149-theme[data-page="modulos"] .module-num{background:linear-gradient(150deg,#F5E8B0,#D4B45A 38%,#A87828 82%,#4E3808)!important;color:#10221E!important}
body.cm149-theme[data-page="modulos"] .lib-topbar nav a.cta-nav,
body.cm149-theme[data-page="modulos"] .lib-topbar [data-founder-open],
body.cm149-theme[data-page="modulos"] .sp-btn{color:#10221E!important}
body.cm149-theme[data-page="modulos"] .official-logo-link>span{color:#FFFBF1!important}

/* Access-release pages had a global dark-green * selector. Keep the premium
   bridge dark and ensure all informative copy clears accessibility contrast. */
body.cm149-theme[data-page="whatsapp-bridge"] .cm-bridge-card :is(h1,h2,h3,strong,b){color:#FFF9EA!important}
body.cm149-theme[data-page="whatsapp-bridge"] .cm-bridge-card :is(p,.cm-bridge-note){color:rgba(248,245,236,.78)!important}
body.cm149-theme[data-page="whatsapp-bridge"] .cm-bridge-icon{color:var(--cm151-gold2)!important;border-color:rgba(230,208,154,.34)!important;background:rgba(230,208,154,.07)!important}

/* Superpremium/book navigation follows the same dark glass hierarchy. */
body.cm149-theme[data-page="superpremium"] :is(.brand,.nav-link,.footer-brand,.lib-logo){color:#F8F5EC!important}
body.cm149-theme[data-page="superpremium"] :is(.nav-link:hover,.nav-link.active){color:var(--cm151-gold2)!important}

/* Platform is the densest product surface. A large part of the legacy UI used
   var(--petro) as foreground text because it was originally light. On the new
   petrol glass this specifically needs an ivory foreground. */
body.cm149-theme.cm-platform-page :is(
 .day .dt b,.crono-next,.learning-action-title,.subject-next-title,.subj-v2-main b,
 .hub-next-title,.method-next-title,.cases-next-title,.case-row-main b,.case-apply-link b,
 .hub-result-main b,.hub-empty b,.subj .n b,.stat .v,.cfrow b,.sheet-card h3,.sheet-card h4,
 .section-title,.today-title,.hub-title,.method-title,.resource b,.mrow .nm b
){color:#FFF9EA!important}
body.cm149-theme.cm-platform-page :is(
 .eyebrow,.field label,.mrow .nm small,.rev .when,.today-why,.today-progress-label,.mini small,
 .day .dt small,.day .bd .sub,.learning-metric span,.learning-signal small,.subject-detail-grid span,
 .subject-method-step small,.hub-result-main small,.hub-result-kind,.case-row-main small,.subj .n small,
 .resource .x small,.note,.cm-acc-chev,.stat .k,.cfrow span
){color:rgba(248,245,236,.68)!important}
body.cm149-theme.cm-platform-page :is(.btn-ghost,.hub-search input,.sheet-card textarea,.hcchip,.hcb.hint,.favDet){
  background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(71,169,200,.018))!important;
  color:#F8F5EC!important;border-color:rgba(230,208,154,.18)!important
}
body.cm149-theme.cm-platform-page :is(.btn-ghost,.hcchip,.hcb.hint,.favDet):hover{border-color:rgba(230,208,154,.40)!important;background:rgba(255,255,255,.075)!important}

/* Final low-contrast floor for white/gray text on translucent petrol. This is
   intentionally scoped to muted utility copy rather than branded accent text. */
body.cm149-theme :is(.muted,.subtle,.secondary-text,.help-text,.supporting-copy){color:rgba(248,245,236,.68)!important}

/* ═══════════════════════════════════════════════════════════════════════
   V151 · auditoria de contraste, rodada 3 — PAINEL INTELIGENTE (tela Início)
   ─────────────────────────────────────────────────────────────────────
   camadamed-painel-inteligente-v1.css foi escrito para fundo CLARO: usa
   --petro (petróleo escuro) como cor de TEXTO. No tema escuro isso vira
   escuro-sobre-escuro. Medido: --petro dá 1,11 de razão de contraste
   contra o vidro petróleo e --ink-soft dá 1,59 — ambos abaixo de 3, que
   é o piso da ilegibilidade. É o que apagava "2 pacientes", "1, 47" e
   "Abdômen agudo" na tela Início.

   Por que escapou das rodadas anteriores: a linha 76 de
   camadamed-visual-system-v149.css JÁ redefine --petro e --ink-soft para
   o tema escuro — mas o painel inteligente resolve suas cores via
   --cm145-petrol / --cm145-petrol-soft, uma cadeia de variáveis
   diferente, que nunca foi redefinida. As classes .pi-* têm zero
   ocorrências em v149 e em v151. O painel inteiro ficou de fora da
   conversão para o petróleo.

   Correção em duas frentes: redefinir a cadeia --cm145-* dentro do tema
   escuro, e cobrir explicitamente as classes .pi-* de texto, para não
   depender só da herança de variável. */
body.cm149-theme.cm-platform-page{
 --cm145-petrol:#FFF9EA!important;
 --cm145-petrol-soft:#D7E0DC!important;
 --pi-mute:rgba(248,245,236,.72)!important;
 --pi-mute-2:rgba(248,245,236,.56)!important}

body.cm149-theme.cm-platform-page :is(.pi-kpi-value,.pi-row-name,.pi-list-text,.pi-duo-value){color:#FFF9EA!important}
body.cm149-theme.cm-platform-page :is(.pi-kpi-label,.pi-row-sub,.pi-duo-label,.pi-card-title,.pi-bar-top){color:rgba(248,245,236,.72)!important}
body.cm149-theme.cm-platform-page :is(.pi-row-time,.pi-empty){color:rgba(248,245,236,.56)!important}
body.cm149-theme.cm-platform-page .pi-kpi-delta{color:#7FD4A8!important}
body.cm149-theme.cm-platform-page .pi-card-badge{color:#7FD4A8!important;background:rgba(127,212,168,.14)!important}
body.cm149-theme.cm-platform-page :is(.pi-pill-amb){color:#7FD4A8!important;background:rgba(127,212,168,.14)!important}
body.cm149-theme.cm-platform-page :is(.pi-pill-int){color:#F3A0AC!important;background:rgba(243,160,172,.14)!important}
body.cm149-theme.cm-platform-page .pi-card{background:var(--cm151-glass),linear-gradient(145deg,rgba(8,38,32,.89),rgba(3,17,14,.94))!important;border-color:rgba(198,161,91,.24)!important}

/* Cartão claro do método (CAMADA APLICAR) na tela Início: é creme de
   propósito, mas as duas regras globais de <strong>/<small> deste mesmo
   arquivo o deixavam com texto quase branco sobre creme — mesmo bug que
   o .cm-branch-card tinha no gateway. Mesma solução: seletor composto
   com !important, que vence em especificidade e em importância. */
body.cm149-theme.cm-platform-page :is(.paper,.cream-card,.light-card,.pi-method-card,.method-card){color:#0B2F2E!important}
body.cm149-theme.cm-platform-page :is(.paper,.cream-card,.light-card,.pi-method-card,.method-card) :is(strong,b,h1,h2,h3,h4,.serif,.display){color:#0B2F2E!important}
body.cm149-theme.cm-platform-page :is(.paper,.cream-card,.light-card,.pi-method-card,.method-card) :is(small,p,.mute,.tiny){color:rgba(11,47,46,.78)!important}


/* ═══════════════════════════════════════════════════════════════════════
   V153 · P0 RELEASE BLOCK — 2026-09-07
   1) Contraste real em Safari/WebKit: color + -webkit-text-fill-color.
   2) Contact strip: SVG sempre recebe caixa explícita (corrige ícones gigantes).
   Mantém petróleo + dourado + Liquid Glass; não clareia a identidade. */
body.cm149-theme.v70-site .v75-panel .v73-section-head h2{
  color:#FFF9EA!important;-webkit-text-fill-color:#FFF9EA!important
}
body.cm149-theme.v70-site .v75-panel .v73-section-head h2 em{
  color:var(--cm151-gold2)!important;-webkit-text-fill-color:var(--cm151-gold2)!important
}
body.cm149-theme[data-page="modulos"] :is(h1,h2,h3,.lib-heading,.module-item h4,.module-header h4,.module-header strong,.module-header b){
  color:#FFF9EA!important;-webkit-text-fill-color:#FFF9EA!important
}
body.cm149-theme[data-page="superpremium"] :is(h1,h2,h3,h4,.text-title,.brand,.footer-brand){
  color:#FFF9EA!important;-webkit-text-fill-color:#FFF9EA!important
}
body.cm149-theme[data-page="superpremium"] :is(.card h3,.card h4,.card p,.book-feature h2,.book-feature p,.clean-list,.clean-list li){
  color:#FFF9EA!important;-webkit-text-fill-color:#FFF9EA!important
}
body.cm149-theme[data-page="superpremium"] :is(p,.lead,.body-text,.mini-note){
  color:rgba(248,245,236,.78)!important;-webkit-text-fill-color:rgba(248,245,236,.78)!important
}
/* Gradiente dourado continua sendo texto recortado. */
body.cm149-theme[data-page="superpremium"] :is(.gold,.h1 .gold,.gold-text){
  -webkit-text-fill-color:transparent!important
}
/* Rodapé/contact strip: páginas antigas não carregavam a folha que dava tamanho ao SVG. */
body.cm149-theme .cm-contact-strip{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;
  width:min(1180px,calc(100% - 32px))!important;margin:28px auto 0!important;padding:22px 0 4px!important
}
body.cm149-theme .cm-contact-link{
  min-width:0!important;min-height:68px!important;padding:12px 14px!important;display:flex!important;align-items:center!important;gap:12px!important;
  border:1px solid rgba(198,161,91,.20)!important;border-radius:18px!important;
  background:var(--cm151-glass),linear-gradient(145deg,rgba(8,38,32,.88),rgba(3,17,14,.93))!important;
  color:#F8F5EC!important;overflow:hidden!important
}
body.cm149-theme .cm-contact-icon{
  flex:0 0 42px!important;width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;
  display:grid!important;place-items:center!important;border-radius:14px!important;
  color:var(--cm151-gold2)!important;background:rgba(230,208,154,.07)!important;border:1px solid rgba(230,208,154,.20)!important
}
body.cm149-theme .cm-contact-icon svg{
  display:block!important;width:21px!important;height:21px!important;min-width:21px!important;min-height:21px!important;
  max-width:21px!important;max-height:21px!important;overflow:visible!important
}
body.cm149-theme .cm-contact-copy{min-width:0!important;display:flex!important;flex-direction:column!important;gap:4px!important}
body.cm149-theme .cm-contact-copy strong{color:#FFF9EA!important;-webkit-text-fill-color:#FFF9EA!important;font-size:11px!important}
body.cm149-theme .cm-contact-copy span{color:rgba(248,245,236,.68)!important;-webkit-text-fill-color:rgba(248,245,236,.68)!important;font-size:12px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
@media(max-width:900px){body.cm149-theme .cm-contact-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){body.cm149-theme .cm-contact-strip{grid-template-columns:1fr!important;width:calc(100% - 28px)!important;padding-top:18px!important}}
