:root {
  --gold: #c9a227; /* cor secundária (dourado) */
  --gold-2: #a88312;
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.12);
  --shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background:
    radial-gradient(
      900px 500px at 10% -10%,
      rgba(201, 162, 39, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 110% 0%,
      rgba(201, 162, 39, 0.1),
      transparent 55%
    ),
    var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  padding: 24px 16px 40px;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}
@media (max-width: 560px) {
  .topbar {
    margin-bottom: 20px;
  }
}
.logo img {
  height: 70px;
  width: auto;
  display: block;
}
@media (max-width: 560px) {
  .logo img {
    height: 50px;
  }
}

.container {
  max-width: 980px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  margin: 6px 0 16px;
}
h1 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: #331406;
}
.sub {
  margin: 0 auto;
  max-width: 760px;
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}
@media (max-width: 560px) {
  .sub {
    font-size: 14px;
  }
}

.intro-txt {
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.grid2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

label.small {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}
input,
select {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
}
input:focus,
select:focus {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}
input[type='radio'] {
  accent-color: var(--gold-2);
}

.section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.section h2 {
  margin: 0 0 2px;
  font-size: 18px;
}
@media (max-width: 560px) {
  .section h2 {
    font-size: 16px;
  }
}
.section p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 560px) {
  .section p {
    font-size: 14px;
  }
}

.q {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 15px;
}
.q-title {
  font-weight: 650;
  margin: 0 0 10px;
  line-height: 1.35;
}

.choices {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 860px) {
  .choices {
    grid-template-columns: 1fr 1fr;
  }
}

.opt {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  user-select: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  min-height: 56px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.opt input {
  width: auto;
  margin-top: 3px;
}
.opt b {
  display: block;
  font-size: 14px;
}
.opt span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.opt input:checked ~ div b {
  color: var(--gold-2);
}
.opt:hover {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  background: var(--gold);
  color: #1a1303;
  transition:
    transform 0.06s ease,
    background 0.15s ease;
}
button:hover {
  background: var(--gold-2);
}
button:active {
  transform: translateY(1px);
}

button.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 750;
}
button.secondary:hover {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.status {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  min-height: 16px;
}

/* Resultado oculto */
.result-wrap {
  margin-top: 0px;
  display: none;
}
.result-wrap.is-visible {
  display: block;
}
.result-wrap .section {
  margin-top: 0px;
  padding-top: 0;
  border-top: none;
}

.result-hero {
  text-align: center;
  margin: 0 0 10px;
}
.result-hero h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
@media (max-width: 560px) {
  .result-hero h2 {
    font-size: 18px;
  }
}
.result-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
@media (max-width: 560px) {
  .result-hero p {
    font-size: 14px;
  }
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 820px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.kpi .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.kpi .name {
  font-weight: 800;
}
@media (max-width: 560px) {
  .kpi .name {
    font-size: 14px;
  }
}

.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.16);
  white-space: nowrap;
}
.score {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

.kpi-level {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(26, 19, 3, 0.9);
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.28);
}
.bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.06);
  margin-top: 8px;
}
.bar > div {
  height: 100%;
  width: 0%;
  background: rgba(201, 162, 39, 0.95);
}

.block-title {
  margin: 14px 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.devolutiva {
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

/* CTA consultoria */
.consultoria {
  margin-top: 14px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 14px;
  padding: 16px;
  background: rgba(201, 162, 39, 0.08);
}
.consultoria h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.consultoria p {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.5;
}
.consultoria ul {
  margin: 0;
  padding-left: 0px;
  list-style: none;
}
@media (max-width: 560px) {
  .consultoria ul {
    font-size: 13px;
  }
  .consultoria ul li {
    margin-top: 3px;
  }
}
.consultoria a {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
}
@media (max-width: 560px) {
  .devolutiva {
    padding: 14px;
    font-size: 14px;
  }
}

/* =========================
   Responsive improvements
========================= */

/* Cards de questão mais adaptáveis */
.choices {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Em telas médias: 3 colunas */
@media (max-width: 980px) {
  .choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Em mobile: 1 coluna */
@media (max-width: 560px) {
  .choices {
    grid-template-columns: 1fr;
  }

  .opt {
    min-height: auto;
    padding: 12px;
  }

  .q {
    padding: 14px;
  }

  .card {
    padding: 20px;
  }

  h1 {
    font-size: 20px;
  }
}

/* =========================
   Validation styles
========================= */

.field-error {
  border-color: rgba(220, 38, 38, 0.55) !important; /* red */
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.q-error {
  border-color: rgba(220, 38, 38, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.section-error {
  border-left: 4px solid rgba(220, 38, 38, 0.75);
  padding-left: 12px;
}

/* Badge do pilar com pendências */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.03);
  color: var(--muted);
  margin: 8px 0 10px;
}
.section-badge.is-error {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
  color: rgba(185, 28, 28, 1);
}

/* =========================
   Button loading state
========================= */
button.is-loading {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

.mt-0 {
  margin-top: 0 !important;
}

#identificacaoTxt {
  text-align: left;
  list-style: none;
  padding: 0;
  font-size: 15px;
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 560px) {
  #identificacaoTxt {
    gap: 8px;
    grid-template-columns: repeat(1, 1fr);
    font-size: 14px;
  }
}
#identificacaoTxt li {
  padding: 0.75em 1em;
  background-color: var(--bg);
  border-radius: 0.35em;
}
#identificacaoTxt li b {
  font-weight: 600;
}
