/* Home Cívica pública — camada visual isolada da casca e da Home. */
:root {
  --hc-ink: #18283b;
  --hc-muted: #556273;
  --hc-action: #1a3a7c;
  --hc-canvas: #f2f5f8;
  --hc-surface: #fff;
  --hc-selected: #eaf0fa;
  --hc-line: #d5dce5;
  --hc-field: #768393;
  --hc-focus: #135fba;
  --hc-success: #195c3b;
  --hc-success-bg: #eaf4ed;
  --hc-warning: #805008;
  --hc-warning-bg: #fff6dd;
  --hc-error: #9a302b;
  --hc-error-bg: #fff0ed;
}

html[data-tema="escuro"] {
  --hc-ink: #f0f4fa;
  --hc-muted: #bac7d8;
  --hc-action: #acc8ff;
  --hc-canvas: #101a2a;
  --hc-surface: #18263a;
  --hc-selected: #253d61;
  --hc-line: #41526b;
  --hc-field: #8b9cb4;
  --hc-focus: #ffdb70;
  --hc-success: #b8e6c9;
  --hc-success-bg: #1c3c2c;
  --hc-warning: #ffdb70;
  --hc-warning-bg: #493b18;
  --hc-error: #ffc1b8;
  --hc-error-bg: #482a2d;
}

body.home-civica { background: var(--hc-canvas); color: var(--hc-ink); }
body.home-civica #bsq-fab { display: none !important; }
.hc-shell,
.hc-main,
.hc-footer,
#chat-btn,
#chat-janela,
#hc-novo-visual { font-family: "Segoe UI", Arial, sans-serif; }
.hc-shell *, .hc-main *, .hc-footer *, #chat-janela *, #hc-novo-visual * { box-sizing: border-box; }
.hc-wrap { width: 100%; margin-inline: auto; padding-inline: 36px; }
.hc-skip { position: fixed; top: -90px; left: 12px; z-index: 1000; min-height: 44px; padding: 11px 16px; border-radius: 5px; background: var(--hc-surface); color: var(--hc-action); font-weight: 700; }
.hc-skip:focus { top: 12px; }
.hc-shell :focus-visible,
.hc-main :focus-visible,
.hc-footer :focus-visible,
#chat-btn:focus-visible,
#chat-janela :focus-visible,
#hc-novo-visual :focus-visible { outline: 3px solid var(--hc-focus) !important; outline-offset: 4px !important; }
.hc-shell a, .hc-main a, .hc-footer a { color: var(--hc-action); text-decoration: none; }
.hc-shell a:hover, .hc-main a:hover, .hc-footer a:hover { text-decoration: underline; }
.hc-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--hc-field); border-radius: 5px; background: var(--hc-surface); color: var(--hc-action); font: 650 15px/1.25 "Segoe UI", Arial, sans-serif; cursor: pointer; }
.hc-button:hover { background: var(--hc-selected); color: var(--hc-action); text-decoration: none !important; }
.hc-button:active { background: var(--hc-line); color: var(--hc-ink); }
.hc-shell .hc-button-primary, .hc-main .hc-button-primary, .hc-footer .hc-button-primary { background: var(--hc-action); border-color: var(--hc-action); color: var(--hc-surface); }
.hc-shell .hc-button-primary:hover, .hc-shell .hc-button-primary:active, .hc-main .hc-button-primary:hover, .hc-main .hc-button-primary:active, .hc-footer .hc-button-primary:hover, .hc-footer .hc-button-primary:active { background: var(--hc-ink); border-color: var(--hc-ink); color: var(--hc-surface); }
.hc-icon { width: 44px; height: 44px; display: inline-grid; place-items: center; flex: 0 0 44px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--hc-action); cursor: pointer; }
.hc-icon:hover { background: var(--hc-selected); color: var(--hc-action); }
.hc-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hc-eyebrow { margin: 0 0 10px; color: var(--hc-muted); font-size: 12px; font-weight: 700; letter-spacing: 1.45px; line-height: 1.3; }
.hc-main h1, .hc-main h2, .hc-main h3, .hc-main p, .hc-main figure { margin: 0; }
.hc-main h2 { color: var(--hc-ink); font-size: 26px; line-height: 1.25; letter-spacing: -.5px; }

