/* Página do diagnóstico gratuito (formulário de 7 perguntas), versão dia/noite */
:root {
  --lin-campo: rgba(0, 0, 0, .22);
  --apagada: #C9C9C9;
  --erro: #B3261E;
  --estrela: "\2734\FE0E";
}
:root[data-tema="escuro"] {
  --lin-campo: rgba(255, 255, 255, .28);
  --apagada: #3C3C3C;
  --erro: #FF8F86;
}
.diag-pagina { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 24px; min-height: calc(100vh - var(--alt-topo)); min-height: calc(100dvh - var(--alt-topo)); display: flex; flex-direction: column; }
.diag-pagina .palco { flex: 1; }
.diag-topo { display: flex; justify-content: space-between; align-items: baseline; padding-top: 22px; font-size: .9375rem; }
.diag-topo .rot { font-weight: 700; letter-spacing: -.01em; }
.diag-rodape { padding: 20px 0 28px; color: var(--cinza); font-size: .9375rem; }
body.final .diag-rodape { visibility: hidden; }
@media (max-width: 420px) { .diag-pagina { padding-left: 20px; padding-right: 20px; } .palco { padding: 28px 0 32px; } .btn { flex: 1 1 auto; } }
:root[data-tema="escuro"] select.campo { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 7l6 6 6-6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

  ::selection { background: var(--tinta); color: var(--fundo); }
  [hidden] { display: none !important; }
  :focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; border-radius: 4px; }

  .aviso-teste {
    background: var(--tinta);
    color: var(--fundo);
    font-size: .875rem;
    font-weight: 600;
    text-align: center;
    padding: 8px 20px;
  }

  .contador { color: var(--cinza); font-variant-numeric: tabular-nums; }

  /* Constelação: cada resposta acende uma &#x2734;&#xFE0E; */
  .constelacao {
    display: block;
    width: 100%;
    height: auto;
    margin: 26px 0 0;
    overflow: visible;
  }
  .traco-base { stroke: var(--apagada); stroke-width: 1.25; stroke-dasharray: 2 5; }
  .traco {
    stroke: var(--tinta);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset .7s cubic-bezier(.6, 0, .2, 1);
  }
  .traco.on { stroke-dashoffset: 0; }
  .halo { fill: var(--fundo); }
  .estrela {
    fill: var(--apagada);
    font-size: 34px;
    transform-box: fill-box;
    transform-origin: center;
    transition: fill .3s, transform .35s cubic-bezier(.3, 1.4, .5, 1);
  }
  .estrela.atual { fill: var(--tinta); transform: scale(1.4); }
  .estrela.feita { fill: var(--tinta); }
  .constelacao.completa .estrela {
    animation: brilho .9s cubic-bezier(.3, 1.3, .5, 1) both;
    animation-delay: calc(var(--i) * 90ms + .5s);
  }
  @keyframes brilho {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.6); }
    100% { transform: scale(1); }
  }

  /* Palco das perguntas */
  .palco {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 0 44px;
  }
  .tela.ativa { animation: entra .45s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes entra {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }

  .tela h1 {
    font-size: clamp(2.25rem, 1.3rem + 4.4vw, 3.75rem);
    line-height: 1.02;
    letter-spacing: -.035em;
    font-weight: 700;
    text-wrap: balance;
  }
  .tela h2 {
    font-size: clamp(1.625rem, 1.15rem + 2.3vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    font-weight: 600;
    margin-bottom: 28px;
    text-wrap: balance;
  }
  .tela h1:focus, .tela h2:focus { outline: none; }
  .tela h2 label { cursor: default; }

  .lead {
    font-size: 1.1875rem;
    color: var(--cinza);
    max-width: 32em;
    margin-top: 18px;
  }
  .lead + .lead { margin-top: 10px; }
  .lead strong { color: var(--tinta); font-weight: 600; }
  .ajuda { color: var(--cinza); max-width: 34em; margin: -14px 0 22px; }

  /* Campos */
  .rotulo { display: block; font-size: .9375rem; color: var(--cinza); margin-top: 26px; }
  .tela h2 + .rotulo { margin-top: 0; }

  .campo {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--lin-campo);
    border-radius: 0;
    color: var(--tinta);
    font: inherit;
    font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
    font-weight: 500;
    letter-spacing: -.01em;
    padding: 8px 0 12px;
    outline: none;
    transition: border-color .2s;
  }
  .campo::placeholder { color: color-mix(in srgb, var(--tinta) 34%, transparent); }
  .campo:focus { border-bottom-color: var(--tinta); }
  .campo:-webkit-autofill {
    -webkit-text-fill-color: var(--tinta);
    box-shadow: 0 0 0 100px var(--fundo) inset;
  }
  select.campo {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 7l6 6 6-6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
  }
  select.campo:invalid { color: color-mix(in srgb, var(--tinta) 42%, transparent); }
  select.campo option { color: var(--tinta); background: var(--fundo); }

  /* Opções de resposta */
  .opcoes { display: grid; gap: 10px; }
  .opcao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    text-align: left;
    background: var(--fundo);
    color: var(--tinta);
    border: 1.5px solid var(--lin-campo);
    border-radius: 16px;
    padding: 17px 20px;
    font: inherit;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s;
  }
  .opcao:hover { border-color: var(--tinta); }
  .opcao::after {
    content: var(--estrela);
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .2s, transform .35s cubic-bezier(.3, 1.4, .5, 1);
  }
  .opcao[aria-pressed="true"] { background: var(--tinta); color: var(--fundo); border-color: var(--tinta); }
  .opcao[aria-pressed="true"]::after { opacity: 1; transform: scale(1); }

  /* Consentimento */
  .consentimento {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 28px;
    color: var(--cinza);
    font-size: .9375rem;
    line-height: 1.45;
    cursor: pointer;
  }
  .consentimento input {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    background: var(--fundo);
    border: 1.5px solid var(--tinta);
    border-radius: 6px;
    display: grid;
    place-content: center;
    cursor: pointer;
  }
  .consentimento input:checked { background: var(--tinta); }
  .consentimento input:checked::after {
    content: var(--estrela);
    color: var(--fundo);
    font-size: 14px;
    line-height: 1;
  }

  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .erro { color: var(--erro); font-size: .9375rem; font-weight: 500; min-height: 1.5em; margin-top: 12px; }

  /* Botões */
  .acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; }
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tinta);
    color: var(--fundo);
    border: 0;
    border-radius: 999px;
    padding: 15px 30px;
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.005em;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
  }
  .btn:hover { opacity: .86; }
  .btn:active { transform: scale(.98); }
  .btn:disabled { opacity: .55; cursor: progress; }
  .btn-contorno {
    background: transparent;
    color: var(--tinta);
    box-shadow: inset 0 0 0 1.5px var(--tinta);
    padding: 15px 24px;
  }
  .btn-contorno:hover { background: var(--tinta); color: var(--fundo); opacity: 1; }
  #redes { gap: 10px; }
  .btn-texto {
    background: none;
    border: 0;
    color: var(--cinza);
    font: inherit;
    font-size: 1rem;
    padding: 12px 2px;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
  .btn-texto:hover { color: var(--tinta); }
  .tela[data-tela="0"] .acoes { margin-top: 36px; }

  /* Tela final */
  .bordao {
    margin-top: 56px;
    font-size: clamp(1.5rem, 1rem + 2.4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-wrap: balance;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }
/* Campos extras montados pela plataforma */
textarea.campo { resize: none; line-height: 1.35; min-height: 5.5em; }
.detalhe { margin-top: 4px; }
.detalhe[hidden] { display: none; }
