/* "Como os agentes trabalham juntos" e "Monte sua equipe de agentes".
   Cores do site (tokens do index); ciano só para o que está ativo. */
.team-flow,
.team-builder {
  --tf-ink: #42caff;
  --tf-card: #0e2236;
  --tf-card-strong: #13304a;
  --tf-line: #2a4660;
  --tf-text: #e9f2f8;
  --tf-muted: #a9bfcf;
  --tf-human: var(--color-warm, #ffb547);
  background: #071523;
  color: var(--tf-text);
}
.team-builder {
  background: #091a2c;
}

/* ---------- abas das situações ---------- */
.tf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.tf-tabs button,
.tb-choice label span {
  min-height: 40px;
  padding: 8px 16px;
  /* borda de controle interativo com contraste acima de 3:1 sobre o fundo */
  border: 1px solid #52728e;
  border-radius: 999px;
  background: transparent;
  color: var(--tf-muted);
  font: 600 14px/1.2 'Manrope Variable', Manrope, sans-serif;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.tf-tabs button[aria-selected='true'],
.tb-choice input:checked + span {
  background: var(--tf-ink);
  border-color: var(--tf-ink);
  color: #062033;
}
.tf-tabs button:focus-visible,
.tb-choice input:focus-visible + span {
  outline: 2px solid #f3f6fa;
  outline-offset: 3px;
}
@media (hover: hover) {
  .tf-tabs button:hover,
  .tb-choice label:hover span {
    border-color: var(--tf-ink);
    color: var(--tf-text);
  }
}

/* barra das abas com Pausar/Continuar (criada pelo JS; sem JS não há animação) */
.tf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 18px;
}
.tf-bar .tf-tabs {
  margin: 0;
}
.tf-pause {
  min-height: 40px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--tf-text);
  font: 600 14px/1.2 'Manrope Variable', Manrope, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.tf-pause:hover {
  color: var(--tf-ink);
}
.tf-pause:focus-visible {
  outline: 2px solid #f3f6fa;
  outline-offset: 3px;
}
.tf-pause[hidden] {
  display: none;
}
/* Toque: alvo de 44px, como os outros botões de pausa (.so-pause, .film-pause e .cs-toggle em
   site-ajustes.css). Fica aqui para a regra viajar com o botão, que só existe nesta folha. */
@media (pointer: coarse) {
  .tf-pause {
    min-height: 44px;
  }
}

/* ---------- orquestrador ---------- */
.tf-orchestrator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 22px;
  color: var(--tf-muted);
  font-size: 14px;
}
.tf-orchestrator b {
  color: var(--tf-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}
.tf-orchestrator ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tf-orchestrator li::before {
  content: '→ ';
  color: var(--tf-ink);
}

/* ---------- quadro: fluxo + ficha ---------- */
.tf-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}
.tf-flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tf;
}
.tf-node {
  position: relative;
  padding: 14px 18px 14px 52px;
  border: 1px solid var(--tf-line);
  border-radius: 10px;
  background: var(--tf-card);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    border-color 0.3s,
    background 0.3s;
}
/* linha que liga um passo ao seguinte */
.tf-node:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 100%;
  width: 2px;
  height: 10px;
  background: var(--tf-line);
}
.tf-node::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 19px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--tf-line);
  border-radius: 50%;
  background: #071523;
}
.tf-node p {
  margin: 4px 0 0;
  color: var(--tf-muted);
  font-size: 15px;
  line-height: 1.45;
}
.tf-agent {
  color: var(--tf-text);
  font-size: 15px;
}
.tf-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 4px;
  background: var(--tf-card-strong);
  color: var(--tf-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tf-bubble {
  max-width: 34em;
  padding: 10px 14px;
  border-radius: 4px 14px 14px;
  background: var(--tf-card-strong);
  color: var(--tf-text) !important;
}
.tf-reply .tf-bubble {
  border-radius: 14px 4px 14px 14px;
  background: #0c3a52;
}
.tf-node.tf-k-orchestrator {
  border-color: #3b6f8f;
}
.tf-node.tf-k-check .tf-agent {
  /* Agente de revisão: âmbar é só de pessoa (docs/guia-ponteiros-agentes.md). */
  color: inherit;
}
.tf-human {
  font-size: 13px !important;
}
.tf-human::before {
  content: '● ';
  color: var(--tf-human);
}
.tf-human:has(.tf-seal)::before {
  content: none;
}

/* resumo da situação, antes do quadro */
.tf-summary {
  max-width: 46em;
  margin: 0 0 18px;
  color: var(--tf-text);
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 600;
  line-height: 1.5;
}

/* passo da pessoa da empresa: âmbar é só de pessoa (docs/guia-ponteiros-agentes.md) */
.tf-role {
  color: var(--tf-muted);
  font-weight: 600;
}
.tf-seal {
  display: inline-block;
  margin: 0 0 0 10px;
  padding: 2px 8px;
  border: 1px solid var(--tf-human);
  border-radius: 999px;
  color: var(--tf-human);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  vertical-align: 1px;
}
.tf-human .tf-seal {
  margin: 0 8px 0 0;
}
.tf-js .tf-node.tf-k-person.is-active {
  border-color: var(--tf-human);
  box-shadow: 0 0 0 1px var(--tf-human), 0 10px 30px #00000040;
}
.tf-node.tf-k-person.is-active::before,
.tf-node.tf-k-person.is-done::before,
.team-flow:not(.tf-js) .tf-node.tf-k-person::before {
  border-color: var(--tf-human);
  background: var(--tf-human);
}
/* revisão dentro do limite: segue sem aprovação (aparece depois da escolha) */
.tf-limit {
  display: inline-block;
  margin: 10px 0 0 !important;
  padding: 4px 10px;
  border: 1px solid #34d399;
  border-radius: 6px;
  color: #b9f3dc !important;
  font-size: 13px !important;
}
.tf-limit::before {
  content: '✓ ';
  color: #34d399;
}
.tf-js .tf-decision:not(:has(.is-picked)) ~ .tf-limit {
  display: none;
}

/* estados (só com JavaScript; sem ele tudo aparece pronto) */
.tf-js .tf-node:not(.is-active):not(.is-done) {
  opacity: 0.32;
  transform: translateY(4px);
}
.tf-js .tf-node.is-active {
  border-color: var(--tf-ink);
  background: var(--tf-card-strong);
  box-shadow: 0 0 0 1px var(--tf-ink), 0 10px 30px #00000040;
}
.tf-node.is-active::before,
.tf-node.is-done::before,
.team-flow:not(.tf-js) .tf-node::before {
  border-color: var(--tf-ink);
  background: var(--tf-ink);
}
.tf-node.is-done:not(:last-child)::after,
.team-flow:not(.tf-js) .tf-node:not(:last-child)::after {
  background: var(--tf-ink);
}

/* agentes: cada um com uma cor e o visor sorridente da LC Labs como avatar */
.is-cyan { --c: #42caff; --c-text: #062033; }
.is-violet { --c: #a78bfa; --c-text: #1d1240; }
.is-green { --c: #34d399; --c-text: #04291c; }
.is-rose { --c: #fb7185; --c-text: #3a0912; }
.is-amber { --c: var(--color-warm, #ffb547); --c-text: #2b1d00; }
.tf-avatar {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 5px;
  vertical-align: -3px;
  background: var(--c, #42caff) url('/brand/lclabs-icone-visor-branco.svg') center / 84% no-repeat;
}
.tf-cursor {
  /* a cor vem da classe is-<cor>; sem ela, ciano */
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  /* contorno de 1px para a seta ler sobre fundo claro, e a sombra de sempre */
  filter: drop-shadow(0 0 1px #0b1d2f) drop-shadow(0 2px 4px #0009);
  transition: opacity 0.35s;
}
.tf-cursor i {
  position: relative;
  width: 15px;
  height: 19px;
  background: var(--c, #42caff);
  clip-path: polygon(0 0, 100% 54%, 57% 63%, 37% 100%);
}
.tf-cursor b {
  display: inline-flex;
  align-items: center;
  margin: 12px 0 0 -3px;
  padding: 3px 9px 3px 4px;
  border-radius: 1px 7px 7px;
  background: #0b1d2f;
  border: 1px solid var(--c, #42caff);
  color: #e9f2f8;
  font: 700 12px/1.2 'Manrope Variable', Manrope, sans-serif;
  white-space: nowrap;
}
/* perto da borda direita: etiqueta à esquerda da seta, canto vivo apontando para ela */
.tf-cursor.is-flip b {
  position: absolute;
  top: 12px;
  right: calc(100% - 3px);
  margin: 0;
  border-radius: 7px 1px 7px 7px;
}
.tf-cursor .tf-avatar {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 5px;
}
/* pessoa: avatar redondo com silhueta, na cor de quem é (âmbar) */
.tf-avatar.is-person,
.tf-cursor .tf-avatar.is-person {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c, #ffb547);
}
.tf-avatar.is-person svg {
  width: 13px;
  height: 13px;
  fill: #2b1d00;
}
.tf-agent {
  display: inline-flex;
  align-items: center;
}
/* clique: um anel que se abre na ponta do cursor */
.tf-cursor::before {
  content: '';
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--c, #42caff);
  border-radius: 50%;
  opacity: 0;
  scale: 0.3;
}
.tf-cursor.is-clicking::before {
  animation: tf-click 0.32s ease-out;
}
.tf-cursor.is-clicking i {
  scale: 0.86;
}
@keyframes tf-click {
  30% {
    opacity: 0.9;
  }
  to {
    opacity: 0;
    scale: 1.6;
  }
}
.tf-cursor.is-waiting {
  opacity: 0.45;
}
.tf-cursor.is-leaving {
  opacity: 0;
}

/* decisão da validação */
.tf-decision {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tf-js .tf-decision:not(.is-open) {
  display: none;
}
.tf-option {
  padding: 6px 12px;
  border: 1px dashed var(--tf-line);
  border-radius: 999px;
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 600;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    opacity 0.25s;
}
/* opção escolhida: ciano, como os botões de ação do site; quem escolheu aparece no ponteiro */
.tf-option.is-picked {
  border-style: solid;
  border-color: var(--tf-ink);
  background: var(--tf-ink);
  color: #062033;
}
.tf-decision:has(.is-picked) .tf-option:not(.is-picked) {
  /* descartada, mas legível (contraste acima de 4,5:1 sobre o cartão) */
  color: #9fb4c3;
  border-color: #3d5a72;
  text-decoration: line-through;
}
.tf-decision.is-open {
  animation: tb-in 0.35s ease both;
}

/* digitando */
.is-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: currentColor;
  animation: tf-caret 0.7s steps(1) infinite;
}
@keyframes tf-caret {
  50% {
    opacity: 0;
  }
}

/* ficha da conversa */
.tf-ficha {
  position: sticky;
  top: 96px;
  padding: 18px 20px;
  border: 1px solid var(--tf-line);
  border-radius: 10px;
  background: #0b1d2f;
}
.tf-ficha h3 {
  margin: 0 0 10px;
  color: var(--tf-ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tf-ficha dl {
  margin: 0;
}
.tf-row {
  padding: 9px 0;
  border-top: 1px solid var(--tf-line);
  transition:
    opacity 0.4s,
    background 0.4s;
}
.tf-row dt {
  color: var(--tf-muted);
  font-size: 12px;
}
.tf-row dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-size: 15px;
}
.tf-js .tf-row:not(.is-done) dd {
  visibility: hidden;
}
.tf-note {
  margin: 12px 0 0;
  color: var(--tf-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* camadas e prova */
.tf-layers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}
.tf-layers li {
  padding: 18px;
  border-top: 2px solid var(--tf-ink);
  background: var(--tf-card);
  border-radius: 0 0 8px 8px;
}
.tf-layers h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.tf-layers p {
  margin: 0;
  color: var(--tf-muted);
  font-size: 14px;
  line-height: 1.5;
}
.tf-proof {
  margin: 22px 0 0;
  color: var(--tf-muted);
  font-size: 14px;
}
.tf-proof::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--tf-ink);
}

/* ---------- monte sua equipe ---------- */
.tb-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  margin: 0 0 24px;
}
.tb-choice {
  margin: 0;
  padding: 0;
  border: 0;
}
.tb-choice legend {
  margin-bottom: 10px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tb-choice div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tb-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.tb-choice label span {
  display: inline-flex;
  align-items: center;
}

.tb-result {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px clamp(16px, 3vw, 36px);
}
.tb-entry,
.tb-area,
.tb-area [data-channel],
.tb-result > .tb-entry {
  display: none;
}
.tb-entry {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--tf-muted);
}
/* As regras que mostram só a área e o canal escolhidos são geradas a partir do JSON (gerar-secoes.py). */
.tb-team h3,
.tb-side h3,
.tb-first h3 {
  margin: 0 0 10px;
  color: var(--tf-ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tb-team ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-team li {
  padding: 14px 16px;
  border: 1px solid var(--tf-line);
  border-radius: 10px;
  background: var(--tf-card);
}
.tb-team li p {
  margin: 4px 0 0;
  color: var(--tf-muted);
  font-size: 14px;
  line-height: 1.45;
}
.tb-side {
  display: grid;
  gap: 18px;
  align-content: start;
}
.tb-side ul {
  margin: 0;
  padding-left: 18px;
  color: var(--tf-muted);
  line-height: 1.7;
}
.tb-side div:first-child li::marker {
  color: var(--tf-human);
}
.tb-first {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border: 1px dashed var(--tf-line);
  border-radius: 10px;
}
.tb-first p {
  margin: 0 0 14px;
  color: var(--tf-muted);
  line-height: 1.55;
}
.tb-first .tb-note {
  margin: 10px 0 0;
  font-size: 13px;
}
@keyframes tb-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- telas menores ---------- */
@media (max-width: 900px) {
  .tf-board,
  .tb-result {
    grid-template-columns: minmax(0, 1fr);
  }
  .tf-ficha {
    position: static;
  }
  .tf-layers {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 759px) {
  /* cursores em espera cobririam o texto do passo: somem até a vez deles */
  .tf-cursor.is-waiting {
    opacity: 0;
  }
}
@media (max-width: 560px) {
  .tf-layers {
    grid-template-columns: minmax(0, 1fr);
  }
  .tf-cursor b {
    font-size: 11px;
  }
  .tf-cursor .tf-role-long {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tf-node,
  .tf-row,
  .tf-cursor,
  .tf-decision.is-open,
  .tb-placed {
    transition: none;
    animation: none;
  }
}

/* montagem da equipe pelos cursores */
.tb-pending {
  opacity: 0;
  transform: translateY(6px);
}
.tb-placed {
  animation: tb-in 0.35s ease both;
}

/* ---------- home: versão curta ---------- */
.team-flow-home .tf-layers {
  margin-top: 0;
}
.tf-more {
  display: inline-flex;
  gap: 6px;
  margin-top: 18px;
  color: var(--tf-ink);
  font-weight: 700;
}

/* ---------- página /como-funciona/ ---------- */
.cf-body {
  background: #071523;
}
.cf-page {
  background: #071523;
  color: #e9f2f8;
}
.cf-page .section-shell {
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 56px);
}
.cf-crumbs {
  /* abaixo do cabeçalho fixo do site */
  margin-top: 84px;
  display: flex;
  gap: 8px;
  padding-bottom: 0 !important;
  color: #a9bfcf;
  font-size: 13px;
}
.cf-crumbs a {
  color: #a9bfcf;
}
.cf-hero h1 {
  margin: 10px 0 18px;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.cf-answer {
  max-width: 46em;
  margin: 0;
  padding-left: 16px;
  border-left: 3px solid #42caff;
  color: #d4e3ec;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
}
.cf-h2 {
  margin: 0 0 22px;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 560;
  letter-spacing: -0.03em;
}
.cf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.cf-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.cf-grid article {
  padding: 20px;
  border: 1px solid #2a4660;
  border-radius: 10px;
  background: #0e2236;
}
.cf-grid h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.cf-grid p {
  margin: 0;
  color: #a9bfcf;
  line-height: 1.6;
}
.cf-grid .text-link {
  display: inline-block;
  margin-top: 12px;
  color: #42caff;
  font-weight: 700;
}
.cf-compare article:last-child {
  border-color: #42caff;
}
.cf-faq {
  color: #e9f2f8;
}
.cf-faq-groups {
  display: grid;
  gap: 10px;
}
.cf-faq-group {
  margin: 18px 0 4px;
  color: #42caff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cf-faq-group:first-child {
  margin-top: 0;
}

/* Selecionado mantém o contraste também com o mouse em cima. */
.tf-tabs button[aria-selected='true'],
.tf-tabs button[aria-selected='true']:hover,
.tb-choice input:checked + span,
.tb-choice label:hover input:checked + span {
  background: #42caff;
  border-color: #42caff;
  color: #062033;
}

/* Sem JavaScript: sem barra de abas; cada situação aparece com o seu título. */
.team-flow:not(.tf-js) .tf-tabs {
  display: none;
}
.tf-panel-title {
  margin: 28px 0 12px;
  color: #42caff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tf-js .tf-panel-title {
  display: none;
}

/* gerado de equipe-agentes.json */
.team-builder:has(#tb-area-vendas:checked) .tb-area[data-area='vendas'] { display: contents; }
.team-builder:has(#tb-area-marketing:checked) .tb-area[data-area='marketing'] { display: contents; }
.team-builder:has(#tb-area-atendimento:checked) .tb-area[data-area='atendimento'] { display: contents; }
.team-builder:has(#tb-area-financeiro:checked) .tb-area[data-area='financeiro'] { display: contents; }
.team-builder:has(#tb-area-operacao:checked) .tb-area[data-area='operacao'] { display: contents; }
.team-builder:has(#tb-area-rh:checked) .tb-area[data-area='rh'] { display: contents; }
.team-builder:has(#tb-canal-whatsapp:checked) p[data-channel='whatsapp'] { display: block; }
.team-builder:has(#tb-canal-whatsapp:checked) li[data-channel='whatsapp'] { display: list-item; }
.team-builder:has(#tb-canal-site:checked) p[data-channel='site'] { display: block; }
.team-builder:has(#tb-canal-site:checked) li[data-channel='site'] { display: list-item; }
.team-builder:has(#tb-canal-email:checked) p[data-channel='email'] { display: block; }
.team-builder:has(#tb-canal-email:checked) li[data-channel='email'] { display: list-item; }
.team-builder:has(#tb-canal-interno:checked) p[data-channel='interno'] { display: block; }
.team-builder:has(#tb-canal-interno:checked) li[data-channel='interno'] { display: list-item; }
