/* (23/11/2026) CONHECIMENTO PRECS (site/telas/iacontexto/iacontexto.css). Era o "Contexto da IA"; virou a tela do que as IAs da
   PRECS sabem e dos documentos da Diretoria, em quatro MUNDOS: a IA do HUB (paleta 8, o índigo da IA PRECS), a IA do Site (paleta
   7, o teal, a que vai falar com o credor), os Documentos internos (paleta 10, o bronze da gestão) e a Linha do tempo (paleta 2, o
   coral). "Ela tem q estar incrivel visualmente animações cores transições fonte hover etc" (Pedro, 23/11/2026).
   Como a cor funciona: a raiz .precs-icx[data-mundo] escolhe a --icx-cor, que é REGISTRADA com @property (é uma <color>), e por
   isso a tela inteira muda de cor transicionando quando a pessoa troca de mundo; cada peça que carrega a cor de um mundo fixo (os
   cartões do alto, os eventos da linha do tempo, os filtros, o selo das janelas) usa a --icx-m do próprio [data-mundo].
   A cor é FORMA (borda, ícone, fundo tingido, brilho): o texto fica no tom do texto (--text-primary/-secondary), e o teste da tela
   mede o contraste renderizado em temas claros e escuros. A diferença nunca é só cor: "+" na linha que entra, "−" na que sai, e o
   leitor de tela ouve "Entra:" e "Sai:". Toda entrada tem saída (o palco sai para um lado e o mundo novo entra pelo outro), e com
   prefers-reduced-motion nada anda. As regras do celular em pé ficam no fim, com html[data-aparelho="retrato"] (são só desta tela).
   Tudo por token (a catraca teste-estilo-tokens.js conta). */

@property --icx-cor{ syntax: '<color>'; inherits: true; initial-value: transparent; }

.precs-hub-cartao[data-id="iacontexto"]{ --precs-cartao-cor: var(--precs-paleta-8); --precs-cartao-tinta: color-mix(in srgb, var(--precs-paleta-8) 72%, var(--text-primary)); }
html[data-ferramenta="iacontexto"]{ --precs-ferr-cor: var(--precs-paleta-8); --precs-ferr-tinta: color-mix(in srgb, var(--precs-paleta-8) 72%, var(--text-primary)); }

/* ---- a raiz: a cor do mundo aberto, que transiciona na troca */
.precs-icx{ --icx-cor: var(--precs-paleta-8); --icx-entra: var(--accent-green); --icx-sai: var(--accent-red);
  display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; transition: --icx-cor var(--dur-3) var(--ease-1); }
.precs-icx[data-mundo="site"]{ --icx-cor: var(--precs-paleta-7); }
.precs-icx[data-mundo="interno"]{ --icx-cor: var(--precs-paleta-10); }
.precs-icx[data-mundo="linha"]{ --icx-cor: var(--precs-paleta-2); }
.precs-icx [data-mundo="hub"], .precs-icx-dlg-area[data-mundo="hub"]{ --icx-m: var(--precs-paleta-8); }
.precs-icx [data-mundo="site"], .precs-icx-dlg-area[data-mundo="site"]{ --icx-m: var(--precs-paleta-7); }
.precs-icx [data-mundo="interno"], .precs-icx-dlg-area[data-mundo="interno"]{ --icx-m: var(--precs-paleta-10); }
.precs-icx [data-mundo="linha"], .precs-icx-dlg-area[data-mundo="linha"]{ --icx-m: var(--precs-paleta-2); }
.precs-icx button, .precs-icx input, .precs-icx textarea{ font-family: var(--font-corpo); }

/* ---- os botões */
.precs-icx-btn{ position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 40px; min-width: 40px; padding: var(--space-1) var(--space-4); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-secondary); color: var(--text-secondary); font-family: var(--font-acao); font-size: var(--fs-4); font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden;
  transition: color var(--dur-1) var(--ease-1), border-color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1), transform var(--dur-1) var(--ease-1), box-shadow var(--dur-2) var(--ease-1); }
.precs-icx-btn:hover:not(:disabled){ color: var(--text-primary); border-color: var(--icx-cor); transform: translateY(-1px); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-cor) 22%, transparent); }
.precs-icx-btn:active:not(:disabled){ transform: translateY(0) scale(.98); }
.precs-icx-btn.forte{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 18%, var(--bg-secondary)); color: var(--text-primary); font-weight: 700; }
.precs-icx-btn.forte svg{ color: var(--icx-cor); }
.precs-icx-btn.forte:hover:not(:disabled){ background: color-mix(in srgb, var(--icx-cor) 28%, var(--bg-secondary)); }
/* o brilho que atravessa o botão forte no hover (o mesmo da marca em todos os temas) */
.precs-icx-btn.forte::after{ content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--marca-texto) 22%, transparent) 50%, transparent 65%); transform: translateX(-110%); pointer-events: none; }
.precs-icx-btn.forte:hover:not(:disabled)::after{ transform: translateX(110%); transition: transform .7s var(--ease-2); }
.precs-icx-btn.leve{ min-height: 32px; padding: 0 var(--space-3); background: transparent; font-size: var(--fs-3); }
.precs-icx-btn.leve.desfazer:hover:not(:disabled){ border-color: var(--accent-orange); }
.precs-icx-btn.icone{ padding: var(--space-1); }
.precs-icx-btn:disabled{ opacity: .45; cursor: default; }
.precs-icx-btn:focus-visible, .precs-icx-abas button:focus-visible, .precs-icx-vistas button:focus-visible, .precs-icx-item:focus-visible, .precs-icx-espera button:focus-visible, .precs-icx-pre:focus-visible, .precs-icx-sugestoes summary:focus-visible,
.precs-icx-mundo:focus-visible, .precs-icx-pasta:focus-visible, .precs-icx-doc-item:focus-visible, .precs-icx-filtro:focus-visible, .precs-icx-chave:focus-visible, .precs-icx-pasta-esc button:focus-visible, .precs-icx-toc button:focus-visible, .precs-icx-md:focus-visible, .precs-icx-md-tab:focus-visible{ outline: var(--focus-ring-largura) solid var(--focus-ring-cor); outline-offset: var(--focus-ring-folga); }
.precs-icx-texto:focus-visible, .precs-icx-pergunta:focus-visible, .precs-icx-q:focus-visible, .precs-icx-nota-campo:focus-visible, .precs-icx-coment:focus-visible, .precs-icx-campo:focus-visible{ outline: var(--focus-ring-largura) solid var(--focus-ring-cor); outline-offset: 1px; }

/* ---- OS MUNDOS: os quatro cartões no alto, cada um com a cor, o ícone e a ilustração da área */
.precs-icx-mundos{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); min-width: 0; }
.precs-icx-mundos[hidden]{ display: none; }
.precs-icx-mundo{ --icx-m: var(--precs-paleta-8); position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "il pe" "nome nome" "desc desc"; align-items: center; column-gap: var(--space-3); row-gap: var(--space-1); min-width: 0; min-height: 132px; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-color); border-radius: var(--radius-card); overflow: hidden; cursor: pointer; text-align: left; color: var(--text-secondary);
  background: radial-gradient(120% 150% at 0% 0%, color-mix(in srgb, var(--icx-m) 12%, transparent), transparent 62%), var(--bg-secondary);
  transition: transform var(--dur-2) var(--ease-1), border-color var(--dur-2) var(--ease-1), box-shadow var(--dur-3) var(--ease-1), background-color var(--dur-2) var(--ease-1); }
