:root {
  color-scheme: light;
  --charcoal: #151715;
  --ink: #262b25;
  --muted: #6e756d;
  --paper: #f4f0e8;
  --panel: #fffaf1;
  --green: #5c744f;
  --green-dark: #354b39;
  --terracotta: #b95f45;
  --terracotta-dark: #8f432f;
  --shadow: 0 24px 70px rgba(21, 23, 21, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(21, 23, 21, 0.04), rgba(185, 95, 69, 0.08) 54%, rgba(244, 240, 232, 0)),
    var(--paper);
  color: var(--ink);
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header,
.site-footer,
.score-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--charcoal);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 232, 0.18);
  border-radius: 8px;
  background: var(--charcoal);
  box-shadow: 0 12px 26px rgba(21, 23, 21, 0.16);
}

.brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong,
.header-link,
.site-footer,
.eyebrow,
.hero__text,
.hero__note,
.tool-button,
.step-counter,
.question-panel,
.result-intro,
.score-line,
.result-card p,
.result-card li,
.advisory-note {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.brand strong {
  font-size: 0.98rem;
  font-weight: 760;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.header-link,
.site-footer a {
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration: none;
}

.header-link:hover,
.site-footer a:hover {
  color: var(--terracotta-dark);
}

.score-shell {
  padding: 56px 0 64px;
}

.score-hero {
  position: relative;
  max-width: 1010px;
  border-bottom: 1px solid rgba(21, 23, 21, 0.16);
}

.score-hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(360px, 38vw);
  height: 1px;
  background: var(--terracotta);
  content: "";
}

.score-hero__content {
  display: flex;
  min-height: 380px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 42px 0 58px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--terracotta-dark);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 18px;
  color: var(--charcoal);
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--charcoal);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 520;
  line-height: 1;
}

h3 {
  margin-bottom: 10px;
  color: var(--charcoal);
  font-size: 1.12rem;
  font-weight: 620;
  line-height: 1.24;
}

.hero__text {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.45vw, 1.18rem);
  line-height: 1.68;
}

.hero__note {
  max-width: 720px;
  margin: 18px 0 24px;
  color: var(--green-dark);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.62;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--charcoal);
  border-radius: 8px;
  padding: 0 20px;
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tool-button--primary {
  background: var(--charcoal);
  color: var(--paper);
}

.tool-button--primary:hover {
  border-color: var(--terracotta);
  background: var(--terracotta-dark);
  transform: translateY(-1px);
}

.tool-button--secondary,
.tool-button--quiet {
  border-color: rgba(21, 23, 21, 0.24);
  background: rgba(255, 250, 241, 0.54);
  color: var(--green-dark);
}

.tool-button--secondary:hover,
.tool-button--quiet:hover {
  border-color: var(--green);
  background: rgba(255, 250, 241, 0.9);
}

.tool-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.quiz-section,
.result-section {
  margin-top: 64px;
}

.quiz-card,
.result-card {
  overflow: hidden;
  border: 1px solid rgba(21, 23, 21, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(231, 221, 207, 0.58)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 42px);
}

.quiz-card__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.step-counter,
.score-line {
  margin-bottom: 4px;
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 760;
}

.score-line {
  margin: 16px 0 0;
  font-size: 1rem;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 23, 21, 0.1);
  margin: 28px 0 30px;
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.question-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  margin: 0;
  padding: 0;
}

.question-panel[hidden] {
  display: none;
}

.question-panel legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  color: var(--charcoal);
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.3vw, 2.2rem);
  font-weight: 520;
  line-height: 1.08;
}

.question-panel label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid rgba(21, 23, 21, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.64);
  color: var(--ink);
  line-height: 1.42;
  padding: 14px 16px;
  cursor: pointer;
}

.question-panel label:has(input:checked) {
  border-color: rgba(92, 116, 79, 0.86);
  background: rgba(92, 116, 79, 0.12);
}

.question-panel input {
  accent-color: var(--green-dark);
}

.form-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--terracotta-dark);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.quiz-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.result-card {
  position: relative;
}

.result-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
  content: "";
}

.result-intro {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.result-grid article {
  border: 1px solid rgba(21, 23, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.55);
  padding: 22px;
}

.result-grid p,
.result-grid li {
  color: var(--muted);
  line-height: 1.68;
}

.result-grid p {
  margin-bottom: 0;
}

.result-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.advisory-note {
  margin-top: 52px;
  border: 1px solid rgba(21, 23, 21, 0.12);
  border-left: 4px solid rgba(92, 116, 79, 0.52);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.42);
  padding: 20px 22px;
}

.advisory-note p {
  max-width: 920px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.68;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(21, 23, 21, 0.16);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
  padding: 24px 0 32px;
}

@media (max-width: 860px) {
  .score-hero__content {
    min-height: auto;
  }

  .quiz-card__header,
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-nav {
    justify-content: flex-start;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer,
  .score-shell {
    width: min(100% - 24px, 1160px);
  }

  .score-shell {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .question-panel {
    grid-template-columns: 1fr;
  }

  .tool-button,
  .quiz-actions .tool-button,
  .result-actions .tool-button {
    width: 100%;
  }
}
