/* Eligibility checks. Large answer buttons, one question at a time, status shown in words and colour. */
.calc { margin: 1.5rem 0 2rem; }
.calc-step { border: 3px solid var(--brand); border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem; margin-bottom: 1.5rem; background: #fff; }
.calc-step h2 { margin-top: 0; }
.calc-step h2:focus { outline: none; }
.calc-count { color: var(--muted); font-weight: bold; margin-bottom: 0.25rem; }
.calc-count:empty { display: none; }
.calc-help { color: var(--muted); }
.calc-options { list-style: none; margin: 1rem 0 0.5rem; padding: 0; display: grid; gap: 0.75rem; max-width: 40rem; }
.calc-option, .calc-option:visited {
  display: block; min-height: 48px; padding: 0.75rem 1rem;
  border: 3px solid var(--brand); border-radius: var(--radius);
  background: var(--panel); color: var(--brand-dark); font-weight: bold; text-decoration: none;
}
.calc-option:hover { background: var(--brand); color: #fff; }
.calc-back {
  font: inherit; font-size: 1rem; cursor: pointer; margin-bottom: 0.75rem;
  padding: 0.5rem 0.9rem; min-height: 44px; border: 2px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--link); text-decoration: underline;
}
.calc-back[hidden] { display: none; }
.calc-back::before { content: "\2190\00a0"; }
.calc-back:dir(rtl)::before { content: "\2192\00a0"; }

/* Results: the badge carries the status in words; colour only repeats it */
.calc-status { margin-bottom: 0.5rem; }
.calc-badge { display: inline-block; font-weight: bold; padding: 0.35rem 0.8rem; border-radius: var(--radius); border: 2px solid; }
.calc-yes { border-color: #1d6b2f; }
.calc-yes .calc-badge { background: #e3f4e6; color: #14501f; }
.calc-no { border-color: #9b2226; }
.calc-no .calc-badge { background: #fbe6e6; color: #7a1a1d; }
.calc-maybe { border-color: #8a6500; }
.calc-maybe .calc-badge { background: var(--notice-bg); color: #5c4300; }
.calc-result h3 { margin-top: 1.25rem; }
.calc-next li, .calc-links li { margin-bottom: 0.5rem; }
.calc-trail dl { margin: 0; }
.calc-trail dt { font-weight: bold; margin-top: 0.5rem; }
.calc-trail dd { margin: 0; margin-inline-start: 1rem; }
.calc-paid { font-weight: bold; }
.calc-disclaimer { font-size: 0.9rem; color: var(--muted); border-top: 1px solid #c9d3de; padding-top: 0.75rem; margin-top: 1.25rem; }
.calc-privacy { color: var(--muted); }
.calc-index li { margin-bottom: 0.5rem; }

/* With the script: only the current step is shown */
.calc-js .calc-noscript { display: none; }
.calc-js .calc-step { display: none; }
.calc-js .calc-step.is-current { display: block; }

/* Without the script, in browsers that support :has(): show the linked step, or the first one */
@supports selector(:has(*)) {
  .calc:not(.calc-js) .calc-step { display: none; }
  .calc:not(.calc-js) .calc-step:target { display: block; }
  .calc:not(.calc-js):not(:has(.calc-step:target)) .calc-first { display: block; }
}
@media print {
  .calc-back, .calc-restart { display: none; }
}