.precs-icx-mundo:hover{ transform: translateY(-3px); border-color: color-mix(in srgb, var(--icx-m) 65%, var(--border-color)); box-shadow: var(--elev-2) color-mix(in srgb, var(--icx-m) 24%, transparent); }
.precs-icx-mundo.sel{ border-color: var(--icx-m); background: radial-gradient(130% 170% at 0% 0%, color-mix(in srgb, var(--icx-m) 30%, transparent), transparent 70%), var(--bg-secondary); box-shadow: var(--elev-2) color-mix(in srgb, var(--icx-m) 30%, transparent); }
/* a régua do mundo aberto, embaixo do cartão, que cresce do meio */
.precs-icx-mundo::after{ content: ''; position: absolute; left: var(--space-4); right: var(--space-4); bottom: 0; height: 3px; border-radius: var(--radius-pill) var(--radius-pill) 0 0; background: var(--icx-m); transform: scaleX(0); transition: transform var(--dur-3) var(--ease-2); }
.precs-icx-mundo.sel::after{ transform: scaleX(1); }
/* o brilho que passa pelo cartão escolhido, uma vez, na troca */
.precs-icx-mundo::before{ content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--marca-texto) 16%, transparent) 50%, transparent 70%); transform: translateX(-110%); pointer-events: none; }
.precs-icx-mundos.troca .precs-icx-mundo.sel::before{ animation: precsIcxVarre 1.1s var(--ease-2) .08s both; }
.precs-icx-mundos.troca .precs-icx-mundo.sel{ animation: precsIcxEscolhe .5s var(--ease-2) both; }
.precs-icx-mundo-il{ grid-area: il; width: 84px; height: 56px; color: var(--icx-m); transition: transform var(--dur-3) var(--ease-2); }
.precs-icx-mundo:hover .precs-icx-mundo-il{ transform: scale(1.06) rotate(-2deg); }
.precs-icx-mundo-il svg{ display: block; width: 100%; height: 100%; overflow: visible; }
.precs-icx-mundo-txt{ display: contents; }
.precs-icx-mundo-nome{ grid-area: nome; display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; margin-top: var(--space-1); }
.precs-icx-mundo-nome svg{ flex: 0 0 auto; color: var(--icx-m); }
.precs-icx-mundo-nome b{ color: var(--text-primary); font-family: var(--font-titulo); font-size: var(--fs-10); font-weight: 700; }
.precs-icx-mundo-desc{ grid-area: desc; color: var(--text-secondary); font-size: var(--fs-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.precs-icx-mundo-pe{ grid-area: pe; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); text-align: right; }
.precs-icx-mundo-stat{ color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 600; }
.precs-icx-mundo-skel{ cursor: default; }
.precs-icx-mundo-skel{ display: flex; }
.precs-icx-mundo-skel .precs-skel-card{ width: 100%; min-height: 104px; }
.precs-icx-mundos.precs-icx-skel .precs-icx-mundo:hover{ transform: none; box-shadow: none; }

/* as ilustrações: corpo de vidro na cor do mundo, traço e cheio; andam só no cartão aberto e no que está sob o mouse */
.precs-icx-il-corpo{ fill: color-mix(in srgb, currentColor 18%, transparent); stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.precs-icx-il-traco{ fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.precs-icx-il-cheio{ fill: currentColor; }
.precs-icx-il-fundo{ fill: var(--bg-secondary); }
.precs-icx-il-fraco{ opacity: .45; }
.precs-icx-il-anda{ transform-box: fill-box; transform-origin: center; animation-play-state: paused; }
.precs-icx-mundo.sel .precs-icx-il-anda, .precs-icx-mundo:hover .precs-icx-il-anda{ animation-play-state: running; }
.precs-icx-il-flutua{ animation: precsIcxFlutua 4.6s ease-in-out infinite; }
.precs-icx-il-pisca{ animation: precsIcxBrilha 2.8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .45s); }
.precs-icx-il-pulsa{ animation: precsIcxPulsa 3.4s ease-in-out infinite; }
.precs-icx-il-leque{ transform-origin: 50% 100%; animation: precsIcxLeque 5.2s ease-in-out infinite; }

/* os selos: no ar (a bolinha verde com a onda), ainda não está no ar (o anel laranja), só a Diretoria (o ouro) */
.precs-icx-selo{ display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-2); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 700; white-space: nowrap; }
.precs-icx-selo i{ position: relative; flex: 0 0 auto; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--marca-ouro); }
.precs-icx-selo.noar i{ background: var(--accent-green); }
.precs-icx-selo.noar i::after{ content: ''; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: precsIcxOnda 2.2s var(--ease-2) infinite; }
.precs-icx-selo.fora i{ background: transparent; border: 2px solid var(--accent-orange); box-sizing: border-box; }

/* ---- O PALCO: o mundo aberto; a troca sai para um lado e o novo entra pelo outro */
.precs-icx-palco{ display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.precs-icx-palco.entra{ animation: precsIcxEntraDir .46s var(--ease-2) both; }
.precs-icx-palco.entra[data-dir="-1"]{ animation-name: precsIcxEntraEsq; }
.precs-icx-palco.saindo{ animation: precsIcxSaiEsq var(--dur-2) var(--ease-3) both; pointer-events: none; }
.precs-icx-palco.saindo[data-dir="-1"]{ animation-name: precsIcxSaiDir; }
.precs-icx-ia, .precs-icx-int, .precs-icx-linha{ display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }

/* a faixa da área: ninguém edita a IA errada (o nome, o selo e quem lê, sempre à vista) */
.precs-icx-faixa{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-width: 0; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-2); border: 1px solid color-mix(in srgb, var(--icx-cor) 50%, var(--border-color)); border-radius: var(--radius-card);
  background: linear-gradient(100deg, color-mix(in srgb, var(--icx-cor) 18%, var(--bg-secondary)), var(--bg-secondary) 58%); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-cor) 14%, transparent); }
.precs-icx-faixa-ico{ display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--radius-inner); background: var(--icx-cor); color: var(--bg-primary); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-cor) 40%, transparent); }
.precs-icx-faixa-txt{ display: flex; flex-direction: column; gap: var(--space-0); min-width: 0; flex: 1 1 220px; }
.precs-icx-faixa-txt b{ color: var(--text-primary); font-family: var(--font-titulo); font-size: var(--fs-11); font-weight: 700; }
.precs-icx-faixa-txt small{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--text-secondary); font-size: var(--fs-3); }
.precs-icx-faixa > .precs-icx-acoes{ margin-left: auto; }
.precs-icx-site-aviso{ display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px dashed var(--icx-cor); border-radius: var(--radius-inner); background: color-mix(in srgb, var(--icx-cor) 8%, var(--bg-secondary)); color: var(--text-secondary); font-size: var(--fs-4); }
.precs-icx-site-aviso > svg{ flex: 0 0 auto; color: var(--icx-cor); }
.precs-icx-site-aviso p{ margin: 0; }
.precs-icx-site-aviso b{ color: var(--text-primary); }

