/* ============================================================================
   InstantMD components — styles for templates/_components.html macros.
   Tokens only (static/tokens.css); no theme selectors. Prefix: .imd-
   Loaded after tokens-bridge.css.
   ========================================================================== */

/* Layout helpers ---------------------------------------------------------- */
.imd-container { width: 100%; max-width: calc(var(--container-max) + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }   /* content = container-max; the gutter sits outside it (1600 + 2×160 at 1920) */
.imd-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.imd-stack > * + * { margin-top: var(--space-20); }

/* Type helpers ------------------------------------------------------------- */
.imd-eyebrow { font-family: var(--font-heading); font-weight: var(--weight-medium); font-size: var(--text-eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-text-highlight); margin: 0 0 var(--space-8); line-height: 1.3; }
.imd-question { font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: var(--text-h1); line-height: var(--leading-heading); color: var(--color-text-heading); margin: 0; }
.imd-question .imd-accent { color: var(--color-text-highlight); }
.imd-helper { font-family: var(--font-body); font-size: var(--text-body); line-height: var(--leading-body); color: var(--color-text-body); margin: var(--space-12) 0 0; max-width: 56ch; }
.imd-step-header { margin-bottom: var(--space-24); }

/* Button -------------------------------------------------------------------- */
.imd-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); min-height: var(--control-height); padding: 0 var(--space-24); border-radius: var(--radius-pill); font-family: var(--font-heading); font-weight: var(--weight-regular); font-size: var(--text-button); line-height: 1.25; text-decoration: none; cursor: pointer; border: var(--stroke-button-primary); background: var(--color-button-primary-bg); color: var(--color-button-primary-text); box-shadow: var(--shadow-sm); transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease; -webkit-tap-highlight-color: transparent; }
.imd-btn:hover { background: var(--color-button-primary-bg-hover); border-color: var(--color-button-primary-bg-hover); color: var(--color-button-primary-text); text-decoration: none; }
.imd-btn:active { transform: translateY(1px); }
.imd-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.imd-btn[disabled], .imd-btn[aria-disabled="true"] { background: var(--primitive-grey-300); border-color: var(--primitive-grey-300); color: var(--primitive-white); box-shadow: none; cursor: not-allowed; }
.imd-btn[aria-busy="true"] { pointer-events: none; }
.imd-btn--secondary { background: var(--color-button-secondary-bg); border: var(--stroke-default); color: var(--color-text-link); box-shadow: none; }
.imd-btn--secondary:hover { background: var(--color-surface-subtle); border-color: var(--color-button-secondary-border); color: var(--color-button-secondary-text); }
.imd-btn--outline { background: var(--color-button-secondary-bg); border: var(--stroke-button-secondary); color: var(--color-button-secondary-text); box-shadow: none; }
.imd-btn--outline:hover { background: var(--color-surface-subtle); }
.imd-btn--inverse { background: var(--color-button-inverse-bg); border: var(--stroke-button-inverse); color: var(--color-button-inverse-text); box-shadow: none; }
.imd-btn--inverse:hover { background: var(--primitive-grey-50); border-color: var(--primitive-grey-50); color: var(--color-button-inverse-text); }
.imd-btn--link { background: transparent; border-color: transparent; box-shadow: none; color: var(--color-text-link); padding-left: 0; padding-right: 0; font-family: var(--font-body); font-weight: var(--weight-semibold); }
.imd-btn--link:hover { background: transparent; border-color: transparent; color: var(--primitive-navy-900); text-decoration: underline; }
.imd-btn--sm { min-height: 40px; padding: 0 var(--space-16); font-size: 14px; }
.imd-btn--lg { min-height: 56px; padding: 0 var(--space-32); font-size: 18px; }
@media (min-width: 1024px) { .imd-btn--lg { min-height: 52px; padding: 0 var(--space-24); font-size: 20px; } }   /* desktop frame: every CTA is 52px with a 20px label */
.imd-btn--full { display: flex; width: 100%; }
.imd-btn__spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: imd-spin .8s linear infinite; }
@keyframes imd-spin { to { transform: rotate(360deg); } }

