/* Pesquisa de Experiência dos Parceiros · Capital Invest (prefixo ps-) */
:root {
  --ps-navy: #0B1C3F;
  --ps-texto: #172A4D;
  --ps-cinza: #5F6F87;
  --ps-cinza-2: #8592A6;
  --ps-linha: #E3E8F0;
  --ps-linha-2: #D5DCE7;
  --ps-campo: #F7F9FC;
  --ps-azul: #1F3A5C; /* azul do logo Capital Invest */
  --ps-azul-esc: #162B45;
  --ps-azul-50: #EEF2F7;
  --ps-azul-100: #DCE3EC;
  --ps-erro: #C2343B;
  --ps-erro-50: #FDF2F2;
  --ps-sombra: 0 1px 2px rgba(16, 38, 84, .04), 0 10px 30px rgba(16, 38, 84, .06);
  --ps-raio: 16px;
  --ps-raio-sm: 10px;
  --ps-largura: 908px;
  --ps-ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: only light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #fff; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: #fff; color: var(--ps-texto);
  font: 400 15px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
.ps-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* fundo: branco limpo com formas circulares azul-claro nas bordas */
.ps-fundo { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: #fff; }
.ps-fundo::before, .ps-fundo::after { content: ''; position: absolute; border-radius: 50%; }
.ps-fundo::before { width: 760px; height: 760px; left: -470px; top: -470px; background: radial-gradient(circle at 70% 70%, #EEF3FA 0%, #F4F7FC 55%, #F9FBFE 100%); }
.ps-fundo::after { width: 900px; height: 900px; right: -690px; top: 260px; background: radial-gradient(circle at 25% 45%, #EEF3FA 0%, #F4F7FC 55%, #FAFCFE 100%); }

.ps-app { width: 100%; max-width: calc(var(--ps-largura) + 48px); margin: 0 auto; padding: 22px 24px calc(40px + env(safe-area-inset-bottom)); }
.ps-carregando { min-height: 70vh; display: grid; place-items: center; color: var(--ps-cinza-2); font-size: 14px; }

/* ---------------------------------------------------------------- logo */
.ps-logo { display: flex; justify-content: center; padding: 6px 0 26px; }
.ps-logo img { display: block; width: auto; height: 38px; }
.ps-final { min-height: calc(100vh - 160px) !important; min-height: calc(100dvh - 160px) !important; }

/* ---------------------------------------------------------------- stepper */
.ps-nav { display: flex; justify-content: center; padding-top: 8px; }
.ps-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--ps-passos, 6), minmax(0, 1fr)); width: 100%; }
.ps-nav > .ps-stepper { max-width: 1050px; }
.ps-progresso { display: none; }
.ps-passo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 0; }
.ps-bola {
  position: relative; z-index: 1; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; background: #E9EDF3; color: #4A5872;
  transition: background-color .35s var(--ps-ease), color .35s var(--ps-ease), box-shadow .35s var(--ps-ease), transform .35s var(--ps-ease);
}
.ps-bola .ps-ico { width: 14px; height: 14px; stroke-width: 2.6; }
.ps-passo.atual .ps-bola { background: var(--ps-azul); color: #fff; box-shadow: 0 0 0 4px var(--ps-azul-100); }
.ps-passo.feita .ps-bola { background: var(--ps-azul-100); color: var(--ps-azul); }
.ps-passo-rot { max-width: 100%; padding: 0 8px; font-size: 12.5px; line-height: 1.45; font-weight: 500; color: #3B4A64; text-align: center; white-space: normal; text-wrap: balance; }
.ps-passo.atual .ps-passo-rot { color: var(--ps-azul); font-weight: 600; }
.ps-passo.futura .ps-passo-rot { color: #4F5D75; }
.ps-trilho { position: absolute; top: 12px; right: calc(50% + 12.5px); width: calc(100% - 25px); height: 1.5px; background: #E1E6EE; overflow: hidden; }
.ps-trilho-cheio { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ps-azul), #8FA2BA); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ps-ease) .05s; }
.ps-passo.feita .ps-trilho-cheio, .ps-passo.atual .ps-trilho-cheio { transform: scaleX(0); }
.ps-passo.feita.pronto .ps-trilho-cheio, .ps-passo.atual.pronto .ps-trilho-cheio { transform: scaleX(1); }
/* trilho que sai da etapa atual: meia linha azul clara, como no mockup */
.ps-passo.atual + .ps-passo .ps-trilho::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 42%; background: linear-gradient(90deg, #8FA2BA, rgba(143, 162, 186, 0)); }

/* ---------------------------------------------------------------- cabeçalho da etapa */
.ps-topo { text-align: center; margin: 40px auto 32px; max-width: 640px; }
.ps-titulo { margin: 0; font-size: 33px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; color: var(--ps-navy); outline: none; text-wrap: balance; }
.ps-sub { margin: 12px auto 0; max-width: 566px; font-size: 16px; line-height: 1.6; color: var(--ps-cinza); text-wrap: balance; }

/* ---------------------------------------------------------------- cartões */
.ps-cartoes { display: grid; gap: 23px; }
.ps-cartao {
  margin: 0; min-width: 0; border: 1px solid rgba(227, 232, 240, .7); border-radius: var(--ps-raio); background: #fff;
  box-shadow: var(--ps-sombra); padding: 23px 24px 21px; transition: border-color .25s, box-shadow .25s;
}

.ps-cab { display: grid; grid-template-columns: 40px 1fr; gap: 20px; align-items: start; margin-bottom: 19px; }
.ps-num {
  display: grid; place-items: center; width: 40px; height: 33px; border-radius: var(--ps-raio-sm);
  background: var(--ps-azul-50); color: var(--ps-azul); font-size: 13.5px; font-weight: 700; letter-spacing: .01em; margin-top: -3px;
}
.ps-num-vazio { visibility: hidden; }
.ps-pergunta { float: left; width: 100%; padding: 0; font-size: 17px; line-height: 1.4; font-weight: 700; color: var(--ps-navy); letter-spacing: -.005em; max-width: 700px; text-wrap: pretty; }
.ps-opcional { display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 999px; background: #F1F4F8; color: var(--ps-cinza); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; vertical-align: 2px; }
.ps-ajuda { clear: both; margin: 0; padding-top: 2px; font-size: 14.5px; color: var(--ps-cinza); line-height: 1.5; text-wrap: pretty; }
.ps-ajuda strong { color: var(--ps-texto); font-weight: 600; }
.ps-ajuda.ps-troca { animation: ps-troca .35s var(--ps-ease); }
@keyframes ps-troca { from { opacity: 0; transform: translateY(-3px); } }

/* radios nativos escondidos (teclado e leitores de tela continuam funcionando) */
.ps-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

/* ---------------------------------------------------------------- NPS */
.ps-nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 16px; margin-top: 6px; }
.ps-nps-op { position: relative; display: block; cursor: pointer; }
.ps-nps-n {
  display: grid; place-items: center; height: 58px; border-radius: var(--ps-raio-sm); border: 1px solid var(--ps-linha);
  background: #fff; font-size: 16px; font-weight: 600; color: var(--ps-navy); box-shadow: 0 1px 2px rgba(16, 38, 84, .04);
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s var(--ps-ease);
}
.ps-nps-op:hover .ps-nps-n { border-color: #B3C0D1; background: #FAFCFF; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31, 58, 92, .08); }
.ps-nps-op:active .ps-nps-n { transform: translateY(0) scale(.97); }
.ps-radio:checked + .ps-nps-n { background: var(--ps-azul); border-color: var(--ps-azul); color: #fff; box-shadow: 0 6px 16px rgba(31, 58, 92, .28); animation: ps-pop .3s var(--ps-ease); }
.ps-radio:focus-visible + .ps-nps-n, .ps-radio:focus-visible + .ps-rosto-cx, .ps-radio:focus-visible + span, .ps-radio:focus-visible + .ps-opcao-cx { outline: 2.5px solid var(--ps-azul); outline-offset: 2px; }
@keyframes ps-pop { 40% { transform: scale(1.06); } }
.ps-nps-legenda { display: flex; justify-content: space-between; margin-top: 14px; margin-bottom: 4px; padding: 0 2px; font-size: 13.5px; color: var(--ps-cinza); }

/* ---------------------------------------------------------------- texto */
.ps-campo-texto { position: relative; }
.ps-texto, .ps-input {
  display: block; width: 100%; border: 1px solid var(--ps-linha-2); border-radius: var(--ps-raio-sm); background: var(--ps-campo);
  padding: 13px 18px; font-size: 15px; line-height: 1.5; color: var(--ps-texto); resize: none; min-height: 88px; height: 88px; overflow-y: hidden;
  transition: border-color .2s, box-shadow .2s, background-color .2s; -webkit-appearance: none; appearance: none;
}
.ps-input { min-height: 0; height: 48px; padding: 0 16px; }
.ps-texto::placeholder, .ps-input::placeholder { color: #A3AEBE; }
.ps-texto:hover, .ps-input:hover { border-color: #C4CEDC; }
.ps-texto:focus, .ps-input:focus { outline: none; border-color: #8FA2BA; background: #fff; box-shadow: 0 0 0 4px rgba(31, 58, 92, .1); }
.ps-contador { display: block; text-align: right; margin-top: 10px; font-size: 13px; color: var(--ps-cinza-2); font-variant-numeric: tabular-nums; }
.ps-contador.perto { color: #B5671B; }

/* ---------------------------------------------------------------- rostos */
.ps-rostos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.ps-rosto-op { position: relative; display: block; cursor: pointer; }
.ps-rosto-cx {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; height: 92px; padding: 0 8px;
  border: 1px solid var(--ps-linha); border-radius: var(--ps-raio-sm); background: #fff; text-align: center;
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s var(--ps-ease);
}
.ps-rosto-rot { font-size: 13.5px; font-weight: 500; color: var(--ps-texto); line-height: 1.2; }
.ps-rosto-op:hover .ps-rosto-cx { border-color: #B3C0D1; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(31, 58, 92, .07); }
.ps-rosto-op:hover .ps-rosto { transform: scale(1.06); }
.ps-radio:checked + .ps-rosto-cx { border-color: var(--ps-azul); background: var(--ps-azul-50); box-shadow: 0 0 0 1px var(--ps-azul) inset; }
.ps-radio:checked + .ps-rosto-cx .ps-rosto { animation: ps-pop .35s var(--ps-ease); }
.ps-rosto { width: 32px; height: 32px; transition: transform .25s var(--ps-ease); }
.ps-rosto-fundo { fill: currentColor; }
.ps-rosto-olho { fill: rgba(30, 22, 12, .78); }
.ps-rosto-boca { fill: none; stroke: rgba(30, 22, 12, .78); stroke-width: 1.6; stroke-linecap: round; }
.ps-rosto-boca.cheia { fill: rgba(30, 22, 12, .78); stroke: none; }
.ps-rosto-1 { color: #F0575D; } .ps-rosto-2 { color: #F7923D; } .ps-rosto-3 { color: #F6C944; } .ps-rosto-4 { color: #5BCB72; } .ps-rosto-5 { color: #22B05C; }
.ps-fora { margin-top: 14px; }

/* chips (não se aplica / sem contato) */
.ps-chip { position: relative; display: inline-flex; cursor: pointer; }
.ps-chip > span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px dashed #C9D2DF;
  font-size: 13.5px; font-weight: 500; color: var(--ps-cinza); background: #fff; transition: all .2s;
}
.ps-chip:hover > span { border-color: #A2B1C5; color: var(--ps-texto); }
.ps-radio:checked + span { border-style: solid; border-color: var(--ps-azul); color: var(--ps-azul); background: var(--ps-azul-50); }

/* ---------------------------------------------------------------- matriz de aspectos */
.ps-matriz { display: grid; gap: 0; }
.ps-matriz-legenda { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -6px 0 6px; font-size: 12.5px; color: var(--ps-cinza-2); }
.ps-matriz-legenda b { color: var(--ps-azul); font-weight: 700; }
.ps-ponto { width: 3px; height: 3px; border-radius: 50%; background: #C5CEDB; }
.ps-linha { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "rot notas na"; align-items: center; gap: 10px 12px; padding: 14px 0; border-top: 1px solid #EEF1F6; }
.ps-matriz > .ps-linha:nth-child(2) { border-top: 0; }
.ps-linha-rot { grid-area: rot; }
.ps-notas { grid-area: notas; }
.ps-na { grid-area: na; }
.ps-matriz .ps-colapso, .ps-matriz .ps-colapso[data-aberto="nao"] { margin-top: 0; }
.ps-linha.pendente .ps-linha-rot::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: #E0767B; box-shadow: 0 0 0 3px rgba(224, 118, 123, .16); vertical-align: middle; animation: ps-entra .3s var(--ps-ease); }
.ps-linha.pendente .ps-nota > span, .ps-linha.pendente .ps-na > span { border-color: #F0CBCD; }
.ps-linha-rot { font-size: 15px; font-weight: 500; color: var(--ps-texto); }
.ps-notas { display: flex; gap: 8px; }
.ps-nota { position: relative; cursor: pointer; }
.ps-nota > span {
  display: grid; place-items: center; width: 44px; height: 42px; border-radius: var(--ps-raio-sm); border: 1px solid var(--ps-linha);
  font-size: 14.5px; font-weight: 600; color: var(--ps-navy); background: #fff; transition: all .2s var(--ps-ease);
}
.ps-nota:hover > span { border-color: #B3C0D1; background: #FAFCFF; transform: translateY(-1px); }
.ps-nota .ps-radio:checked + span { background: var(--ps-azul); border-color: var(--ps-azul); color: #fff; box-shadow: 0 4px 12px rgba(31, 58, 92, .25); animation: ps-pop .3s var(--ps-ease); }
.ps-na > span { justify-content: center; min-width: 118px; min-height: 42px; padding: 8px 12px; font-size: 12.5px; white-space: nowrap; }


/* ---------------------------------------------------------------- opções */
.ps-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ps-opcao { position: relative; display: block; cursor: pointer; }
.ps-opcao-cx {
  display: flex; align-items: center; gap: 14px; height: 100%; min-height: 58px; padding: 12px 16px; border-radius: var(--ps-raio-sm);
  border: 1px solid var(--ps-linha); background: #fff; font-size: 14.5px; font-weight: 500; line-height: 1.35; color: var(--ps-texto);
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s var(--ps-ease);
}
.ps-marca { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #B8C3D3; background: #fff; transition: all .2s var(--ps-ease); }
.ps-opcao:hover .ps-opcao-cx { border-color: #B3C0D1; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(31, 58, 92, .07); }
.ps-radio:checked + .ps-opcao-cx { border-color: var(--ps-azul); background: var(--ps-azul-50); box-shadow: 0 0 0 1px var(--ps-azul) inset; }
.ps-radio:checked + .ps-opcao-cx .ps-marca { border-color: var(--ps-azul); border-width: 5.5px; }
.ps-outro { padding-top: 12px; }

/* blocos que abrem e fecham (atendimento sem contato) */
.ps-colapso { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s var(--ps-ease), opacity .35s, margin .4s; margin-top: -23px; }
.ps-colapso-cont { display: grid; gap: 23px; }
.ps-colapso[data-aberto="sim"] > .ps-colapso-in > .ps-colapso-cont { animation: ps-surge .45s var(--ps-ease); }
@keyframes ps-surge { from { transform: translateY(-6px); } }
.ps-colapso[data-aberto="sim"] { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.ps-colapso[data-aberto="nao"] { visibility: hidden; transition: grid-template-rows .3s var(--ps-ease), opacity .2s, margin .3s, visibility 0s .3s; }
.ps-cartao .ps-colapso, .ps-cartao .ps-colapso[data-aberto="nao"] { margin-top: 0; }
.ps-cartao .ps-colapso-cont { gap: 0; }
.ps-colapso-in { overflow: hidden; min-height: 0; }
.ps-nota-info { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 18px; border-radius: var(--ps-raio-sm); background: var(--ps-azul-50); color: #1F3A5C; font-size: 14px; line-height: 1.5; }
.ps-nota-info .ps-ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ps-azul); }

/* múltipla escolha */
.ps-caixa { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #B8C3D3; background: #fff; color: #fff; transition: all .2s var(--ps-ease); }
.ps-caixa .ps-ico { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: all .2s var(--ps-ease); }
.ps-radio:checked + .ps-opcao-cx .ps-caixa { background: var(--ps-azul); border-color: var(--ps-azul); }
.ps-radio:checked + .ps-opcao-cx .ps-caixa .ps-ico { opacity: 1; transform: none; }
.ps-opcoes.uma { grid-template-columns: 1fr; }

/* escala rotulada (1 Muito difícil … 5 Muito fácil) */
.ps-escala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ps-escala-op { position: relative; display: block; cursor: pointer; }
.ps-escala-cx { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; height: 100%; min-height: 96px; padding: 12px 8px; border: 1px solid var(--ps-linha); border-radius: var(--ps-raio-sm); background: #fff; text-align: center; transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s var(--ps-ease); }
.ps-escala-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ps-azul-50); color: var(--ps-azul); font-size: 14px; font-weight: 700; transition: all .2s var(--ps-ease); }
.ps-escala-rot { font-size: 13.5px; font-weight: 500; line-height: 1.25; color: var(--ps-texto); }
.ps-escala-op:hover .ps-escala-cx { border-color: #B3C0D1; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(31, 58, 92, .07); }
.ps-radio:checked + .ps-escala-cx { border-color: var(--ps-azul); background: var(--ps-azul-50); box-shadow: 0 0 0 1px var(--ps-azul) inset; }
.ps-radio:checked + .ps-escala-cx .ps-escala-n { background: var(--ps-azul); color: #fff; animation: ps-pop .3s var(--ps-ease); }
.ps-radio:focus-visible + .ps-escala-cx { outline: 2.5px solid var(--ps-azul); outline-offset: 2px; }

/* ---------------------------------------------------------------- erros */
.ps-erro { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 8px; margin: 16px 0 0; padding: 8px 14px 8px 10px; border-radius: 999px; background: #FFF5F5; border: 1px solid #F6D9DB; font-size: 13px; font-weight: 500; line-height: 1.35; color: #B4323A; animation: ps-entra .3s var(--ps-ease); }
.ps-erro .ps-ico { flex: none; width: 16px; height: 16px; stroke-width: 2; }
.ps-cartao.com-erro { border-color: #F3D3D5; box-shadow: 0 1px 2px rgba(16, 38, 84, .04), 0 10px 30px rgba(180, 50, 58, .06); }
.ps-chama { animation: ps-chama .45s var(--ps-ease); }
@keyframes ps-chama { 20% { transform: translateX(-4px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
.ps-erro[hidden] { display: none; }
.ps-erro-geral { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--ps-raio-sm); background: var(--ps-erro-50); color: var(--ps-erro); font-size: 14px; text-align: center; }
.ps-erro-geral[hidden] { display: none; }

/* ---------------------------------------------------------------- rodapé */
.ps-rodape { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.ps-rodape-info { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.ps-contagem { font-size: 15px; color: var(--ps-cinza); white-space: nowrap; }
.ps-salvo { font-size: 12.5px; color: var(--ps-cinza-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.ps-salvo[data-estado="erro"] { color: #B5671B; }
.ps-rodape-acoes { display: flex; gap: 10px; }
.ps-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 42px; padding: 0 22px; border-radius: var(--ps-raio-sm);
  border: 1px solid transparent; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .15s var(--ps-ease), color .2s;
}
.ps-btn .ps-ico { width: 18px; height: 18px; }
.ps-btn-pri { background: var(--ps-azul); color: #fff; box-shadow: 0 6px 16px rgba(31, 58, 92, .24); }
.ps-btn-pri:hover { background: var(--ps-azul-esc); box-shadow: 0 8px 20px rgba(31, 58, 92, .3); }
.ps-btn-pri:hover .ps-ico { transform: translateX(2px); }
.ps-btn-pri .ps-ico { transition: transform .2s var(--ps-ease); }
.ps-btn-sec { background: #fff; color: var(--ps-texto); border-color: var(--ps-linha); }
.ps-btn-sec:hover { border-color: #C4CEDC; background: #FAFBFD; }
.ps-btn:active { transform: scale(.98); }
.ps-btn:focus-visible { outline: 2.5px solid var(--ps-azul); outline-offset: 3px; }
.ps-btn[disabled] { opacity: .75; cursor: progress; }
.ps-giro { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: ps-giro .8s linear infinite; }
@keyframes ps-giro { to { transform: rotate(360deg); } }
.ps-ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ps-privacidade { display: flex; gap: 10px; align-items: flex-start; max-width: 640px; margin: 44px auto 0; font-size: 12.5px; line-height: 1.55; color: var(--ps-cinza-2); text-align: left; }
.ps-privacidade .ps-ico { flex: none; width: 15px; height: 15px; margin-top: 2px; stroke-width: 1.8; }

/* ---------------------------------------------------------------- revisão */
.ps-revisao { display: grid; gap: 16px; }
.ps-rev-bloco { border: 1px solid rgba(227, 232, 240, .7); border-radius: var(--ps-raio); background: #fff; box-shadow: var(--ps-sombra); padding: 20px 24px; }
.ps-rev-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ps-rev-cab .ps-num { margin: 0; }
.ps-rev-tit { flex: 1; margin: 0; font-size: 16px; font-weight: 700; color: var(--ps-navy); }
.ps-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; margin: -8px -10px; border: 0; border-radius: 8px; background: none; color: var(--ps-azul); font-size: 14px; font-weight: 600; cursor: pointer; }
.ps-link .ps-ico { width: 15px; height: 15px; }
.ps-link:hover { background: var(--ps-azul-50); }
.ps-link:focus-visible { outline: 2.5px solid var(--ps-azul); outline-offset: 1px; }
.ps-rev-lista { margin: 0; display: grid; }
.ps-rev-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; padding: 9px 0 9px 54px; border-top: 1px solid #F0F3F7; font-size: 14px; }
.ps-rev-item:first-child { border-top: 0; }
.ps-rev-item dt { color: var(--ps-cinza); }
.ps-rev-item dd { margin: 0; color: var(--ps-texto); font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }

/* ---------------------------------------------------------------- telas finais */
.ps-final { min-height: calc(100vh - 80px); min-height: calc(100dvh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0; }
.ps-final .ps-titulo { max-width: 640px; }
.ps-final .ps-sub { max-width: 520px; }
.ps-final .ps-btn { margin-top: 28px; }
.ps-selo { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 30px; background: radial-gradient(circle, var(--ps-azul-50) 0%, rgba(238, 244, 255, 0) 70%); animation: ps-entra .6s var(--ps-ease) both; }
.ps-selo-svg { width: 64px; height: 64px; }
.ps-selo-anel { fill: #fff; stroke: var(--ps-azul); stroke-width: 2; stroke-dasharray: 164; stroke-dashoffset: 164; animation: ps-traco .8s var(--ps-ease) .15s forwards; }
.ps-selo-anel.neutro { stroke: #B9C6DA; }
.ps-selo-check { fill: none; stroke: var(--ps-azul); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 34; animation: ps-traco .45s var(--ps-ease) .75s forwards; }
.ps-selo-i { fill: none; stroke: #7F8EA6; stroke-width: 3; stroke-linecap: round; }
.ps-final.ok .ps-titulo, .ps-final.ok .ps-sub { animation: ps-entra .6s var(--ps-ease) .25s both; }
@keyframes ps-traco { to { stroke-dashoffset: 0; } }
@keyframes ps-entra { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- transições de etapa */
.ps-etapa[data-dir="frente"] .ps-topo { animation: ps-entra-d .45s var(--ps-ease) both; }
.ps-etapa[data-dir="tras"] .ps-topo { animation: ps-entra-e .45s var(--ps-ease) both; }
.ps-cartoes > * { animation: ps-entra .5s var(--ps-ease) both; }
.ps-cartoes > :nth-child(2) { animation-delay: .06s; }
.ps-cartoes > :nth-child(3) { animation-delay: .12s; }
.ps-cartoes > :nth-child(4) { animation-delay: .18s; }
@keyframes ps-entra-d { from { opacity: 0; transform: translateX(14px); } }
@keyframes ps-entra-e { from { opacity: 0; transform: translateX(-14px); } }

/* ---------------------------------------------------------------- identificação (link geral) */
.ps-abertura { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px 0 64px; text-align: center; }
.ps-abertura::after { content: ''; position: fixed; z-index: -1; pointer-events: none; width: 800px; height: 460px; right: -340px; bottom: -360px; border: 1px solid #C79B50; border-radius: 50%; transform: rotate(-28deg); }
.ps-abertura .ps-logo { padding-bottom: 36px; }
.ps-abertura .ps-topo { max-width: 620px; margin: 0 auto 32px; }
.ps-abertura .ps-selo-campanha { margin-bottom: 40px; background: #EFF5FC; color: var(--ps-azul); font-weight: 500; letter-spacing: 0; }
.ps-abertura .ps-titulo { max-width: 520px; margin: 0 auto; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(29px, 3.1vw, 40px); font-weight: 700; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.ps-abertura .ps-sub { max-width: 490px; margin: 26px auto 0; font-size: 16px; line-height: 1.75; color: #6F85A5; }
.ps-abertura .ps-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 390px; gap: 0; margin-bottom: 40px; color: var(--ps-azul); }
.ps-abertura .ps-meta > span { position: relative; flex-direction: column; gap: 10px; padding: 0 14px; font-size: 13px; line-height: 1.5; text-wrap: balance; }
.ps-abertura .ps-meta > span + span::before { content: ''; position: absolute; left: 0; top: 24px; width: 1px; height: 44px; background: #DDE8F6; }
.ps-abertura .ps-meta .ps-ico { width: 48px; height: 48px; padding: 13px; border-radius: 50%; background: #EDF5FF; color: var(--ps-navy); }
.ps-abertura > .ps-btn { width: 100%; max-width: 360px; height: 54px; border-radius: 13px; font-size: 17px; background: linear-gradient(120deg, #193A60, #162E4A); box-shadow: 0 9px 20px rgba(22, 46, 74, .18); }
.ps-abertura > .ps-btn:hover { background: var(--ps-azul-esc); }
.ps-ident { max-width: 640px; margin: 0 auto; }
.ps-ident-tela { max-width: var(--ps-largura); margin: 0 auto; }
.ps-ident-tela .ps-logo img { height: 30px; }
.ps-ident-tela .ps-nav { width: 100%; }
.ps-ident .ps-titulo { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.04em; }
.ps-ident .ps-sub { max-width: 550px; margin: 10px auto 0; color: #6F85A5; }
.ps-ident .ps-cartao-ident { padding: 0; border: 0; background: transparent; box-shadow: none; }
.ps-ident .ps-ident-secao { padding: 22px; border: 1px solid #EAF0F8; border-radius: 15px; background: #fff; box-shadow: 0 6px 22px rgba(16, 38, 84, .045); }
.ps-ident .ps-ident-secao + .ps-ident-secao { margin-top: 14px; }
.ps-ident .ps-ident-ico { background: #EDF5FF; border-radius: 16px; }
.ps-ident .ps-input { border-color: #D3E1F3; background: #F8FAFD; }
.ps-ident .ps-opcional { padding: 2px 10px; background: #EEF3FA; color: #506D95; }
.ps-ident-nota { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; padding: 9px 12px; border-radius: 9px; background: #EDF5FF; color: #506D95; font-size: 12px; }
.ps-ident-nota .ps-ico { flex: none; width: 17px; height: 17px; }
.ps-ident .ps-ident-acoes > .ps-btn { flex: 1; height: 48px; }
.ps-ident .ps-ident-acoes > .ps-btn-sec { background: #EEF3FA; border-color: #D3E1F3; }
.ps-ident .ps-topo { margin-top: 18px; margin-bottom: 22px; }
.ps-selo-campanha { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px; background: var(--ps-azul-50); color: var(--ps-azul); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.ps-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 28px; font-size: 13.5px; color: var(--ps-cinza); }
.ps-meta span { display: inline-flex; align-items: center; gap: 7px; }
.ps-meta .ps-ico { width: 16px; height: 16px; color: var(--ps-azul); }
.ps-cartao-ident { padding: 26px 28px 28px; animation: ps-entra .5s var(--ps-ease) both; }
.ps-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.ps-ident-secao + .ps-ident-secao { margin-top: 24px; padding-top: 24px; border-top: 1px solid #EEF1F6; }
.ps-ident-cab { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.ps-ident-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ps-azul-50); color: var(--ps-azul); }
.ps-ident-ico .ps-ico { width: 20px; height: 20px; stroke-width: 1.8; }
.ps-ident-tit { margin: 1px 0 2px; font-size: 16px; font-weight: 700; color: var(--ps-navy); }
.ps-ident-sub { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ps-cinza); text-wrap: pretty; }
.ps-input-cx { position: relative; }
.ps-input.travado { background: var(--ps-azul-50); border-color: var(--ps-azul-100); color: var(--ps-navy); font-weight: 600; letter-spacing: .04em; padding-right: 84px; cursor: default; }
.ps-input.travado:focus { box-shadow: none; border-color: var(--ps-azul-100); }
.ps-trocar { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border: 0; border-radius: 8px; background: #fff; color: var(--ps-azul); font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 38, 84, .08); }
.ps-trocar:hover { background: var(--ps-azul-50); }
.ps-trocar:focus-visible { outline: 2.5px solid var(--ps-azul); outline-offset: 1px; }
.ps-trocar[hidden] { display: none; }
.ps-dica[data-tipo="ok"] { color: #1F7A4D; }
.ps-dica[data-tipo="ok"]::before { content: '✓ '; font-weight: 700; }
.ps-dica[data-tipo="aviso"] { color: #9A6B12; }
.ps-rotulo .ps-opcional { margin-left: 8px; vertical-align: 1px; }
.ps-rotulo { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ps-navy); }
.ps-dica { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ps-cinza-2); }
.ps-campo .ps-erro { margin-top: 10px; }
.ps-input.com-erro { border-color: #EBB8BC; background: #FFFBFB; }
.ps-isca { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ps-ident-acoes { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.ps-btn-largo { min-width: 240px; height: 48px; }
.ps-ident ~ .ps-privacidade { margin-top: 32px; }
.ps-quem { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; margin: 30px auto 0; font-size: 13px; color: var(--ps-cinza); text-align: center; }
.ps-quem strong { color: var(--ps-texto); font-weight: 600; }
.ps-link-sm { margin: 0; padding: 4px 8px; font-size: 13px; }
.ps-quem + .ps-privacidade { margin-top: 14px; }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 960px) {
  .ps-app { padding-left: 20px; padding-right: 20px; }
  .ps-stepper { grid-template-columns: repeat(var(--ps-passos, 6), minmax(0, 1fr)); width: 100%; }
  .ps-passo-rot { font-size: 12px; }
  .ps-nps { gap: 10px; }
  .ps-rostos { gap: 10px; }
  .ps-escala { gap: 8px; }
  .ps-matriz-legenda { justify-content: flex-start; margin-top: -8px; }
}
@media (max-width: 960px) and (min-width: 641px) {
  .ps-linha { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rot rot" "notas na"; }
  .ps-na { justify-self: start; }
}

/* ---------------------------------------------------------------- celular */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .ps-app { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .ps-fundo::before { width: 420px; height: 420px; left: -300px; top: -300px; }
  .ps-fundo::after { width: 520px; height: 520px; right: -440px; top: 380px; }
  .ps-campos { grid-template-columns: 1fr; gap: 18px; }
  .ps-cartao-ident { padding: 20px 16px 22px; }
  .ps-meta { gap: 6px 14px; font-size: 12.5px; margin-bottom: 20px; }
  .ps-ident .ps-topo { margin-top: 8px; }
  .ps-ident-acoes .ps-btn-largo { flex: 1; min-width: 0; padding: 0 14px; }
  .ps-abertura { min-height: calc(100dvh - 40px); padding: 28px 12px 40px; }
  .ps-abertura .ps-logo { padding-bottom: 32px; }
  .ps-abertura .ps-logo img { height: 33px; }
  .ps-abertura .ps-selo-campanha { padding: 7px 10px; margin-bottom: 38px; font-size: clamp(10px, 2.85vw, 12px); white-space: nowrap; }
  .ps-abertura .ps-titulo { max-width: 325px; font-size: clamp(27px, 7.5vw, 30px); }
  .ps-abertura .ps-sub { margin-top: 24px; font-size: 14.5px; line-height: 1.75; }
  .ps-abertura .ps-meta { margin-bottom: 34px; }
  .ps-abertura .ps-meta > span { padding: 0 9px; font-size: 12px; }
  .ps-abertura > .ps-btn { height: 52px; font-size: 16px; }
  .ps-ident-tela .ps-logo { padding-bottom: 18px; }
  .ps-ident-tela .ps-logo img { height: 27px; }
  .ps-ident-tela .ps-progresso-nome { font-size: 0; }
  .ps-ident-tela .ps-progresso-nome::after { content: 'Etapa 1'; font-size: 12px; }
  .ps-ident .ps-topo { margin: 22px auto 18px; }
  .ps-ident .ps-titulo { font-size: 25px; }
  .ps-ident .ps-sub { font-size: 13px; line-height: 1.55; }
  .ps-ident .ps-ident-secao { padding: 16px 14px; }
  .ps-ident .ps-ident-cab { gap: 12px; margin-bottom: 14px; }
  .ps-ident .ps-ident-tit { font-size: 14px; }
  .ps-ident .ps-ident-sub { font-size: 12px; }
  .ps-ident .ps-campos { gap: 14px; }
  .ps-ident .ps-rotulo { margin-bottom: 6px; font-size: 12px; }
  .ps-ident .ps-input { min-height: 44px; font-size: 16px; }
  .ps-ident .ps-ident-acoes { margin-top: 12px; }
  .ps-logo { padding: 4px 0 18px; }
  .ps-logo img { height: 26px; }
  .ps-nav { display: block; padding-top: 4px; }
  .ps-stepper { display: none; }
  .ps-progresso { display: block; }
  .ps-progresso-txt { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
  .ps-progresso-nome { font-size: 13px; font-weight: 700; color: var(--ps-azul); letter-spacing: .01em; }
  .ps-progresso-n { font-size: 12.5px; font-weight: 600; color: var(--ps-cinza-2); font-variant-numeric: tabular-nums; }
  .ps-progresso-seg { display: grid; grid-template-columns: repeat(var(--ps-passos, 6), 1fr); gap: 5px; }
  .ps-progresso-seg span { position: relative; height: 4px; border-radius: 4px; background: #E6EBF2; overflow: hidden; }
  .ps-progresso-seg span::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--ps-azul); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ps-ease); }
  .ps-progresso-seg span.feita::after { background: #8FA2BA; }
  .ps-progresso.pronto .ps-progresso-seg span.feita::after, .ps-progresso.pronto .ps-progresso-seg span.atual::after { transform: scaleX(1); }
  .ps-topo { margin: 30px auto 24px; }
  .ps-titulo { font-size: 25px; }
  .ps-sub { font-size: 14.5px; margin-top: 10px; }
  .ps-cartoes { gap: 14px; }
  .ps-cartao { padding: 18px 16px 20px; border-radius: 14px; }
  .ps-cab { grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
  .ps-num { width: 36px; height: 28px; font-size: 12.5px; margin: 0; }
  .ps-num-vazio { display: none; }
  .ps-pergunta { font-size: 16px; }
  .ps-ajuda { font-size: 14px; }
  .ps-nps { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .ps-nps-n { height: 48px; font-size: 15px; }
  .ps-nps-legenda { font-size: 12.5px; margin-top: 10px; }
  .ps-rostos { grid-template-columns: 1fr; gap: 8px; }
  .ps-rosto-cx { flex-direction: row; justify-content: flex-start; height: 56px; padding: 0 16px; gap: 14px; }
  .ps-rosto { width: 28px; height: 28px; }
  .ps-rosto-rot { font-size: 14.5px; }
  .ps-chip, .ps-chip > span { width: 100%; }
  .ps-chip-largo > span { justify-content: center; min-height: 48px; border-radius: var(--ps-raio-sm); }
  .ps-linha { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rot na" "notas notas"; gap: 10px; padding: 14px 0 16px; }
  .ps-notas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; }
  .ps-nota > span { width: 100%; height: 46px; }
  .ps-chip.ps-na, .ps-chip.ps-na > span { width: auto; }
  .ps-na > span { min-width: 0; min-height: 34px; padding: 6px 11px; font-size: 12px; }
  .ps-escala { grid-template-columns: 1fr; gap: 8px; }
  .ps-escala-cx { flex-direction: row; justify-content: flex-start; min-height: 54px; padding: 0 16px; gap: 14px; text-align: left; }
  .ps-escala-n { width: 28px; height: 28px; font-size: 13px; }
  .ps-escala-rot { font-size: 14.5px; }
  .ps-erro { border-radius: 12px; }
  .ps-opcional { margin-left: 8px; }
  .ps-opcoes { grid-template-columns: 1fr; gap: 8px; }
  .ps-opcao-cx { min-height: 54px; }
  .ps-texto, .ps-input { font-size: 16px; } /* evita zoom do iOS ao focar */
  .ps-rodape { position: sticky; bottom: 0; z-index: 2; margin: 14px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid #EEF1F6; }
  .ps-rodape-info { flex-direction: column; gap: 0; }
  .ps-contagem { font-size: 14px; }
  .ps-salvo { font-size: 11.5px; max-width: 120px; }
  .ps-btn { height: 46px; padding: 0 16px; }
  .ps-btn-sec span { display: none; }
  .ps-btn-sec { width: 46px; padding: 0; }
  .ps-privacidade { margin-top: 24px; }
  .ps-rev-bloco { padding: 16px; }
  .ps-rev-item { grid-template-columns: 1fr; gap: 2px; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .ps-selo-anel, .ps-selo-check { stroke-dashoffset: 0; }
}
