/*
 * Central de ajuda (/help — Web#129, Brain ADR-102): visitante (página própria, _HelpLayout) e logado (dentro do painel premium ou Sneat).
 * Só tokens: --bs-primary e --psh-* (gerados por /branding/theme.css a partir do Tenant.Theme) — nenhum hex de marca. Os fallbacks são
 * neutros e escuros. Modos: .hc--public / .hc--premium (mesmos tokens --psh-*) e .hc--sneat (tokens do Bootstrap/Sneat, claro ou escuro).
 */
.hc-body,
.hc {
    --hc-primary: var(--bs-primary, #3fdf89);
    --hc-on-primary: var(--psh-on-primary, #0a0a0b);
    --hc-bg: var(--psh-bg, #0a0a0b);
    --hc-card: var(--psh-card, #141517);
    --hc-border: var(--psh-border, #2a2b2e);
    --hc-text: var(--psh-text, #f1f2f3);
    --hc-muted: var(--psh-muted, #8c8f95);
    --hc-radius: var(--psh-radius, 12px);
    --hc-font: var(--psh-font, 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif);
    --hc-surface: color-mix(in oklch, var(--hc-card) 72%, var(--hc-text) 6%);
    --hc-body: color-mix(in oklch, var(--hc-text) 88%, var(--hc-muted));
    --hc-tint: color-mix(in oklch, var(--hc-primary) 16%, transparent);
    --hc-primary-text: color-mix(in oklch, var(--hc-primary) 72%, var(--hc-text));
    --hc-ring: color-mix(in oklch, var(--hc-primary) 38%, transparent);
}

/* Sneat (logado fora do shell premium): tokens do Bootstrap, funcionam no tema claro e no escuro. */
.hc.hc--sneat {
    --hc-primary: var(--bs-primary, #696cff);
    --hc-on-primary: var(--psh-on-primary, #fff);
    --hc-bg: transparent;
    --hc-card: var(--bs-card-bg, var(--bs-body-bg, #fff));
    --hc-border: var(--bs-border-color, #d9dee3);
    --hc-text: var(--bs-heading-color, var(--bs-body-color, #566a7f));
    --hc-muted: color-mix(in oklch, var(--hc-body) 80%, transparent);
    --hc-radius: .5rem;
    --hc-font: inherit;
    --hc-surface: color-mix(in oklch, var(--hc-card) 92%, var(--hc-text) 4%);
    --hc-body: var(--bs-body-color, #697a8d);
    --hc-primary-text: var(--hc-primary);
}

/* ---------- Página própria (visitante) ---------- */
.hc-html { scroll-behavior: smooth; }
.hc-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--hc-bg); color: var(--hc-body); font-family: var(--hc-font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.hc-body *, .hc-body *::before, .hc-body *::after { box-sizing: border-box; }
.hc-body a { color: inherit; }
.hc-skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--hc-primary); color: var(--hc-on-primary); font-weight: 600; text-decoration: none; transition: top .15s ease; }
.hc-skip:focus { top: 12px; }
.hc-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }

.hc-topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in oklch, var(--hc-bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hc-border); }
.hc-topbar__inner { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.hc-topbar__spacer { flex: 1; }
.hc-topbar__link { font-size: 14px; font-weight: 500; color: var(--hc-muted); text-decoration: none; padding-left: 16px; border-left: 1px solid var(--hc-border); }
.hc-topbar__link:hover { color: var(--hc-text); }
.hc-brand { display: inline-flex; align-items: center; text-decoration: none; min-height: 28px; }
.hc-brand img { display: block; max-height: 28px; width: auto; max-width: 160px; }
.hc-brand__name { font-size: 18px; font-weight: 700; color: var(--hc-text); letter-spacing: -.01em; }
.hc-lang { display: inline-flex; padding: 3px; border: 1px solid var(--hc-border); border-radius: 999px; background: var(--hc-card); }
.hc-lang a { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--hc-muted); text-decoration: none; }
.hc-lang a.is-active { background: var(--hc-tint); color: var(--hc-primary-text); }
.hc-lang a:hover { color: var(--hc-text); }

.hc-footer { border-top: 1px solid var(--hc-border); color: var(--hc-muted); font-size: 13px; }
.hc-footer__inner { max-width: 1120px; margin: 0 auto; padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.hc-footer nav { display: flex; gap: 20px; }
.hc-footer a { text-decoration: none; }
.hc-footer a:hover { color: var(--hc-text); }

/* ---------- Estrutura ---------- */
.hc { max-width: 1120px; margin: 0 auto; color: var(--hc-body); font-family: var(--hc-font); line-height: 1.6; }
.hc--public { padding-top: 8px; }
.hc a { color: inherit; }
.hc h1, .hc h2, .hc h3 { color: var(--hc-text); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.hc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hc :focus-visible, .hc-body :focus-visible { outline: 2px solid var(--hc-primary); outline-offset: 2px; border-radius: 6px; }

.hc-eyebrow { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .66px; text-transform: uppercase; color: var(--hc-primary-text); background: var(--hc-tint); }

/* ---------- Botões ---------- */
.hc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--hc-radius); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: filter .15s ease, border-color .15s ease, background-color .15s ease; }
.hc-btn--primary { background: var(--hc-primary); color: var(--hc-on-primary); }
.hc a.hc-btn--primary { color: var(--hc-on-primary); }
.hc-btn--primary:hover { filter: brightness(1.07); }
.hc-btn--outline { background: transparent; border-color: color-mix(in oklch, var(--hc-border) 70%, var(--hc-text) 18%); color: var(--hc-text); }
.hc-btn--outline:hover { border-color: var(--hc-primary); }
.hc-btn--sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.hc-btn i { font-size: 17px; }

/* ---------- Hero e busca ---------- */
.hc-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 56px 16px 40px; margin: 8px 0 8px; border-radius: calc(var(--hc-radius) + 8px); background:
    radial-gradient(ellipse 80% 120% at 50% 0%, color-mix(in oklch, var(--hc-primary) 18%, transparent), transparent 70%); }
.hc--premium .hc-hero, .hc--sneat .hc-hero { padding: 36px 16px 28px; border: 1px solid var(--hc-border); background:
    radial-gradient(ellipse 80% 140% at 50% 0%, color-mix(in oklch, var(--hc-primary) 14%, var(--hc-card)), var(--hc-card) 72%); }
.hc-hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; max-width: 22ch; }
.hc-hero__sub { margin: 0; max-width: 56ch; font-size: 16px; color: var(--hc-muted); }
.hc-hero--message { padding-top: 48px; }

.hc-search { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; max-width: 640px; padding: 6px 6px 6px 44px; border: 1px solid var(--hc-border); border-radius: calc(var(--hc-radius) + 4px); background: var(--hc-card); transition: border-color .15s ease, box-shadow .15s ease; }
.hc-search:focus-within { border-color: var(--hc-primary); box-shadow: 0 0 0 4px var(--hc-ring); }
.hc-search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--hc-muted); pointer-events: none; }
.hc-search__input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--hc-text); font: inherit; font-size: 16px; outline: none; }
.hc-search__input::placeholder { color: var(--hc-muted); }
.hc-search__input::-webkit-search-cancel-button { filter: grayscale(1); }
.hc-search--sm { max-width: none; margin: 0 0 24px; padding: 4px 4px 4px 40px; }
.hc-search--sm .hc-search__input { height: 38px; font-size: 14px; }
.hc-search--sm .hc-btn { min-height: 34px; }
.hc-search--lg .hc-btn { min-height: 44px; }

/* ---------- Seções, grade e cartões ---------- */
.hc-section { margin: 36px 0; }
.hc-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hc-section__head h2 { font-size: 20px; font-weight: 600; }
.hc-count { margin: 0 0 12px; font-size: 13px; color: var(--hc-muted); }

.hc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hc-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--hc-border); border-radius: calc(var(--hc-radius) + 4px); background: var(--hc-card); text-decoration: none; transition: border-color .15s ease, transform .2s ease, box-shadow .2s ease; }
.hc-card:hover { border-color: color-mix(in oklch, var(--hc-primary) 45%, var(--hc-border)); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .55); }
.hc-card strong { font-size: 16px; font-weight: 600; color: var(--hc-text); }
.hc-card__text { font-size: 14px; color: var(--hc-muted); flex: 1; }
.hc-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--hc-primary-text); }
.hc-icon { width: 42px; height: 42px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--hc-tint); color: var(--hc-primary-text); font-size: 22px; }
.hc-icon--lg { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
.hc-chip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--hc-surface); color: var(--hc-muted); font-size: 12px; font-weight: 500; text-decoration: none; }
.hc-chip i { font-size: 14px; color: var(--hc-primary-text); }
a.hc-chip:hover { color: var(--hc-text); }

