/* Alder: the /match quiz (match-wizard) and the results page
   (match-results). Linked from each template's body; page.tpl.php hoists it
   into the head. Mobile first; one breakpoint at 921px, as alder.css.
   No gradients, glows, hover lift or horizontal rules. */

/* ---------- Wizard ---------- */
.al-mw__wrap { max-width: 680px; }
.al-mw__head { padding: 26px 0 30px; }
.al-mw__count {
  display: flex; align-items: center; gap: 10px;
  font: italic 500 15px/1.3 var(--al-serif); color: var(--al-moss);
}
.al-mw__sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; }
.al-mw__now { font-style: normal; font-family: var(--al-sans); font-weight: 600; font-size: 13px; color: var(--al-ink); }
.al-mw__bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 12px; }
.al-mw__seg { display: block; }
.al-mw__seg::before { content: ""; display: block; height: 6px; border-radius: 999px; background: rgba(14, 42, 27, .12); }
.al-mw__seg.is-done::before { background: var(--al-brand); }
.al-mw__seg.is-now::before { background: var(--al-pill); }
.al-mw__seg span { display: none; }
.al-mw__q {
  margin-top: 22px; font: 800 clamp(1.7rem, 7vw, 2.6rem)/1.08 var(--al-display);
  letter-spacing: -.025em; color: var(--al-ink); text-wrap: balance;
}
.al-mw__desc { margin-top: 10px; font: italic 400 17px/1.5 var(--al-serif); color: var(--al-body); }

.al-mw__body { padding-top: 24px; padding-bottom: 56px; }
.al-mw__form { display: block; }
.al-mw__alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: #FCEBEA; color: #7A1F1F; font-size: 15px; line-height: 1.5; }

/* Radio steps: one card per answer */
.al-mw__opts, .al-mw__chips { border: 0; margin: 0; padding: 0; min-width: 0; }
.al-mw__opts { display: grid; gap: 10px; }
.al-mw__opt {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 14px 16px;
  border: 1.5px solid var(--al-line); border-radius: var(--al-r); background: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: border-color .15s, background-color .15s;
}
@media (hover: hover) { .al-mw__opt:hover { border-color: rgba(14, 42, 27, .4); } }
.al-mw__opt:has(:checked) { border-color: var(--al-pill); background: var(--al-paper); }
@supports not selector(:has(*)) { .al-mw__opt.is-on { border-color: var(--al-pill); background: var(--al-paper); } }
.al-mw__optlabel { font: 500 16px/1.35 var(--al-sans); color: var(--al-ink); }
.al-scope .al-mw__radio {
  -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--al-muted); border-radius: 50%; background: #fff; cursor: pointer;
  transition: border-width .12s, border-color .12s;
}
.al-scope .al-mw__radio:checked { border: 7px solid var(--al-pill); }
.al-scope .al-mw__radio:focus-visible { outline: 2px solid var(--al-brand); outline-offset: 3px; border-radius: 50%; }
.al-mw__opt--other { flex-wrap: wrap; row-gap: 10px; }
.al-mw__opt--other .al-mw__input--inline { flex: 1 1 160px; min-width: 0; min-height: 44px; }

/* Text inputs: pills, 16px type so iOS never zooms */
.al-scope .al-mw__input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 0 18px;
  border: 1px solid var(--al-line); border-radius: 999px; background: #fff; box-shadow: none;
  font: 400 16px/1.2 var(--al-sans); color: var(--al-ink);
  -webkit-appearance: none; appearance: none;
}
.al-scope .al-mw__input::placeholder { color: var(--al-muted); opacity: 1; }
.al-scope .al-mw__input:focus { outline: 2px solid var(--al-brand); outline-offset: 2px; }
.al-scope .al-mw__input--zip { max-width: 180px; }

