/* Auditoria UX geral — 2026-08-25. Camada de correção não destrutiva. */
:focus-visible{outline:3px solid #f0bd58!important;outline-offset:3px!important}
button,a,input,select,textarea{max-width:100%}
/* Não permitir quebra arbitrária global em links/botões: isso quebrava a bottom-nav mobile letra a letra. */
.questionCard h2,.simulationModalCard h2,.feedback,.questionMoreActions{overflow-wrap:anywhere}

/* Questões: leitura, ações e feedback */
.options button{min-height:48px;align-items:flex-start}
.questionTopActions{flex-wrap:wrap;justify-content:flex-end;min-width:0}
.questionMoreActions{max-width:min(92vw,360px);z-index:40}
.questionActions{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center}
.questionActions .ghost,.questionActions .answerBtn{width:100%;min-height:44px;margin-top:0}

/* Modais: não estourar viewport */
.modalCard{max-height:92vh;overflow:auto}

/* Concursos: contraste real e botões acessíveis */
.contestStandalone{--bg:#081522;--ink:#eef4f8;--muted:#b7c5d1;background:#081522!important;color:#eef4f8!important}
.contestStandaloneMain{background:linear-gradient(180deg,#081522,#0b1b2a 55%,#081522)}
.contestStandalone .contestIntro{background:linear-gradient(135deg,rgba(215,165,42,.10),rgba(14,38,58,.72));border-color:rgba(215,165,42,.34)}
.contestStandalone .contestIntro p{color:#c4d0da}
.contestCard{background:linear-gradient(145deg,#132b3f,#0f2233);border-color:rgba(173,198,216,.20);box-shadow:0 12px 28px rgba(0,0,0,.18)}
.contestCard h3{color:#f4f7fa}
.contestRole{color:#e7d6bb}
.contestCard dt,.contestConfidence,.contestChecked,.contestFooterNote,.contestSummary{color:#b7c5d1}
.contestCard dd{color:#eef4f8}
.contestAction{min-height:44px;border-color:rgba(202,217,228,.32);color:#f2f6f9}
.contestAction.primary{background:#d5a246;border-color:#d5a246;color:#142033}
.contestControls input,.contestControls select{min-height:44px;background:#102536;color:#f4f7fa;border-color:rgba(197,216,230,.28)}

/* Home escura: reforço de contraste em textos secundários */
body[data-layer="inicio"] .homeQuickHead p,
body[data-layer="inicio"] .homeQuickCard span,
body[data-layer="inicio"] .homeContestSummary p,
body[data-layer="inicio"] .heroMiniStats span{color:#b7c7d2!important}

@media(max-width:760px){
  /* Topo mobile: evitar esmagamento e manter busca utilizável */
  .topbar{height:auto!important;min-height:66px;padding:10px 12px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "search search";gap:8px 10px!important;align-items:center!important}
  .mobileBrand{grid-area:brand;min-width:0!important;max-width:none!important}
  .mobileBrand strong{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;display:block!important;-webkit-line-clamp:unset!important}
  .globalSearch{grid-area:search;width:100%!important;min-width:0!important}
  .topActions{grid-area:actions;display:flex;gap:6px;align-items:center}
  .topActions #syncStatus,.topActions .premiumTop{display:none!important}
  .topActions .profile{min-height:44px;min-width:56px;padding:.55rem .65rem}
  #installApp{width:44px!important;min-width:44px!important;padding:0!important;font-size:0!important;display:grid!important;place-items:center!important}
  #installApp::before{content:"＋";font-size:22px;line-height:1}

  /* Hero mobile: contraste, hierarquia e menor densidade vertical. */
  body[data-layer="inicio"] .hero{padding:24px 16px 18px!important;gap:14px!important;min-height:0!important;background:linear-gradient(180deg,#f7fafc 0%,#eef3f7 100%)!important;color:#102846!important}
  body[data-layer="inicio"] .hero h1{margin:8px 0 12px!important;color:#0b3158!important;text-shadow:none!important;font-size:clamp(38px,11.5vw,52px)!important;line-height:.96!important;letter-spacing:-.045em!important}
  body[data-layer="inicio"] .hero h1 em{color:#e5a82f!important;text-shadow:none!important}
  body[data-layer="inicio"] .hero p{color:#526b80!important;line-height:1.48!important;margin:0 0 10px!important}
  body[data-layer="inicio"] .hero .eyebrow{background:#0b3158!important;color:#f5c45b!important;border-color:#d7a43c!important}
  .heroActions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;align-items:stretch!important}
  .heroActions .cta{grid-column:1/-1!important;grid-row:1!important;width:100%!important;justify-content:center!important;margin:0!important}
  .heroActions .heroGhost{width:100%!important;min-width:0!important;margin:0!important;justify-content:center!important;padding:11px 10px!important;text-align:center!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
  .heroMascot{min-height:190px!important;max-height:220px!important;margin-top:4px!important;background-position:center 31%!important}
  .heroMiniStats{margin-top:0!important}
  .heroMiniStats>div:first-child{min-height:72px!important}

  /* Bottom navigation: itens essenciais, simétricos e sem títulos de grupo. */
  .sideNav{padding:0!important;height:auto!important;min-height:0!important;bottom:0!important;left:0!important;right:0!important;top:auto!important;overflow:visible!important;padding-bottom:env(safe-area-inset-bottom)!important}
  .sideNav>.sideBrand,.sideNav>.premiumSide,.sideNav nav>.navGroupLabel{display:none!important}
  .sideNav nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:0!important;width:100%!important;align-items:stretch!important;overflow:visible!important}
  .sideNav nav>a{display:none!important}
  .sideNav nav>a[data-mobile-nav="primary"]{display:flex!important;min-width:0!important;min-height:64px!important;margin:0!important;padding:7px 3px 6px!important;border-radius:0!important;border-left:0!important;border-right:0!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:3px!important;font-size:11px!important;line-height:1.08!important;text-align:center!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
  .sideNav nav>a span{display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .sideNav nav>a em{display:none!important}
  .appMain{padding-bottom:calc(70px + env(safe-area-inset-bottom))!important}

  /* Questões e ações */
  .workspace{padding-left:10px!important;padding-right:10px!important}
  .questionCard{padding:16px!important;border-radius:14px!important}
  .questionCard h2{font-size:17px!important;line-height:1.55!important}
  .options{gap:9px}
  .options button{padding:12px 11px!important;font-size:15px;line-height:1.5}
  .questionTop{align-items:flex-start!important;gap:10px!important}
  .questionTopActions{justify-content:flex-start!important;width:100%}
  .questionActions{grid-template-columns:1fr 1fr;gap:8px}
  .questionActions #answerBtn{grid-column:1/-1;grid-row:1}
  .questionActions #prevQuestion{grid-column:1;grid-row:2}
  .questionActions #skipQuestion{grid-column:2;grid-row:2}

  /* Botões: alvo de toque mínimo */
  button,.ghost,.answerBtn,.cta,.favoriteBtn,.contestAction{min-height:44px}

  /* Seções densas */
  .sectionHead{display:grid!important;gap:12px!important}
  .sectionHead .compactBtn,.sectionHead>.ghost,.sectionHead>.answerBtn{width:100%!important}
  .dashboardColumns,.studyIntelligence,.notebookColumns{grid-template-columns:1fr!important}
  .toolbar{display:grid!important;grid-template-columns:1fr!important;padding-left:12px!important;padding-right:12px!important}
  .toolbar>*{width:100%!important}

  /* Modais em telas pequenas */
  .modal{padding:8px!important;align-items:end!important}
  .modalCard{width:100%!important;max-height:94vh!important;border-radius:18px 18px 10px 10px!important;padding:22px 16px!important}

  /* Concursos */
  .contestStandaloneHeader{padding:10px 12px!important;gap:10px!important}
  .contestStandaloneBrand img{width:40px!important;height:40px!important}
  .contestStandaloneBrand{font-size:13px!important;min-width:0}
  .contestStandaloneBrand div{min-width:0}
  .contestStandaloneNav a.primary{min-height:44px;display:flex;align-items:center}
  .contestControls{grid-template-columns:1fr!important}
  .contestControls label:first-child{grid-column:auto!important}
  .contestCard dl{grid-template-columns:1fr!important}
  .contestActions{grid-template-columns:1fr!important}
  .contestAction{width:100%}
}

@media(max-width:420px){
  .mobileBrand strong{font-size:11px!important}
  .mobileBrand .betaBadge{display:none!important}
  .topActions .profile{min-width:52px;font-size:12px!important}
  .hero{padding-left:14px!important;padding-right:14px!important}
  .hero p{font-size:15px!important}
  .homeQuickAccess,.layerHeader{margin-left:12px!important;margin-right:12px!important}
  .sideNav nav>a[data-mobile-nav="primary"]{font-size:10.5px!important;padding-left:2px!important;padding-right:2px!important}
}
