/* Zavra · O que construímos. Depende de site.css.
   Cada seção tem um formato próprio e a cor do seu tema (--c): ontologia céu, agentes jade, cockpits mar, painéis mata, controle aurora. */

.demo-note { margin-top: 14px; text-align: right }
/* "Pausar animação" (construimos.js): o botão fica logo abaixo da demonstração, à esquerda, e divide a linha com a nota;
   em telas muito estreitas, a nota desce para a linha de baixo */
.demo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 14px }
.demo-row .demo-note { flex: 1 1 170px; margin-top: 0 }
/* em pausa, o que entra na tela (um clique no cockpit, o caso completo do agente) aparece direto, sem a animação de entrada parada no início */
.motion-off .stage-body > *, .motion-off .agent-log li, .motion-off .ck-appr li, .motion-off .ask-steps li { animation: none }
/* toque: a área de toque dos controles pequenos chega a 44px de altura sem mudar o desenho (pseudo-elemento transparente).
   As células do mapa de calor usam ::before, porque ::after já é o ponto de "ação pendente". */
.node::after, .ck-tabs button::after, .ck-filter button::after, .ask-think::after { content: ""; position: absolute; inset: -6px 0 }
.ck-filter button::after { inset: -7px 0 }
.ask-think::after { inset: -10px 0 }
.stage-k { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint) }

/* ============ 01 · ONTOLOGIA ============ */
.onto { display: grid; grid-template-columns: minmax(0, 190px) 56px minmax(0, 1fr) 56px minmax(0, 190px); align-items: center; gap: 0; padding: clamp(20px, 3vw, 36px); background: #fff; border: 1px solid var(--line); border-radius: var(--r) }
.onto-k { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
.onto-k .mark { width: 14px; height: 14px; color: var(--c) }
.onto-col ul { display: grid; gap: 6px }
.onto-col li { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); background: var(--paper); font-size: var(--fs-sm) }
.onto-src li::before { content: ""; width: 8px; height: 8px; background: #b9bbbf }
.onto-use li i { width: 8px; height: 8px; background: var(--c) }
.onto-s { margin-top: 10px; font-size: var(--fs-2xs); color: var(--faint) }
/* ligação: traço com um pulso que corre da esquerda para a direita */
.onto-link { position: relative; display: grid; justify-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--faint) }
.onto-link i { position: relative; width: 100%; height: 2px; background: var(--line); overflow: hidden }
.onto-link i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: linear-gradient(90deg, transparent, var(--c)); animation: run 1.8s linear infinite }
@keyframes run { from { transform: translateX(-100%) } to { transform: translateX(250%) } }
.onto-core { padding: 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line) }
.graph { position: relative; aspect-ratio: 100 / 62; margin: 4px 0 14px }
.graph-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible }
.graph-edges line { stroke: #c9c8c2; stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: stroke .3s ease }
.graph-edges line.on { stroke: var(--c); stroke-width: 2.2 }
.node { position: absolute; transform: translate(-50%, -50%); min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease }
.node:hover { border-color: var(--text) }
.node.near { border-color: var(--c) }
.node.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 0 0 6px rgba(63, 104, 163, .14) }
.n-cliente { left: 14%; top: 26% } .n-contrato { left: 54%; top: 16% } .n-pedido { left: 28%; top: 70% }
.n-nota { left: 66%; top: 58% } .n-entrega { left: 46%; top: 92% } .n-pagamento { left: 86%; top: 86% }
.rel { position: absolute; transform: translate(-50%, -50%); font-size: var(--fs-2xs); color: var(--faint); background: var(--paper); padding: 0 4px; pointer-events: none }
.r1 { left: 34%; top: 21% } .r2 { left: 21%; top: 48% } .r3 { left: 60%; top: 37% } .r4 { left: 47%; top: 64% } .r5 { left: 37%; top: 81% } .r6 { left: 76%; top: 72% }
.onto-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; padding: 14px 16px; min-height: 112px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: var(--fs-xs) }
.onto-card dt { color: var(--faint) }
.onto-card dd { margin: 0; color: var(--text) }
.onto-card .t { grid-column: 1 / -1; font-size: var(--fs-sm); font-weight: 600; color: var(--text) }
.onto figcaption { grid-column: 1 / -1; margin-top: 18px; text-align: center }
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(40px, 5vw, 64px); counter-reset: k }
.keys li { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 2px solid var(--text); counter-increment: k }
.keys li::before { content: "0" counter(k); font-size: var(--fs-2xs); font-weight: 600; color: var(--c) }
.keys b { font-size: var(--fs-h3); font-weight: 550; letter-spacing: -.02em; line-height: 1.25; white-space: nowrap }
.keys span { color: var(--muted); font-size: var(--fs-sm) }
@media (max-width: 1180px) {
  .keys { grid-template-columns: 1fr 1fr; gap: 32px 48px }
  .rules { grid-template-columns: 1fr 1fr; gap: 32px 0 }
  .rules li:nth-child(2n) { border-right: 0; margin-right: 0 }
}
@media (max-width: 1000px) {
  .onto { grid-template-columns: 1fr; gap: 12px }
  .onto-col ul { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) }
  .onto-link { height: 36px; grid-template-columns: auto; align-content: center }
  .onto-link i { width: 2px; height: 28px }
  .onto-link i::after { inset: 0 0 auto; width: 100%; height: 40%; background: linear-gradient(180deg, transparent, var(--c)); animation-name: run-y }
  .onto-link span { display: none }
  .keys { grid-template-columns: 1fr 1fr }
}
@keyframes run-y { from { transform: translateY(-100%) } to { transform: translateY(250%) } }
@media (max-width: 560px) {
  .onto { padding: 14px }
  .onto-core { padding: 12px }
  .graph { aspect-ratio: 100 / 80 }
  .node { min-height: 30px; padding: 0 10px }
  .rel { display: none }
  .keys { grid-template-columns: 1fr; gap: 24px }
}