/* Field wrapper -------------------------------------------------------------- */
.imd-field { margin: 0 0 var(--space-16); }
.imd-field__label { display: block; font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: var(--text-h4); line-height: 1.3; color: var(--color-text-heading); margin: 0 0 var(--space-8); }
.imd-field__req { color: var(--color-text-error); }
.imd-field__help { font-size: var(--text-body-sm); line-height: var(--leading-small); color: var(--color-text-support); margin: var(--space-8) 0 0; }
.imd-field__error { font-size: var(--text-body-sm); line-height: var(--leading-small); color: var(--color-text-error); margin: var(--space-8) 0 0; }
.imd-field__error[hidden] { display: none; }
.imd-btn[hidden] { display: none; }   /* the class's inline-flex would otherwise beat the UA [hidden] rule (support modal swaps its two actions) */
legend.imd-field__label { padding: 0; float: none; width: auto; }

/* Input / select / textarea ----------------------------------------------------- */
.imd-input { position: relative; display: flex; align-items: center; background: var(--color-surface-card); border: var(--stroke-input); border-radius: var(--radius-lg); min-height: var(--input-height); transition: border-color .15s ease, box-shadow .15s ease; }
.imd-input:hover { border-color: var(--primitive-charcoal-500); }
.imd-input:focus-within { border: var(--stroke-focus); box-shadow: 0 0 0 4px rgba(var(--primitive-blue-600-rgb), .13); }
.imd-field--error .imd-input { border: var(--stroke-error); }
.imd-input__control { flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; min-height: calc(var(--input-height) - 2px); padding: 0 var(--space-20); border: 0; background: transparent; border-radius: inherit; font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: 22px; color: var(--color-text-heading); outline: none; appearance: none; }
.imd-input__control::placeholder { color: var(--color-text-support); font-weight: var(--weight-medium); }
/* one ring only, on the wrapper: beat the theme's input[type=…] attribute selectors and the global :focus-visible ring */
.imd-input .imd-input__control, .imd-input .imd-input__control:hover, .imd-input .imd-input__control:focus, .imd-input .imd-input__control:focus-visible { border: 0; outline: none; box-shadow: none; background: transparent; border-radius: inherit; }
.imd-input--sm { min-height: 56px; }
.imd-input--sm .imd-input__control { min-height: 54px; font-size: 18px; padding: 0 var(--space-16); }
.imd-input--text .imd-input__control, .imd-input--select .imd-input__control { font-size: 18px; font-weight: var(--weight-medium); }
.imd-input__suffix { flex: none; padding-right: var(--space-20); font-family: var(--font-heading); font-size: var(--text-body); color: var(--color-text-heading); }
.imd-input--select .imd-input__control { padding-right: var(--space-48); font-family: var(--font-body); font-weight: var(--weight-regular); font-size: 18px; cursor: pointer; }
.imd-input__chevron { position: absolute; right: var(--space-20); top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--color-icon-default); border-bottom: 2px solid var(--color-icon-default); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.imd-input--textarea { align-items: stretch; }
.imd-input--textarea .imd-input__control { min-height: 120px; padding: var(--space-16) var(--space-20); font-family: var(--font-body); font-weight: var(--weight-regular); font-size: 18px; line-height: var(--leading-body); resize: vertical; }

