:root {
  color-scheme: light;
  --bg: #fffaf5;
  --fg: #1d1a17;
  --accent: #d94f3d;
  --muted: #6b625b;
  --card: #fff;
  --border: #eadfd5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--fg);
  background: linear-gradient(180deg, #fffaf5 0%, #fff1e8 100%);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.shell-wide {
  place-items: start center;
}

.hero {
  width: 100%;
  max-width: 42rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.hero-wide {
  max-width: 72rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

h1 {
  margin: 0 0 1rem;
  line-height: 1.1;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.actions {
  margin-top: 1.5rem;
}

.actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  border: 0;
  cursor: pointer;
  display: inline-block;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.secondary-button {
  background: #f3e6da;
  color: var(--fg);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.quiz-form {
  margin-top: 1.25rem;
}

.options {
  display: grid;
  gap: 0.75rem;
}

.option-button {
  width: 100%;
  text-align: left;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 1rem;
  cursor: pointer;
}

.option-button:hover,
.option-button:focus-visible,
.button:hover,
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.2);
}

.error {
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: #fff0ed;
  color: #8c2f24;
}

.share-card,
.panel,
.stat-card {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: #fffdfa;
}

.quiz-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.quiz-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: #fffdfa;
}

.quiz-card h2 {
  margin-top: 0;
}

.share-label,
.stat-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.share-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.share-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats-grid,
.dashboard-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}

.filter-pill {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  background: #fff;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.stat-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.plain-list {
  margin: 0;
  padding-left: 1rem;
}

.plain-list li + li {
  margin-top: 0.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 250, 245, 0.9);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  z-index: 10;
}

.site-brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0.04em;
}

.lang-switch {
  font-size: 0.9rem;
}

.lang-link {
  text-decoration: none;
  color: var(--accent);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.lang-link:hover,
.lang-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 79, 61, 0.2);
}

.filter-pill-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.footer-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.retake-banner {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #fff1e8;
  border: 1px solid #f5d4be;
  color: var(--fg);
  font-size: 0.95rem;
}

.quiz-card-retake {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.whatsapp-button {
  margin-top: 0.75rem;
  display: inline-block;
  background: #25d366;
  color: #fff;
}

.whatsapp-button:hover,
.whatsapp-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3);
}

.archetype-hero {
  text-align: center;
}

.archetype-art {
  display: grid;
  place-items: center;
  margin: 0.5rem 0 1.5rem;
}

.archetype-art-image {
  max-width: 100%;
  width: 18rem;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.archetype-hero h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
}

.archetype-hero .share-card {
  text-align: left;
}

.inline-actions {
  margin-top: 0;
}

.option-button:focus-visible,
.button:focus-visible,
.lang-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .shell {
    padding: 2.5rem;
  }
  .hero {
    padding: 2.5rem;
  }
}