/* ---- as abas da IA e as vistas: pílulas numa fileira que rola de lado se faltar espaço */
.precs-icx-abas, .precs-icx-vistas, .precs-icx-filtros{ display: flex; gap: var(--space-1); align-self: flex-start; max-width: 100%; padding: var(--space-0); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-secondary); overflow-x: auto; scrollbar-width: none; }
.precs-icx-faixa > .precs-icx-abas, .precs-icx-faixa > .precs-icx-filtros{ margin-left: auto; align-self: center; background: var(--bg-primary); }
.precs-icx-abas button, .precs-icx-vistas button, .precs-icx-filtro{ display: inline-flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; min-height: 40px; padding: var(--space-1) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font-family: var(--font-acao); font-size: var(--fs-5); font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: color var(--dur-2) var(--ease-1), background-color var(--dur-2) var(--ease-1), border-color var(--dur-2) var(--ease-1); }
.precs-icx-abas button:hover, .precs-icx-vistas button:hover, .precs-icx-filtro:hover{ color: var(--text-primary); background: color-mix(in srgb, var(--icx-cor) 8%, transparent); }
.precs-icx-abas button.ativa, .precs-icx-vistas button.ativa{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 16%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-abas button.ativa svg, .precs-icx-vistas button.ativa svg{ color: var(--icx-cor); }
.precs-icx-abas button.off{ color: var(--text-muted); }
.precs-icx-abas button.off.ativa{ color: var(--text-primary); }
.precs-icx-conta-aba, .precs-icx-mini{ display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 0 var(--space-1); border-radius: var(--radius-pill); background: var(--bg-tertiary); color: var(--text-primary); font-family: var(--font-num); font-size: var(--fs-2); font-weight: 600; }
.precs-icx-vistas{ font-size: var(--fs-4); }
.precs-icx-vistas-linha{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.precs-icx-foco-btn[aria-pressed="true"]{ border-color: var(--icx-cor); color: var(--text-primary); background: color-mix(in srgb, var(--icx-cor) 16%, var(--bg-secondary)); }

.precs-icx-corpo{ display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.precs-icx-corpo.entra > *{ animation: precsIcxSobe var(--dur-3) var(--ease-2) both; }

/* ---- as seções: a lista à esquerda, o editor à direita; no "em foco" a lista recolhe e o editor ganha a largura */
.precs-icx-secoes{ display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--space-4); align-items: start; min-width: 0; transition: grid-template-columns .4s var(--ease-2), gap .4s var(--ease-2); }
.precs-icx-secoes.foco{ grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.precs-icx-lista{ display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; transition: opacity var(--dur-2) var(--ease-1); }
.precs-icx-secoes.foco .precs-icx-lista{ opacity: 0; visibility: hidden; overflow: hidden; }
.precs-icx-item{ position: relative; display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; min-height: 40px; padding: var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-card); background: var(--bg-secondary); color: var(--text-secondary); text-align: left; cursor: pointer; overflow: hidden;
  transition: border-color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1), transform var(--dur-2) var(--ease-1); }
.precs-icx-item:hover{ border-color: color-mix(in srgb, var(--icx-cor) 60%, var(--border-color)); transform: translateX(2px); }
.precs-icx-item.sel{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 12%, var(--bg-secondary)); }
.precs-icx-item::before{ content: ''; position: absolute; left: 0; top: var(--space-2); bottom: var(--space-2); width: 3px; border-radius: 0 var(--radius-pill) var(--radius-pill) 0; background: var(--icx-cor); transform: scaleY(0); transition: transform var(--dur-3) var(--ease-2); }
.precs-icx-item.sel::before{ transform: scaleY(1); }
.precs-icx-item.muda .precs-icx-item-n{ box-shadow: var(--elev-1) color-mix(in srgb, var(--accent-orange) 35%, transparent); outline: 2px solid var(--accent-orange); outline-offset: 1px; }
.precs-icx-corpo.entra .precs-icx-item{ animation: precsIcxSobe var(--dur-3) var(--ease-2) both; animation-delay: calc(var(--i, 0) * 45ms); }
.precs-icx-item-n{ display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--bg-tertiary); color: var(--text-primary); font-family: var(--font-num); font-size: var(--fs-3); font-weight: 600; }
.precs-icx-item.sel .precs-icx-item-n{ background: var(--icx-cor); color: var(--bg-primary); }
.precs-icx-item-txt{ display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); min-width: 0; }
.precs-icx-item-txt b{ color: var(--text-primary); font-family: var(--font-rotulo); font-size: var(--fs-5); font-weight: 700; }
.precs-icx-item-txt small{ color: var(--text-secondary); font-size: var(--fs-2); }

/* ---- os selos de estado: o texto fica no tom do texto (contraste AA), a cor vai na borda e no ícone */
.precs-icx-chip{ display: inline-flex; vertical-align: middle; align-items: center; gap: var(--space-1); padding: 0 var(--space-2); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-primary); color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 700; white-space: nowrap; }
.precs-icx-chip.publicado{ border-color: var(--accent-green); color: var(--text-primary); }
.precs-icx-chip.publicado svg{ color: var(--accent-green-text); }
.precs-icx-chip.pendente{ border-color: var(--accent-orange); background: color-mix(in srgb, var(--accent-orange) 14%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-chip.pendente svg{ color: var(--accent-orange-text); }
.precs-icx-chip.sujo{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 14%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-chip.sujo svg{ color: var(--icx-cor); }
.precs-icx-chip.responde{ border-color: var(--accent-green); color: var(--text-primary); }
.precs-icx-chip.recusa{ border-color: var(--accent-red); color: var(--text-primary); }

/* ---- o editor */
.precs-icx-painel{ position: relative; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-5); border: 1px solid var(--border-color); border-radius: var(--radius-card); background: var(--bg-secondary); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-cor) 10%, transparent); overflow: hidden; }
.precs-icx-painel::before{ content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--icx-cor), color-mix(in srgb, var(--icx-cor) 0%, transparent)); }
.precs-icx-painel-cab{ display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.precs-icx-painel-tit{ display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; flex: 1 1 260px; }
.precs-icx-painel-tit h2, .precs-icx-leitor-tit h2, .precs-icx-doc-ed-cab h2{ margin: 0; color: var(--text-primary); font-family: var(--font-titulo); font-size: var(--fs-11); font-weight: 700; }
.precs-icx-painel-tit p{ margin: 0; }
.precs-icx-onde{ display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase; }
.precs-icx-onde svg{ color: var(--icx-cor); }
.precs-icx-desc{ margin: 0; color: var(--text-secondary); font-size: var(--fs-4); }
.precs-icx-acoes{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.precs-icx-vista{ display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.precs-icx-rot{ color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-3); font-weight: 600; }
.precs-icx-texto{ width: 100%; min-height: 380px; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); color: var(--text-primary); font-size: var(--fs-6); resize: vertical; box-sizing: border-box; transition: border-color var(--dur-2) var(--ease-1), box-shadow var(--dur-2) var(--ease-1); }
.precs-icx-texto:focus{ border-color: var(--icx-cor); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-cor) 18%, transparent); }
.precs-icx-pe{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.precs-icx-conta{ color: var(--text-secondary); font-family: var(--font-num); font-size: var(--fs-3); }
.precs-icx-conta.passa{ color: var(--accent-red-text); font-weight: 700; }
.precs-icx-nota{ color: var(--text-secondary); font-size: var(--fs-3); }
.precs-icx-nota b{ color: var(--text-primary); }

/* ---- a diferença linha a linha: + entra (verde), − sai (vermelho); o texto sempre no tom do texto */
.precs-icx-legenda{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: 0; color: var(--text-secondary); font-size: var(--fs-3); }
.precs-icx-legenda b{ display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: var(--radius-sm); font-family: var(--font-num); font-size: var(--fs-4); }
.precs-icx-legenda .entra b{ background: color-mix(in srgb, var(--icx-entra) 18%, var(--bg-primary)); color: var(--accent-green-text); }
.precs-icx-legenda .sai b{ background: color-mix(in srgb, var(--icx-sai) 18%, var(--bg-primary)); color: var(--accent-red-text); }
.precs-icx-legenda .fim{ margin-left: auto; color: var(--text-secondary); font-size: var(--fs-2); }
.precs-icx-diff{ margin: 0; padding: 0; list-style: none; max-height: 520px; overflow: auto; border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); font-family: var(--font-num); font-size: var(--fs-3); }
.precs-icx-diff li{ display: grid; grid-template-columns: 28px minmax(0, 1fr); border-bottom: 1px solid color-mix(in srgb, var(--border-color) 50%, transparent); }
.precs-icx-diff .sinal{ display: flex; align-items: flex-start; justify-content: center; padding: var(--space-1) 0; font-weight: 700; }
.precs-icx-diff .txt{ padding: var(--space-1) var(--space-2); color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.precs-icx-diff .igual .txt{ color: var(--text-secondary); }
.precs-icx-diff .entra{ background: color-mix(in srgb, var(--icx-entra) 12%, var(--bg-primary)); }
.precs-icx-diff .entra .sinal{ color: var(--accent-green-text); background: color-mix(in srgb, var(--icx-entra) 22%, var(--bg-primary)); }
.precs-icx-diff .sai{ background: color-mix(in srgb, var(--icx-sai) 12%, var(--bg-primary)); }
.precs-icx-diff .sai .sinal{ color: var(--accent-red-text); background: color-mix(in srgb, var(--icx-sai) 22%, var(--bg-primary)); }
.precs-icx-diff .sai .txt{ text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-primary) 45%, transparent); }
.precs-icx-diff .pulo{ background: var(--bg-secondary); }
.precs-icx-diff .pulo .sinal, .precs-icx-diff .pulo .txt{ color: var(--text-secondary); font-family: var(--font-corpo); font-style: italic; }
.precs-icx-vista .precs-icx-diff .entra, .precs-icx-vista .precs-icx-diff .sai{ animation: precsIcxRisca .5s var(--ease-2) both; animation-delay: calc(var(--i, 0) * 25ms); }

