:root {
  --bg: #f6f2ea;
  --bg-rgb: 246, 242, 234;
  --surface: #fffdf8;
  --surface-2: #ece4d5;
  --acento: #6b7a5e;
  --acento-hover: #536047;
  --texto: #25211b;
  --texto-suave: #6f675b;
  --borda: rgba(75, 65, 52, 0.16);
  --borda-hover: rgba(75, 65, 52, 0.32);
  --alerta: #b5644b;
  --grave: #8e3a3a;
  --sombra-sm: 0 2px 14px rgba(37, 33, 27, 0.08);
  --sombra-md: 0 12px 36px rgba(37, 33, 27, 0.12);
  --sombra-lg: 0 24px 70px rgba(37, 33, 27, 0.16);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-2xl: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--texto);
  background:
    radial-gradient(circle at 12% 10%, rgba(107, 122, 94, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 28%, rgba(181, 100, 75, 0.12), transparent 24rem),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(120deg, transparent 0 46%, rgba(107, 122, 94, 0.16) 47%, transparent 48% 100%),
    linear-gradient(60deg, transparent 0 48%, rgba(181, 100, 75, 0.09) 49%, transparent 50% 100%);
  background-size: 88px 88px, 130px 130px;
  z-index: -2;
}

body.drawer-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

p {
  line-height: 1.72;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 999;
  background: var(--texto);
  color: #fff;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  transition: top .2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section.compact {
  padding: 2.8rem 0;
}

.soft-section {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.48), rgba(236, 228, 213, 0.52));
  border-block: 1px solid var(--borda);
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-heading.left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--acento-hover);
  background: rgba(107, 122, 94, 0.1);
  border: 1px solid rgba(107, 122, 94, 0.18);
  padding: .4rem .65rem;
  border-radius: var(--r-2xl);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--texto);
  line-height: 1.08;
}

h1,
h2 {
  font-family: var(--serif);
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 5.8rem);
  max-width: 880px;
}

h1 em {
  color: var(--acento-hover);
  font-style: italic;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-top: .75rem;
}

h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.section-heading p,
.hero-sub {
  color: var(--texto-suave);
  font-size: 1.08rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-d2 {
  transition-delay: .16s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  padding: .9rem 1.35rem;
  border-radius: var(--r-2xl);
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}

.btn-primary {
  color: #fff;
  background: var(--acento);
  box-shadow: 0 12px 32px rgba(107, 122, 94, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--acento-hover);
  transform: translateY(-2px);
  box-shadow: var(--sombra-md);
}

.btn-ghost,
.btn-soft {
  color: var(--texto);
  background: rgba(255, 253, 248, 0.68);
  border: 1px solid var(--borda-hover);
}

.btn-ghost:hover,
.btn-soft:hover,
.btn-ghost:focus-visible,
.btn-soft:focus-visible {
  color: var(--acento-hover);
  border-color: var(--acento);
  transform: translateY(-2px);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: 72px;
  z-index: 100;
  background: rgba(var(--bg-rgb), 0.84);
  border-bottom: 1px solid rgba(75, 65, 52, 0.11);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow .3s ease, border-color .3s ease;
}

.site-header.scrolled {
  box-shadow: var(--sombra-sm);
  border-bottom-color: var(--borda);
}

.header-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--texto);
  color: var(--surface);
  font-family: var(--mono);
  font-size: .85rem;
}

.brand-text {
  display: none;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: .45rem;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--texto-suave);
  font-weight: 700;
  padding: .7rem .9rem;
  border-radius: var(--r-2xl);
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--texto);
  background: rgba(107, 122, 94, 0.1);
}

