:root{
  --qh-ink:#07233f;
  --qh-muted:#577067;
  --qh-line:#d7e9df;
  --qh-soft:#f3faf6;
  --qh-white:#fff;
  --qh-deep:#06372a;
  --qh-mid:#08724e;
  --qh-bright:#17b779;
  --qh-light:#8be4bd;
  --qh-shadow:0 18px 38px rgba(3,74,51,.10);
}

.qihome,.qitp,.qila,.qipl,.qisd,.qisim{
  background:linear-gradient(145deg,#edf7f0 0%,#fbfefc 48%,#f5fffa 100%)!important;
  min-height:calc(100vh - 80px);
}
.qihome .container,.qitp .container,.qila .container,.qipl .container,.qisd .container,.qisim .container{position:relative}

/* Heros principais */
.qitp-hero,.qila-hero,.qipl-hero,.qisd-hero,.qisim-head{
  position:relative;
  overflow:hidden;
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.04) 0 1px,transparent 1px 9px),linear-gradient(108deg,var(--qh-deep) 0%,var(--qh-mid) 43%,var(--qh-bright) 74%,var(--qh-light) 100%)!important;
  color:#fff!important;
  border:1px solid rgba(181,241,210,.48)!important;
  border-left:4px solid #67d69d!important;
  border-radius:24px!important;
  box-shadow:0 22px 48px rgba(3,74,51,.18),inset 0 1px 0 rgba(255,255,255,.15)!important;
}
.qitp-hero::before,.qila-hero::before,.qipl-hero::before,.qisd-hero::before,.qisim-head::before{
  content:"";position:absolute;inset:0;background:radial-gradient(circle at 84% 22%,rgba(255,255,255,.18),transparent 28%),linear-gradient(90deg,transparent 0 67%,rgba(255,255,255,.05));pointer-events:none;
}
.qitp-hero::after,.qila-hero::after,.qipl-hero::after,.qisd-hero::after,.qisim-head::after{
  content:"";position:absolute;right:-54px;bottom:-112px;width:250px;height:250px;border-radius:50%;background:radial-gradient(circle,rgba(211,255,235,.22),transparent 68%);pointer-events:none;
}
.qitp-hero>*,.qila-hero>*,.qipl-hero>*,.qisd-hero>*,.qisim-head>*{position:relative;z-index:1}
.qitp-hero h1,.qila-hero h1,.qipl-hero h1,.qisd-hero h1,.qisim-head h1{color:#fff!important;letter-spacing:-.03em}
.qitp-hero p,.qila-hero p,.qipl-hero p,.qisd-hero p,.qisim-head p{color:#e0f7eb!important}

/* Selos/badges */
.qitp-badge,.qihome-badge,
.qila-kicker span,.qitp-stats span,.qipl-nav a,.qisim-headmeta span{
  background:rgba(4,73,51,.45)!important;
  border:1px solid rgba(255,255,255,.16)!important;
  color:#f3fff8!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09);
}
.qihome-badge,.qitp-badge{
  display:inline-flex;align-items:center;gap:8px;
}
.qihome-badge::before,.qitp-badge::before,.qipl-nav a:first-child::before,.qisd-hero h1::before,.qisim-head h1::before{
  content:"";display:inline-block;vertical-align:middle;width:18px;height:18px;flex:0 0 18px;background:url('../img/branding/qi-habilitacao.webp') center/contain no-repeat;filter:drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
.qila-kicker span:first-child::before{content:"";display:inline-block;width:16px;height:16px;margin-right:6px;background:url('../img/branding/qi-habilitacao.webp') center/contain no-repeat;vertical-align:-3px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.18));}
.qisim-head h1,.qisd-hero h1{display:flex;align-items:center;gap:10px}

/* Ações de hero */
.qitp-actions .primary,.qila-actions .primary,.qisd-actions .primary,
.qisim-actions .btn-primary,.qihome .btn-primary{
  background:#fff!important;color:#08724b!important;border:1px solid #fff!important;
  box-shadow:0 10px 22px rgba(6,55,42,.12);
}
.qitp-actions .soft,.qila-actions .soft,.qisd-actions .soft,
.qisim-actions .btn-light,.qihome .btn-light{
  background:rgba(4,73,51,.52)!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important;
}
.qitp-actions a:hover,.qila-actions a:hover,.qisd-actions a:hover,.qisim-actions .btn:hover,.qihome .btn:hover{filter:brightness(.985)}

/* Painéis e cards */
.qitp-panel,.qila-body,.qila-related,.qipl-panel,.qisd-card,.qisd-section,
.qisim-card,.qisim-result,.qihome-choice,.qihome-tool,.qihome-topic,.qihome-lesson,.qihome-progress>div,.qihome-faqgrid article{
  background:#fff!important;
  border:1px solid var(--qh-line)!important;
  box-shadow:var(--qh-shadow);
}
.qitp-panel h2,.qila-body h2,.qila-related h2,.qipl-panel h2,.qisd-section h2,.qisim-result h2,
.qihome-section h2,.qihome-tool h3,.qihome-lesson h3,.qihome-faqgrid h3,.qihome-topic b,
.qitp-card strong,.qila-card strong,.qisim-card h2,.qisim-review h3,.qisd-card strong{
  color:var(--qh-ink)!important;
}
.qitp-panel>p,.qila-copy,.qila-source,.qila-card span,.qipl-panel p,.qipl-intro,.qipl-meta,.qipl-note,
.qisd-card p,.qisd-section p,.qisd-section li,.qisim-cardhead small,.qisim-source,.qisim-review p,
.qihome-section p,.qihome-choice span,.qihome-tool p,.qihome-tool .qihome-mini,.qihome-topic span,.qihome-lesson p,.qihome-progress>div>div:not(.qihome-bar),.qihome-faqgrid p,.qihome-disclaimer{
  color:var(--qh-muted)!important;
}
.qitp-card,.qila-card,.qipl-group,.qipl-sign,.qisd-card,.qisim-review,.qihome-signlinks a{
  border-color:var(--qh-line)!important;
}
.qitp-card small,.qila-source a,.qipl-group a,.qipl-back,.qipl-meta a,.qisim-cardhead small,.qisim-source a,.qihome-signlinks a,.qihome-lesson a{
  color:var(--qh-mid)!important;
}
.qitp-scope a,.qihome-signlinks a,.qihome-lesson a,.qipl-nav a,.qipl-group a,.qipl-back{
  border:1px solid #cce9da!important;
  background:#f3fbf7!important;
}
.qitp-scope a.active,.qihome-choice.active{background:linear-gradient(180deg,#ffffff,#f2fbf6)!important;border-color:#93ddb7!important;box-shadow:inset 3px 0 0 #17b779,0 18px 34px rgba(6,55,42,.1)!important}
.qitp-empty,.qisim-warn,.qihome-preview{background:#fff7de!important;border:1px solid #efd27b!important;color:#73560b!important}

/* Placas */
.qipl-toolbar .qipl-count{color:var(--qh-ink)!important}
.qipl-search{border:1px solid var(--qh-line)!important;background:#fff!important;border-radius:12px;padding:0 12px}
.qipl-search input{border:0!important;background:transparent!important;color:var(--qh-ink)!important;outline:0;padding:11px 0}
.qipl-grid{gap:12px}
.qipl-sign{border-radius:18px!important;background:#fff!important;box-shadow:0 12px 28px rgba(6,55,42,.07)!important}
.qipl-visual{background:#f8fbf9!important;border-bottom:1px solid #e3efe8!important}
.qipl-sign h3,.qipl-sign strong{color:var(--qh-ink)!important}
.qipl-sign .sign-tags .code{background:#eefaf3!important;color:var(--qh-mid)!important;border-color:#cce9da!important}
.qipl-sign .sign-tags .group{background:#f3fbf7!important;color:#5d786e!important;border-color:#d8ebe0!important}

/* Simulado */
.qisim-progress{background:#eaf2ed!important}
.qisim-progress i{background:linear-gradient(90deg,var(--qh-mid),var(--qh-bright))!important}
.qisim-option{border-color:#d8ebe0!important;background:#fff!important}
.qisim-option:hover{background:#f7fcf9!important}
.qisim-option:has(input:checked){border-color:#93ddb7!important;background:#edf9f2!important;box-shadow:0 0 0 2px rgba(23,183,121,.08)!important}
.qisim-result .qisim-ok{color:#127748!important}
.qisim-result .qisim-bad{color:#9f5c0d!important}
.qisim-category-grid div{background:#f9fcfa!important;border-color:#dfebe4!important}
.qisim-review.good{background:#edf9f1!important;border-color:#d0ead8!important}
.qisim-review.bad{background:#fff8ef!important;border-color:#f0dcc0!important}
.qisim-visual{border-color:#e2eee7!important;background:#fbfefc!important}

/* Home */
.qihome-hero{box-shadow:0 22px 48px rgba(3,74,51,.24),inset 0 1px 0 rgba(255,255,255,.15)!important}
.qihome-trust span{background:rgba(255,255,255,.16)!important;border:1px solid rgba(255,255,255,.16)!important;color:#fff!important}
.qihome-dbstats div,.qihome-exam{box-shadow:inset 0 1px 0 rgba(255,255,255,.12)!important}
.qihome-bar{background:#eaf2ed!important}.qihome-bar i{background:linear-gradient(90deg,var(--qh-mid),var(--qh-bright))!important}

/* Ajustes de contraste / hover */
.qitp-card:hover,.qila-card:hover,.qipl-group:hover,.qipl-sign:hover,.qisd-card:hover,.qihome-topic:hover,.qihome-lesson:hover,.qihome-choice:hover{
  transform:translateY(-2px);
  border-color:#93ddb7!important;
  box-shadow:0 18px 34px rgba(6,55,42,.1)!important;
}
.qipl-nav,.qisd-actions,.qitp-actions,.qila-actions,.qisim-actions{display:flex;gap:9px;flex-wrap:wrap}

@media(max-width:700px){
  .qipl-nav a,.qisd-actions a,.qitp-actions a,.qila-actions a,.qisim-actions .btn{width:100%;justify-content:center}
  .qihome-badge::before,.qitp-badge::before,.qila-kicker span:first-child::before,.qipl-nav a:first-child::before,.qisd-hero h1::before,.qisim-head h1::before{width:16px;height:16px;flex-basis:16px}
}

/* =====================================================================
   PATCH 323 — legibilidade reforçada nos botões do hero de Placas
   ===================================================================== */
.qipl-hero .qipl-nav a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:42px!important;
  padding:10px 14px!important;
  border-radius:999px!important;
  background:rgba(4,73,51,.52)!important;
  border:1px solid rgba(255,255,255,.24)!important;
  color:#ffffff!important;
  text-decoration:none!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 18px rgba(3,48,34,.14)!important;
}
.qipl-hero .qipl-nav a:hover{
  background:rgba(4,73,51,.68)!important;
  border-color:rgba(255,255,255,.32)!important;
  color:#ffffff!important;
}
.qipl-hero .qipl-nav a:first-child::before{
  margin-right:2px;
}