/* ---- o aviso do 409 */
.precs-icx-aviso{ display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--accent-orange); border-radius: var(--radius-inner); background: color-mix(in srgb, var(--accent-orange) 10%, var(--bg-secondary)); color: var(--text-primary); font-size: var(--fs-4); animation: precsIcxSobe var(--dur-3) var(--ease-2) both; }
.precs-icx-aviso > svg{ flex: 0 0 auto; color: var(--accent-orange-text); }
.precs-icx-aviso > div{ display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.precs-icx-aviso-acoes{ display: flex; flex-wrap: wrap; gap: var(--space-2); }
.precs-icx-guardado{ width: 100%; min-height: 120px; padding: var(--space-2); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); color: var(--text-primary); font-size: var(--fs-4); box-sizing: border-box; resize: vertical; }

/* ---- o histórico (das seções e dos documentos) */
.precs-icx-hist{ display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.precs-icx-hist li{ display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--border-color); border-left: 3px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); transition: border-color var(--dur-2) var(--ease-1), transform var(--dur-2) var(--ease-1); }
.precs-icx-hist li:hover{ border-left-color: var(--icx-cor); transform: translateX(2px); }
.precs-icx-hist li.atual{ border-color: var(--accent-green); border-left-color: var(--accent-green); }
.precs-icx-hist li.aberto{ border-left-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 8%, var(--bg-primary)); }
.precs-icx-vista .precs-icx-hist li, .precs-icx-leitor-corpo .precs-icx-hist li{ animation: precsIcxSobe var(--dur-3) var(--ease-2) both; animation-delay: calc(var(--i, 0) * 40ms); }
.precs-icx-hist-cab{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); color: var(--text-primary); font-size: var(--fs-4); }
.precs-icx-hist-cab time{ color: var(--text-secondary); font-size: var(--fs-3); }
.precs-icx-hist p{ margin: 0; color: var(--text-secondary); font-size: var(--fs-4); overflow-wrap: anywhere; }
.precs-icx-hist-pe{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.precs-icx-hist-pe small{ color: var(--text-secondary); font-size: var(--fs-2); }

/* ---- testar e provas */
.precs-icx-teste, .precs-icx-provas, .precs-icx-previa{ display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.precs-icx-ajuda{ margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-color); border-left: 3px solid var(--icx-cor); border-radius: var(--radius-inner); background: var(--bg-secondary); color: var(--text-secondary); font-size: var(--fs-4); }
.precs-icx-ajuda b{ color: var(--text-primary); }
.precs-icx-mudou{ margin: 0; color: var(--text-secondary); font-size: var(--fs-4); }
.precs-icx-perg{ display: flex; align-items: flex-start; gap: var(--space-2); }
.precs-icx-pergunta, .precs-icx-q{ flex: 1 1 auto; width: 100%; min-height: 48px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); color: var(--text-primary); font-size: var(--fs-5); resize: vertical; box-sizing: border-box; }
.precs-icx-lado{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); min-width: 0; }
.precs-icx-resp{ display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-3); border: 1px solid var(--border-color); border-top-width: 4px; border-radius: var(--radius-inner); background: var(--bg-secondary); transition: border-color var(--dur-2) var(--ease-1); }
.precs-icx-resp.pub{ border-top-color: var(--text-muted); }
.precs-icx-resp.ras{ border-top-color: var(--icx-cor); }
.precs-icx-resp.gerando{ animation: precsIcxPensa 1.4s ease-in-out infinite; }
.precs-icx-resp-cab{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.precs-icx-resp-cab b{ color: var(--text-primary); font-family: var(--font-rotulo); font-size: var(--fs-4); font-weight: 700; }
.precs-icx-resp-cab small{ color: var(--text-secondary); font-family: var(--font-num); font-size: var(--fs-2); }
.precs-icx-resp-txt{ min-height: 72px; color: var(--text-primary); font-size: var(--fs-4); white-space: pre-wrap; overflow-wrap: anywhere; }
.precs-icx-resp-erro{ margin: 0; color: var(--accent-red-text); font-size: var(--fs-3); font-weight: 600; }
.precs-icx-provas-barra{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.precs-icx-provas-lista{ display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.precs-icx-prova{ display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-card); background: var(--bg-secondary); }
.precs-icx-corpo.entra .precs-icx-prova{ animation: precsIcxSobe var(--dur-3) var(--ease-2) both; animation-delay: calc(var(--i, 0) * 40ms); }
.precs-icx-prova-cab{ display: flex; align-items: flex-start; gap: var(--space-2); }
.precs-icx-prova-linha{ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.precs-icx-espera{ display: inline-flex; gap: var(--space-1); padding: var(--space-0); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-primary); }
.precs-icx-espera button{ min-height: 40px; padding: var(--space-1) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font-family: var(--font-acao); font-size: var(--fs-3); font-weight: 600; cursor: pointer; }
.precs-icx-espera button.responde.ativa{ border-color: var(--accent-green); background: color-mix(in srgb, var(--accent-green) 14%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-espera button.recusa.ativa{ border-color: var(--accent-red); background: color-mix(in srgb, var(--accent-red) 14%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-espera button:disabled{ cursor: default; }
.precs-icx-nota-campo, .precs-icx-campo{ flex: 1 1 240px; min-width: 0; min-height: 40px; padding: var(--space-1) var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); color: var(--text-primary); font-size: var(--fs-4); box-sizing: border-box; }
.precs-icx-progresso{ display: flex; flex-direction: column; gap: var(--space-1); color: var(--text-secondary); font-size: var(--fs-4); }
.precs-icx-barra{ height: 6px; border-radius: var(--radius-pill); background: var(--bg-tertiary); overflow: hidden; }
.precs-icx-barra i{ display: block; height: 100%; width: var(--icx-p, 0%); border-radius: var(--radius-pill); background: var(--icx-cor); transition: width var(--dur-3) var(--ease-2); }
.precs-icx-sugestoes summary{ min-height: 40px; display: flex; align-items: center; color: var(--text-primary); font-family: var(--font-rotulo); font-weight: 700; cursor: pointer; }
.precs-icx-sugestoes p{ margin: var(--space-2) 0; }
.precs-icx-sugestoes ol{ display: flex; flex-direction: column; gap: var(--space-1); margin: 0 0 var(--space-3); padding-left: var(--space-5); color: var(--text-primary); }
.precs-icx-site-off .precs-icx-vazio{ border-color: color-mix(in srgb, var(--icx-cor) 50%, var(--border-color)); background: color-mix(in srgb, var(--icx-cor) 5%, transparent); }

/* ---- o que a IA vê */
.precs-icx-previa-cab{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.precs-icx-pre{ margin: 0; max-height: 620px; overflow: auto; padding: var(--space-4); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-num); font-size: var(--fs-3); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- DOCUMENTOS INTERNOS: a lista por pasta à esquerda, o leitor à direita */
.precs-icx-docs{ display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: var(--space-4); align-items: start; min-width: 0; }
.precs-icx-docs-lado{ display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.precs-icx-busca{ display: flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-secondary); color: var(--text-secondary); transition: border-color var(--dur-2) var(--ease-1); }
.precs-icx-busca:focus-within{ border-color: var(--icx-cor); outline: var(--focus-ring-largura) solid var(--focus-ring-cor); outline-offset: 1px; }
.precs-icx-busca input{ flex: 1 1 auto; min-width: 0; min-height: 38px; border: 0; background: transparent; color: var(--text-primary); font-size: var(--fs-5); outline: none; }
.precs-icx-busca input::placeholder{ color: var(--text-muted); }
.precs-icx-pastas{ display: flex; flex-wrap: wrap; gap: var(--space-1); }
.precs-icx-pasta{ display: inline-flex; align-items: center; gap: var(--space-1); min-height: 34px; padding: 0 var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-secondary); color: var(--text-secondary); font-family: var(--font-acao); font-size: var(--fs-3); font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1), color var(--dur-1) var(--ease-1); }
.precs-icx-pasta:hover{ color: var(--text-primary); border-color: color-mix(in srgb, var(--icx-cor) 60%, var(--border-color)); }
.precs-icx-pasta.ativa{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 16%, var(--bg-secondary)); color: var(--text-primary); }
.precs-icx-pasta svg{ color: var(--icx-cor); }
.precs-icx-pasta b{ font-family: var(--font-num); font-size: var(--fs-2); font-weight: 600; }
.precs-icx-chave{ display: inline-flex; align-items: center; gap: var(--space-2); align-self: flex-start; min-height: 40px; padding: 0 var(--space-2); border: 0; background: transparent; color: var(--text-secondary); font-family: var(--font-acao); font-size: var(--fs-4); font-weight: 600; cursor: pointer; }
.precs-icx-chave i{ position: relative; width: 32px; height: 18px; border-radius: var(--radius-pill); background: var(--bg-tertiary); border: 1px solid var(--border-color); transition: background-color var(--dur-2) var(--ease-1); }
.precs-icx-chave i::after{ content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: var(--radius-pill); background: var(--text-secondary); transition: transform var(--dur-2) var(--ease-2), background-color var(--dur-2) var(--ease-1); }
.precs-icx-chave[aria-pressed="true"]{ color: var(--text-primary); }
.precs-icx-chave[aria-pressed="true"] i{ background: color-mix(in srgb, var(--icx-cor) 40%, var(--bg-tertiary)); }
.precs-icx-chave[aria-pressed="true"] i::after{ transform: translateX(14px); background: var(--icx-cor); }
.precs-icx-docs-lista{ display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.precs-icx-docs-grupo{ display: flex; flex-direction: column; gap: var(--space-1); }
.precs-icx-docs-pasta{ display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0 var(--space-1); color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase; }
.precs-icx-docs-pasta svg{ color: var(--icx-cor); }
.precs-icx-docs-pasta b{ margin-left: auto; font-family: var(--font-num); font-weight: 600; }
.precs-icx-doc-item{ position: relative; display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 48px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-secondary); color: var(--text-secondary); text-align: left; cursor: pointer; overflow: hidden;
  transition: border-color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1), transform var(--dur-2) var(--ease-1); }
.precs-icx-doc-item:hover{ border-color: color-mix(in srgb, var(--icx-cor) 60%, var(--border-color)); transform: translateX(2px); }
.precs-icx-doc-item.sel{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 12%, var(--bg-secondary)); }
.precs-icx-doc-item.arq{ border-style: dashed; }
.precs-icx-corpo.entra .precs-icx-doc-item{ animation: precsIcxSobe var(--dur-3) var(--ease-2) both; animation-delay: calc(var(--i, 0) * 35ms); }
.precs-icx-doc-ico{ display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--icx-cor) 14%, var(--bg-primary)); color: var(--icx-cor); }
.precs-icx-doc-item.sel .precs-icx-doc-ico{ background: var(--icx-cor); color: var(--bg-primary); }
.precs-icx-doc-txt{ display: flex; flex-direction: column; gap: var(--space-0); min-width: 0; flex: 1 1 auto; }
.precs-icx-doc-txt b{ color: var(--text-primary); font-family: var(--font-rotulo); font-size: var(--fs-5); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.precs-icx-doc-txt small{ color: var(--text-secondary); font-size: var(--fs-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.precs-icx-docs-nada{ margin: 0; padding: var(--space-3); }
.precs-icx-leitor{ position: relative; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-5); border: 1px solid var(--border-color); border-radius: var(--radius-card); background: var(--bg-secondary); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-cor) 10%, transparent); overflow: hidden; }
.precs-icx-leitor::before{ content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--icx-cor), color-mix(in srgb, var(--icx-cor) 0%, transparent)); }
.precs-icx-leitor-cab{ display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3); }
.precs-icx-leitor-tit{ display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 260px; min-width: 0; }
.precs-icx-leitor-tit h2{ overflow-wrap: anywhere; }
.precs-icx-leitor-tit p{ margin: 0; }
.precs-icx-leitor-volta{ display: none; }
.precs-icx-leitor-corpo{ display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.precs-icx-corpo.entra .precs-icx-leitor-corpo{ animation: precsIcxSobe var(--dur-3) var(--ease-2) both; }
.precs-icx-leitor-vazio .precs-icx-vazio{ min-height: 320px; }
.precs-icx-ler{ display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.precs-icx-ler.com-toc{ grid-template-columns: minmax(0, 1fr) 210px; }
.precs-icx-toc{ position: sticky; top: var(--space-2); display: flex; flex-direction: column; gap: var(--space-0); padding: var(--space-3); border-left: 2px solid color-mix(in srgb, var(--icx-cor) 50%, var(--border-color)); }
.precs-icx-toc b{ margin-bottom: var(--space-1); color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase; }
.precs-icx-toc button{ min-height: 32px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: var(--fs-3); text-align: left; cursor: pointer; transition: color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1); }
.precs-icx-toc button:hover{ color: var(--text-primary); background: color-mix(in srgb, var(--icx-cor) 10%, transparent); }
.precs-icx-toc button.n2{ padding-left: var(--space-4); }
.precs-icx-toc button.n3{ padding-left: var(--space-6); font-size: var(--fs-2); }

/* a leitura confortável do Markdown: coluna de ~72 letras, a hierarquia nas fontes da casa */
.precs-icx-md{ max-width: 74ch; color: var(--text-primary); font-family: var(--font-corpo); font-size: var(--fs-7); overflow-wrap: anywhere; }
.precs-icx-md > :first-child{ margin-top: 0; }
.precs-icx-md h3, .precs-icx-md h4, .precs-icx-md h5, .precs-icx-md h6{ margin: var(--space-6) 0 var(--space-2); color: var(--text-primary); font-family: var(--font-titulo); font-weight: 700; scroll-margin-top: var(--space-4); }
.precs-icx-md .precs-icx-md-h1{ font-size: var(--fs-11); }
.precs-icx-md .precs-icx-md-h2{ padding-bottom: var(--space-1); border-bottom: 1px solid color-mix(in srgb, var(--icx-cor) 40%, var(--border-color)); font-size: var(--fs-10); }
.precs-icx-md .precs-icx-md-h3{ font-family: var(--font-rotulo); font-size: var(--fs-9); }
.precs-icx-md .precs-icx-md-h4, .precs-icx-md .precs-icx-md-h5, .precs-icx-md .precs-icx-md-h6{ font-family: var(--font-rotulo); font-size: var(--fs-8); }
.precs-icx-md p{ margin: var(--space-3) 0; }
.precs-icx-md ul, .precs-icx-md ol{ margin: var(--space-3) 0; padding-left: var(--space-6); }
.precs-icx-md li{ margin: var(--space-1) 0; }
.precs-icx-md li::marker{ color: var(--icx-cor); }
.precs-icx-md strong{ font-weight: 700; }
.precs-icx-md a{ color: var(--text-primary); font-weight: 600; text-decoration: underline; text-decoration-color: var(--icx-cor); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.precs-icx-md a:hover{ background: color-mix(in srgb, var(--icx-cor) 12%, transparent); }
.precs-icx-md code{ padding: 0 var(--space-1); border-radius: var(--radius-sm); background: var(--bg-tertiary); color: var(--text-primary); font-family: var(--font-num); font-size: var(--fs-5); }
.precs-icx-md-pre{ margin: var(--space-3) 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); overflow-x: auto; }
.precs-icx-md-pre code{ padding: 0; background: transparent; white-space: pre; }
.precs-icx-md blockquote{ margin: var(--space-3) 0; padding: var(--space-1) var(--space-4); border-left: 3px solid var(--icx-cor); border-radius: 0 var(--radius-inner) var(--radius-inner) 0; background: color-mix(in srgb, var(--icx-cor) 7%, transparent); color: var(--text-secondary); }
.precs-icx-md blockquote p{ margin: var(--space-2) 0; }
.precs-icx-md hr{ height: 1px; margin: var(--space-5) 0; border: 0; background: var(--border-color); }
.precs-icx-md-tab{ max-width: 100%; margin: var(--space-3) 0; overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-inner); }
.precs-icx-md table{ width: 100%; border-collapse: collapse; font-size: var(--fs-5); }
.precs-icx-md th{ padding: var(--space-2) var(--space-3); background: var(--bg-tertiary); color: var(--text-primary); font-family: var(--font-rotulo); font-size: var(--fs-4); font-weight: 700; text-align: left; }
.precs-icx-md td{ padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border-color); color: var(--text-primary); }
.precs-icx-md tbody tr:hover td{ background: color-mix(in srgb, var(--icx-cor) 6%, transparent); }
.precs-icx-md-previa{ max-width: none; padding: var(--space-4); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); }

