:root {
  --bg: #f4efe7;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --text: #1c1917;
  --muted: #6b645f;
  --line: rgba(28, 25, 23, 0.12);
  --accent: #ea580c;
  --accent-soft: #ffedd5;
  --green: #0f766e;
  --shadow: 0 28px 70px rgba(28, 25, 23, 0.12);
  --container: 1180px;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(234, 88, 12, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent 28%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(244, 239, 231, 0.86);
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.quiz-actions,
.hero-section__grid {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-header__inner {
  min-height: 76px;
}

.site-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.site-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--text);
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-brand__copy {
  display: grid;
  gap: 0.1rem;
}

.site-brand__copy strong,
.hero-section h1,
.quiz-step__head h2,
.result-shell__head h2,
.fallback-section h1 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

.site-brand__copy small,
.hero-section p,
.quiz-step__head p,
.setup-notice p,
.quiz-field span + input,
.quiz-field span + select,
.quiz-field span + textarea,
.site-footer p {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-section,
.quiz-section,
.fallback-section {
  padding: 4rem 0;
}

.hero-section__grid {
  align-items: stretch;
}

.hero-section__content,
.hero-section__panel,
.quiz-shell,
.fallback-section__inner {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-section__content,
.hero-section__panel,
.fallback-section__inner {
  padding: 2rem;
}

.hero-section__content {
  flex: 1 1 60%;
}

.hero-section__panel {
  flex: 1 1 36%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, rgba(234, 88, 12, 0.10), rgba(15, 118, 110, 0.08));
}

.hero-section h1,
.fallback-section h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.94;
}

.hero-section__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.hero-section__chips span,
.quiz-option.is-selected {
  border-color: var(--accent);
}

.hero-section__chips span {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-section__panel-label {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--green);
}

.hero-section__checklist,
.result-shell__body ul {
  margin: 0;
  padding-left: 1.2rem;
}

.hero-section__checklist li,
.result-shell__body li {
  margin-bottom: 0.55rem;
}

.setup-notice {
  margin-top: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.quiz-shell {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
}

.quiz-progress {
  display: grid;
  gap: 0.5rem;
}

.quiz-progress__bar {
  overflow: hidden;
  height: 10px;
  background: rgba(28, 25, 23, 0.08);
  border-radius: 999px;
}

.quiz-progress__bar span {
  display: block;
  width: 12.5%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #fb923c);
  transition: width 0.24s ease;
}

.quiz-progress p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.quiz-form,
.quiz-step,
.quiz-grid,
.result-shell,
.result-shell__head,
.result-shell__body {
  display: grid;
  gap: 1.2rem;
}

.quiz-step {
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98));
}

.quiz-step__head {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.quiz-step__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--text);
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.quiz-step__head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.quiz-step__head p,
.quiz-status {
  margin: 0;
}

.quiz-options {
  display: grid;
  gap: 1rem;
}

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

.quiz-grid--single {
  grid-template-columns: 1fr;
}

.quiz-option {
  min-height: 92px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.quiz-option:hover,
.quiz-option:focus-visible,
.quiz-option.is-selected {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.92), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 30px rgba(28, 25, 23, 0.08);
}

.quiz-field {
  display: grid;
  gap: 0.4rem;
}

.quiz-field span {
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.quiz-field input,
.quiz-field select,
.quiz-field textarea {
  width: 100%;
  min-height: 54px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: white;
  font: inherit;
  color: var(--text);
}

.quiz-field textarea {
  min-height: 130px;
  resize: vertical;
}

.quiz-back,
.quiz-next,
.quiz-submit,
.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.95rem 1.4rem;
  border: 1px solid var(--text);
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.quiz-back {
  background: transparent;
}

.quiz-next,
.quiz-submit,
.hero-link {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.quiz-next[disabled],
.quiz-submit[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-status {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--text);
  background: rgba(28, 25, 23, 0.06);
}

.quiz-status.is-loading {
  border-left-color: var(--green);
  background: rgba(15, 118, 110, 0.08);
}

.quiz-status.is-error {
  border-left-color: var(--accent);
  background: rgba(234, 88, 12, 0.08);
}

.result-shell {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 1));
}

.result-shell__head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
}

.result-shell__body h2,
.result-shell__body h3 {
  margin: 0 0 0.5rem;
  font-family: "Space Grotesk", sans-serif;
}

.result-shell__body h2 {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.result-shell__body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.result-shell__body h3 {
  margin-top: 1rem;
  font-size: 1.08rem;
}

.result-shell__body p {
  margin: 0 0 0.9rem;
}

.result-shell__body ul {
  margin-bottom: 1rem;
}

.result-shell__body li {
  padding-left: 0.1rem;
}

.result-shell__body .exercise-media-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.55rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  vertical-align: middle;
}

.result-shell__body .exercise-media-link:hover,
.result-shell__body .exercise-media-link:focus-visible {
  background: var(--accent);
  color: white;
}

.fallback-section__inner {
  display: grid;
  gap: 1rem;
  text-align: left;
}

.site-footer {
  padding: 2rem 0 3rem;
}

.site-footer__inner {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 960px) {
  .hero-section__grid {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .quiz-options--two,
  .quiz-grid,
  .quiz-step__head {
    grid-template-columns: 1fr;
  }

  .quiz-actions,
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-section,
  .quiz-section,
  .fallback-section {
    padding: 2.8rem 0;
  }

  .hero-section__content,
  .hero-section__panel,
  .quiz-shell,
  .fallback-section__inner {
    padding: 1.25rem;
  }
}
