/* Respondente: mobile-first, uma pergunta por tela. Cores vêm do tema (tokens do kit BCC: --navy, --gold…). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f);
  font-size: 1.0625rem; line-height: 1.5; min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-l); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Faixa da marca */
.marca {
  background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold);
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px; position: relative; overflow: hidden;
}
.marca::before {
  content: ''; position: absolute; inset: 0; background-image: var(--banner, none); background-size: cover; background-position: center;
  opacity: .28; pointer-events: none;
}
.marca-linha { position: relative; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px; min-height: 40px; }
.marca-logo { height: 40px; width: auto; max-width: 45%; object-fit: contain; }
.marca-nome { font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.marca-faixa { margin-left: auto; font-size: .875rem; opacity: .9; text-align: right; }
.marca-previa { position: relative; max-width: 640px; margin: 8px auto 0; font-size: .8125rem; background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 6px; }

.app { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(132px + env(safe-area-inset-bottom)); }
.aviso { color: var(--muted); }

/* Cabeçalho da pergunta */
.cabeca { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .875rem; color: var(--muted); }
.cabeca .bloco { color: var(--gold-d); font-weight: 600; }
.trilha { height: 6px; background: var(--line); border-radius: 3px; margin: 8px 0 24px; overflow: hidden; }
.trilha i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold)); border-radius: 3px; transition: width .3s ease; }

.tela h1 { font-size: 1.375rem; line-height: 1.3; margin: 0 0 8px; font-weight: 650; outline: none; }
.tela .ajuda { color: var(--muted); margin: 0 0 18px; font-size: .9375rem; }
.tela-estado { padding-top: 40px; }
.tela-estado h1 { font-size: 1.5rem; }
.tela-estado p { color: var(--muted); }

/* Abertura */
.abertura h1 { font-size: 1.6rem; margin-top: 8px; }
.abertura p { margin: 0 0 14px; }
.assinatura { color: var(--muted); font-size: .9375rem; }
.consentimento { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 8px 0 20px; }
.consentimento a { color: var(--gold-d); }

/* Opções */
.opcoes { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.opcao {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 16px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.opcao:hover { border-color: var(--gold-l); }
.opcao[aria-checked="true"], .opcao[aria-pressed="true"] { background: var(--sel); border-color: var(--gold-d); }
.marcador {
  flex: none; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-items: center;
}
.multi .marcador { border-radius: 6px; }
.opcao[aria-checked="true"] .marcador, .opcao[aria-pressed="true"] .marcador { border-color: var(--gold-d); background: var(--gold-d); }
.opcao[aria-checked="true"] .marcador::after, .opcao[aria-pressed="true"] .marcador::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--surface);
}
.multi .opcao[aria-pressed="true"] .marcador::after { width: 10px; height: 5px; border-radius: 0; background: none; border: solid var(--surface); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.opcoes.duas { grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .opcoes.duas { grid-template-columns: 1fr; } }

.campo-outro, .texto, select.lista {
  width: 100%; margin-top: 10px; padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
}
select.lista { min-height: 52px; margin-top: 0; appearance: auto; }
.texto { min-height: 140px; resize: vertical; }
.contador { text-align: right; font-size: .8125rem; color: var(--muted); }

/* Ordenação: toque na ordem */
.rank .posicao {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center;
  font-weight: 700; font-size: .9375rem; color: var(--surface);
}
.rank .opcao[aria-pressed="true"] .posicao { background: var(--gold-d); border: 0; }
.acao-sec { background: none; border: 0; color: var(--gold-d); padding: 10px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Matriz (Likert): um cartão por item */
.matriz { display: grid; gap: 14px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0; }
.item legend { font-weight: 600; padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.niveis { clear: both; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nivel {
  min-height: 48px; padding: 6px 4px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer;
  font-size: .8125rem; line-height: 1.2; text-align: center;
}
.nivel[aria-checked="true"] { background: var(--gold-d); border-color: var(--gold-d); color: #fff; font-weight: 600; }
.nivel.na { grid-column: 1 / -1; min-height: 38px; background: none; }
.nivel.na[aria-checked="true"] { background: var(--muted); border-color: var(--muted); }
@media (max-width: 360px) { .niveis { grid-template-columns: 1fr 1fr; } }

/* NPS / escala */
.notas { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.nota {
  aspect-ratio: 1; min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 600;
}
.nota[aria-checked="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pontas { display: flex; justify-content: space-between; color: var(--muted); font-size: .8125rem; margin-top: 8px; gap: 16px; }
@media (max-width: 520px) { .notas { grid-template-columns: repeat(6, 1fr); } }

/* Barra fixa */
.barra {
  position: fixed; inset: auto 0 0 0; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
}
.barra-in { max-width: 640px; margin: 0 auto; }
.msg { min-height: 1.4em; margin: 0 0 6px; font-size: .9rem; color: #b42318; font-weight: 600; }
@media (prefers-color-scheme: dark) { .msg { color: #ff8a80; } }
.botoes { display: flex; gap: 10px; }
.btn {
  min-height: 50px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 600; cursor: pointer;
}
.btn.primario { flex: 1; background: var(--gold-d); border-color: var(--gold-d); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primario { color: var(--bg); } }
.btn[disabled] { opacity: .55; cursor: progress; }
.selos { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); margin-top: 8px; }

.fim { text-align: left; padding-top: 24px; }
.fim .ok {
  width: 56px; height: 56px; border-radius: 50%; background: var(--sel); display: grid; place-items: center; margin-bottom: 16px;
}
.fim .ok::after { content: ''; width: 20px; height: 10px; border: solid var(--gold-d); border-width: 0 0 3px 3px; transform: translateY(-3px) rotate(-45deg); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#ts { margin-top: 12px; }
.consentimento p { margin: 0 0 10px; }
.consentimento > :last-child { margin-bottom: 0; }