.nav-ham {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--borda);
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-ham span {
  width: 20px;
  height: 2px;
  background: var(--texto);
  border-radius: 4px;
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(37, 33, 27, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.nav-drawer.aberto {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(330px, 86vw);
  background: var(--surface);
  box-shadow: var(--sombra-lg);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.nav-drawer.aberto .drawer-panel {
  transform: none;
}

.drawer-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--texto);
  cursor: pointer;
  font-size: 1.5rem;
}

.drawer-panel a {
  color: var(--texto);
  text-decoration: none;
  font-size: 1.12rem;
  font-weight: 800;
  padding: 1rem;
  border-radius: var(--r-lg);
  background: rgba(107, 122, 94, 0.09);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 24% 28%, rgba(107, 122, 94, 0.28), transparent 18rem),
    radial-gradient(circle at 82% 18%, rgba(181, 100, 75, 0.18), transparent 18rem),
    linear-gradient(145deg, #f6f2ea 0%, #ede5d7 100%);
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-content {
  display: grid;
  gap: 1.25rem;
}

.hero-actions,
.result-actions,
.summary-head {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .4rem;
}

.trust-row span {
  color: var(--texto-suave);
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid var(--borda);
  border-radius: var(--r-2xl);
  padding: .55rem .72rem;
  font-size: .9rem;
  font-weight: 700;
}

.hero-card,
.notice-card,
.quiz-panel,
.result-panel,
.summary-card,
.guide-card,
.step-card {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--borda);
  border-radius: var(--r-xl);
  box-shadow: var(--sombra-sm);
}

.hero-card {
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}

.hero-card::before,
.quiz-panel::before,
.result-panel::before,
.summary-card::before,
.guide-card::before,
.step-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--acento), transparent);
  opacity: .7;
}

.hero-card p {
  margin: .65rem 0 0;
  color: var(--texto-suave);
}

.battery-shell {
  width: 100%;
  height: 72px;
  border: 2px solid rgba(37, 33, 27, 0.24);
  border-radius: 20px;
  padding: .45rem;
  margin-bottom: 1.35rem;
  position: relative;
}

.battery-shell::after {
  content: '';
  position: absolute;
  top: 20px;
  right: -10px;
  width: 8px;
  height: 28px;
  border-radius: 0 6px 6px 0;
  background: rgba(37, 33, 27, 0.24);
}

.battery-level {
  height: 100%;
  width: 32%;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--acento), var(--alerta));
  animation: bateria 3.8s ease-in-out infinite;
}

@keyframes bateria {
  0%, 100% { width: 28%; }
  50% { width: 76%; }
}

.notice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.3rem;
}

.notice-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(181, 100, 75, 0.14);
  color: var(--alerta);
  font-weight: 900;
  font-family: var(--mono);
}

.notice-card h2 {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  margin-top: 0;
}

.notice-card p {
  margin: .55rem 0 0;
  color: var(--texto-suave);
}

.app-layout {
  display: grid;
  gap: 1.25rem;
}

.quiz-panel,
.result-panel,
.summary-card,
.guide-card,
.step-card {
  position: relative;
  overflow: hidden;
}

.quiz-panel,
.result-panel,
.summary-card {
  padding: clamp(1.2rem, 4vw, 2rem);
}

.progress-box {
  background: rgba(236, 228, 213, 0.58);
  border: 1px solid var(--borda);
  border-radius: var(--r-lg);
  padding: .9rem;
  margin-bottom: 1.3rem;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--texto-suave);
  font-size: .92rem;
  font-weight: 800;
}

.progress-track {
  margin-top: .65rem;
  height: 10px;
  background: rgba(37, 33, 27, 0.1);
  border-radius: var(--r-2xl);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--acento), var(--alerta));
  transition: width .25s ease;
}

.quiz-form {
  display: grid;
  gap: 1.2rem;
}

.question-section {
  display: grid;
  gap: .9rem;
  padding: 1rem;
  border: 1px solid var(--borda);
  border-radius: var(--r-xl);
  background: rgba(255, 253, 248, 0.62);
}

.question-section h3 {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  font-size: 1.05rem;
}

.section-code {
  font-family: var(--mono);
  color: var(--acento-hover);
  background: rgba(107, 122, 94, 0.12);
  padding: .25rem .45rem;
  border-radius: var(--r-sm);
}

.question-card {
  border: 1px solid rgba(75, 65, 52, 0.11);
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1rem;
}

.question-card legend {
  padding: 0;
  margin-bottom: .9rem;
  font-weight: 800;
  line-height: 1.5;
}

.options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .45rem;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option span {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--borda);
  border-radius: 16px;
  color: var(--texto-suave);
  background: rgba(246, 242, 234, 0.8);
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.option span small {
  display: none;
}

.option input:checked + span {
  background: var(--acento);
  border-color: var(--acento);
  color: #fff;
  box-shadow: 0 8px 20px rgba(107, 122, 94, 0.24);
}

.option input:focus-visible + span,
.option span:hover {
  transform: translateY(-2px);
  border-color: var(--acento);
}

.result-sticky {
  display: grid;
  gap: 1rem;
}