/* o editor do documento e a versão aberta do histórico */
.precs-icx-doc-ed{ display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.precs-icx-doc-ed-cab{ display: flex; flex-direction: column; gap: var(--space-1); }
.precs-icx-doc-campos{ display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: end; }
.precs-icx-doc-campo{ display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.precs-icx-campo{ font-family: var(--font-titulo); font-size: var(--fs-8); font-weight: 600; }
.precs-icx-pasta-esc{ display: flex; flex-wrap: wrap; gap: var(--space-1); }
.precs-icx-pasta-esc button{ display: inline-flex; align-items: center; gap: var(--space-1); min-height: 40px; padding: 0 var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-primary); color: var(--text-secondary); font-family: var(--font-acao); font-size: var(--fs-3); font-weight: 600; cursor: pointer; transition: border-color var(--dur-1) var(--ease-1), background-color var(--dur-1) var(--ease-1), color var(--dur-1) var(--ease-1); }
.precs-icx-pasta-esc button:hover{ color: var(--text-primary); border-color: color-mix(in srgb, var(--icx-cor) 60%, var(--border-color)); }
.precs-icx-pasta-esc button.ativa{ border-color: var(--icx-cor); background: color-mix(in srgb, var(--icx-cor) 16%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-pasta-esc button svg{ color: var(--icx-cor); }
.precs-icx-doc-texto{ min-height: 440px; font-family: var(--font-num); font-size: var(--fs-5); }
.precs-icx-doc-acoes{ justify-content: flex-end; }
.precs-icx-versao{ display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--icx-cor); border-radius: var(--radius-inner); background: color-mix(in srgb, var(--icx-cor) 6%, var(--bg-secondary)); animation: precsIcxSobe var(--dur-3) var(--ease-2) both; }
.precs-icx-versao-cab{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.precs-icx-versao .precs-icx-md{ max-height: 420px; overflow: auto; }

/* ---- A LINHA DO TEMPO: os dias, a linha que se desenha e os eventos na cor da área */
.precs-icx-filtro{ font-size: var(--fs-4); }
.precs-icx-filtro svg{ color: var(--icx-m); }
.precs-icx-filtro.ativa{ border-color: var(--icx-m); background: color-mix(in srgb, var(--icx-m) 16%, var(--bg-primary)); color: var(--text-primary); }
.precs-icx-tempo{ display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; transition: opacity var(--dur-2) var(--ease-1); }
.precs-icx-tempo.relendo{ opacity: .6; }
.precs-icx-tempo.precs-icx-skel .precs-skel-card{ min-height: 92px; }
.precs-icx-dia h3{ display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0 0 var(--space-2); color: var(--text-primary); font-family: var(--font-titulo); font-size: var(--fs-10); font-weight: 700; text-transform: capitalize; }
.precs-icx-dia h3 small{ color: var(--text-secondary); font-family: var(--font-num); font-size: var(--fs-3); font-weight: 400; }
.precs-icx-dia h3 b{ margin-left: auto; color: var(--text-secondary); font-family: var(--font-rotulo); font-size: var(--fs-2); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase; }
.precs-icx-dia ol{ position: relative; display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0 0 0 var(--space-8); list-style: none; }
.precs-icx-dia ol::before{ content: ''; position: absolute; left: 11px; top: var(--space-2); bottom: var(--space-2); width: 2px; border-radius: var(--radius-pill); background: linear-gradient(var(--icx-cor), color-mix(in srgb, var(--icx-cor) 15%, var(--border-color))); transform-origin: top; }
.precs-icx-corpo.entra .precs-icx-dia ol::before{ animation: precsIcxDesenha .8s var(--ease-2) both; }
.precs-icx-ev{ position: relative; min-width: 0; }
.precs-icx-corpo.entra .precs-icx-ev:not(.quieto){ animation: precsIcxEntraDir .5s var(--ease-2) both; animation-delay: calc(var(--i, 0) * 55ms); }
.precs-icx-ev-no{ position: absolute; left: calc(-1 * var(--space-8)); top: var(--space-3); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 2px solid var(--icx-m); border-radius: var(--radius-pill); background: var(--bg-primary); color: var(--icx-m); box-sizing: border-box; transition: transform var(--dur-2) var(--ease-2), background-color var(--dur-2) var(--ease-1), color var(--dur-2) var(--ease-1); }
.precs-icx-ev:hover .precs-icx-ev-no{ transform: scale(1.18); background: var(--icx-m); color: var(--bg-primary); }
.precs-icx-ev-card{ display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--border-color); border-left: 3px solid var(--icx-m); border-radius: var(--radius-inner); background: linear-gradient(100deg, color-mix(in srgb, var(--icx-m) 7%, var(--bg-secondary)), var(--bg-secondary) 45%);
  transition: transform var(--dur-2) var(--ease-1), box-shadow var(--dur-2) var(--ease-1), border-color var(--dur-2) var(--ease-1); }
.precs-icx-ev:hover .precs-icx-ev-card{ transform: translateX(3px); box-shadow: var(--elev-1) color-mix(in srgb, var(--icx-m) 22%, transparent); }
.precs-icx-ev.desfazendo .precs-icx-ev-card{ animation: precsIcxPensa 1.2s ease-in-out infinite; }
.precs-icx-ev-cab{ display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.precs-icx-ev-foto{ flex: 0 0 auto; display: inline-flex; }
.precs-icx-ev-img, .precs-icx-ev-ini{ display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-pill); object-fit: cover; }
.precs-icx-ev-img{ outline: 2px solid var(--icx-m); outline-offset: 1px; }
.precs-icx-ev-ini{ background: color-mix(in srgb, var(--icx-m) 22%, var(--bg-primary)); color: var(--text-primary); font-family: var(--font-titulo); font-size: var(--fs-6); font-weight: 700; }
.precs-icx-ev-frase{ flex: 1 1 auto; min-width: 0; margin: 0; color: var(--text-secondary); font-size: var(--fs-5); }
.precs-icx-ev-frase > b{ color: var(--text-primary); font-family: var(--font-rotulo); font-weight: 700; }
.precs-icx-ev-alvo{ display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); padding: 0 var(--space-2); border: 1px solid color-mix(in srgb, var(--icx-m) 55%, var(--border-color)); border-radius: var(--radius-pill); background: color-mix(in srgb, var(--icx-m) 12%, var(--bg-primary)); color: var(--text-primary); font-size: var(--fs-4); font-weight: 600; vertical-align: middle; }
.precs-icx-ev-alvo svg{ color: var(--icx-m); }
.precs-icx-ev-cab time{ flex: 0 0 auto; color: var(--text-secondary); font-family: var(--font-num); font-size: var(--fs-3); }
.precs-icx-ev-baixo{ display: flex; align-items: flex-end; gap: var(--space-3); min-width: 0; margin-left: 46px; }
.precs-icx-ev-coment{ flex: 1 1 auto; min-width: 0; margin: 0; padding: var(--space-1) var(--space-3); border-left: 2px solid color-mix(in srgb, var(--icx-m) 50%, var(--border-color)); color: var(--text-primary); font-size: var(--fs-4); font-style: italic; overflow-wrap: anywhere; }
.precs-icx-ev-pe{ display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); margin-left: auto; }
.precs-icx-tempo-mais{ display: flex; justify-content: center; }
.precs-icx-tempo-fim{ display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin: 0; color: var(--text-secondary); font-size: var(--fs-4); font-style: italic; }
.precs-icx-tempo-fim svg{ color: var(--icx-cor); }