/* ---------- Lista de artigos ---------- */
.hc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hc-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hc-article-link { display: flex; align-items: center; gap: 16px; height: 100%; padding: 16px 18px; border: 1px solid var(--hc-border); border-radius: var(--hc-radius); background: var(--hc-card); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.hc-article-link:hover { border-color: color-mix(in oklch, var(--hc-primary) 45%, var(--hc-border)); }
.hc-article-link__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hc-article-link strong { font-size: 15px; font-weight: 600; color: var(--hc-text); }
.hc-article-link small { font-size: 13.5px; color: var(--hc-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-article-link__go { color: var(--hc-muted); font-size: 18px; flex: 0 0 auto; transition: transform .15s ease, color .15s ease; }
.hc-article-link:hover .hc-article-link__go { color: var(--hc-primary-text); transform: translateX(3px); }

/* ---------- Vazio ---------- */
.hc-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 16px; border: 1px dashed var(--hc-border); border-radius: calc(var(--hc-radius) + 4px); color: var(--hc-muted); }
.hc-empty i { font-size: 32px; color: var(--hc-primary-text); }
.hc-empty h2 { font-size: 17px; }
.hc-empty p { margin: 0; max-width: 46ch; }

/* ---------- Páginas de assunto e artigo ---------- */
.hc-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 20px 0 20px; font-size: 13px; color: var(--hc-muted); }
.hc-breadcrumb a { text-decoration: none; }
.hc-breadcrumb a:hover { color: var(--hc-text); text-decoration: underline; }
.hc-breadcrumb [aria-current] { color: var(--hc-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.hc-breadcrumb i { font-size: 11px; }

.hc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.hc-layout--article { grid-template-columns: 240px minmax(0, 1fr) 200px; }
.hc-side, .hc-toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; font-size: 14px; }
.hc--premium .hc-side, .hc--premium .hc-toc { top: calc(var(--psh-topbar-h, 72px) + 16px); }
.hc--sneat .hc-side, .hc--sneat .hc-toc { top: 90px; }
.hc-side ul, .hc-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hc-side a, .hc-toc a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--hc-muted); text-decoration: none; line-height: 1.35; }
.hc-side a:hover, .hc-toc a:hover { color: var(--hc-text); background: var(--hc-surface); }
.hc-side a.is-active { color: var(--hc-primary-text); background: var(--hc-tint); font-weight: 600; }
.hc-side a i { font-size: 17px; }
.hc-side__title { margin: 0 0 8px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .66px; text-transform: uppercase; color: var(--hc-muted); }
.hc-side__back { margin-bottom: 14px; font-weight: 600; color: var(--hc-text) !important; }
.hc-toc { border-left: 1px solid var(--hc-border); padding-left: 12px; }
.hc-toc a { padding: 5px 8px; font-size: 13px; }

