/* ==========================================================================
   Diagnóstico do consultório — quiz interativo (preto e branco premium)
   1. Tokens       2. Base          3. Fundo         4. Cabeçalho
   5. Palco/telas  6. Tipografia    7. Abertura      8. Capítulo
   9. Pergunta     10. Entradas     11. Opções       12. Escala
   13. Botões      14. Dock         15. Revisão      16. Concluído
   17. Animações   18. Responsivo   19. Acessibilidade
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  color-scheme: dark;

  --bg: #030303;
  --text: #f5f5f4;
  --text-2: rgba(245, 245, 244, .70);
  --text-3: rgba(245, 245, 244, .46);
  --text-4: rgba(245, 245, 244, .28);

  --stroke: rgba(255, 255, 255, .09);
  --stroke-2: rgba(255, 255, 255, .18);
  --stroke-3: rgba(255, 255, 255, .42);

  --glass: linear-gradient(180deg, rgba(255, 255, 255, .075) 0%, rgba(255, 255, 255, .018) 100%);
  --glass-hover: linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .04) 100%);
  --silver: linear-gradient(135deg, #ffffff 0%, #f0f0f0 30%, #c9c9c9 65%, #9a9a9a 100%);
  --grad-text: linear-gradient(180deg, #ffffff 0%, #ededed 38%, #9b9b9b 100%);
  --grad-line: linear-gradient(90deg, rgba(255, 255, 255, .25), #ffffff);

  --error: #ff9e9e;

  --font-display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --max: 720px;
  --gutter: 28px;
  --radius: 16px;
  --tap: 52px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* 2. Base ----------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: transparent; /* o degradê vem de .bg */
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

::selection { background: #fff; color: #000; }

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 3. Fundo ---------------------------------------------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 35%, transparent 65%),
    radial-gradient(80% 60% at 100% 110%, rgba(255, 255, 255, .07) 0%, transparent 60%),
    linear-gradient(180deg, #121212 0%, #070707 45%, #000000 100%);
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}

.bg__orb--1 {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
  animation: flutuar 22s ease-in-out infinite alternate;
}

.bg__orb--2 {
  width: 460px;
  height: 460px;
  right: -160px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
  animation: flutuar 28s ease-in-out infinite alternate-reverse;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 55% at 50% 0%, #000 0%, transparent 100%);
}

.bg__grain {
  position: absolute;
  inset: -50%;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 4. Cabeçalho ------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: var(--safe-top);
  background: linear-gradient(180deg, rgba(3, 3, 3, .92) 0%, rgba(3, 3, 3, .65) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.topbar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px max(var(--gutter), var(--safe-right)) 16px max(var(--gutter), var(--safe-left));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--silver);
  box-shadow: 0 0 18px rgba(255, 255, 255, .25), inset 0 -2px 4px rgba(0, 0, 0, .25);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__count {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.topbar__count b { color: var(--text); font-weight: 600; }

.progress {
  height: 2px;
  background: rgba(255, 255, 255, .07);
}

.progress__fill {
  height: 100%;
  width: 100%;
  background: var(--grad-line);
  box-shadow: 0 0 12px rgba(255, 255, 255, .55);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .7s var(--ease);
}

/* 5. Palco e telas -------------------------------------------------------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px max(var(--gutter), var(--safe-right)) calc(132px + var(--safe-bottom)) max(var(--gutter), var(--safe-left));
}

.screen {
  margin-block: auto; /* centraliza na vertical; se for maior que a tela, começa no topo */
  width: 100%;
}

.screen > * {
  animation: entrar .7s var(--ease) both;
}

.screen > :nth-child(2) { animation-delay: .05s; }
.screen > :nth-child(3) { animation-delay: .1s; }
.screen > :nth-child(4) { animation-delay: .15s; }
.screen > :nth-child(5) { animation-delay: .2s; }
.screen > :nth-child(n+6) { animation-delay: .25s; }

.screen--back > * { animation-name: entrar-voltando; }

/* 6. Tipografia ----------------------------------------------------------- */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  padding-right: .06em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--grad-line);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 7px 14px 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  background: var(--glass);
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .6);
  animation: pulsar 2.4s ease-out infinite;
}

.display {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 8.4vw, 76px);
  line-height: 1;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.display .serif { font-size: 1.08em; }