/* ============ 02 · AGENTES ============ */
.ag-intro { display: grid; gap: 14px }
.agent { border-radius: var(--r); padding: clamp(18px, 2.4vw, 28px); color: #fff; display: grid; gap: 18px }
/* véu escuro o bastante para todo texto do painel passar de 4,5:1; o azul-lago fica como tom, não como fundo */
.agent-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 12, 16, .72), rgba(8, 12, 16, .84)) }
.agent-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: var(--fs-sm) }
.agent-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600 }
.agent .tag { background: rgba(255, 255, 255, .12); color: #fff }
.live { width: 8px; height: 8px; border-radius: 50%; background: #8fe0b9; box-shadow: 0 0 0 0 rgba(143, 224, 185, .6); animation: live 2s infinite }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(143, 224, 185, 0) } 100% { box-shadow: 0 0 0 0 rgba(143, 224, 185, 0) } }
.agent-count { display: flex; flex-wrap: wrap; gap: 6px 20px; color: rgba(255, 255, 255, .85); font-size: var(--fs-xs) }
.agent-count b { color: #fff; font-size: var(--fs-sm); font-variant-numeric: tabular-nums }
.agent-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: none }
.stage { position: relative; min-height: 236px; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); transition: background .35s ease, border-color .35s ease }
.stage::after { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 2px; background: var(--lago); transform: scaleX(0); transform-origin: left; transition: transform .5s ease }
.stage.on { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .32) }
.stage.on::after, .stage.done::after { transform: scaleX(1) }
.stage.done::after { background: rgba(255, 255, 255, .35) }
.agent .stage-k { color: rgba(255, 255, 255, .82); margin-bottom: 14px }
.agent .stage-k span { color: var(--lago) }
.stage-body { display: grid; gap: 8px; font-size: var(--fs-xs) }
.stage-body > * { animation: pop .4s ease both }
@keyframes pop { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.ev { padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--ink) }
.ev small { display: block; font-size: var(--fs-2xs); color: #63666b; letter-spacing: .04em; text-transform: uppercase }
.ev b { display: block; margin: 4px 0 2px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3 }
.ev span { color: #55595f }
.chk { display: flex; gap: 8px; align-items: baseline; line-height: 1.4; color: #fff }
.chk::before { content: "✓"; flex: none; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 4px; background: rgba(255, 255, 255, .16); font-size: 10px }
.chk.alert::before { content: "!"; background: var(--mata); color: #fff }
.src { font-size: var(--fs-2xs); color: rgba(255, 255, 255, .78) }
.verdict { padding: 12px; border-radius: 10px; font-weight: 600; font-size: var(--fs-sm); line-height: 1.35 }
.verdict small { display: block; margin-top: 4px; font-weight: 400; font-size: var(--fs-xs); opacity: .85 }
.verdict.ok { background: rgba(111, 179, 156, .2); border: 1px solid rgba(143, 224, 185, .55) }
.verdict.up { background: rgba(194, 176, 124, .22); border: 1px solid rgba(214, 196, 140, .6) }
.act { display: flex; gap: 8px; align-items: baseline; line-height: 1.4 }
.act::before { content: "→"; color: var(--lago) }
.act.done::before { content: "✓"; color: #8fe0b9 }
.agent-log { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12) }
.agent-log .stage-k { margin-bottom: 8px }
.agent-log ul { display: grid; gap: 6px; min-height: 84px; font-size: var(--fs-xs) }
.agent-log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; animation: pop .4s ease both; color: rgba(255, 255, 255, .92) }
.agent-log time { color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums }
.agent-log .tag { min-height: 22px; gap: 6px }
.agent-log .tag::before { font-size: 10px; font-weight: 700 }
.agent-log .tag.ok::before { content: "✓" }
.agent-log .tag.up::before { content: "↑" }
.agent-log .tag.ok { background: rgba(111, 179, 156, .3); color: #d9f3e8 }
.agent-log .tag.up { background: rgba(194, 176, 124, .3); color: #f4ead0 }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(40px, 5vw, 64px) }
.rules li { display: grid; gap: 8px; align-content: start; padding: 4px 24px 4px 0; margin-right: 24px; border-right: 1px solid var(--line) }
.rules li:last-child { border-right: 0; margin-right: 0 }
.rules span { font-size: var(--fs-2xs); font-weight: 600; color: var(--c) }
.rules b { font-size: var(--fs-h3); font-weight: 550; letter-spacing: -.02em; line-height: 1.25 }
.rules p { color: var(--muted); font-size: var(--fs-sm) }
/* quatro colunas estreitas: espaço para o caso mais longo (Rede A), sem a caixa mudar de altura entre um caso e outro */
@media (min-width: 1001px) and (max-width: 1180px) { .stage { min-height: 256px } }
@media (max-width: 1000px) {
  .agent-stages { grid-template-columns: 1fr 1fr }
  .rules { grid-template-columns: 1fr 1fr; gap: 32px 0 }
  .rules li:nth-child(2n) { border-right: 0; margin-right: 0 }
}
@media (max-width: 560px) {
  .agent-stages { grid-template-columns: 1fr }
  .stage { min-height: 0 }
  .rules { grid-template-columns: 1fr; gap: 28px }
  .rules li { border-right: 0; margin-right: 0; padding-right: 0 }
  .agent-log li { grid-template-columns: minmax(0, 1fr) auto }
  .agent-log time { display: none }
}

/* ============ 03 · COCKPITS ============ */
.cockpit { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 40px 80px -48px rgba(15, 16, 19, .35) }
.ck-bar { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm) }
.ck-dots { display: flex; gap: 6px } .ck-dots i { width: 10px; height: 10px; border-radius: 50%; background: #dcdad3 }
.ck-tabs { position: relative; display: flex; gap: 4px; margin-left: 8px }
.ck-pill { position: absolute; left: 0; top: 0; border-radius: 999px; background: var(--paper); box-shadow: 0 0 0 .5px rgba(15, 16, 19, .08), 0 1px 3px rgba(15, 16, 19, .08), inset 0 -6px 10px -8px #fff; pointer-events: none;
  transition: transform .45s cubic-bezier(.3, 1.3, .45, 1), width .45s cubic-bezier(.3, 1.3, .45, 1) }
.ck-pill.snap { transition: none }
.ck-tabs button { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; font-size: var(--fs-xs); color: var(--muted) }
.ck-tabs button:hover { color: var(--text) }
.ck-tabs [aria-selected="true"] { background: var(--paper); color: var(--text); font-weight: 600 }
.ck-tabs.has-pill [aria-selected="true"] { background: none }
.ck-tabs em { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--c); color: #fff; font-size: 11px; font-weight: 600 }
/* a visão geral define a altura da janela; casos e aprovações ocupam o mesmo espaço e rolam por dentro */
.ck-panels { position: relative }
.ck-panel { min-width: 0; transition: opacity .25s ease }
.ck-panel.off { opacity: 0; visibility: hidden }
.ck-sheet { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 14px; padding: clamp(16px, 2.4vw, 28px) }
.ck-sheet-head { position: sticky; top: calc(-1 * clamp(16px, 2.4vw, 28px)); z-index: 1; margin: calc(-1 * clamp(16px, 2.4vw, 28px)) calc(-1 * clamp(16px, 2.4vw, 28px)) 0; padding: clamp(16px, 2.4vw, 28px) clamp(16px, 2.4vw, 28px) 12px; background: #fff }
.ck-sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-sm) }
.ck-sheet-head { border-bottom: 1px solid var(--line) }
/* quando os filtros quebram em duas linhas (celular), o intervalo entre elas dá lugar às áreas de toque, sem uma invadir a outra */
.ck-filter { display: flex; flex-wrap: wrap; gap: 14px 4px }
.ck-filter button { position: relative; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: var(--fs-xs); color: var(--muted) }
.ck-filter [aria-pressed="true"] { border-color: var(--text); color: var(--text); font-weight: 600 }
.ck-table { display: grid; font-size: var(--fs-xs) }
.ck-table .tr { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .7fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line) }
.ck-table .th { padding-block: 6px; color: var(--faint); font-size: var(--fs-2xs); letter-spacing: .06em; text-transform: uppercase }
.ck-table b { font-weight: 600 }
.ck-table em { font-style: normal; font-variant-numeric: tabular-nums }
.ck-table small { display: block; margin-top: 2px; color: var(--muted) }
.st { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-weight: 600 }
.st::before { content: ""; width: 7px; height: 7px; background: currentColor }
.st.wait { color: #7a6a35 } .st.ok { color: var(--c) } .st.off { color: var(--faint) }
.ck-appr { display: grid; gap: 8px }
.ck-appr li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; animation: pop .3s ease both }
.ck-appr li > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 280px; font-size: var(--fs-xs) }
.ck-appr small { color: var(--faint) }
.ck-appr b { font-size: var(--fs-sm); font-weight: 600 }
.ck-appr span { color: var(--muted) }
.ck-appr small { display: flex; align-items: center; gap: 6px }
.ck-appr small i { width: 7px; height: 7px; flex: none; background: var(--c) }
.ap-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px }
.ap-meta em { font-style: normal; display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: var(--fs-2xs); color: var(--muted) }
.ap-meta em.cf { color: #2f6e66; border-color: rgba(47, 110, 102, .3); background: rgba(93, 154, 145, .1) }
.ap-meta em.cf.media { color: #7a6a35; border-color: rgba(122, 106, 53, .3); background: rgba(194, 176, 124, .14) }
.ck-acts { display: flex; gap: 6px }
.ck-sheet .btn-line { border-color: var(--line-2); color: var(--text) }
.ck-empty { padding: 24px 4px; color: var(--muted); font-size: var(--fs-sm) }
/* aprovações em dia: faixa calma, com um ✓ */
.ck-appr .ck-empty { justify-content: center; gap: 10px; border: 0; background: var(--paper); text-align: center }
.ck-appr .ck-empty::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: rgba(93, 154, 145, .16); color: #2f6e66; font-size: 12px; font-weight: 700 }
.ck-user { margin-left: auto; font-size: var(--fs-xs); color: var(--muted) }
.ck-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) }
.ck-heat { padding: clamp(16px, 2.4vw, 28px); border-right: 1px solid var(--line) }
.ck-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 16px; font-size: var(--fs-sm) }
.ck-head span { font-size: var(--fs-xs); color: var(--muted) }
.heat { display: grid; grid-template-columns: 92px repeat(5, minmax(0, 1fr)); gap: 4px; font-size: var(--fs-xs) }
.heat .hh { padding: 4px 0; text-align: center; font-size: var(--fs-2xs); color: var(--muted) }
.heat .rh { display: flex; align-items: center; color: var(--muted) }
.cell { position: relative; min-height: 52px; border: 0; border-radius: var(--r-step); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; transition: background .5s ease, color .5s ease, box-shadow .2s ease, transform .15s ease }
.cell:hover { transform: scale(1.04) }
.cell.sel { box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px rgba(15, 16, 19, .12) }
/* ponto no canto: há ação do agente esperando aprovação nesta célula */
.cell.has::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .55 }
.l0 { background: #eceee9; color: #62666b } .l1 { background: #d9e4ee; color: #33506f } .l2 { background: #aec6de; color: #1f3a5a }
.l3 { background: #4d77a9; color: #fff } .l4 { background: #2f5689; color: #fff }
.heat-scale { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: var(--fs-2xs); color: var(--faint) }
.heat-scale i { width: 120px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #eceee9, #d9e4ee, #aec6de, #4d77a9, #2f5689) }
.ck-detail { display: grid; align-content: start; gap: 14px; padding: clamp(16px, 2.4vw, 28px); background: var(--surface-2) }
.ck-detail h3 { font-size: var(--fs-h3); font-weight: 550; letter-spacing: -.02em }
.ck-kpi { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline }
.ck-kpi b { font-size: 1.75rem; font-weight: 500; letter-spacing: -.03em }
.ck-kpi span { font-size: var(--fs-xs); color: var(--muted) }
.ck-cases { display: grid; gap: 6px }
.ck-cases li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: var(--fs-xs) }
.ck-cases b { font-weight: 600 }
.ck-cases em { font-style: normal; font-variant-numeric: tabular-nums }
.ck-cases small { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; color: var(--c) }
.ck-cases small::before { content: ""; width: 6px; height: 6px; background: currentColor }
.ck-cases small.wait { color: var(--mata) } .ck-cases small.off { color: var(--faint) }
.ck-prep { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 10px; background: #e2ece9; font-size: var(--fs-xs) }
.ck-prep span { display: inline-flex; gap: 8px; align-items: center }
.ck-prep span::before { content: ""; width: 8px; height: 8px; background: var(--c) }
.ck-prep.done { background: var(--paper) }
.ck-toast { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--fs-xs); transition: opacity .3s ease, transform .3s ease; pointer-events: none; white-space: nowrap }
.ck-toast.on { opacity: 1; transform: translate(-50%, 0) }
.claims, .points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(40px, 5vw, 64px) }
.claims li, .points li { display: grid; gap: 8px; align-content: start }
.claims li::before, .points li::before { content: ""; width: 24px; height: 8px; background: var(--c); margin-bottom: 8px }
.claims b, .points b { font-size: var(--fs-h3); font-weight: 550; letter-spacing: -.02em; line-height: 1.25 }
.claims span, .points span { color: var(--muted); font-size: var(--fs-sm) }
@media (max-width: 860px) {
  .ck-body { grid-template-columns: 1fr }
  .ck-heat { border-right: 0; border-bottom: 1px solid var(--line) }
  .ck-user { display: none }
  .ck-table .tr { grid-template-columns: minmax(0, 1fr) auto; }
  .ck-table .tr > :nth-child(2) { display: none }
  .ck-table .tr > :nth-child(4) { grid-column: 1 / -1 }
  .ck-table .th > :nth-child(4) { display: none }
  .claims, .points { grid-template-columns: 1fr; gap: 28px }
}
@media (max-width: 560px) {
  .heat { grid-template-columns: 64px repeat(5, minmax(0, 1fr)); gap: 3px }
  .cell { min-height: 42px; font-size: var(--fs-2xs) }
  .ck-bar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 14px }
  .ck-tabs { order: 3; width: 100%; margin-left: 0 }
  .ck-tabs button { padding: 0 10px }
  .ck-toast { white-space: normal; width: calc(100% - 32px); text-align: center }
}