.al-mw__fields { display: grid; gap: 24px; }
.al-mw__field + .al-mw__field, .al-mw__chips + .al-mw__field { margin-top: 24px; }
.al-mw__fields .al-mw__field + .al-mw__field { margin-top: 0; }
.al-mw__label { display: block; margin-bottom: 8px; font: 600 15px/1.3 var(--al-sans); color: var(--al-ink); }
.al-mw__opt-note { font-weight: 400; color: var(--al-muted); }

/* Concerns: search, then pill chips */
.al-mw__search { position: relative; margin-bottom: 14px; }
.al-mw__searchic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--al-muted); pointer-events: none; }
.al-scope .al-mw__searchinput { padding-left: 44px; }
.al-mw__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.al-mw__chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--al-line); border-radius: 999px; background: #fff; cursor: pointer;
  font: 500 15px/1.25 var(--al-sans); color: var(--al-ink);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: border-color .15s, background-color .15s;
}
@media (hover: hover) { .al-mw__chip:hover { border-color: rgba(14, 42, 27, .4); } }
.al-mw__chip.is-on, .al-mw__chip:has(:checked) { border-color: var(--al-pill); background: var(--al-paper); }
.al-scope .al-mw__check {
  -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0;
  border: 1.5px solid var(--al-muted); border-radius: 6px; background: #fff center / 12px 12px no-repeat; cursor: pointer;
}
.al-scope .al-mw__check:checked {
  border-color: var(--al-pill); background-color: var(--al-pill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.al-scope .al-mw__check:focus-visible { outline: 2px solid var(--al-brand); outline-offset: 2px; }

/* Location: popular city chips */
.al-mw__cities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.al-mw__cities .al-chip { font-size: 14px; border: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.al-mw__cities .al-chip[aria-pressed="true"] { background: var(--al-pill); color: #fff; font-weight: 600; }

/* Action bar: pinned to the bottom of the screen while the step scrolls.
   Next comes first in the source; row-reverse puts Back on the left. */
.al-mw__actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-direction: row-reverse; align-items: center; gap: 10px;
  margin: 24px calc(-1 * var(--al-gutter)) 0; padding: 12px var(--al-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--al-page);
}
.al-mw__actions .al-pill { min-height: 52px; font-size: 16px; }
.al-mw__next { flex: 1 1 auto; }
.al-mw__back { flex: none; background: #fff; }
.al-mw__back .al-ico { width: 18px; height: 18px; }

.al-mw__note { margin-top: 20px; font-size: 14px; line-height: 1.6; color: var(--al-muted); }
.al-mw__note strong { color: var(--al-ink); font-weight: 600; }

/* Phones: Ask gets its own lane. The launcher (56px, 16px in from the
   right) drops into the pinned bar at button height, and the bar keeps
   room for it, so it never covers Continue at any scroll position. The
   scroll-to-top button would sit over Continue, so it is off here. */
@media (max-width: 920px) {
  body:has(.al-mw__actions) #ocd-ask-fab {
    width: 52px; height: 52px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  body:has(.al-mw__actions) #ocd-ask-fab svg { width: 24px; height: 24px; }
  body:has(.al-mw__actions) #ocd-scroll-top,
  body:has(.al-mw__actions) .ocd-scroll-top { display: none !important; }
  .al-mw__actions { padding-right: calc(max(16px, env(safe-area-inset-right, 0px)) + 52px + 10px); }
  .al-mw__next { flex: 1 1 0; min-width: 0; white-space: normal; }
}
/* Narrow phones: Back is icon only (its text stays for screen readers) */
@media (max-width: 419px) {
  .al-mw__back { width: 52px; padding: 0; }
  .al-mw__backtxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 359px) { .al-mw__next .al-ico { display: none; } }

@media (min-width: 921px) {
  .al-mw__head { padding: 48px 0 52px; }
  .al-mw__bar { margin-top: 16px; }
  .al-mw__seg span { display: block; margin-top: 8px; font: 500 12px/1.2 var(--al-sans); color: var(--al-muted); }
  .al-mw__seg.is-now span { color: var(--al-ink); font-weight: 600; }
  .al-mw__q { margin-top: 28px; }
  .al-mw__desc { font-size: 19px; }
  .al-mw__body { padding-top: 36px; padding-bottom: 96px; }
  .al-mw__opts { grid-template-columns: 1fr 1fr; }
  .al-mw__opt--other { grid-column: 1 / -1; }
  .al-mw__actions { margin-inline: -24px; padding-inline: 24px; }
}

/* ---------- Results ---------- */
.al-mres [x-cloak] { display: none !important; }
.al-mres__wrap { max-width: 920px; }
.al-mres__head { padding: 28px 0 32px; }
.al-mres__mark {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px;
  border-radius: 50%; background: var(--al-page); color: var(--al-moss);
}
.al-mres__mark .al-ico { width: 24px; height: 24px; stroke-width: 2.2; }
.al-mres__h { font: 800 clamp(2rem, 7vw, 3rem)/1.05 var(--al-display); letter-spacing: -.03em; color: var(--al-ink); }
.al-mres__sub { margin-top: 10px; font-size: 15px; color: var(--al-body); }
.al-mres__sub a { display: inline-flex; align-items: center; min-height: 44px; color: var(--al-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.al-mres__chips { margin-top: 10px; }
.al-mres__chips .al-chip { background: var(--al-page); font-size: 13px; }

.al-mres__body { padding-top: 12px; padding-bottom: 72px; }
.al-mres__empty { margin-top: 16px; }
.al-mres .al-fallback { margin-top: 44px; }

/* Bulk bar: select all, count, the two send buttons */
.al-mres__bulk {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px;
  padding: 10px 12px 10px 16px; border-radius: var(--al-r); background: var(--al-sand);
}
.al-mres__all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 600 15px/1.2 var(--al-sans); color: var(--al-ink); cursor: pointer; }
.al-mres__n { font-size: 13px; color: var(--al-muted); }
.al-mres__send { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.al-mres__send .al-pill { flex: 1 1 0; min-width: 0; padding-inline: 14px; }
.al-mres .al-pill:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.al-scope .al-mres__check {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 0;
  border: 1.5px solid var(--al-muted); border-radius: 6px; background: #fff center / 13px 13px no-repeat; cursor: pointer;
}
.al-scope .al-mres__check:checked {
  border-color: var(--al-pill); background-color: var(--al-pill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.al-scope .al-mres__check:disabled { opacity: .4; cursor: not-allowed; }
.al-scope .al-mres__check:focus-visible { outline: 2px solid var(--al-brand); outline-offset: 2px; }

/* Rows: one hairline between rows, as the provider result list */
.al-mres__list { margin-top: 8px; }
.al-mres__row { display: grid; grid-template-columns: 32px 56px minmax(0, 1fr); column-gap: 12px; padding: 18px 0; }
.al-mres__row + .al-mres__row { border-top: 1px solid var(--al-sand-2); }
.al-mres__pick { display: flex; align-items: flex-start; justify-content: center; min-height: 44px; padding-top: 18px; margin-top: -6px; cursor: pointer; }
.al-mres__av {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  background: var(--al-paper); color: var(--al-moss); font: 700 20px/1 var(--al-display);
}
.al-mres__av img { width: 100%; height: 100%; object-fit: cover; }
.al-mres__name { font: 700 18px/1.25 var(--al-display); letter-spacing: -.01em; color: var(--al-ink); }
.al-mres__name a { text-decoration: none; }
@media (hover: hover) { .al-mres__name a:hover { color: var(--al-moss); text-decoration: underline; text-underline-offset: 3px; } }
.al-mres__creds { font: 400 13px/1.3 var(--al-sans); color: var(--al-muted); }
.al-mres__flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.al-mres__flags > span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px;
  font: 600 12.5px/1 var(--al-sans);
}
.al-mres__pct { background: var(--al-paper); color: var(--al-pill); }
.al-mres__warn { background: #FBF1DC; color: #7A4B00; }
.al-mres__warn .al-ico { width: 14px; height: 14px; }
.al-mres__closed { background: #FBECEA; color: #8E2A1E; }
.al-mres__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.al-mres__city { margin-top: 6px; font-size: 14px; color: var(--al-muted); }
.al-mres__why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.al-mres__why li { padding: 5px 10px; border-radius: 999px; background: var(--al-sand); font-size: 12.5px; line-height: 1.25; color: var(--al-body); }
.al-mres__why li.is-neg { background: #FBF1DC; color: #7A4B00; }
.al-mres__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 6px; }
.al-mres__toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; font: 500 13.5px/1.2 var(--al-sans); color: var(--al-muted); }
.al-mres__toggle .al-ico { width: 16px; height: 16px; transition: transform .18s; }
.al-mres__toggle .al-ico.is-open { transform: rotate(180deg); }
@media (hover: hover) { .al-mres__toggle:hover { color: var(--al-ink); } }
.al-mres__view { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; font: 600 14px/1.2 var(--al-sans); color: var(--al-ink); }
.al-mres__view .al-ico { width: 16px; height: 16px; }
@media (hover: hover) { .al-mres__view:hover { color: var(--al-moss); } }
.al-mres__score { margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--al-sand); font-size: 13px; }
.al-mres__score li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.al-mres__pts { flex: none; font: 500 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--al-moss); }
.al-mres__pts.is-neg { color: #7A4B00; }
.al-mres__score li.al-mres__total { margin-top: 6px; padding-top: 8px; font-weight: 600; color: var(--al-ink); }
.al-mres__total .al-mres__pts { color: var(--al-ink); }

/* Contact dialog */
.al-mres__modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  padding: 12px; background: rgba(14, 42, 27, .55);
}
.al-mres__dialog {
  width: 100%; max-width: 480px; max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 20px; background: var(--al-page);
}
.al-mres__dh { font: 700 22px/1.2 var(--al-display); letter-spacing: -.015em; color: var(--al-ink); }
.al-mres__dsub { margin-top: 6px; font-size: 15px; color: var(--al-body); }
.al-mres__fields { position: relative; display: grid; gap: 10px; margin-top: 18px; }
.al-scope .al-mres__in {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 0 18px;
  border: 1px solid var(--al-line); border-radius: 999px; background: #fff; box-shadow: none;
  font: 400 16px/1.3 var(--al-sans); color: var(--al-ink);
}
.al-scope .al-mres__in--area { padding: 12px 18px; border-radius: var(--al-r); resize: vertical; }
.al-scope .al-mres__in::placeholder { color: var(--al-muted); opacity: 1; }
.al-scope .al-mres__in:focus { outline: 2px solid var(--al-brand); outline-offset: 2px; }
.al-mres__privacy { font-size: 13px; line-height: 1.5; color: var(--al-muted); }
.al-mres__err { margin-top: 12px; font-size: 14px; color: #8E2A1E; }
.al-mres__dact { display: flex; gap: 8px; margin-top: 20px; }
.al-mres__dact .al-pill { flex: 1 1 0; min-height: 48px; }

@media (min-width: 640px) {
  .al-mres__send { width: auto; margin-left: auto; }
  .al-mres__send .al-pill { flex: none; }
  .al-mres__modal { align-items: center; padding: 24px; }
  .al-mres__dialog { padding: 28px; }
}
@media (min-width: 921px) {
  .al-mres__head { padding: 48px 0 52px; }
  .al-mres__row { grid-template-columns: 32px 64px minmax(0, 1fr); column-gap: 16px; padding: 22px 0; }
  .al-mres__av { width: 64px; height: 64px; }
  .al-mres__name { font-size: 20px; }
}