/* Option row (radio / checkbox) ---------------------------------------------- */
.imd-options { border: 0; padding: 0; margin: 0 0 var(--space-16); min-width: 0; }
.imd-options__list { display: flex; flex-direction: column; gap: var(--space-12); }
.imd-option { position: relative; display: flex; align-items: center; gap: var(--space-16); min-height: 56px; padding: var(--space-16) var(--space-20); background: var(--color-surface-card); border: var(--stroke-default); border-radius: var(--radius-md); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.imd-option:hover { border-color: var(--primitive-charcoal-500); }
.imd-option__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.imd-option__mark { flex: none; width: 24px; height: 24px; border: 2px solid var(--color-border-input); border-radius: 50%; background: var(--color-surface-card); display: grid; place-items: center; transition: border-color .15s ease, background-color .15s ease; }
.imd-option--checkbox .imd-option__mark { border-radius: 6px; }
.imd-option__mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--color-surface-card); transform: scale(0); transition: transform .15s cubic-bezier(.34,1.56,.64,1); }
.imd-option--checkbox .imd-option__mark::after { width: 6px; height: 11px; border-radius: 0; border: solid var(--color-surface-card); border-width: 0 2px 2px 0; background: transparent; margin-top: -2px; transform: rotate(45deg) scale(0); }
.imd-option__input:checked ~ .imd-option__mark { background: var(--color-button-primary-bg); border-color: var(--color-button-primary-bg); }
.imd-option__input:checked ~ .imd-option__mark::after { transform: scale(1); }
.imd-option--checkbox .imd-option__input:checked ~ .imd-option__mark::after { transform: rotate(45deg) scale(1); }
.imd-option:has(.imd-option__input:checked) { border: var(--stroke-focus); background: var(--color-surface-subtle); }
.imd-option:has(.imd-option__input:focus-visible) { box-shadow: var(--focus-ring); }
.imd-option:has(.imd-option__input:disabled) { opacity: .5; cursor: not-allowed; }
.imd-option__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imd-option__label { font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: var(--text-h4); line-height: 1.3; color: var(--color-text-heading); }
.imd-option__desc { font-family: var(--font-body); font-size: var(--text-body-sm); line-height: var(--leading-small); color: var(--color-text-body); }

/* Card ------------------------------------------------------------------------- */
.imd-card { background: var(--color-surface-card); border: var(--stroke-default); border-radius: var(--radius-lg); color: var(--color-text-body); }
.imd-card--subtle { background: var(--color-surface-subtle); }
.imd-card--dark { background: var(--color-surface-dark-card); border-color: var(--color-surface-dark-card); color: var(--color-text-on-dark-muted); }
.imd-card--dark .imd-card__title, .imd-card--dark h2, .imd-card--dark h3, .imd-card--dark strong { color: var(--color-text-on-dark); }
.imd-card--dark .imd-eyebrow { color: var(--color-text-on-dark-accent); }
.imd-card--pad-sm { padding: var(--space-16); }
.imd-card--pad-md { padding: var(--space-20); }
.imd-card--pad-lg { padding: var(--space-32); }
.imd-card__title { font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: var(--text-h3); line-height: var(--leading-heading); color: var(--color-text-heading); margin: 0 0 var(--space-8); }
.imd-card > :last-child { margin-bottom: 0; }

/* Alert ------------------------------------------------------------------------ */
.imd-alert { padding: var(--space-16); border-radius: var(--radius-md); background: var(--color-surface-subtle); border: var(--stroke-default); margin: 0 0 var(--space-16); }
.imd-alert__text { margin: 0; font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--text-body); line-height: 1.4; color: var(--color-text-heading); }
.imd-alert--info { border-color: var(--color-border-highlight); }
.imd-alert--info .imd-alert__text { color: var(--color-text-highlight); }
.imd-alert--success { border-color: var(--color-border-highlight); }
.imd-alert--error { border-color: var(--color-border-error); }
.imd-alert--error .imd-alert__text { color: var(--color-text-error); }

/* Progress rail ------------------------------------------------------------------ */
.imd-progress { margin: 0 0 var(--space-20); }
.imd-progress__meta { display: flex; justify-content: flex-end; margin-bottom: var(--space-8); font-size: var(--text-body-sm); color: var(--color-text-support); }
.imd-progress__track { height: 8px; border-radius: var(--radius-pill); background: var(--color-bmi-track); overflow: hidden; }
.imd-progress__fill { height: 100%; border-radius: var(--radius-pill); background: var(--color-bmi-marker); transition: width .3s ease; }

