:root {
  --navy: #102342;
  --cream: #f7f4ef;
  --teal: #21867e;
  --text: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.7;
}

.container {
  max-width: 780px;
  margin: 70px auto;
  padding: 20px;
}

.card {
  background: white;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.card-header {
  background: var(--navy);
  color: white;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 25px;
  margin: 0;
}

.card-content {
  padding: 40px;
}

.footprint-icon {
  font-size: 40px;
}

h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
}

h2 {
  font-size: 27px;
}

p {
  font-size: 15px;
}

.info-box {
  background: #f7f4ef;
  border: 1px solid #e7e3dc;
  border-radius: 10px;
  padding: 24px;
  margin: 28px 0;
}

.info-box h3 {
  margin-top: 0;
}

.privacy-note {
  background: #eef6f5;
  padding: 16px;
  border-radius: 8px;
  font-size: 13px;
}

button {
  display: block;
  margin: 28px 0 0 auto;
  padding: 15px 26px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

button:hover {
  background: var(--teal);
}

@media (max-width: 600px) {
  .container {
    margin: 20px auto;
  }

  .card-header {
    padding: 24px;
    flex-wrap: wrap;
  }

  .card-content {
    padding: 24px;
  }
}
.card-header h1 {
  line-height: 1.35;
}

p {
  line-height: 1.85;
}


/* Educational highlight section */

.highlight-box {
  border-left: 4px solid var(--teal);
  padding: 8px 24px;
  margin: 32px 0;
}

.section-label {
  color: #748091;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.highlight-box h3,
.info-box h3 {
  margin-top: 12px;
  font-size: 21px;
}

.highlight-box p {
  margin-bottom: 16px;
}

/* Active and passive footprint rows */

.footprint-type {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 22px 0;
}

.footprint-type strong {
  color: var(--navy);
  font-size: 15px;
}

.footprint-type p {
  margin: 5px 0 0;
  font-size: 14px;
}

/* Takeaway message */

.takeaway {
  font-style: italic;
  color: #64748b;
  border-top: 1px solid #dedbd5;
  padding-top: 18px;
  margin-top: 25px;
}

/* Privacy note */

.privacy-note {
  border: 1px solid #d5e8e5;
  background: #eef6f5;
  color: #365e59;
  padding: 18px 22px;
  margin-top: 30px;
}

.privacy-note p {
  margin: 6px 0 0;
  font-size: 13px;
}

/* Better spacing */

.card-content > p {
  margin-bottom: 20px;
}

.card-content h2 {
  margin-bottom: 22px;
  line-height: 1.35;
}


/* QUIZ PAGE */

[hidden] {
  display: none !important;
}

.quiz-page .card-header {
  margin: 0;
}

.quiz-instructions {
  color: #84909f;
  font-style: italic;
  font-size: 13px;
}

/* Progress indicator */

.progress-card {
  background: #f7f4ef;
  border: 1px solid #e7e3dc;
  border-radius: 12px;
  padding: 24px;
  margin: 30px 0;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #748091;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.progress-heading strong {
  color: var(--teal);
  font-size: 13px;
}

.progress-track {
  height: 8px;
  background: #e5e3df;
  border-radius: 20px;
  overflow: hidden;
  margin: 14px 0;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: var(--teal);
  border-radius: 20px;
  transition: width 0.3s ease;
}

.footprint-counts {
  display: flex;
  gap: 24px;
  color: #64748b;
  font-size: 13px;
}

/* Question sections */

.question-section {
  margin: 35px 0;
}

.question-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #334155;
}

.question-heading .active-dot,
.question-heading .passive-dot {
  display: inline-block;
  margin: 0;
}

.section-description {
  color: #84909f;
  font-size: 13px;
  margin-bottom: 18px;
}

/* Individual questions */

.question-item {
  background: #fff;
  border: 1px solid #e7e5e1;
  border-radius: 9px;
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.question-item:has(input:checked) {
  border-color: var(--teal);
  background: #f5fbfa;
}

.question-row {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.question-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex-shrink: 0;
}

.question-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

.risk-badge {
  padding: 4px 9px;
  border-radius: 15px;
  font-size: 10px;
  font-weight: 700;
}

.risk-low {
  background: #edf0f3;
  color: #64748b;
}

.risk-med {
  background: #faf1dd;
  color: #92712d;
}

.risk-high {
  background: #fce9e9;
  color: #b64b4b;
}

.question-explanation {
  display: none;
  margin: 12px 0 0 32px;
  padding-top: 12px;
  border-top: 1px solid #e7e5e1;
  font-size: 13px;
  color: #64748b;
}

.question-item:has(input:checked)
.question-explanation {
  display: block;
}

/* Navigation */

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 35px;
}

.quiz-navigation button {
  margin: 0;
}

.secondary-btn {
  background: white;
  color: #475569;
  border: 1px solid #e2e2e2;
}

.secondary-btn:hover {
  background: #f7f4ef;
}

@media (max-width: 600px) {
  .quiz-navigation {
    flex-direction: column-reverse;
  }

  .quiz-navigation button {
    width: 100%;
  }

  .question-row {
    flex-wrap: wrap;
  }
}


/* RESULTS PAGE */

.results-summary {
  text-align: center;
  background: #f7f4ef;
  border: 1px solid #e7e3dc;
  border-radius: 14px;
  padding: 35px 28px;
  margin-bottom: 35px;
}

.result-icon {
  font-size: 36px;
  margin: 18px 0 8px;
}

.results-summary h2 {
  margin: 10px 0;
  font-size: 30px;
}

.result-score {
  font-family: 'DM Sans', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--navy);
  margin: 12px 0;
}

.result-meter,
.breakdown-track {
  background: #e5e3df;
  border-radius: 20px;
  overflow: hidden;
}

.result-meter {
  height: 12px;
  margin-top: 20px;
}

#result-meter-fill {
  width: 0%;
  height: 100%;
  background: var(--teal);
  border-radius: 20px;
  transition: width 0.5s ease;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: #87919d;
  margin-top: 12px;
  letter-spacing: 0.6px;
}

.score-disclaimer {
  font-size: 12px;
  color: #84909f;
  margin-top: 25px;
}

.results-explanation,
.results-breakdown,
.recommendations-section {
  margin: 35px 0;
}

.results-explanation h3,
.results-breakdown h3,
.recommendations-section h3 {
  font-size: 22px;
  margin: 10px 0 16px;
}

/* Active/passive breakdown */

.breakdown-item {
  margin: 22px 0;
}

.breakdown-heading {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #475569;
  margin-bottom: 10px;
}

.breakdown-heading strong {
  color: var(--navy);
}

.breakdown-track {
  height: 9px;
}

.active-bar,
.passive-bar {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 0.5s ease;
}

.active-bar {
  background: var(--teal);
}

.passive-bar {
  background: #7856a2;
}

.breakdown-note {
  font-size: 12px;
  color: #84909f;
  margin-top: 20px;
}

/* Recommendations */

.recommendation-card {
  background: #f7f4ef;
  border: 1px solid #e7e3dc;
  border-radius: 10px;
  padding: 20px;
  margin: 12px 0;
}

.recommendation-card h4 {
  color: var(--navy);
  font-size: 15px;
  margin: 0 0 8px;
}

.recommendation-card p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}