/* ============ 04 · PAINÉIS ============ */
.ask { border-radius: var(--r); padding: clamp(24px, 6vw, 72px) clamp(14px, 5vw, 72px); display: grid; justify-items: center; gap: 16px }
.ask-veil { position: absolute; inset: 0; z-index: -1; background: rgba(16, 18, 10, .18) }
.ask-card { width: 100%; max-width: 860px; padding: clamp(14px, 2vw, 20px); border-radius: 18px; background: rgba(249, 248, 244, .97); color: var(--ink); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55); display: grid; gap: 14px;
  --text: #0f1013; --muted: #55595f; --faint: #63666b; --line: rgba(15, 16, 19, .12); --ceu: #3f68a3 }
.ask-q { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px 0 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: var(--fs-body) }
.ask-text { flex: 1; min-height: 1.5em }
/* luz na borda: um ponto com o degradê do Z dá a volta na caixa enquanto a pergunta é digitada e analisada */
.beam { position: absolute; inset: -1px; border-radius: inherit; border: 2px solid transparent; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  -webkit-mask: linear-gradient(transparent, transparent) padding-box, linear-gradient(#000, #000) border-box; -webkit-mask-composite: source-in;
  mask: linear-gradient(transparent, transparent) padding-box, linear-gradient(#000, #000) border-box; mask-composite: intersect }
.ask-q.busy .beam { opacity: 1 }
@supports (offset-path: rect(0 auto auto 0)) {
  .beam::after { content: ""; position: absolute; width: 170px; height: 14px; border-radius: 7px; background: linear-gradient(to left, #3f68a3, #2a7489 30%, #3f7a52 62%, rgba(122, 106, 53, 0));
    offset-path: rect(0 auto auto 0 round 999px); offset-anchor: 90% 50%; animation: beam 4.5s linear infinite; animation-play-state: paused }
  .ask-q.busy .beam::after { animation-play-state: running }
}
@keyframes beam { from { offset-distance: 0% } to { offset-distance: 100% } }
.ask-text.typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; vertical-align: -2px; background: var(--ink); animation: blink 1s steps(2) infinite }
@keyframes blink { 50% { opacity: 0 } }
.ask-send { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px }
/* altura reservada para as três linhas: o cartão não cresce enquanto a análise aparece */
.ask-trace { display: grid; gap: 4px }
.ask-think { position: relative; justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); cursor: pointer }
.ask-think:hover { color: var(--text) }
.ask-think svg { width: 9px; height: 9px; transition: transform .2s ease }
.ask-think[aria-expanded="false"] svg { transform: rotate(-90deg) }
.ask-think.idle { visibility: hidden }
.ask-steps.closed { display: none }
.ask-steps { display: grid; align-content: start; gap: 4px; min-height: calc(3 * 1.55em + 8px); padding: 0 8px; font-size: var(--fs-xs); line-height: 1.55; color: var(--muted) }
.ask-steps li { display: flex; gap: 8px; align-items: center; animation: pop .35s ease both }
.ask-steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--ink); animation: spin .8s linear infinite }
.ask-steps li.ok::before { content: "✓"; border: 0; animation: none; display: grid; place-items: center; font-size: 11px; color: #4b6b3a }
@keyframes spin { to { transform: rotate(360deg) } }
.ask-answer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease }
.ask-answer.on { opacity: 1; transform: none }
.ans-kpi, .ans-why { padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; gap: 10px; align-content: start }
.ans-num { font-size: 2.25rem; font-weight: 500; letter-spacing: -.03em; line-height: 1 }
.ans-num b { font-weight: inherit }
.ans-num > span { display: block; margin-top: 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; color: var(--ceu) }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 64px }
.bars i { flex: 1; background: #c5c0a0; border-radius: 2px 2px 0 0; height: 80% }
.bars i:nth-child(2) { height: 84% } .bars i:nth-child(3) { height: 78% } .bars i:nth-child(4) { height: 86% } .bars i:nth-child(5) { height: 82% } .bars i:nth-child(6) { height: 88% }
.bars i:nth-child(7) { height: 83% } .bars i:nth-child(8) { height: 85% } .bars i:nth-child(9) { height: 81% } .bars i:nth-child(10) { height: 84% }
.bars i.low { height: 58%; background: var(--ceu) }
.ans-conf { display: inline-flex; justify-self: start; align-items: center; gap: 6px; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 600; color: #2f6e66; background: rgba(93, 154, 145, .12); border: 1px solid rgba(47, 110, 102, .25) }
.ans-conf i { width: 6px; height: 6px; background: currentColor }
.ans-text { font-size: var(--fs-body); font-weight: 600; line-height: 1.4 }
.ans-rows { display: grid; gap: 4px; font-size: var(--fs-xs) }
.ans-rows li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line) }
.ans-rows b { color: var(--ceu); font-variant-numeric: tabular-nums }
.ans-act { grid-column: 1 / -1; min-height: 60px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: var(--fs-sm) }
.ans-act-t { display: inline-flex; gap: 10px; align-items: center }
.ans-act-t i { width: 8px; height: 8px; background: var(--jade); flex: none }
.ans-act.done { background: #2f4a3d }
.ans-act.done .ans-act-t i { background: #8fe0b9 }
.ask-watch { background: rgba(255, 255, 255, .16); color: #fff; opacity: 0; transition: opacity .5s ease }
.ask-watch.on { opacity: 1 }
@media (max-width: 760px) { .ask-answer { grid-template-columns: 1fr } .ans-num { font-size: 1.875rem } }

/* ============ 05 · CONTROLE ============ */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.bx { display: grid; grid-template-rows: auto auto 1fr; gap: 8px; padding: clamp(20px, 2.6vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: var(--r) }
.bx-vis { margin-bottom: 18px; padding: 16px; border-radius: 12px; background: var(--paper); font-size: var(--fs-xs); min-height: 168px; display: grid; align-content: center; gap: 8px }
.acc div { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line) }
.acc div:last-child { border-bottom: 0; color: var(--faint) }
.acc em { font-style: normal; color: var(--muted) }
.sw { position: relative; width: 32px; height: 18px; border-radius: 999px; background: #cfcdc6 }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .3s ease }
.sw.on { background: var(--c) } .sw.on::after { transform: translateX(14px) }
.spend p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px }
.spend p b { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em }
.spend p span { color: var(--muted) }
.spend-bar { position: relative; display: flex; height: 12px; border-radius: 6px; background: #e3e0d7; overflow: visible }
.spend-bar i { height: 100%; transform-origin: left; transform: scaleX(0); transition: transform 1.2s cubic-bezier(.3, .7, .2, 1) }
.spend-bar i.a { width: 34%; background: var(--c); border-radius: 6px 0 0 6px } .spend-bar i.b { width: 22%; background: #8796b3 } .spend-bar i.c { width: 17%; background: #b9c2d3 }
.bx.is-in .spend-bar i { transform: scaleX(1) }
.bx.is-in .spend-bar i.b { transition-delay: .3s } .bx.is-in .spend-bar i.c { transition-delay: .6s }
.spend-bar em { position: absolute; left: 80%; top: -5px; bottom: -5px; width: 2px; background: var(--mata) }
.spend ul { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted) }
.spend li { display: inline-flex; align-items: center; gap: 6px }
.spend li i { width: 8px; height: 8px } .spend li i.a { background: var(--c) } .spend li i.b { background: #8796b3 } .spend li i.c { background: #b9c2d3 }
.spend li.alert { color: var(--mata); margin-left: auto } .spend li.alert::before { content: ""; width: 2px; height: 10px; background: var(--mata) }
/* as três linhas dividem as mesmas colunas: setas alinhadas e selos da mesma largura */
.route { grid-template-columns: minmax(0, 1fr) 40px max-content; gap: 14px 10px; align-items: center }
.route div { display: contents }
.route span { white-space: nowrap }
@media (max-width: 560px) { .route { grid-template-columns: minmax(0, 1fr) 20px max-content; column-gap: 8px } .route em { padding: 4px 10px } }
.route i { height: 1.5px; background: var(--line-2); position: relative }
.route i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left: 6px solid var(--line-2); border-right: 0 }
.route em { font-style: normal; text-align: center; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line) }
.route em.hi { background: var(--c); color: #fff; border-color: var(--c) }
.log p { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.4 }
.log p:last-child { border-bottom: 0 }
.log time { flex: none; color: var(--faint); font-variant-numeric: tabular-nums }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr } .bx-vis { min-height: 0 } }

/* ============ celular: demonstrações mais densas ============ */
@media (max-width: 560px) {
  .demo-note { margin-top: 10px }
  .demo-row { margin-top: 16px }
  /* ontologia: origens e usuários viram etiquetas pequenas em linha; o mapa fica mais baixo */
  .onto { padding: 12px; gap: 6px }
  .onto-k { margin-bottom: 8px; font-size: 11px }
  .onto-col ul { display: flex; flex-wrap: wrap; gap: 6px }
  .onto-col li { min-height: 30px; padding: 0 10px; gap: 6px; border-radius: 999px; font-size: var(--fs-xs) }
  .onto-src li::before, .onto-use li i { width: 6px; height: 6px }
  .onto-s { display: none }
  .onto-link { height: 22px }
  .onto-link i { height: 16px }
  .onto-core { padding: 10px }
  .graph { aspect-ratio: 100 / 74; margin: 0 0 10px }
  .node { min-height: 28px; padding: 0 10px; font-size: 12px }
  .node::after { inset: -9px 0 }
  .node.on { box-shadow: 0 0 0 4px rgba(63, 104, 163, .14) }
  .onto-card { gap: 4px 12px; padding: 10px 12px; min-height: 0; font-size: 12px }
  .onto figcaption { margin-top: 10px }
  .keys { gap: 20px; margin-top: 32px }
  .keys li { padding-top: 12px }
  /* agente: etapas compactas, histórico com dois casos */
  .agent { padding: 14px; gap: 12px }
  .agent-top { font-size: var(--fs-xs) }
  .stage { padding: 12px }
  .agent .stage-k { margin-bottom: 8px }
  .agent-log ul { min-height: 0 }
  .agent-log li:nth-child(n+3) { display: none }
  .rules { gap: 20px; margin-top: 32px }
  /* cockpit: mapa mais baixo, dois casos no detalhe */
  .ck-heat, .ck-detail { padding: 14px }
  .ck-head { margin-bottom: 10px }
  /* toque: linhas de 44px (41 + 3 de intervalo); a área de toque de cada célula cobre metade do intervalo, sem invadir a vizinha */
  .cell { min-height: 41px }
  .cell::before { content: ""; position: absolute; inset: -1.5px }
  .heat-scale { margin-top: 10px }
  .ck-detail { gap: 10px }
  .ck-kpi b { font-size: 1.375rem }
  .ck-cases li:nth-child(n+3) { display: none }
  .ck-sheet { padding: 14px }
  .claims, .points { gap: 20px; margin-top: 32px }
  /* painel: cartão mais justo */
  .ask { padding: 14px 10px; gap: 10px }
  .ask-card { padding: 10px; gap: 10px; border-radius: 14px }
  .ask-q { min-height: 44px; padding-left: 14px; font-size: var(--fs-sm) }
  .ask-send { width: 32px; height: 32px }
  .ans-kpi, .ans-why { padding: 12px; gap: 8px }
  .ans-num { font-size: 1.625rem }
  .bars { height: 40px }
  .ans-rows li:nth-child(3) { display: none }
  .ans-act { padding: 10px 10px 10px 12px; font-size: var(--fs-xs) }
  /* controle */
  .bento { gap: 10px }
  .bx { padding: 16px }
  .bx-vis { margin-bottom: 10px; padding: 12px }
}

/* Mesmo marcador visual em todos os blocos de benefícios. */
.keys li { border-top: 0; padding-top: 0 }
.keys li::before { content: ""; width: 24px; height: 8px; background: var(--c); margin-bottom: 8px }
.keys b { white-space: normal }
.rules .benefit-bar { background: var(--c) }
/* As divisórias intermediárias só são removidas no layout de duas colunas. */
@media (min-width: 1181px) {
  .rules li:nth-child(2n):not(:last-child) { border-right: 1px solid var(--line); margin-right: 24px }
}

/* ============ microinterações das demonstrações ============ */
/* agente: linha de análise e fontes lidas */
.think { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); color: rgba(255, 255, 255, .78); letter-spacing: .01em }
.think::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--lago) }
.srcs { display: flex; flex-wrap: wrap; gap: 4px }
.srcs span { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: var(--fs-2xs); color: rgba(255, 255, 255, .9) }
/* texto com brilho passando: a IA está trabalhando */
.sh { color: transparent; background: linear-gradient(100deg, var(--sh-a) 35%, var(--sh-b) 50%, var(--sh-a) 65%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: sh 1.6s linear infinite }
@keyframes sh { from { background-position: 100% 0 } to { background-position: 0 0 } }
.agent .sh { --sh-a: rgba(255, 255, 255, .5); --sh-b: #fff }
.ask .sh { --sh-a: rgba(15, 16, 19, .42); --sh-b: #0f1013 }
/* número que rola: cada algarismo é uma fita de 0 a 9 */
.nf { font-variant-numeric: tabular-nums; white-space: nowrap }
.nf-d { position: relative; display: inline-block; line-height: 1.15; clip-path: inset(0) }
.nf-g { visibility: hidden }
.nf-s { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; transition: transform .9s cubic-bezier(.2, .85, .25, 1) }
.nf-s > span { line-height: 1.15 }