/* Back link ------------------------------------------------------------------------ */
.imd-back { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--tap-target); font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--text-body); color: var(--color-text-link); text-decoration: none; }
.imd-back:hover { text-decoration: underline; color: var(--primitive-navy-900); }
.imd-back:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

/* Tag ----------------------------------------------------------------------------- */
.imd-tag { display: inline-flex; align-items: center; gap: var(--space-4); padding: 4px var(--space-12); border-radius: var(--radius-pill); background: var(--color-tag-bg-on-white); border: 1px solid var(--color-tag-border); color: var(--color-tag-text); font-family: var(--font-body); font-size: var(--text-body-sm); font-weight: var(--weight-semibold); line-height: 1.3; vertical-align: middle; }
.imd-tag--sm { padding: 2px var(--space-8); font-size: 12px; font-weight: var(--weight-regular); }
.imd-tag__icon { color: var(--color-tag-icon); display: inline-flex; }

/* FAQ row -------------------------------------------------------------------------- */
.imd-faq { border-bottom: var(--stroke-divider); }
.imd-faq__q { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); min-height: var(--tap-target); padding: var(--space-16) 0; cursor: pointer; list-style: none; font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: var(--text-h4); line-height: 1.3; color: var(--color-text-heading); }
.imd-faq__q::-webkit-details-marker { display: none; }
.imd-faq__q:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.imd-faq__icon { position: relative; flex: none; width: 20px; height: 20px; }
.imd-faq__icon::before, .imd-faq__icon::after { content: ""; position: absolute; background: var(--color-icon-default); left: 50%; top: 50%; transform: translate(-50%, -50%); transition: transform .2s ease; }
.imd-faq__icon::before { width: 14px; height: 2px; }
.imd-faq__icon::after { width: 2px; height: 14px; }
.imd-faq[open] .imd-faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.imd-faq__a { padding: 0 0 var(--space-20); font-family: var(--font-body); font-size: var(--text-body); line-height: var(--leading-body); color: var(--color-text-body); max-width: 68ch; }

/* Step number ------------------------------------------------------------------------ */
.imd-step-num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--color-surface-card); border: 2px solid var(--color-border-default); font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 20px; color: var(--color-step-number); }

/* Trust badges ---------------------------------------------------------------------- */
.imd-trust { display: flex; flex-wrap: wrap; gap: var(--space-16) var(--space-24); list-style: none; margin: 0; padding: 0; }
.imd-trust__item { display: inline-flex; align-items: center; gap: var(--space-8); font-family: var(--font-body); font-size: var(--text-body-sm); color: var(--color-text-body); }
.imd-trust__icon { display: inline-flex; width: 28px; height: 28px; color: var(--color-icon-trust); }

/* Nav ---------------------------------------------------------------------------------- */
.imd-nav { background: var(--color-bg-page); border-bottom: var(--stroke-divider); }
.imd-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); min-height: 64px; }
.imd-nav__logo { display: inline-flex; align-items: center; }
.imd-nav__logo img { height: 28px; width: auto; }
.imd-nav__actions { display: flex; align-items: center; gap: var(--space-16); }
.imd-nav__help { font-size: var(--text-body-sm); color: var(--color-text-support); }
@media (max-width: 767px) { .imd-nav__help { display: none; } }
@media (min-width: 1024px) {
  /* Figma "Header / Sticky" (565:34910): 100px tall, 134×45 logo, 192×52 Get Started with a 20px label */
  .imd-nav__inner { min-height: 100px; }
  .imd-nav__logo img { height: 45px; }
  .imd-nav__actions .imd-btn { min-height: 52px; min-width: 192px; padding: 0 var(--space-24); font-size: 20px; }
  .imd-eyebrow { font-weight: var(--weight-semibold); letter-spacing: 0; line-height: 24px; }
}