.hc-content { min-width: 0; }
.hc-page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hc-page-head h1 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; }
.hc-page-head p { margin: 4px 0 0; color: var(--hc-muted); }

.hc-article__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.hc-article__head h1 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; }
.hc-article__summary { margin: 0; font-size: 17px; color: var(--hc-muted); }
.hc-article__meta { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--hc-muted); }

/* Corpo do artigo (HTML gerado por HelpRules.RenderBody) */
.hc-prose { font-size: 16px; line-height: 1.75; color: var(--hc-body); }
.hc-prose > :first-child { margin-top: 0; }
.hc-prose p { margin: 0 0 16px; }
.hc-prose h2 { font-size: 22px; font-weight: 600; margin: 36px 0 12px; scroll-margin-top: 96px; }
.hc-prose h3 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; scroll-margin-top: 96px; }
.hc-prose ul, .hc-prose ol { margin: 0 0 18px; padding-left: 1.4em; display: grid; gap: 8px; }
.hc-prose li::marker { color: var(--hc-primary-text); font-weight: 600; }
.hc-prose strong { color: var(--hc-text); font-weight: 600; }
.hc-prose a { color: var(--hc-primary-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hc-prose a:hover { text-decoration-thickness: 2px; }
.hc-prose code { padding: 2px 6px; border-radius: 6px; background: var(--hc-surface); color: var(--hc-text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.hc-prose .hc-callout { margin: 0 0 20px; padding: 14px 16px; border: 1px solid color-mix(in oklch, var(--hc-primary) 35%, var(--hc-border)); border-left-width: 4px; border-radius: var(--hc-radius); background: var(--hc-tint); }
.hc-prose .hc-callout p { margin: 0; color: var(--hc-text); }

.hc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hc-border); }
.hc-pager__item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--hc-border); border-radius: var(--hc-radius); background: var(--hc-card); text-decoration: none; transition: border-color .15s ease; }
.hc-pager__item:hover { border-color: color-mix(in oklch, var(--hc-primary) 45%, var(--hc-border)); }
.hc-pager__item small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hc-muted); }
.hc-pager__item strong { font-size: 14px; color: var(--hc-text); }
.hc-pager__item--next { text-align: right; }
.hc-pager__item--next small { justify-content: flex-end; }