.hc-institution { background: #f7f7f7; border-bottom: 1px solid #ddd; }
.hc-institution-inner { min-height: 64px; display: flex; align-items: center; gap: 24px; color: #556273; font-size: 14px; }
.hc-institution img { width: 308px; height: auto; object-fit: contain; }
.hc-institution span { flex: 1; }
.hc-institution a { min-height: 44px; display: inline-flex; align-items: center; color: #1a3a7c; }
.hc-header { position: static; top: auto; z-index: auto; width: auto; height: auto; display: block; padding: 0; background: var(--hc-surface); border-bottom: 1px solid var(--hc-line); box-shadow: none; }
.hc-head-inner { min-height: 102px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hc-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; color: var(--hc-ink) !important; }
.hc-brand:hover { text-decoration: none !important; }
.hc-brand strong { display: block; font-size: 28px; line-height: 1.15; letter-spacing: -.5px; }
.hc-brand small { display: block; color: var(--hc-muted); font-size: 14px; line-height: 1.35; }
.hc-brand > svg { width: 48px; height: 48px; }
.hc-desktop-nav { display: flex; align-items: center; gap: 10px; }
.hc-desktop-nav a { min-height: 48px; display: inline-flex; align-items: center; padding: 9px 6px; color: var(--hc-ink); font-size: 16px; font-weight: 650; }
.hc-desktop-nav a[aria-current="page"] { box-shadow: inset 0 -3px var(--hc-action); }
.hc-head-actions, #nav-deslogado, #nav-logado { display: flex; align-items: center; gap: 7px; }
#btn-tema, .hc-search-button, .hc-menu-button, #nav-sino { width: 44px; height: 44px; min-height: 44px; border: 1px solid transparent; border-radius: 5px; display: inline-grid; place-items: center; padding: 0; background: transparent; color: var(--hc-action); }
#btn-tema:hover, .hc-search-button:hover, .hc-menu-button:hover, #nav-sino:hover { background: var(--hc-selected); }
#btn-tema svg, .hc-search-button svg, .hc-menu-button svg, #nav-sino svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#nav-sino { position: relative; }
#nav-sino-badge { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #9a302b; color: #fff; font-size: 10px; line-height: 16px; }
.hc-account-button { min-height: 44px; border-radius: 5px; padding: 9px 14px; }
#nav-deslogado .hc-button-primary { display: none; }
#btn-perfil.hc-profile-button { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--hc-action); border-radius: 5px; background: var(--hc-action); color: var(--hc-surface); font-family: inherit; font-weight: 650; }
#nav-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 50%; background: rgba(255,255,255,.2); }
.hc-profile-text { display: grid; min-width: 0; text-align: left; line-height: 1.18; }
#nav-nome { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-selo { font-size: 11px; opacity: .82; }
#nav-perfil-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 180; min-width: 230px; padding: 6px; border: 1px solid var(--hc-line); border-radius: 8px; background: var(--hc-surface); box-shadow: 0 12px 30px rgba(12,27,50,.18); }
#nav-perfil-menu a { min-height: 44px; display: flex; align-items: center; padding: 9px 12px; border-radius: 5px; color: var(--hc-ink); font-size: 14px; font-weight: 600; }
#nav-perfil-menu a:hover { background: var(--hc-selected); text-decoration: none; }
.hc-menu-button { display: none; }

.hc-drawer-overlay { position: fixed; inset: 0; z-index: 270; display: none; background: rgba(12,27,50,.58); }
.hc-drawer-overlay.open { display: block; }
.hc-drawer { position: fixed; inset: 0 0 0 auto; z-index: 280; width: min(420px, 100%); display: none; padding: 20px; overflow: auto; overscroll-behavior: contain; border-left: 1px solid var(--hc-line); background: var(--hc-surface); color: var(--hc-ink); }
.hc-drawer.open { display: block; }
.hc-drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hc-drawer-top strong { font-size: 21px; }
.hc-drawer-section { margin: 18px 10px 6px; color: var(--hc-muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.hc-drawer-link { min-height: 48px; display: flex; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--hc-line); color: var(--hc-ink) !important; font-size: 15px; font-weight: 600; }
.hc-drawer-link:hover { background: var(--hc-selected); text-decoration: none !important; }

.hc-main { background: var(--hc-canvas); color: var(--hc-ink); }
#destaque-pnab.hc-campaign { min-height: 124px; margin-top: 30px; padding: 24px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: visible; border: 0; border-block: 1px solid var(--hc-line); border-left: 4px solid var(--hc-action); background: var(--hc-surface); color: var(--hc-ink); }
#destaque-pnab.hc-campaign::before, #destaque-pnab.hc-campaign::after { content: none; }
#destaque-pnab.hc-campaign h2 { margin-bottom: 5px; color: var(--hc-ink); font-size: 26px; }
#destaque-pnab.hc-campaign p { color: var(--hc-muted); font-size: 16px; }
.hc-intro .hc-eyebrow { font-size: 14px; }
.hc-shell .hc-button, .hc-main .hc-button { min-height: 52px; font-size: 16px; }
.hc-intro .hc-text-link { font-size: 16px; }
.hc-campaign .hc-button { flex: 0 0 auto; }
.hc-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 64px; padding-block: 52px; }
.hc-intro-copy { padding-block: 12px; }
.hc-intro h1 { color: var(--hc-ink); font-size: clamp(38px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -1.8px; font-weight: 720; }
.hc-intro h1 span { color: var(--hc-action); }
.hc-lead { max-width: 610px; margin-top: 24px !important; color: var(--hc-muted); font-size: 20px; line-height: 1.65; }
.hc-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.hc-text-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--hc-action); font-size: 14px; font-weight: 650; }
.hc-place { align-self: start; overflow: hidden; border: 1px solid var(--hc-line); border-radius: 8px; background: var(--hc-surface); }
.hc-place-media { display: grid; overflow: hidden; }
.hc-place-media img { grid-area: 1/1; width: 100%; height: 250px; display: block; object-fit: cover; object-position: 50% 55%; opacity: 1; visibility: visible; transition: opacity .45s ease, visibility 0s; }
.hc-place-media img[hidden] { display: block !important; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, visibility 0s .45s; }
.hc-place figcaption { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 16px 20px; }
.hc-place figcaption > span:first-child { grid-column: 1/-1; color: var(--hc-muted); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; }
.hc-place strong { font-size: 20px; }
.hc-place figcaption a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.hc-place-links { display: flex; flex-wrap: wrap; gap: 4px 16px; grid-column: 1/-1; }
.hc-place-controls { grid-column: 1/-1; display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--hc-line); }
.hc-place-controls .hc-icon { width: 44px; height: 44px; }
#hc-place-position { margin-inline: auto; color: var(--hc-muted); font-size: 12px; }
#hc-place-pause { min-height: 44px; padding: 8px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--hc-action); font: 650 13px/1.2 inherit; }
#hc-place-pause:hover { background: var(--hc-selected); }

.hc-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hc-opportunities { padding: 10px 36px 48px; }
.hc-op-body { min-height: 176px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border: 1px solid var(--hc-line); border-left: 4px solid var(--hc-action); border-radius: 8px; background: var(--hc-surface); }
.hc-op-copy { flex: 1; }
.hc-op-status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; padding: 4px 8px; border-radius: 4px; background: var(--hc-success-bg); color: var(--hc-success); font-size: 13px; font-weight: 700; }
#mz-ed-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; }
.hc-op-body h3 { margin-bottom: 6px; font-size: 21px; }
.hc-op-body p { max-width: 720px; color: var(--hc-muted); }
.hc-countdown { display: none; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hc-countdown div { min-width: 64px; padding: 7px 9px; border: 1px solid var(--hc-line); border-radius: 5px; text-align: center; }
.hc-countdown strong { display: block; font-variant-numeric: tabular-nums; }
.hc-countdown span { color: var(--hc-muted); font-size: 10px; text-transform: uppercase; }
.hc-op-body[data-state="carregando"] { color: var(--hc-muted); }
.hc-op-body[data-state="erro"] { border-color: var(--hc-error); background: var(--hc-error-bg); }
.hc-op-body[data-state="encerrado"],
.hc-op-body[data-state="agendado"],
.hc-op-body[data-state="em_breve"],
.hc-op-body[data-state="parcial"] { border-left-color: var(--hc-warning); background: var(--hc-warning-bg); }
.hc-op-body[data-state="encerrado"] .hc-op-status,
.hc-op-body[data-state="agendado"] .hc-op-status,
.hc-op-body[data-state="em_breve"] .hc-op-status,
.hc-op-body[data-state="parcial"] .hc-op-status { background: transparent; color: var(--hc-warning); border: 1px solid currentColor; }
.hc-loading-lines { width: 100%; }
.hc-loading-lines i { width: 78%; height: 13px; display: block; margin-top: 14px; border-radius: 3px; background: var(--hc-line); }
.hc-loading-lines i:last-child { width: 52%; }

.hc-services { padding-bottom: 56px; }
.hc-service-grid { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--hc-line); border-radius: 8px; background: var(--hc-surface); }
.hc-service { min-height: 145px; display: flex; align-items: start; gap: 18px; padding: 24px; border-bottom: 1px solid var(--hc-line); color: var(--hc-ink) !important; }
.hc-service:nth-child(odd) { border-right: 1px solid var(--hc-line); }
.hc-service:nth-last-child(-n+2) { border-bottom: 0; }
.hc-service:hover { background: var(--hc-selected); color: var(--hc-action) !important; text-decoration: none !important; }
.hc-service:focus-visible { outline-offset: -5px !important; }
.hc-service-number { color: var(--hc-muted); font-size: 13px; font-weight: 650; }
.hc-service > div { flex: 1; }
.hc-service h3 { color: inherit; font-size: 18px; }
.hc-service p { margin-top: 6px; color: var(--hc-muted); font-size: 14px; line-height: 1.55; }
.hc-notices { padding-block: 42px; border-block: 1px solid var(--hc-line); background: var(--hc-surface); }
.hc-notice-body { min-height: 100px; }
#avisos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
#avisos-grid .card { min-height: 170px; padding: 20px; border: 1px solid var(--hc-line); border-radius: 8px; background: var(--hc-surface); color: var(--hc-ink); }
#avisos-grid .card h4 { color: var(--hc-ink); font-size: 18px; }
#avisos-grid .card p { margin: 8px 0; color: var(--hc-muted); font-size: 14px; }
#avisos-grid .card img { max-width: calc(100% + 40px) !important; height: 145px !important; margin: -20px -20px 14px !important; border-radius: 8px 8px 0 0 !important; object-fit: cover; }
#avisos-grid .hc-notice-empty { grid-column: 1/-1; min-height: 160px; padding-top: 24px; border-top: 1px solid var(--hc-line); }
#avisos-grid .hc-notice-empty h3 { margin: 0 0 8px; color: var(--hc-ink); font-size: 23px; }
#avisos-grid .hc-notice-empty p { margin: 0; color: var(--hc-muted); }
#avisos-grid .hc-notice-empty a { min-height: 44px; display: inline-flex; align-items: center; margin-top: 4px; color: var(--hc-action); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
#destaques-home { margin-bottom: 24px; background: var(--hc-surface); border: 0; }
html[data-tema="escuro"] #destaques-home { background: var(--hc-surface); }
#destaques-home .dh-palco { border-radius: 8px; }
#destaques-home[hidden] { display: none !important; }
#destaques-home .dh-in { width: 100%; max-width: none; margin: 0; padding: 0; }
#destaques-home .dh-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
#destaques-home .dh-etq { color: var(--hc-muted); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
#destaques-home .dh-cartao { display: none; grid-template-columns: minmax(220px, .85fr) 1.15fr; overflow: hidden; border: 1px solid var(--hc-line); border-radius: 8px; background: var(--hc-surface); }
#destaques-home .dh-cartao.ativo { display: grid; }
#destaques-home .dh-fotos { position: relative; min-height: 250px; overflow: hidden; background: var(--hc-canvas); }
#destaques-home .dh-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
#destaques-home .dh-foto.ativa { opacity: 1; }
#destaques-home .dh-txt { padding: 28px; }
#destaques-home .dh-tit { font-family: inherit; font-size: 24px; }
#destaques-home .dh-res { margin: 10px 0 18px; color: var(--hc-muted); font-size: 16px; }
/* O contrato do botão inclui primeiro plano e fundo: .hc-main a não pode
   transformar o rótulo primário em azul sobre azul. */
