:root {
  --ink: #0b0d0f;
  --ink-soft: #343a40;
  --paper: #f3f0e9;
  --surface: #ffffff;
  --line: #d9d4ca;
  --accent: #d54b2b;
  --accent-dark: #a93218;
  --green: #346b51;
  --shadow: 0 26px 80px rgba(11, 13, 15, 0.12);
  --radius: 26px;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(213, 75, 43, 0.13), transparent 28rem),
    linear-gradient(180deg, #f7f5ef 0%, var(--paper) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input { font: inherit; }

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header { padding: 1.35rem 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

.brand-copy { font-size: 1.02rem; }

.header-note,
.fine-print,
.legal-date {
  color: #646a6e;
  font-size: 0.9rem;
}

.shell {
  width: min(1040px, calc(100% - 2rem));
  margin: 2.5rem auto 5rem;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 4.5rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(11, 13, 15, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel::after {
  content: "";
  position: absolute;
  width: 18rem;
  aspect-ratio: 1;
  right: -9rem;
  top: -10rem;
  border: 1px solid rgba(213, 75, 43, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

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

.eyebrow,
.question-kicker {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2 {
  max-width: 16ch;
  margin-bottom: 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 6.5vw, 5.8rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.052em;
}

h2 { font-size: clamp(2rem, 5vw, 4.25rem); }

.question-example {
  max-width: 760px;
  margin: -0.3rem 0 1.75rem;
  padding: 0.9rem 1rem;
  color: var(--ink-soft);
  background: #f5f1e9;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.55;
}

.lead {
  max-width: 690px;
  margin-bottom: 2.25rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 2.4rem 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.intro-grid article {
  min-height: 9rem;
  padding: 1.35rem;
  background: #fbfaf7;
}

.intro-grid strong {
  display: block;
  margin-bottom: 1.4rem;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.intro-grid span {
  display: block;
  max-width: 20ch;
  font-weight: 680;
  line-height: 1.3;
}

.button {
  min-height: 3.2rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:focus-visible,
input:focus-visible,
.answer-card:focus-visible {
  outline: 3px solid rgba(213, 75, 43, 0.3);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: var(--ink);
}

.button-primary:hover:not(:disabled) { background: var(--accent-dark); }

.button-quiet {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button-wide { width: 100%; }

.fine-print { margin: 1rem 0 0; }

.progress-wrap { margin-bottom: clamp(2.3rem, 5vw, 4rem); }

.progress-meta,
.pillar-top,
.band-row,
.result-hero,
.quiz-actions,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.progress-meta {
  margin-bottom: 0.65rem;
  color: #5e6468;
  font-size: 0.85rem;
  font-weight: 720;
}

.progress-track,
.pillar-track {
  height: 0.42rem;
  overflow: hidden;
  background: #e7e3da;
  border-radius: 999px;
}

.progress-track span,
.pillar-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 260ms ease;
}

.quiz-panel h2 {
  max-width: 20ch;
  min-height: 3em;
  font-size: clamp(1.8rem, 4.7vw, 3.7rem);
  line-height: 1.05;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
  margin: 2rem 0 2.5rem;
}

.answer-card {
  min-height: 7.3rem;
  padding: 1rem 0.5rem;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.answer-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.answer-card.is-selected {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.answer-card strong {
  display: block;
  margin-bottom: 1.1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.answer-card span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.form-panel > p:not(.eyebrow) { max-width: 660px; }

.form-panel form {
  display: grid;
  gap: 1.2rem;
  max-width: 740px;
  margin-top: 2rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-panel label > span:first-child {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 720;
}

.form-panel input[type="text"],
.form-panel input[type="email"] {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdb7ac;
  border-radius: 12px;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.consent-group {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  background: #f7f4ee;
  border-radius: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: 0.7rem;
  align-items: start;
  cursor: pointer;
}

.check-row input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.18rem;
  accent-color: var(--accent-dark);
}

.check-row span,
.consent-group p {
  margin: 0;
  color: #4e5559;
  font-size: 0.82rem;
}

.turnstile-wrap { min-height: 65px; }

.form-error {
  min-height: 1.5rem;
  margin: 0;
  color: #a52c19;
  font-size: 0.9rem;
  font-weight: 650;
}

.result-hero { align-items: flex-start; }

.score-ring {
  display: grid;
  place-content: center;
  width: clamp(7rem, 18vw, 10rem);
  aspect-ratio: 1;
  flex: 0 0 auto;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fbfaf7;
}

.score-ring strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 7vw, 4rem);
  font-weight: 500;
  line-height: 0.85;
}

.score-ring span { color: #6c7174; }

.band-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 1.3rem 0 2.3rem;
}

.band-badge {
  padding: 0.38rem 0.78rem;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.band-badge[data-band="critico"] { background: #a92f1b; }
.band-badge[data-band="fragil"] { background: #b85b18; }
.band-badge[data-band="estable"] { background: #49715d; }
.band-badge[data-band="solido"] { background: #225944; }

.pillar-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 2.2rem;
  margin-bottom: 2.5rem;
}

.pillar-top {
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.diagnosis-card {
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: var(--ink);
  color: #f8f4eb;
  border-radius: 20px;
}

.diagnosis-card h3 {
  margin-bottom: 1.1rem;
  color: #e68a72;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diagnosis-card p { max-width: 760px; }
.diagnosis-card p:last-child { margin-bottom: 0; }

.result-actions {
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.site-footer {
  padding: 0 0 2rem;
  color: #5e6468;
  font-size: 0.84rem;
}

.legal-shell { width: min(850px, calc(100% - 2rem)); }
.legal-panel h1 { max-width: 13ch; font-size: clamp(2.5rem, 7vw, 5rem); }
.legal-panel h2 {
  max-width: none;
  margin: 2rem 0 0.65rem;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.legal-panel p { max-width: 72ch; color: var(--ink-soft); }

noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  padding: 1rem;
  color: #fff;
  background: #9a2f1c;
  border-radius: 12px;
  text-align: center;
}

@media (max-width: 760px) {
  .header-note { display: none; }
  .shell { margin-top: 1rem; }
  .panel { padding: 1.35rem; border-radius: 20px; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-grid article { min-height: auto; }
  .answer-options { grid-template-columns: 1fr; gap: 0.5rem; }
  .answer-card {
    display: grid;
    grid-template-columns: 2.3rem 1fr;
    align-items: center;
    min-height: 3.5rem;
    padding: 0.7rem 1rem;
    text-align: left;
  }
  .answer-card strong { margin: 0; font-size: 1.5rem; }
  .answer-card span { font-size: 0.9rem; }
  .quiz-panel h2 { min-height: auto; }
  .field-grid,
  .pillar-results { grid-template-columns: 1fr; }
  .result-hero { align-items: center; }
  .score-ring { width: 6.6rem; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