.headline {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 6.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.headline .serif { font-size: 1.08em; }

.lead {
  margin: 0 0 36px;
  max-width: 33em;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
}

h1:focus,
h2:focus { outline: none; }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--stroke-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
}

/* 7. Abertura ------------------------------------------------------------- */
.intro__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.stat {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--glass);
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.stat__label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-3);
}

.intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.intro__note {
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 8. Capítulo ------------------------------------------------------------- */
.chapter__num {
  display: block;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(96px, 22vw, 180px);
  line-height: .9;
  letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

.chapter__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter__meta li {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--glass);
}

.chapter__dots {
  display: flex;
  gap: 6px;
  margin: 0 0 28px;
}

.chapter__dots span {
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
}

.chapter__dots .is-done { background: rgba(255, 255, 255, .55); }
.chapter__dots .is-current { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); }

/* 9. Pergunta ------------------------------------------------------------- */
.q__title {
  display: flex;
  gap: 14px;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 3.6vw, 32px);
  line-height: 1.22;
  letter-spacing: -.025em;
  text-wrap: pretty;
}

.q__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 1.22em;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  transform: translateY(.42em);
}

.q__num .icon { width: 14px; height: 14px; }

.q__req {
  margin-left: 4px;
  color: var(--text-3);
}

.q__hint {
  margin: 0 0 0 calc(14px + 2.6ch + 18px);
  max-width: 36em;
  font-size: 15px;
  color: var(--text-3);
}

.q__counter {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.q__body {
  margin: 32px 0 0 calc(14px + 2.6ch + 18px);
}

.q__error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0 calc(14px + 2.6ch + 18px);
  padding: 9px 14px;
  width: fit-content;
  max-width: 100%;
  font-size: 14px;
  color: var(--error);
  border: 1px solid rgba(255, 158, 158, .28);
  border-radius: 10px;
  background: rgba(255, 158, 158, .06);
}

.q__error::before {
  content: "!";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  background: var(--error);
}

.q--shake .q__body { animation: tremer .42s ease; }

/* 10. Entradas de texto --------------------------------------------------- */
.line-input {
  display: block;
  width: 100%;
  padding: 10px 0 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 3.2vw, 28px);
  letter-spacing: -.02em;
  color: var(--text);
  caret-color: #fff;
  background:
    linear-gradient(90deg, #fff, #fff) left bottom / 0% 1px no-repeat,
    linear-gradient(90deg, var(--stroke-2), var(--stroke-2)) left bottom / 100% 1px no-repeat;
  border: 0;
  border-radius: 0;
  outline: none;
  appearance: none;
  transition: background-size .5s var(--ease);
}

.line-input::placeholder { color: var(--text-4); opacity: 1; }

.line-input:focus {
  background-size: 100% 1px, 100% 1px;
}

.area-input {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 18px 20px;
  font: inherit;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  caret-color: #fff;
  background: var(--glass);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  outline: none;
  resize: none;
  overflow: hidden;
  appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.area-input::placeholder { color: var(--text-4); }

.area-input:hover { border-color: var(--stroke-3); }

.area-input:focus {
  border-color: rgba(255, 255, 255, .7);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .07), 0 20px 40px -24px rgba(255, 255, 255, .25);
}

.input-tip {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.q--error .line-input {
  background:
    linear-gradient(90deg, var(--error), var(--error)) left bottom / 100% 1px no-repeat;
}

.q--error .area-input { border-color: var(--error); }

/* 11. Opções -------------------------------------------------------------- */
.choices {
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.choices--cols {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--tap);
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--stroke-2);
  border-radius: 14px;
  background: var(--glass);
  cursor: pointer;
  user-select: none;
  transition: border-color .18s, background .18s, transform .18s var(--ease), box-shadow .25s, color .18s;
  animation: entrar .6s var(--ease) both;
  animation-delay: calc(.18s + var(--i, 0) * .035s);
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice:hover {
  border-color: var(--stroke-3);
  background: var(--glass-hover);
}

.choice:active { transform: scale(.985); }

.choice__key {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--stroke-2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .35);
  transition: inherit;
}

.choice__text {
  flex: 1;
  font-size: 16px;
  line-height: 1.35;
}

.choice__tick {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s, transform .3s var(--ease);
}

.choice__tick .icon { width: 18px; height: 18px; stroke-width: 2.6; }