#destaques-home .dh-lk { min-height: 48px; display: inline-flex; align-items: center; margin: 0; border: 1px solid var(--hc-action); border-radius: 5px; background: var(--hc-action); color: var(--hc-surface); font-size: 14px; }
#destaques-home .dh-lk.sec { background: var(--hc-surface); color: var(--hc-action); }
#destaques-home .dh-lk:hover, #destaques-home .dh-lk:active { background: var(--hc-ink); border-color: var(--hc-ink); color: var(--hc-surface); text-decoration: none; }
#destaques-home .dh-lk.sec:hover, #destaques-home .dh-lk.sec:active { background: var(--hc-selected); color: var(--hc-action); }
#avisos-grid .card h4 { font-family: inherit; }
#avisos-grid .card .cl { font-size: 14px; line-height: 1.5; }
#destaques-home .dh-nav { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; }
#destaques-home .dh-seta, #destaques-home .dh-pausa { min-width: 44px; min-height: 44px; border: 1px solid var(--hc-field); border-radius: 5px; background: var(--hc-surface); color: var(--hc-action); }
#destaques-home .dh-pontos { display: flex; gap: 7px; }
#destaques-home .dh-pt, #destaques-home .dh-fp { width: 18px; height: 18px; min-width: 18px; padding: 0; border: 5px solid var(--hc-surface); border-radius: 50%; background: var(--hc-muted); box-shadow: 0 0 0 1px var(--hc-line); }
#destaques-home .dh-pt[aria-current="true"], #destaques-home .dh-fp[aria-current="true"] { background: var(--hc-action); }