/* ---- lendo e vazio */
.precs-icx-skel .precs-icx-item{ cursor: default; flex-direction: column; }
.precs-icx-painel-skel, .precs-icx-skel .precs-icx-painel{ display: flex; flex-direction: column; gap: var(--space-3); }
.precs-icx-painel-skel .precs-skel-card, .precs-icx-skel .precs-skel-card{ min-height: 260px; }
.precs-icx-vazio{ border: 1px dashed var(--border-color); border-radius: var(--radius-card); }
.precs-icx-vazio .precs-icx-btn{ margin-top: var(--space-2); }

/* ---- as janelas (a precsEstJanela, na camada de topo, fora da raiz da tela): o selo da área diz em qual IA a mudança cai */
.precs-icx-pub{ display: flex; flex-direction: column; gap: var(--space-2); }
.precs-icx-dlg-area{ --icx-m: var(--precs-paleta-8); display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--icx-m); border-radius: var(--radius-inner); background: color-mix(in srgb, var(--icx-m) 12%, var(--bg-secondary)); color: var(--text-primary); }
.precs-icx-dlg-area > svg{ flex: 0 0 auto; color: var(--icx-m); }
.precs-icx-dlg-area span{ display: flex; flex-direction: column; min-width: 0; }
.precs-icx-dlg-area b{ font-family: var(--font-titulo); font-size: var(--fs-7); font-weight: 700; }
.precs-icx-dlg-area small{ color: var(--text-secondary); font-size: var(--fs-3); }
.precs-icx-dlg-p{ margin: 0; color: var(--text-secondary); font-size: var(--fs-4); }
.precs-icx-dlg-p b{ color: var(--text-primary); }
.precs-icx-dlg-aviso{ color: var(--text-primary); font-weight: 600; }
.precs-icx-pub .precs-icx-rot{ margin-top: var(--space-2); }
.precs-icx-coment{ width: 100%; min-height: 80px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-color); border-radius: var(--radius-inner); background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-corpo); font-size: var(--fs-5); resize: vertical; box-sizing: border-box; }
.precs-icx-pub .precs-icx-legenda b{ display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: var(--radius-sm); font-family: var(--font-num); }
.precs-icx-pub .precs-icx-legenda .entra b{ background: color-mix(in srgb, var(--accent-green) 18%, var(--bg-primary)); color: var(--accent-green-text); }
.precs-icx-pub .precs-icx-legenda .sai b{ background: color-mix(in srgb, var(--accent-red) 18%, var(--bg-primary)); color: var(--accent-red-text); }