.choice.is-checked {
  color: #0a0a0a;
  border-color: transparent;
  background: var(--silver);
  box-shadow: 0 14px 34px -14px rgba(255, 255, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.choice.is-checked .choice__key {
  color: #fff;
  border-color: #0a0a0a;
  background: #0a0a0a;
}

.choice.is-checked .choice__tick {
  opacity: 1;
  transform: none;
}

.choice:has(input:focus-visible) {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.choice.is-disabled {
  opacity: .35;
  cursor: not-allowed;
}

.choice.is-disabled input { cursor: not-allowed; }

.choice--pop { animation: estalar .4s var(--ease); }

/* 12. Escala 0–10 --------------------------------------------------------- */
.scale {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 8px;
}

.tile {
  position: relative;
  display: grid;
  place-items: center;
  height: 56px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  background: var(--glass);
  cursor: pointer;
  user-select: none;
  transition: border-color .18s, background .18s, transform .18s var(--ease), box-shadow .25s, color .18s;
  animation: entrar .6s var(--ease) both;
  animation-delay: calc(.18s + var(--i, 0) * .03s);
}

.tile input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.tile:hover { border-color: var(--stroke-3); background: var(--glass-hover); transform: translateY(-2px); }

.tile.is-checked {
  color: #0a0a0a;
  border-color: transparent;
  background: var(--silver);
  box-shadow: 0 14px 30px -12px rgba(255, 255, 255, .5);
  transform: translateY(-2px);
}

.tile:has(input:focus-visible) {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.scale__ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3);
}

.scale__ends span:last-child { text-align: right; }

/* 13. Botões -------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 14px 28px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -.005em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .2s var(--ease), box-shadow .3s, opacity .2s, border-color .2s, background .2s;
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.btn:disabled { cursor: default; opacity: .7; }

.btn--light {
  color: #0a0a0a;
  background: var(--silver);
  box-shadow: 0 16px 36px -16px rgba(255, 255, 255, .55), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, .15);
}

/* brilho que atravessa o botão */
.btn--light::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .9) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease);
}

.btn--light:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px -16px rgba(255, 255, 255, .6), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, .15);
}

.btn--light:hover:not(:disabled)::after { transform: translateX(120%); }

.btn--light:active:not(:disabled) { transform: translateY(0) scale(.98); }

.btn--light .icon { transition: transform .3s var(--ease); }
.btn--light:hover:not(:disabled) .icon { transform: translateX(3px); }

.btn--lg {
  min-height: 60px;
  padding: 18px 34px;
  font-size: 16px;
  border-radius: 16px;
}

.btn--ghost {
  color: var(--text);
  background: var(--glass);
  border-color: var(--stroke-2);
}

.btn--ghost:hover { border-color: var(--stroke-3); background: var(--glass-hover); }

.btn--link {
  min-height: auto;
  padding: 6px 0;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-decoration-color: var(--stroke-3);
  text-underline-offset: 4px;
  overflow: visible;
}

.btn--link:hover { color: var(--text); text-decoration-color: #fff; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: girar .7s linear infinite;
}

/* 14. Dock (navegação inferior) ------------------------------------------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(calc(100% - 32px), 640px);
  padding: 8px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(28, 28, 28, .78) 0%, rgba(12, 12, 12, .82) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
  transform: translateX(-50%);
  animation: subir .6s var(--ease) both;
}

.dock__back {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  color: var(--text);
  border: 1px solid var(--stroke-2);
  border-radius: 14px;
  background: var(--glass);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}

.dock__back:hover { border-color: var(--stroke-3); background: var(--glass-hover); }
.dock__back:active { transform: scale(.95); }
.dock__back:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dock__back:disabled { opacity: .3; cursor: default; }

.dock__hint {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.dock__next { min-width: 190px; }

/* 15. Revisão ------------------------------------------------------------- */
.review__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.review__summary li {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--glass);
}

.review__summary b { color: var(--text); font-weight: 600; }

.review-group {
  margin: 0 0 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--glass);
  overflow: hidden;
}

.review-group summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  transition: background .2s;
}

.review-group summary::-webkit-details-marker { display: none; }
.review-group summary:hover { background: rgba(255, 255, 255, .03); }
.review-group summary:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: var(--radius); }

.review-group__num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.review-group__title {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -.015em;
}