.score-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: .3rem auto;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--acento) 0deg, var(--alerta) var(--score-angle), rgba(37, 33, 27, 0.1) var(--score-angle) 360deg);
  transition: background .25s ease;
}

.score-ring > div {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: inset 0 0 0 1px var(--borda);
}

.score-ring strong {
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: .9;
}

.score-ring span {
  color: var(--texto-suave);
  font-size: .85rem;
  font-weight: 800;
}

.result-panel h2 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  text-align: center;
}

.result-panel p {
  margin: 0;
  color: var(--texto-suave);
  text-align: center;
}

.result-actions {
  justify-content: center;
}

.category-summary {
  display: grid;
  gap: .8rem;
  margin-top: .5rem;
}

.category-line {
  display: grid;
  gap: .35rem;
}

.category-line header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  font-size: .87rem;
  color: var(--texto-suave);
  font-weight: 800;
}

.mini-track {
  height: 8px;
  border-radius: var(--r-2xl);
  background: rgba(37, 33, 27, 0.1);
  overflow: hidden;
}

.mini-track span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--acento), var(--alerta));
  transition: width .25s ease;
}

.summary-head {
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.summary-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.summary-content {
  display: grid;
  gap: 1rem;
}

.summary-grid {
  display: grid;
  gap: 1rem;
}

.summary-item {
  padding: 1rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--borda);
  background: rgba(246, 242, 234, 0.64);
}

.summary-item h3 {
  margin-bottom: .45rem;
}

.summary-item p,
.summary-item li {
  color: var(--texto-suave);
}

.summary-item ul {
  margin: .65rem 0 0;
  padding-left: 1.1rem;
}

.guide-grid {
  display: grid;
  gap: 1rem;
}

.guide-card {
  padding: 1.2rem;
}

.guide-card button {
  width: 100%;
  background: transparent;
  color: var(--texto);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-weight: 900;
}

.guide-card button span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(107, 122, 94, 0.12);
  color: var(--acento-hover);
  flex: 0 0 auto;
  transition: transform .25s ease;
}

.guide-card.aberto button span {
  transform: rotate(45deg);
}

.guide-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}

.guide-card.aberto .guide-body {
  grid-template-rows: 1fr;
}

.guide-body > div {
  overflow: hidden;
}

.guide-body p {
  color: var(--texto-suave);
  margin: 1rem 0 0;
}

.steps-grid {
  display: grid;
  gap: 2rem;
}

.steps-list {
  display: grid;
  gap: 1rem;
}

.step-card {
  padding: 1.2rem 1.2rem 1.2rem 1.4rem;
}

.step-card span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--texto);
  color: var(--surface);
  font-family: var(--mono);
  font-weight: 900;
  margin-bottom: .8rem;
}

.step-card p {
  color: var(--texto-suave);
  margin: .55rem 0 0;
}

.top-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--texto);
  color: var(--surface);
  cursor: pointer;
  box-shadow: var(--sombra-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 80;
}

.top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.site-footer {
  padding: 2rem 0;
  color: var(--texto-suave);
  border-top: 1px solid var(--borda);
  background: rgba(255, 253, 248, 0.52);
}

.footer-wrap {
  display: grid;
  gap: .35rem;
}

.footer-wrap p {
  margin: 0;
  font-size: .92rem;
}

@media (min-width: 560px) {
  .brand-text {
    display: inline;
  }

  .option span {
    gap: .2rem;
    align-content: center;
  }

  .option span small {
    display: block;
    font-size: .56rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .82;
  }
}

@media (min-width: 768px) {
  .section {
    padding: 6.5rem 0;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-ham {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, .82fr);
  }

  .hero-card {
    padding: 2rem;
  }

  .app-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .result-sticky {
    position: sticky;
    top: 96px;
  }

  .summary-grid,
  .guide-grid,
  .steps-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .steps-grid {
    grid-template-columns: .8fr 1.2fr;
    align-items: start;
  }
}

@media print {
  .site-header,
  .nav-drawer,
  .hero,
  #aviso,
  #teste,
  #guia,
  #passos,
  .top-btn,
  .site-footer,
  .summary-head .btn {
    display: none !important;
  }

  body {
    background: #fff;
  }

  #resumo {
    display: block !important;
    padding: 0;
    background: #fff;
    border: 0;
  }

  .summary-card {
    box-shadow: none;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
