/* Health-check quiz surfaces — Ledger & Ink, scoped to this page. */
.quiz-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px;
}

.quiz-shell :where(button, a) {
  -webkit-tap-highlight-color: transparent;
}

.progress-bar {
  height: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface-2);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.35s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.progress-meta b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.quiz-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.quiz-card {
  padding: clamp(22px, 5vw, 34px);
}

.quiz-cat {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin-bottom: 16px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 38%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 12%, var(--surface));
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.quiz-q {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(21px, 4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.quiz-hint {
  margin-bottom: 22px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.quiz-option:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 8%, var(--surface));
  box-shadow: 0 3px 12px color-mix(in srgb, var(--ink) 10%, transparent);
}

.quiz-option .arrow {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 18px;
  font-weight: 800;
  transition: transform 0.15s ease;
}

.quiz-option:hover .arrow {
  transform: translateX(3px);
}

.quiz-shell :where(button, a):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.quiz-skip {
  margin-top: 14px;
  text-align: center;
}

.quiz-skip button,
.restart-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quiz-skip button:hover,
.restart-btn:hover {
  border-color: var(--line);
  color: var(--teal);
}

.result-card {
  padding: clamp(22px, 5vw, 34px);
}

.result-score {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.score-ring {
  position: relative;
  display: flex;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  align-items: center;
  justify-content: center;
  border: 4px solid color-mix(in srgb, #fff 26%, transparent);
  border-radius: 50%;
  color: #fff;
  font-family: var(--head);
  font-size: 27px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score-ring.good {
  background: var(--success);
}

.score-ring.medium {
  background: #8A4B08;
}

.score-ring.weak {
  background: #A12C24;
}

.result-score .body h2 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 23px;
}

.result-score .body p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.finding-block {
  margin-bottom: 22px;
}

.finding-block h3 {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.finding {
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 0 12px 12px 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.finding.warn {
  border-left-color: #A12C24;
  background: color-mix(in srgb, #A12C24 10%, var(--surface));
}

.finding.warn strong {
  color: #84251E;
}

.finding.ok {
  border-left-color: #17643A;
  background: color-mix(in srgb, #17643A 10%, var(--surface));
}

.finding.ok strong {
  color: #155A35;
}

.finding strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.finding a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.result-card .finding .btn {
  min-height: 44px;
  white-space: normal;
}

.result-card .btn-primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.result-card .btn-primary:hover {
  border-color: var(--orange-dark);
  background: var(--orange-dark);
  color: #fff;
}

.result-card .btn-outline {
  border-color: var(--teal);
  background: transparent;
  color: var(--teal);
}

.result-card .btn-outline:hover {
  background: color-mix(in srgb, var(--teal) 12%, var(--surface));
  color: var(--teal);
}

:root[data-theme="dark"] .finding.warn strong {
  color: #FF9C8F;
}

:root[data-theme="dark"] .finding.ok strong {
  color: #62D898;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .finding.warn strong {
    color: #FF9C8F;
  }

  :root:not([data-theme="light"]) .finding.ok strong {
    color: #62D898;
  }
}

:root[data-theme="dark"] .result-card .btn-primary {
  border-color: #22C1BD;
  background: #22C1BD;
  color: #0E1422;
}

:root[data-theme="dark"] .result-card .btn-primary:hover {
  border-color: #55D8D0;
  background: #55D8D0;
  color: #0E1422;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .result-card .btn-primary {
    border-color: #22C1BD;
    background: #22C1BD;
    color: #0E1422;
  }

  :root:not([data-theme="light"]) .result-card .btn-primary:hover {
    border-color: #55D8D0;
    background: #55D8D0;
    color: #0E1422;
  }
}

.result-cta {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.result-cta p {
  margin-bottom: 14px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}

.result-cta .btn {
  min-height: 48px;
}

.restart-btn {
  margin-top: 10px;
  text-decoration: none;
}

@media (max-width: 600px) {
  .quiz-shell {
    padding: 28px 16px;
  }

  .result-score {
    align-items: flex-start;
    gap: 14px;
  }

  .score-ring {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    font-size: 23px;
  }

  .result-score .body h2 {
    font-size: 20px;
  }

  .finding .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 360px) {
  .quiz-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .quiz-card,
  .result-card {
    padding: 19px 16px;
  }

  .quiz-option {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .quiz-option,
  .quiz-option .arrow {
    transition: none;
  }

  .quiz-option:hover {
    transform: none;
  }
}

/* Keep the compact phone and navigation labels inside the narrow header. */
@media (max-width: 640px) {
  .health-check-page .utility-bar .utility-right a[href^="tel:"],
  .health-check-page .primary-nav .nav-inner > a {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