.hc-community { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; padding-block: 56px; }
.hc-community-copy p { margin: 16px 0; color: var(--hc-muted); }
.hc-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; padding-left: 32px; border-left: 1px solid var(--hc-line); }
.hc-numbers strong { display: block; color: var(--hc-ink); font-size: 30px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hc-numbers span { color: var(--hc-muted); font-size: 13px; }
.hc-numbers p, .hc-numbers a { grid-column: 1/-1; }
.hc-numbers p { color: var(--hc-muted); font-size: 13px; }

.hc-footer { padding: 40px 0 16px; border-top: 1px solid var(--hc-line); background: var(--hc-surface); color: var(--hc-ink); }
.hc-footer-services { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-bottom: 26px; margin-bottom: 28px; border-bottom: 1px solid var(--hc-line); }
.hc-footer-services a, .hc-footer-services button { min-height: 44px; display: inline-flex; align-items: center; padding: 0; border: 0; background: transparent; color: var(--hc-action); font: 600 13px/1.4 inherit; }
.hc-footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 24px; }
.hc-footer-grid h2, .hc-footer-grid h3 { margin: 0 0 12px; color: var(--hc-ink); font-size: 15px; }
.hc-footer-grid p, .hc-footer-grid small { display: block; margin: 0 0 12px; color: var(--hc-muted); font-size: 12px; }
.hc-footer-grid a, .hc-footer-grid button { min-height: 44px; display: flex; align-items: center; padding: 0; border: 0; background: transparent; color: var(--hc-action); font: 600 13px/1.4 inherit; text-align: left; }
.hc-footer-grid [hidden] { display: none !important; }
.hc-seals { max-width: none; margin-top: 28px; padding-block: 24px; border-block: 1px solid var(--hc-line); background: #f7f7f7; text-align: center; }
.hc-seals > div { display: inline-flex; align-items: center; justify-content: center; gap: 28px; max-width: 100%; padding: 16px 20px; }
.hc-seals > div > img { width: 350px; height: auto; max-width: 65%; object-fit: contain; }
.hc-snc-mark { position: relative; width: 154px; height: 90px; display: block; flex: 0 0 154px; overflow: hidden; background: #f7f7f7; }
.hc-snc-mark img { position: absolute; top: -58px; left: -64px; width: 282px !important; max-width: none !important; height: 432px !important; }
.hc-footer-end { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; color: var(--hc-muted); font-size: 11px; }

#chat-btn.hc-help-open { position: fixed !important; right: 24px !important; bottom: 24px !important; z-index: 401 !important; min-height: 48px; display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1px solid transparent; border-radius: 999px; background: #1a3a7c; color: #fff; box-shadow: 0 6px 22px rgba(12,27,50,.24); font-weight: 700; cursor: pointer; }
#chat-btn.hc-help-open:hover { background: #112d69; }
#chat-btn.hc-help-open svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#chat-janela.hc-help-dialog { position: fixed !important; inset: 50% auto auto 50% !important; z-index: 510 !important; width: min(680px, calc(100% - 32px)) !important; max-height: min(88dvh, 780px); overflow: auto; transform: translate(-50%, -50%); border: 1px solid var(--hc-line); border-radius: 8px; background: var(--hc-surface); color: var(--hc-ink); box-shadow: 0 24px 70px rgba(12,27,50,.28); }
.hc-help-backdrop { position: fixed; inset: 0; z-index: 500; display: none; background: rgba(12,27,50,.68); }
.hc-help-backdrop.open { display: block; }
.hc-chat-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 22px 24px 14px; border-bottom: 1px solid var(--hc-line); background: var(--hc-surface); }
.hc-chat-head h2 { margin: 0; color: var(--hc-ink); font-size: 23px; }
.hc-chat-head p { margin: 0 0 4px; color: var(--hc-muted); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
#chat-msgs { height: auto !important; min-height: 200px; max-height: 330px; padding: 18px 24px !important; background: var(--hc-canvas) !important; }
#chat-msgs .hc-chat-intro { margin-bottom: 14px; color: var(--hc-muted); font-size: 14px; }
#opcoes-rapidas { margin: 0 !important; display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
#chat-janela .chat-op { min-height: 48px; padding: 10px 12px; border: 1px solid var(--hc-field); border-radius: 6px; background: var(--hc-surface); color: var(--hc-action); font: 650 14px/1.35 "Segoe UI", Arial, sans-serif; text-align: left; }
#chat-janela .chat-op:hover { background: var(--hc-selected); border-color: var(--hc-action); }
#chat-janela .balao-bot, #chat-janela .balao-user { max-width: 88%; padding: 10px 13px; border-radius: 7px; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; }
#chat-janela .balao-bot { border: 1px solid var(--hc-line); background: var(--hc-surface); color: var(--hc-ink); }
#chat-janela .balao-user { background: var(--hc-action); color: var(--hc-surface); }
#chat-janela .avatar-bot { display: none; }
.hc-chat-compose { padding: 14px 24px; border-top: 1px solid var(--hc-line); background: var(--hc-surface); }
#chat-contato-box { padding: 12px 24px 0 !important; border-top: 1px solid var(--hc-line) !important; }
#chat-contato, #chat-input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--hc-field) !important; border-radius: 5px !important; background: var(--hc-surface); color: var(--hc-ink) !important; font: 16px/1.4 "Segoe UI", Arial, sans-serif !important; }
#chat-input { min-height: 112px; resize: vertical; }
#chat-envio-box { display: grid; grid-template-columns: 1fr auto; align-items: end !important; gap: 10px !important; padding: 12px 24px 16px !important; }
#chat-enviar { width: auto !important; min-width: 120px; height: 48px !important; padding: 10px 16px; border-radius: 5px !important; background: var(--hc-action) !important; color: var(--hc-surface) !important; font: 700 14px/1.2 "Segoe UI", Arial, sans-serif !important; }
#chat-enviar:disabled { cursor: wait; opacity: .7; }
#chat-porta-login { padding: 16px 24px !important; border-top: 1px solid var(--hc-line) !important; color: var(--hc-ink); }
#chat-porta-login > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#chat-porta-login button, #chat-porta-login a { min-height: 44px !important; border-radius: 5px !important; font-family: "Segoe UI", Arial, sans-serif !important; }
#chat-porta-login button { padding: 10px 16px; border: 1px solid var(--hc-action); font-weight: 700; }
#chat-btn-entrar { background: var(--hc-action); color: var(--hc-surface); }
#chat-btn-criar { background: var(--hc-surface); color: var(--hc-action); }
#chat-porta-login > a { display: inline-flex; align-items: center; margin-top: 10px; color: var(--hc-action) !important; font-weight: 650; }
.hc-chat-foot { padding: 10px 24px; border-top: 1px solid var(--hc-line); background: var(--hc-selected); color: var(--hc-muted); font-size: 12px; text-align: center; }

#hc-novo-visual { color: var(--hc-ink); background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: 8px; padding: 28px; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; }
#hc-novo-visual::backdrop { background: rgba(12,27,50,.7); }
#hc-novo-visual h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.22; }
#hc-novo-visual p { margin: 0 0 22px; color: var(--hc-muted); line-height: 1.65; }
#hc-novo-visual .hc-button { width: 100%; }

@media (max-width: 1100px) {
  .hc-desktop-nav { display: none; }
  .hc-menu-button { display: inline-grid; }
  .hc-institution span { display: none; }
  .hc-intro { gap: 32px; }
  .hc-intro h1 { font-size: 42px; }
}
@media (max-width: 800px) {
  .hc-wrap { padding-inline: 24px; }
  .hc-intro { gap: 24px; }
  .hc-intro h1 { font-size: 36px; }
  .hc-op-body { align-items: start; flex-direction: column; }
  .hc-footer-grid { grid-template-columns: 1fr 1fr; }
  .hc-community { gap: 32px; }
  #avisos-grid { grid-template-columns: 1fr 1fr; }
  #chat-btn.hc-help-open { bottom: calc(var(--nav-mobile-h, 72px) + 12px) !important; }
  .hc-footer { padding-bottom: calc(var(--nav-mobile-h, 72px) + 26px); }
}
@media (max-width: 580px) {
  .hc-wrap { padding-inline: 20px; }
  .hc-institution-inner { min-height: 56px; gap: 8px; }
  .hc-institution img { width: 205px; }
  .hc-institution a { max-width: 110px; font-size: 10px; }
  .hc-head-inner { min-height: 86px; flex-wrap: wrap; padding-block: 10px; }
  .hc-brand strong { font-size: 21px; }
  .hc-brand small { font-size: 11px; }
  .hc-brand svg { width: 38px; height: 38px; }
  .hc-head-actions { flex: 1; justify-content: flex-end; }
  #btn-tema { display: none; }
  .hc-intro { grid-template-columns: 1fr; padding-block: 28px; }
  .hc-intro h1 { font-size: 36px; letter-spacing: -1.1px; }
  .hc-lead { margin-top: 16px !important; font-size: 16px; }
  .hc-hero-actions { gap: 8px; margin-top: 24px; }
  .hc-hero-actions > .hc-button { padding: 10px 12px; gap: 10px; font-size: 14px; }
  .hc-place { display: grid; grid-template-columns: 42% 1fr; }
  .hc-place-media { grid-column: 1/-1; }
  .hc-place-media img { height: 200px; }
  .hc-place figcaption { grid-column: 1/-1; }
  #destaque-pnab.hc-campaign { width: calc(100% - 40px); margin: 20px 20px 0; padding: 16px; flex-direction: column; align-items: start; }
  .hc-opportunities { padding: 8px 20px 32px; }
  .hc-section-head { align-items: start; flex-wrap: wrap; margin-bottom: 16px; }
  .hc-op-body { min-height: 238px; padding: 20px; }
  .hc-service-grid { grid-template-columns: 1fr; }
  .hc-service { min-height: 124px; padding: 20px; border-right: 0 !important; border-bottom: 1px solid var(--hc-line) !important; }
  .hc-service:last-child { border-bottom: 0 !important; }
  .hc-services { padding-bottom: 32px; }
  .hc-notices { padding-block: 32px; }
  #avisos-grid { grid-template-columns: 1fr; }
  #destaques-home .dh-cartao.ativo { grid-template-columns: 1fr; }
  #destaques-home .dh-fotos { min-height: 200px; }
  .hc-community { grid-template-columns: 1fr; padding-block: 32px; gap: 24px; }
  .hc-numbers { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--hc-line); }
  .hc-footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hc-footer-grid > div:first-child { grid-column: 1/-1; }
  .hc-seals > div { width: 100%; flex-direction: column; gap: 12px; }
  .hc-seals > div > img { width: 300px; max-width: 100%; }
  .hc-snc-mark { flex-basis: 90px; }
  .hc-footer-end { flex-direction: column; gap: 4px; }
  #chat-btn.hc-help-open { right: 14px !important; }
  #chat-janela.hc-help-dialog { inset: 0 !important; width: 100% !important; max-width: none !important; max-height: 100dvh; height: 100dvh; transform: none; border: 0; border-radius: 0; }
  #opcoes-rapidas { grid-template-columns: 1fr; }
  #chat-msgs { max-height: none; }
  #chat-envio-box { grid-template-columns: 1fr !important; }
  #chat-enviar { width: 100% !important; }
  #hc-novo-visual { padding: 22px; }
}
@media (max-width: 390px) {
  .hc-head-inner { display: grid; grid-template-columns: 1fr; }
  .hc-head-actions { width: 100%; justify-content: space-between; }
  #nav-deslogado { flex: 1; }
  #nav-deslogado .hc-button { flex: 1; padding-inline: 8px; }
  #btn-tema { display: inline-grid; }
  #chat-btn.hc-help-open { right: 12px !important; padding-inline: 14px; }
  #chat-btn.hc-help-open span { max-width: 118px; line-height: 1.15; text-align: left; }
}
@media (max-width: 1024px) {
  #chat-btn.hc-help-open { position: static !important; margin-top: 20px; max-width: 100%; box-shadow: none; border-radius: 5px; }
  #chat-btn.hc-help-open span { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-place-media img { transition: none !important; }
  .hc-main { scroll-behavior: auto; }
}
/* Modais de cadastro e documentos são superfícies da mesma plataforma. */
body.home-civica .modal {font-family:"Segoe UI",Arial,sans-serif;border-radius:8px;}
body.home-civica .modal :is(h3,input,select,textarea,button) {font-family:"Segoe UI",Arial,sans-serif;}
body.home-civica .modal :is(input,select,textarea) {font-size:16px;}
body.home-civica .modal :is(.dica,.sub,.campo label,.lgpd) {font-size:14px;line-height:1.55;}
body.home-civica .modal :is(button,.mb) {min-height:44px;font-size:14px;}
body.home-civica .modal .mf {width:44px;height:44px;top:6px;right:6px;}
body.home-civica #modal-cad {max-width:960px;}
body.home-civica #bloco-requisitos summary {cursor:pointer;min-height:44px;font-size:15px;line-height:1.5;}
body.home-civica #bloco-requisitos p {font-size:14px!important;}
body.home-civica #modal-cad h3 {font-size:28px;}
@media(max-width:600px){body.home-civica #modal-cad {max-height:94dvh;padding:48px 20px 24px;}body.home-civica .modal h3 {font-size:24px;}}

/* Opções nativas não recebem a largura dos campos de texto. */
body.home-civica .overlay input:is([type="radio"],[type="checkbox"]) {width:18px!important;min-width:18px;max-width:18px;min-height:18px;height:18px;flex:0 0 18px;padding:0!important;}
body.home-civica :is(#cc-rad-artista-label,#cc-rad-outro-label) {align-items:flex-start!important;gap:12px!important;}
body.home-civica :is(#cc-rad-artista-label,#cc-rad-outro-label)>input {margin-top:4px!important;}
body.home-civica :is(#cc-rad-artista-label,#cc-rad-outro-label)>span {flex:1;min-width:0;}
body.home-civica .cv-icon {vertical-align:middle;flex-shrink:0;}

.cv-aviso-presencial {padding:12px 14px;background:#fff4d5;color:#754500;border:1px solid #dbc06a;border-radius:6px;font-size:14px;line-height:1.5;}

/* Boas-vindas é parte do percurso público, com a mesma linguagem do portal. */
body.home-civica #boas-vindas .bv-cx{background:#fff;border-radius:8px;color:#18283b;}
body.home-civica #boas-vindas .bv-halo{display:none;}
body.home-civica #boas-vindas :is(.bv-marca b,.bv-tit,.bv-sub,.bv-porta h3){font-family:"Segoe UI",Arial,sans-serif;color:#18283b;}
body.home-civica #boas-vindas .bv-tit em{color:#1a3a7c;font-style:normal;}
body.home-civica #boas-vindas :is(.bv-lead,.bv-lead b,.bv-marca s,.bv-porta.p2 p){color:#556273;}
body.home-civica #boas-vindas .bv-marca s{font-size:12px;letter-spacing:.04em;}
body.home-civica #boas-vindas .bv-selo{background:#eaf0fa;border-color:#bac9e1;color:#1a3a7c;}
body.home-civica #boas-vindas .bv-porta{background:#f2f5f8;border:1px solid #d5dce5;border-radius:6px;}
body.home-civica #boas-vindas .bv-porta.p2 .bv-etq{background:#eaf0fa;color:#1a3a7c;}
body.home-civica #boas-vindas .bv-porta :is(p,.bv-fatos){font-size:14px;}
body.home-civica #boas-vindas .bv-bt{background:#1a3a7c;color:#fff;border-color:#1a3a7c;border-radius:5px;}
body.home-civica #boas-vindas .bv-x{background:#fff;color:#1a3a7c;border-color:#768393;}

body.home-civica:has(#boas-vindas.aberto) #nav-mobile,body.home-civica:has(#boas-vindas.aberto) #bsq-fab{display:none!important;}

body.home-civica #boas-vindas .bv-chips i{background:#eaf0fa;color:#1a3a7c;font-size:14px;}
body.home-civica #boas-vindas .bv-chips>span:first-child{color:#546479;font-size:12px;}
body.home-civica #boas-vindas .bv-marca svg{background:#1a3a7c;border-radius:10px;}
@media(max-width:900px){body.home-civica #boas-vindas .bv-esq{margin-top:0;padding-top:20px;}body.home-civica #boas-vindas .bv-dir{min-height:140px;height:140px;}}

/* Cinco links reais do destaque: preservar a leitura integral dos títulos no celular. */
@media(max-width:600px){#destaques-home .dh-links{display:grid;grid-template-columns:minmax(0,1fr);}#destaques-home .dh-lk{width:100%;min-width:0;justify-content:flex-start;text-align:left;}}