/* ---- os movimentos */
@keyframes precsIcxEntraDir{ from{ opacity: 0; transform: translateX(24px); } to{ opacity: 1; transform: none; } }
@keyframes precsIcxEntraEsq{ from{ opacity: 0; transform: translateX(-24px); } to{ opacity: 1; transform: none; } }
@keyframes precsIcxSaiEsq{ to{ opacity: 0; transform: translateX(-18px); } }
@keyframes precsIcxSaiDir{ to{ opacity: 0; transform: translateX(18px); } }
@keyframes precsIcxSobe{ from{ opacity: 0; transform: translateY(8px); } to{ opacity: 1; transform: none; } }
@keyframes precsIcxVarre{ from{ transform: translateX(-110%); } to{ transform: translateX(110%); } }
@keyframes precsIcxEscolhe{ 0%{ transform: scale(.98); } 60%{ transform: scale(1.015); } 100%{ transform: none; } }
@keyframes precsIcxFlutua{ 50%{ transform: translateY(-4px); } }
@keyframes precsIcxBrilha{ 0%, 100%{ transform: scale(1); opacity: 1; } 50%{ transform: scale(1.22) rotate(12deg); opacity: .75; } }
@keyframes precsIcxPulsa{ 50%{ transform: scale(1.08); } }
@keyframes precsIcxLeque{ 50%{ transform: rotate(-4deg); } }
@keyframes precsIcxOnda{ from{ transform: scale(1); opacity: .7; } to{ transform: scale(2.8); opacity: 0; } }
@keyframes precsIcxDesenha{ from{ transform: scaleY(0); } to{ transform: scaleY(1); } }
@keyframes precsIcxRisca{ from{ opacity: 0; transform: translateX(-6px); } to{ opacity: 1; transform: none; } }
@keyframes precsIcxPensa{ 50%{ border-color: color-mix(in srgb, var(--icx-cor) 60%, var(--border-color)); } }

