/* I care more about simplicity and direct uploadability than code architecture elegance. */
:root {
  --bg: #f8f0e6;
  --surface: #fffaf4;
  --surface-strong: #fff4e8;
  --text: #322820;
  --muted: #716257;
  --faint: #a89587;
  --line: #e4d3c3;
  --accent: #8a4f34;
  --accent-dark: #6f3d27;
  --accent-soft: #f1d8c4;
  --focus: rgba(138, 79, 52, 0.22);
  --shadow: 0 18px 50px rgba(83, 55, 35, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(241, 216, 196, 0.9), transparent 34rem),
    linear-gradient(135deg, #f8f0e6 0%, #f5e7d8 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family:
    ui-rounded,
    "Avenir Next",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.55;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 28px 16px;
}

.card {
  background: rgba(255, 250, 244, 0.94);
  border: 1px solid rgba(228, 211, 195, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 48px);
}

.is-hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2rem, 8vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.intro-copy,
.results-subtitle {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
}

.intro-note {
  display: grid;
  gap: 6px;
  max-width: 720px;
  margin: 26px 0;
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.intro-note strong {
  color: var(--text);
}

.primary-button,
.secondary-button,
.text-button,
.answer-button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #fffaf4;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-dark);
}

.secondary-button {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
}

.text-button {
  min-height: 44px;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

button:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.disclaimer {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-wrap {
  margin-bottom: 32px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #ead9c9;
  border-radius: 999px;
}

.progress-bar {
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #b87958);
  border-radius: inherit;
  transition: width 180ms ease;
}

.answers {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.answer-button {
  width: 100%;
  min-height: 62px;
  padding: 17px 18px;
  background: #fffefd;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  font-weight: 750;
  text-align: left;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--accent);
  background: #fff7ef;
}

.quiz-controls,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.result-grid {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.result-section {
  padding: 20px;
  background: #fffefd;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.result-section h2 {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-section p {
  margin: 0;
  color: var(--muted);
}

.accent-section {
  background: var(--surface-strong);
}

.encouragement {
  background: #fff7ef;
}

ol,
ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

li::marker {
  color: var(--accent);
  font-weight: 900;
}

.copy-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
}

@media (min-width: 760px) {
  .app-shell {
    padding: 54px 24px;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accent-section,
  .encouragement {
    grid-column: 1 / -1;
  }
}

@media print {
  html,
  body {
    background: #fff;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

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

  .result-actions,
  .copy-status {
    display: none;
  }
}