.review-group__count {
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.review-group__chev {
  color: var(--text-3);
  transition: transform .3s var(--ease);
}

.review-group[open] .review-group__chev { transform: rotate(180deg); }

.review-group__list {
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  width: 100%;
  padding: 14px 12px;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  border-top: 1px solid var(--stroke);
  cursor: pointer;
  transition: background .2s;
}

.review-row:hover { background: rgba(255, 255, 255, .04); border-radius: 10px; }
.review-row:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 10px; }

.review-row__q {
  font-size: 13px;
  color: var(--text-3);
}

.review-row__a {
  grid-column: 1;
  font-size: 15px;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.review-row__a--empty { color: var(--text-4); font-style: italic; }

.review-row__edit {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  transition: color .2s;
}

.review-row:hover .review-row__edit { color: #fff; }

/* 16. Concluído e avisos ---------------------------------------------------- */
.done__mark {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 0 32px;
}

.done__mark svg { width: 100%; height: 100%; overflow: visible; }

.done__ring {
  fill: none;
  stroke: url(#grad-anel);
  stroke-width: 1.5;
  stroke-dasharray: 277;
  stroke-dashoffset: 277;
  animation: desenhar 1.1s var(--ease) .15s forwards;
}

.done__check {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: desenhar .6s var(--ease) .8s forwards;
}

.done__glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 65%);
  animation: aparecer 1.2s ease .5s both;
}

.notice {
  margin: 24px 0 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-2);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--glass);
}

.notice--error {
  color: var(--error);
  border-color: rgba(255, 158, 158, .28);
  background: rgba(255, 158, 158, .06);
}

.status:empty { display: none; }

/* 17. Animações ------------------------------------------------------------ */
@keyframes entrar {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@keyframes entrar-voltando {
  from { opacity: 0; transform: translateY(-26px); }
  to { opacity: 1; transform: none; }
}

@keyframes subir {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes estalar {
  0% { transform: scale(1); }
  40% { transform: scale(.97); }
  100% { transform: scale(1); }
}

@keyframes tremer {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

@keyframes flutuar {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(120px, 80px, 0) scale(1.15); }
}

@keyframes pulsar {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
}

@keyframes desenhar { to { stroke-dashoffset: 0; } }

@keyframes aparecer { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

@keyframes girar { to { transform: rotate(360deg); } }

/* 18. Responsivo ----------------------------------------------------------- */

/* Dicas de teclado só em aparelhos com mouse/teclado */
@media (hover: none), (pointer: coarse) {
  .only-keyboard { display: none !important; }
}

@media (max-width: 720px) {
  .choices--cols { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }

  .stage { padding-top: 32px; padding-bottom: calc(112px + var(--safe-bottom)); }

  .screen { margin-block: 0 auto; }

  .topbar__inner { padding-top: 14px; padding-bottom: 14px; }

  .lead { font-size: 17px; margin-bottom: 28px; }

  .intro__stats { gap: 8px; margin-bottom: 32px; }
  .stat { padding: 14px 10px 12px 12px; }
  .stat__value { font-size: clamp(15px, 4.6vw, 20px); white-space: nowrap; }
  .stat__label { font-size: 12px; }

  .intro__actions .btn--light { width: 100%; }
  .intro__actions { justify-content: center; }

  /* Pergunta: número acima do título, conteúdo sem recuo */
  .q__title { flex-direction: column; gap: 10px; }
  .q__num { transform: none; height: auto; }
  .q__hint,
  .q__body,
  .q__error { margin-left: 0; }
  .q__body { margin-top: 24px; }

  .choice { padding-right: 12px; }

  .scale { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .tile { height: 52px; font-size: 17px; }

  .dock {
    bottom: calc(10px + var(--safe-bottom));
    width: calc(100% - 20px);
    padding: 6px;
    border-radius: 18px;
  }

  .dock__hint { display: none; }
  .dock__next { flex: 1; min-width: 0; }

  .review-group summary { padding: 14px; }
}

@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .brand__name { font-size: 13px; }
  .stat__value { font-size: 18px; }
  .choice__key { width: 26px; height: 26px; }
}

@media (max-height: 640px) and (min-width: 601px) {
  .stage { padding-top: 28px; }
  .display { font-size: clamp(36px, 7vw, 60px); }
}

/* 19. Acessibilidade ------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .bg__orb { animation: none; }
}
