:root {
  --paper: #f1f4ef;
  --surface: #ffffff;
  --ink: #202720;
  --muted: #606960;
  --line: #d8ded5;
  --forest: #244436;
  --forest-dark: #1b3127;
  --accent: #c78356;
  --accent-soft: #f2e3d8;
  --danger: #a34f3c;
  --shadow: 0 1.25rem 3.5rem rgba(32, 39, 32, 0.07);
  --type: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --tool-max: 34rem;
  --content-max: 48rem;
  --max: var(--content-max);
  --radius: 0.9rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 18rem;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--type);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
  color: var(--forest-dark);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--forest);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

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

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

body.quiz-active .hero,
body.quiz-active .site-footer {
  display: none;
}

body.quiz-active .tool-shell {
  padding-top: clamp(2rem, 7vw, 4rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  width: min(var(--tool-max), calc(100% - 2rem));
  padding: 1.35rem 0 0;
}

.mark {
  display: inline-block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: color 180ms ease;
}

.mark:hover {
  color: var(--accent);
}

.hero {
  width: min(var(--tool-max), calc(100% - 2rem));
  padding: clamp(3.5rem, 9vw, 4.75rem) 0 1.25rem;
  text-align: center;
}

.hero-copy {
  max-width: 34rem;
  margin-inline: auto;
}

.hero h1 {
  max-width: 11ch;
  margin: 0 auto;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(3.35rem, 13vw, 5.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-wrap: balance;
}

.hero-lead {
  max-width: 32ch;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 3.8vw, 1.2rem);
  line-height: 1.4;
  text-wrap: balance;
}

.hero-art {
  display: flex;
  width: 8.5rem;
  height: 5.5rem;
  align-items: end;
  justify-content: center;
  margin: 1.2rem auto 0;
}

.hero-art img {
  display: block;
  width: 8.5rem;
  max-height: 5.5rem;
  object-fit: contain;
  filter: drop-shadow(0 0.8rem 0.75rem rgba(32, 39, 32, 0.12));
  animation: hero-settle 700ms var(--ease) both;
}

@keyframes hero-settle {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-shell {
  width: min(var(--tool-max), calc(100% - 2rem));
}

.tool {
  max-width: var(--tool-max);
  margin-inline: auto;
  padding: clamp(1.25rem, 5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quiz-intro {
  padding: 0.25rem 0 0.1rem;
  text-align: center;
}

.quiz-intro h2 {
  margin: 0;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-wrap: balance;
}

.quiz-intro p {
  max-width: 34ch;
  margin: 0.8rem auto 0;
  color: var(--muted);
  line-height: 1.45;
}

.go,
.quiz-next {
  width: 100%;
  min-height: 4rem;
  margin-top: 1.35rem;
  padding: 0.9rem 1rem;
  background: var(--forest-dark);
  border: 1px solid var(--forest-dark);
  border-radius: 0.65rem;
  color: var(--surface);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.go:hover,
.quiz-next:hover {
  background: var(--forest);
  border-color: var(--forest);
  transform: translateY(-1px);
}

.go:active,
.quiz-next:active,
.quiz-back:active,
.more:active,
.restart:active {
  transform: translateY(1px);
}

.quiz-progress {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-track {
  height: 0.2rem;
  overflow: hidden;
  background: var(--accent-soft);
  border-radius: 1rem;
}

.progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0.25);
  transform-origin: left center;
  transition: transform 240ms var(--ease);
}

.q {
  min-inline-size: 0;
  padding: 0;
  margin: 0 0 1.5rem;
  border: 0;
}

.q legend {
  padding: 0;
  margin: 0 0 1.25rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-wrap: balance;
}

.choices {
  display: grid;
  gap: 0.6rem;
}

.choices label {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choices span {
  display: flex;
  min-height: 3.35rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.choices span::before {
  width: 0.9rem;
  height: 0.9rem;
  flex: none;
  margin-right: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 50%;
  content: "";
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.choices label:active span {
  transform: scale(0.99);
}

.choices input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.choices input:checked + span::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent-soft);
}

.choices input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quiz-error {
  margin: -0.45rem 0 1rem;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}

.quiz-controls {
  display: grid;
  grid-template-columns: minmax(6rem, 0.7fr) minmax(0, 1.5fr);
  gap: 0.6rem;
}

.quiz-controls.is-first {
  grid-template-columns: 1fr;
}

.quiz-back,
.more,
.restart {
  min-height: 3.35rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.quiz-back {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.quiz-back:hover {
  background: var(--paper);
  color: var(--ink);
}

.quiz-next {
  margin-top: 0;
}

.results {
  display: none;
  padding-top: 1.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.results.is-on {
  display: block;
}

.is-complete .quiz-progress,
.is-complete .q,
.is-complete .quiz-controls {
  display: none !important;
}

.results h2 {
  margin: 0;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(2.35rem, 9vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.match {
  margin: 0.55rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid li {
  position: relative;
  display: flex;
  min-height: 8.75rem;
  flex-direction: column;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  animation: card-in 420ms var(--ease) both;
}

.grid li:nth-child(1) { animation-delay: 40ms; }
.grid li:nth-child(2) { animation-delay: 90ms; }
.grid li:nth-child(3) { animation-delay: 140ms; }
.grid li:nth-child(4) { animation-delay: 190ms; }
.grid li:nth-child(n + 5) { animation-delay: 240ms; }

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid strong {
  display: block;
  max-width: 14ch;
  padding-right: 4.5rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.why {
  max-width: 38ch;
  margin: 0.5rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.card-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
}

.copy,
.share,
.fav {
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.copy,
.share {
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
}

.copy {
  background: var(--surface);
  color: var(--forest);
}

.share {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--forest-dark);
}

.copy:hover,
.share:hover,
.fav:hover {
  transform: translateY(-1px);
}

.share.is-done {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--surface);
}

.fav {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.4rem 0.55rem;
  background: transparent;
  border-color: var(--line);
  border-radius: 0.5rem;
  color: var(--muted);
}

.fav.is-fav {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--forest-dark);
}

.actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.more {
  width: 100%;
  background: var(--forest-dark);
  border: 1px solid var(--forest-dark);
  color: var(--surface);
}

.more:hover {
  background: var(--forest);
  border-color: var(--forest);
}

.restart {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.restart:hover {
  background: var(--paper);
  color: var(--ink);
}

.favoritos {
  display: none;
  padding-top: 1.4rem;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.favoritos.is-on {
  display: block;
}

.favoritos h3 {
  margin: 0 0 0.7rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.favoritos ol {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.favoritos li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.favoritos strong {
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: 1.25rem;
  font-weight: 500;
}

.favoritos .fav {
  position: static;
}

.content {
  padding-bottom: 4rem;
}

.seo-content {
  width: min(var(--content-max), calc(100% - 2rem));
  margin-top: clamp(4rem, 12vw, 7rem);
}

.page-intro {
  max-width: 38ch;
  margin: 0 0 2.25rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.seo-content h2 {
  max-width: 26ch;
  margin: 0 0 0.4rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(2.1rem, 6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.intro {
  max-width: 42ch;
  margin: 0 0 1.4rem;
  color: var(--muted);
}

.name-list {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.name-list li {
  display: grid;
  grid-template-columns: minmax(7rem, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.name-list li strong {
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.name-list li p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.more-names {
  margin-top: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.more-names summary {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: var(--forest);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
}

.more-names summary::-webkit-details-marker {
  display: none;
}

.more-names summary::after {
  color: var(--muted);
  content: "+";
  font-size: 1.35rem;
  font-weight: 400;
}

.more-names[open] summary::after {
  content: "−";
}

.name-list-more {
  margin-top: 0;
}

.article {
  max-width: 42rem;
  margin-top: clamp(4rem, 12vw, 7rem);
}

.article h3,
.faq h3 {
  margin: 2.25rem 0 0.55rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.article h3:first-child,
.faq h3:first-of-type {
  margin-top: 0;
}

.article p,
.faq p {
  max-width: 65ch;
  margin: 0 0 1rem;
  color: var(--muted);
}

.article a,
.faq a {
  color: var(--forest);
  font-weight: 600;
}

.faq {
  max-width: 42rem;
  padding-top: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--line);
}

.faq h2 {
  margin: 0 0 1.4rem;
  color: var(--forest-dark);
  font-family: var(--type);
  font-size: clamp(2.1rem, 6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer .wrap {
  width: min(var(--content-max), calc(100% - 2rem));
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer p {
  max-width: 42ch;
  margin: 0;
  font-size: 0.84rem;
}

@media (min-width: 38rem) {
  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choices-vibe label:last-child {
    grid-column: 1 / -1;
  }

  .hero-art,
  .hero-art img {
    width: 9.5rem;
  }

  .hero-art,
  .hero-art img {
    max-height: 6.5rem;
  }
}

@media (max-width: 30rem) {
  .name-list li {
    display: block;
  }

  .name-list li p {
    margin-top: 0.35rem;
  }
}

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

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