/* ---------- Contato ---------- */
.hc-contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; margin: 48px 0 0; padding: 28px; border: 1px solid color-mix(in oklch, var(--hc-primary) 28%, var(--hc-border)); border-radius: calc(var(--hc-radius) + 8px); background: radial-gradient(ellipse 90% 140% at 100% 0%, color-mix(in oklch, var(--hc-primary) 16%, var(--hc-card)), var(--hc-card) 70%); }
.hc-contact h2 { margin: 10px 0 6px; font-size: 22px; font-weight: 600; }
.hc-contact p { margin: 0; color: var(--hc-muted); }
.hc-contact__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hc-contact__line { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 13px; overflow-wrap: anywhere; }
.hc-contact__line i { color: var(--hc-primary-text); font-size: 16px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
    .hc-layout--article { grid-template-columns: 220px minmax(0, 1fr); }
    .hc-toc { display: none; }
}
@media (max-width: 900px) {
    .hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-layout, .hc-layout--article { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .hc-side { position: static; max-height: none; }
    .hc-side ul { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .hc-side li { flex: 0 0 auto; }
    .hc-side a { border: 1px solid var(--hc-border); white-space: nowrap; }
    .hc-layout--article .hc-side { display: none; }
    .hc-list--two { grid-template-columns: minmax(0, 1fr); }
    .hc-contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .hc-grid { grid-template-columns: minmax(0, 1fr); }
    .hc-hero { padding: 36px 8px 28px; }
    .hc-topbar__inner { gap: 10px; padding: 10px 12px; }
    .hc-topbar__link { display: none; }
    .hc-search { padding-left: 40px; }
    .hc-search .hc-btn { padding: 0 14px; }
    .hc-search--lg .hc-search__input { font-size: 15px; }
    .hc-pager { grid-template-columns: minmax(0, 1fr); }
    .hc-pager__item--next { text-align: left; }
    .hc-pager__item--next small { justify-content: flex-start; }
    .hc-contact { padding: 22px 18px; }
    .hc-contact__actions .hc-btn { flex: 1 1 100%; }
    .hc-main { padding: 0 12px 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .hc-html { scroll-behavior: auto; }
    .hc-card, .hc-article-link, .hc-article-link__go, .hc-btn { transition: none; }
    .hc-card:hover { transform: none; }
}