/* ---- o celular em pé: os mundos numa fileira que rola com o dedo, as listas viram fileiras, o leitor ocupa a largura */
html[data-aparelho="retrato"] .precs-icx-mundos{ display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-1); scroll-snap-type: x proximity; scrollbar-width: none; }
html[data-aparelho="retrato"] .precs-icx-mundo{ flex: 0 0 auto; grid-template-columns: minmax(0, 1fr); grid-template-areas: "nome" "pe"; min-height: 56px; max-width: 78vw; padding: var(--space-2) var(--space-3); scroll-snap-align: start; }
html[data-aparelho="retrato"] .precs-icx-mundo-pe{ flex-direction: row; align-items: center; text-align: left; }
html[data-aparelho="retrato"] .precs-icx-mundo-nome{ margin-top: 0; }
html[data-aparelho="retrato"] .precs-icx-mundo-nome b{ white-space: nowrap; }
html[data-aparelho="retrato"] .precs-icx-mundo:hover{ transform: none; }
html[data-aparelho="retrato"] .precs-icx-mundo-il, html[data-aparelho="retrato"] .precs-icx-mundo-desc{ display: none; }
html[data-aparelho="retrato"] .precs-icx-mundo-nome b{ font-size: var(--fs-8); }
html[data-aparelho="retrato"] .precs-icx-mundo-skel{ width: 160px; }
html[data-aparelho="retrato"] .precs-icx-faixa{ align-items: flex-start; }
html[data-aparelho="retrato"] .precs-icx-faixa-txt b{ font-size: var(--fs-10); }
html[data-aparelho="retrato"] .precs-icx-faixa > .precs-icx-abas, html[data-aparelho="retrato"] .precs-icx-faixa > .precs-icx-filtros, html[data-aparelho="retrato"] .precs-icx-faixa > .precs-icx-acoes{ flex-basis: 100%; margin-left: 0; }
html[data-aparelho="retrato"] .precs-icx-faixa > .precs-icx-acoes .precs-icx-btn{ flex: 1 1 auto; }
html[data-aparelho="retrato"] .precs-icx-secoes, html[data-aparelho="retrato"] .precs-icx-secoes.foco{ grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
html[data-aparelho="retrato"] .precs-icx-secoes.foco .precs-icx-lista{ opacity: 1; visibility: visible; }
html[data-aparelho="retrato"] .precs-icx-foco-btn{ display: none; }
html[data-aparelho="retrato"] .precs-icx-lista{ flex-direction: row; overflow-x: auto; padding-bottom: var(--space-1); scroll-snap-type: x proximity; scrollbar-width: none; }
html[data-aparelho="retrato"] .precs-icx-item{ flex: 0 0 auto; width: auto; max-width: 78vw; scroll-snap-align: start; }
html[data-aparelho="retrato"] .precs-icx-item:hover{ transform: none; }
html[data-aparelho="retrato"] .precs-icx-item-txt small{ display: none; }
html[data-aparelho="retrato"] .precs-icx-painel, html[data-aparelho="retrato"] .precs-icx-leitor{ padding: var(--space-3); }
html[data-aparelho="retrato"] .precs-icx-painel-cab .precs-icx-acoes, html[data-aparelho="retrato"] .precs-icx-provas-barra .precs-icx-acoes, html[data-aparelho="retrato"] .precs-icx-doc-acoes{ width: 100%; }
html[data-aparelho="retrato"] .precs-icx-acoes .precs-icx-btn{ flex: 1 1 auto; }
html[data-aparelho="retrato"] .precs-icx-texto{ min-height: 300px; }
html[data-aparelho="retrato"] .precs-icx-lado{ grid-template-columns: minmax(0, 1fr); }
html[data-aparelho="retrato"] .precs-icx-perg{ flex-direction: column; align-items: stretch; }
html[data-aparelho="retrato"] .precs-icx-legenda .fim{ margin-left: 0; flex-basis: 100%; }
html[data-aparelho="retrato"] .precs-icx-abas, html[data-aparelho="retrato"] .precs-icx-vistas, html[data-aparelho="retrato"] .precs-icx-filtros{ align-self: stretch; }
html[data-aparelho="retrato"] .precs-icx-docs{ grid-template-columns: minmax(0, 1fr); }
html[data-aparelho="retrato"] .precs-icx-docs.com-doc .precs-icx-docs-lado{ display: none; }
html[data-aparelho="retrato"] .precs-icx-docs:not(.com-doc) .precs-icx-leitor{ display: none; }
html[data-aparelho="retrato"] .precs-icx-leitor-volta{ display: inline-flex; }
html[data-aparelho="retrato"] .precs-icx-pasta, html[data-aparelho="retrato"] .precs-icx-btn.leve{ min-height: 40px; }
html[data-aparelho="retrato"] .precs-icx-ler.com-toc{ grid-template-columns: minmax(0, 1fr); }
html[data-aparelho="retrato"] .precs-icx-toc{ display: none; }
html[data-aparelho="retrato"] .precs-icx-doc-campos{ grid-template-columns: minmax(0, 1fr); }
html[data-aparelho="retrato"] .precs-icx-dia ol{ padding-left: var(--space-6); }
html[data-aparelho="retrato"] .precs-icx-ev-no{ left: calc(-1 * var(--space-6)); width: 20px; height: 20px; }
html[data-aparelho="retrato"] .precs-icx-dia ol::before{ left: 9px; }
html[data-aparelho="retrato"] .precs-icx-ev-baixo{ flex-wrap: wrap; margin-left: 0; }
html[data-aparelho="retrato"] .precs-icx-ev-cab{ flex-wrap: wrap; }
html[data-aparelho="retrato"] .precs-icx-ev:hover .precs-icx-ev-card{ transform: none; }

@media (prefers-reduced-motion: reduce){
  .precs-icx, .precs-icx *, .precs-icx *::before, .precs-icx *::after{ animation: none !important; transition: none !important; }
}