/* Footer — "InstantMD desktop and mobile footer updates" (PDF, 2026-10-10) ------------------------------------------
   Mobile: logo + seal, tagline, HIPAA pill, social row, rule, disclaimer, rule, copyright on three lines, links stacked.
   Desktop (≥768): brand left / pill + socials right; disclaimer; rule; copyright · address left, links right. */
.imd-footer { background: var(--color-surface-card); color: var(--color-text-body); border-top: var(--stroke-divider); padding: var(--space-40) 0 var(--space-32); font-family: var(--font-body); font-size: 14px; line-height: 20px; }
.imd-footer a { color: var(--color-text-heading); text-decoration: none; }
.imd-footer a:hover { text-decoration: underline; color: var(--color-text-heading); }
.imd-footer a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.imd-footer__top { display: flex; flex-direction: column; gap: var(--space-20); padding-bottom: var(--space-24); border-bottom: var(--stroke-divider); margin-bottom: var(--space-24); }
.imd-footer__brand { display: grid; gap: var(--space-16); justify-items: start; }
.imd-footer__logos { display: flex; align-items: center; gap: var(--space-16); margin: 0; }
.imd-footer__home { display: inline-flex; }
.imd-footer__logo { height: 28px; width: auto; display: block; }
.imd-footer__seal { display: inline-flex; }
.imd-footer__seal img { display: block; width: 73px; height: 79px; }   /* LegitScript's native size; they ask that it is not scaled */
.imd-footer__tagline { margin: 0; font-size: 14px; line-height: 20px; color: var(--color-text-body); }
.imd-footer__trust { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-16); }
.imd-footer__pill { display: inline-flex; align-items: center; height: 28px; padding: 0 var(--space-12); border: 1px solid var(--color-border-input); border-radius: var(--radius-pill); font-family: var(--font-heading); font-weight: var(--weight-medium); font-size: 12px; line-height: 1; color: var(--color-text-heading); }
.imd-footer__social { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-8); }
.imd-footer__social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border-input); color: var(--color-text-heading); }
.imd-footer__social a:hover { border-color: var(--color-text-heading); text-decoration: none; }
.imd-footer__social a:focus-visible { border-radius: 50%; }
.imd-footer__social svg { width: 16px; height: 16px; display: block; }
.imd-footer__disclaimer { margin: 0 0 var(--space-24); font-size: 14px; line-height: 20px; color: var(--color-text-body); }
.imd-footer__disclaimer a { text-decoration: underline; }
.imd-footer__bottom { display: flex; flex-direction: column; gap: var(--space-16); border-top: 1px solid var(--color-button-secondary-border); padding-top: var(--space-24); }   /* the full-width rule above the copyright */
.imd-footer__copy { margin: 0; font-size: 13px; line-height: 18px; color: var(--color-text-support); }
.imd-footer__copy > span { display: block; }
.imd-footer__copy > .imd-footer__sep { display: none; }   /* three lines on mobile, one line with · on desktop */
.imd-footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.imd-footer__links a { font-size: 13px; line-height: 18px; padding: 2px 0; color: var(--color-text-link); }
@media (min-width: 768px) {
  .imd-footer { padding: var(--space-48) 0 var(--space-40); }
  .imd-footer__top { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: var(--space-40); padding-bottom: 0; border-bottom: 0; margin-bottom: var(--space-24); }
  .imd-footer__logo { height: 32px; }
  .imd-footer__tagline { font-size: 16px; line-height: 24px; max-width: 320px; }
  .imd-footer__trust { flex-direction: row; align-items: center; gap: var(--space-16); }
  .imd-footer__disclaimer { font-size: 14px; line-height: 22px; max-width: 110ch; margin-bottom: var(--space-24); }
  .imd-footer__bottom { flex-direction: row; justify-content: space-between; align-items: center; gap: var(--space-24); }
  .imd-footer__copy > span, .imd-footer__copy > .imd-footer__sep { display: inline; }
  .imd-footer__links { flex-direction: row; flex-wrap: wrap; gap: var(--space-8) var(--space-24); justify-content: flex-end; }
}
@media (min-width: 1024px) { .imd-footer { padding-top: var(--space-64); } }

