*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0f172a;
  --surface: #1e293b;
  --border:  #334155;
  --text:    #e2e8f0;
  --muted:   #94a3b8;
  --cyan:    #22d3ee;
  --blue:    #3b82f6;
  --green:   #22c55e;
  --yellow:  #eab308;
  --red:     #ef4444;
  --purple:  #a78bfa;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.wrapper {
  max-width: 760px;
  margin: 0 auto;
}

/* ── cabeçalho ── */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}
header .logo { font-size: 1.1rem; color: var(--cyan); font-weight: 700; letter-spacing: .06em; }
header h1   { font-size: 1.55rem; margin: .4rem 0 .6rem; line-height: 1.3; }
header p    { color: var(--muted); font-size: .88rem; line-height: 1.65; max-width: 580px; margin: 0 auto; }

.badge {
  display: inline-block;
  background: #1e3a8a44;
  border: 1px solid #1e3a8a88;
  color: var(--blue);
  font-size: .72rem;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: .8rem;
}

/* ── seções ── */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.section-title .num {
  background: var(--cyan);
  color: #0f172a;
  font-size: .72rem;
  font-weight: 800;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── questões ── */
.q { margin-bottom: 1.4rem; }
.q:last-child { margin-bottom: 0; }

.q-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .55rem;
  line-height: 1.55;
  display: block;
}
.q-label .opt { color: var(--muted); font-weight: 400; font-size: .78rem; }
.q-note {
  font-size: .77rem;
  color: var(--muted);
  margin-bottom: .55rem;
  font-style: italic;
}

/* inputs de texto */
input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
  padding: .55rem .85rem;
  transition: border-color .15s;
}
input[type="text"]:focus, input[type="email"]:focus,
textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
select { cursor: pointer; }
select option { background: #1e293b; }

/* radio / checkbox */
.opts { display: flex; flex-direction: column; gap: .45rem; }
.opts.row { flex-direction: row; flex-wrap: wrap; gap: .5rem; }

.opt-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  padding: .45rem .7rem;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
  font-size: .85rem;
  color: var(--muted);
}
.opt-item:hover { background: #1e40af15; color: var(--text); }
.opt-item input[type="radio"],
.opt-item input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 1px;
  accent-color: var(--cyan);
  flex-shrink: 0;
}
.opt-item.checked { background: #164e6322; border-color: #22d3ee55; color: var(--text); }

/* escala Likert */
.likert {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.likert-pole {
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
}
.likert-options {
  display: flex;
  gap: .4rem;
  flex: 1;
  justify-content: center;
}
.lk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
}
.lk span { font-size: .72rem; color: var(--muted); }
.lk input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--cyan);
  cursor: pointer;
}
.lk:has(input:checked) span { color: var(--cyan); font-weight: 700; }

/* divisor */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}

/* bloco de contexto */
.context-box {
  background: #0f2235;
  border: 1px solid #1e4a7088;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  font-size: .83rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.4rem;
}
.context-box strong { color: var(--cyan); }

/* botão enviar */
.submit-area { text-align: center; margin-top: 2rem; }
.btn-submit {
  background: var(--cyan);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: .8rem 2.5rem;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-submit:hover  { opacity: .85; }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }

/* tela de confirmação */
#resultado {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}
.res-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: var(--green);
}
.res-icon.err { color: var(--red); }
#resultado h2 { font-size: 1.4rem; margin-bottom: .75rem; }
#resultado p  { color: var(--muted); max-width: 480px; margin: 0 auto .4rem; }
#resultado details { text-align: left; max-width: 600px; margin: 1rem auto 0; }
#resultado pre {
  background: #020617;
  border-radius: 6px;
  padding: .75rem;
  font-size: .78rem;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}
.copy-resp {
  background: var(--border);
  border: none;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .72rem;
  cursor: pointer;
  margin-top: .5rem;
}
.copy-resp:hover { background: var(--blue); color: #fff; }

/* rodapé */
footer {
  text-align: center;
  color: var(--muted);
  font-size: .75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 540px) {
  .section { padding: 1.1rem 1rem; }
  .likert-options { gap: .25rem; }
}

@media print {
  body { background: #fff; color: #000; }
  .section { background: #f8f8f8; border-color: #ccc; }
  .submit-area { display: none !important; }
  .section-title { color: #0077aa; border-color: #ccc; }
  .q-label { color: #111; }
}