/* Check row — Figma "Row / …" (mobile Why InstantMD, Ongoing support) ------------------------------------------- */
.imd-check-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-16); }
.imd-check-row { display: flex; gap: var(--space-12); align-items: flex-start; padding: var(--space-16); background: var(--color-surface-card); border-radius: var(--radius-md); }
.imd-check-row__icon { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--color-button-primary-bg); position: relative; }
.imd-check-row__icon::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--color-text-on-button); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.imd-check-row__text { display: grid; gap: 4px; min-width: 0; }
.imd-check-row__text strong { font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: 18px; line-height: 24px; color: var(--color-text-heading); }
.imd-check-row__text span { font-family: var(--font-body); font-size: 16px; line-height: 22px; color: var(--color-text-body); }

/* Modal / sheet ------------------------------------------------------------------------- */
.imd-modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; inset: 0; position: fixed; }
.imd-modal::backdrop { background: rgba(var(--primitive-navy-900-rgb), .55); }
.imd-modal__panel { position: absolute; left: var(--space-12); right: var(--space-12); bottom: var(--space-12); background: var(--color-surface-card); border-radius: var(--radius-lg); padding: var(--space-32) var(--space-24) var(--space-24); text-align: center; box-shadow: var(--shadow-md); }
.imd-modal__title { font-family: var(--font-heading); font-weight: var(--weight-semibold); font-size: 22px; line-height: 1.2; color: var(--color-text-heading); margin: 0 0 var(--space-12); }
.imd-modal__panel:focus { outline: none; }
.imd-modal__body { font-family: var(--font-body); font-size: var(--text-body); line-height: var(--leading-body); color: var(--color-text-body); margin: 0 0 var(--space-20); }
.imd-modal__panel .imd-btn + .imd-btn, .imd-modal__panel .imd-btn + .imd-back { margin-top: var(--space-12); }
@media (min-width: 640px) { .imd-modal__panel { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100% - 48px)); transform: translate(-50%, -50%); padding: var(--space-48) var(--space-40); } }

/* Slot chip ------------------------------------------------------------------------------ */
.imd-slot { min-height: 52px; padding: var(--space-12) var(--space-16); border-radius: var(--radius-sm); border: var(--stroke-input); background: var(--color-surface-card); font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--text-body); color: var(--color-text-heading); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.imd-slot:hover { border-color: var(--color-border-focus); }
.imd-slot:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.imd-slot--selected, .imd-slot[aria-pressed="true"] { background: var(--color-button-primary-bg); border-color: var(--color-button-primary-bg); color: var(--color-button-primary-text); }
.imd-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }

@media (prefers-reduced-motion: reduce) { .imd-btn, .imd-option, .imd-input, .imd-progress__fill, .imd-faq__icon::before, .imd-faq__icon::after { transition: none; } .imd-btn__spinner { animation-duration: 1.5s; } }

/* The purchased theme offsets .main for its fixed header (theme/_generic.css, layout/header/header.css).
   Pages on the redesign nav (macro `nav`) flow normally, so drop that offset for them. */
.imd-nav ~ #wrapper .main, .imd-nav + #wrapper .main { padding-top: 0; }
/* Sticky footer (2026-10-09): the page is a full-height column, main grows, so the footer sits at the bottom of the
   viewport on short screens (the stepper's done states, the 404, the care network page) instead of floating mid-page. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > #wrapper { flex: 1 0 auto; display: flex; flex-direction: column; }
body > #wrapper > #content { flex: 1 0 auto; display: flex; flex-direction: column; }
body > #wrapper > #content > .main { flex: 1 0 auto; }
