/* Assistance request modal styles. Depends on .modal-backdrop/.modal/.modal-actions
 * from site-nav.css and the page-level --brand-primary / --text variables.
 *
 * The .expert-modal scope overrides any host-page `.modal p` / `.modal h3` rules
 * so the assistance dialog renders the same on the SPA and resource pages. */

:is(.pathway-start-button, .rpk-start-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
  padding: 0.58rem 1rem;
  border: 1px solid #2a6267;
  border-radius: 999px;
  background: linear-gradient(110deg, #19744b, #11695e 62%, #275879);
  color: #fff;
  box-shadow: 0 4px 12px rgba(28, 103, 82, 0.2);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
:is(.pathway-start-button, .rpk-start-button):hover { box-shadow: 0 5px 15px rgba(28, 103, 82, 0.32); }
.pathway-start-button[hidden] { display: none; }
a.pathway-start-button, a.pathway-start-button:hover { color: #fff; text-decoration: none; }
.pathway-start-button::before {
  content: '';
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19.25 4.75 5.6 10.55c-.78.33-.74 1.45.08 1.72l5.13 1.7 1.7 5.13c.27.82 1.39.86 1.72.08l5.8-13.65c.22-.53-.25-1.02-.78-.78Z'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
}
.pathway-start-button[aria-busy="true"] { cursor: progress; }
.pathway-start-button[aria-busy="true"]::before {
  box-sizing: border-box;
  width: 1rem;
  height: 1rem;
  margin: 0.25rem;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  background: none;
}
@media (prefers-reduced-motion: no-preference) {
  .pathway-start-button[aria-busy="true"]::before { animation: expertSubmitSpin 0.7s linear infinite; }
}
:is(.pathway-start-button, .rpk-start-button):focus-visible { outline: 2px solid #176d57; outline-offset: 3px; }

.pathway-start-actions { container: pathway-start / inline-size; }
@container pathway-start (width < 16.25rem) {
  .pathway-start-label-detail { display: none; }
}

.pathway-start-button[data-pathway-considering] {
  border-color: #a6bcb0;
  background: #fff;
  color: #234d3b;
  box-shadow: none;
}
.pathway-start-button[data-pathway-considering]:hover {
  border-color: #6c9a81;
  background: #eef5f0;
}
.pathway-start-button[data-pathway-considering]:not([aria-busy="true"])::before {
  background-color: #396650;
}

.rpk-sheen { position: relative; isolation: isolate; overflow: hidden; }
.rpk-sheen::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -20% auto -20% -55%;
  width: 35%;
  pointer-events: none;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, var(--rpk-sheen, rgba(255, 255, 255, 0.12)), transparent);
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .rpk-sheen::after { transition: left 380ms ease-in-out; }
  .rpk-sheen:hover::after { left: 120%; }
}

@media (prefers-reduced-motion: reduce) {
  .rpk-sheen::after { display: none; }
}

.modal.expert-modal { position: relative; max-height: 88dvh; overflow: hidden; display: flex; flex-direction: column; }
.modal.expert-modal.expert-assistance-dialog { box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain; }
.modal.expert-modal.expert-assistance-dialog > * { flex-shrink:0; min-width:0; }
.modal.expert-modal.expert-assistance-review { max-width: 32rem; }
.modal.expert-modal .expert-dialog-title { margin: 0 0 0.4rem; font-size: 1.45rem; font-weight: 700; line-height: 1.25; }
.modal.expert-modal #assistance-review-title { padding-right: 2.25rem; margin-bottom: 1rem; }
#assistance-review-title:focus { outline: none; }
.modal.expert-modal h3 { font-size: 1.125rem; font-weight: 600; color: var(--text); margin: 0; }
.modal.expert-modal p { font-size: 1rem; color: var(--text); line-height: 1.55; margin: 0; }
.modal.expert-modal p.expert-disclosure { font-size: 0.75rem; color: #666; line-height: 1.5; margin-top: 1rem; }
.modal.expert-modal a { color: var(--brand-primary); }
.modal.expert-modal a:hover { color: var(--brand-primary-hover); }

.expert-pathway-label { display: inline-flex; align-items: center; gap: 0.6rem; width: fit-content; max-width: 100%; margin: 0.35rem 0 1rem; color: #583e09; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; }
.expert-pathway-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 2.125rem; height: 2.125rem; border: 1px solid rgba(154,112,32,0.14); border-radius: 8px; background: #f6efe0; color: #9a7020; }
.expert-pathway-icon svg { width: 1.0625rem; height: 1.0625rem; }
.expert-pathway-name { min-width: 0; overflow-wrap: anywhere; }
.expert-form-pathway { margin-top: 0; margin-bottom: 0.85rem; font-size: 0.875rem; }
.modal.expert-modal .expert-assistance-intro h4 { margin:0; color:var(--text); font-size:0.9375rem; font-weight:650; line-height:1.4; }
.modal.expert-modal p.expert-opt-in-note { margin-top: 0.45rem; color: var(--text-muted, #56586a); font-size: 0.9375rem; line-height: 1.5; }
.expert-disclosure { margin-top: 1rem; font-size: 0.75rem; line-height: 1.5; color: #666; }
.modal.expert-modal label.expert-consent { display: grid; grid-template-columns: 1rem minmax(0, 1fr); align-items: start; column-gap: 0.65rem; margin: 1rem 0 0; padding-top:1rem; border-top:1px solid var(--border, #e6e8e0); font-size: 0.875rem; line-height: 1.5; color: var(--text-muted, #56586a); cursor: pointer; overflow-wrap: anywhere; }
.modal.expert-modal .expert-citizeo-costs + label.expert-consent { margin-top:0; }
.modal.expert-modal label.expert-consent input[type="checkbox"] { justify-self: start; align-self: start; width: 1rem; height: 1rem; margin: 0.15rem 0 0; }
.modal.expert-modal label.expert-consent span { display: block; min-width: 0; }
.expert-consent + .modal-actions { margin-top: 1.25rem; }
.expert-assistance-captcha:not(:empty), .expert-consent-error:not([hidden]) { margin-top: 0.75rem; }
.expert-assistance-captcha:empty { display: none; }
.expert-form-loading { min-height: 12rem; display: flex; align-items: center; justify-content: center; color: var(--text-subtle, #8686a0); }
.modal.expert-modal.expert-modal-morphing { overflow: hidden; will-change: width, height; }
.expert-request-form { display: flex; flex-direction: column; gap: 1rem; min-height: 0; flex: 1; }
.expert-request-form[hidden] { display: none; }
.expert-review-form .stage-renderer { max-width: none; padding: 0; }
/* Preserve the renderer's question hierarchy inside the generic modal styles. */
.modal.expert-modal .stage-renderer-field label { font-size: 0.9375rem; color: var(--text, #1f2338); }
.modal.expert-modal .stage-renderer-field > label { margin-bottom: 0.375rem; }
.modal.expert-modal .stage-renderer :is(.field-desc, .field-help) p { font-size: inherit; line-height: inherit; color: inherit; margin: 0.5rem 0; }
.modal.expert-modal .stage-renderer :is(.field-desc, .field-help) > :first-child { margin-top: 0; }
.modal.expert-modal .stage-renderer :is(.field-desc, .field-help) > :last-child { margin-bottom: 0; }
/* The dialog's generic text-input margin offsets menus and controls anchored
 * to the renderer's select wrappers. The renderer fields own their spacing. */
.modal.expert-modal .stage-renderer input[type="text"],
.modal.expert-modal .stage-renderer input[type="email"] { margin: 0; }
.expert-review-form .sr-fields { min-width: 0; }
.expert-request-modal .expert-review-form .stage-renderer-field { margin-bottom: 1.25rem; }
.modal.expert-modal:has(.expert-review-form .sr-filter-wrap.open, .expert-review-form .sr-multi.open, .expert-review-form .sr-date-wrap.open),
.expert-review-form .expert-request-body:has(.sr-filter-wrap.open, .sr-multi.open, .sr-date-wrap.open) { overflow: visible; }
/* Remove closed menus immediately so their shrinking height cannot briefly
 * enlarge the dialog's scroll area after normal scrolling resumes. */
.expert-review-form .sr-filter-wrap:not(.open) > .sr-dropdown,
.expert-review-form .sr-multi:not(.open) > .sr-dropdown { display: none; }
.modal.expert-modal p.expert-required-note { margin-bottom: 1rem; font-size: 0.8125rem; color: var(--text-muted, #56586a); }
.expert-required-note span { color: #c00; }
.expert-request-modal .expert-review-actions { margin-top: 0; container: expert-review-actions / inline-size; }
.expert-review-actions .sr-actions { width: 100%; margin: 0; align-items: center; }
.expert-review-actions .sr-back-btn { margin-right: auto; }
.expert-review-actions .sr-next-label { white-space: nowrap; }
@container expert-review-actions (max-width: 22rem) {
  .expert-review-actions .sr-next-full-label { display: none; }
  .expert-review-actions .sr-next-compact-label { display: inline-flex; align-items: center; gap: 0.375rem; }
}
.expert-request-modal .expert-review-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.875rem; min-height: 12rem; color: var(--text-muted, #56586a); text-align: center; }
.expert-request-modal .expert-review-loading[hidden] { display: none; }
.expert-review-loading-spinner { width: 2rem; height: 2rem; border: 3px solid rgba(74, 124, 89, 0.18); border-top-color: var(--brand-primary, #4a7c59); border-radius: 50%; animation: expertSubmitSpin 0.7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .expert-review-loading-spinner { animation: none; }
}
.expert-request-header { position: relative; flex: 0 0 auto; padding-right: 2.25rem; }
.modal.expert-modal.expert-request-modal { max-width: 620px; width: calc(100% - 2rem); max-height: min(82vh, 720px); padding: 0; }
.expert-request-modal .expert-request-form { gap: 0; }
.expert-request-modal .expert-request-header { padding: 1.35rem 3.5rem 1rem 1.5rem; border-bottom: 1px solid var(--border, #d9d3c7); }
.modal.expert-modal .expert-request-header h3 { margin: 0 0 0.5rem; }
.modal.expert-modal .expert-submit-btn { min-width: 7rem; display: inline-grid; align-items: center; justify-content: center; }
.modal.expert-modal .expert-submit-btn .expert-submit-label,
.modal.expert-modal .expert-submit-btn .expert-submit-spinner { grid-area: 1 / 1; justify-self: center; align-self: center; }
.modal.expert-modal .expert-submit-btn .expert-submit-spinner { width: 16px; height: 16px; box-sizing: border-box; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; visibility: hidden; }
.modal.expert-modal .expert-submit-btn.is-loading { opacity: 1; pointer-events: none; cursor: wait; }
.modal.expert-modal .expert-submit-btn.is-loading .expert-submit-label { visibility: hidden; }
.modal.expert-modal .expert-submit-btn.is-loading .expert-submit-spinner { visibility: visible; animation: expertSubmitSpin 0.7s linear infinite; }
.expert-request-close {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  top: -0.375rem;
  right: -0.375rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted, #56586a);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.expert-request-close svg { width: 1rem; height: 1rem; }
.expert-request-modal .expert-request-close { top: 0.875rem; right: 1rem; }
.expert-opt-in-close { top: 0.875rem; right: 1rem; }
.expert-request-close:hover,
.expert-request-close:focus-visible { background: rgba(31, 35, 56, 0.07); color: var(--text, #1f2338); outline: none; }
.expert-request-body { flex: 1 1 auto; overflow-y: auto; max-height: 62dvh; min-height: 0; padding-right: 1.125rem; padding-bottom: 1.5rem; margin-right: -1.125rem; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }
.expert-request-modal .expert-request-body { padding: 1.25rem 1.5rem 1.5rem; margin-right: 0; border-bottom: 1px solid var(--border, #d9d3c7); }
.expert-request-modal .modal-actions { padding: 1rem 1.5rem 1.25rem; background: #fff; }
.expert-request-modal [data-intake-back] { margin-right: auto; }
/* Payment scrolls as one dialog, including its header and Back control. */
.modal.expert-modal.expert-checkout-modal { max-width: 480px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.expert-checkout-view { flex: 0 0 auto; min-width: 0; }
.expert-checkout-view .expert-request-body { flex: 0 0 auto; overflow: visible; padding: 1rem; max-height: none; scrollbar-gutter: auto; }
.expert-checkout-view [data-checkout-mount] { min-width: 0; width: 100%; }
.expert-checkout-view [data-checkout-mount][hidden], .expert-checkout-view [data-payment-retry][hidden] { display: none; }
.expert-checkout-view .modal-actions { flex-shrink: 0; justify-content: space-between; gap: 0.75rem; }
.expert-checkout-view [data-checkout-back]:disabled { opacity: 0.55; cursor: wait; }
.expert-request-form > .checkout-summary {
  position: static;
  margin-inline: 1.5rem;
  padding-inline: 0 2rem;
}
.expert-request-form > .checkout-summary,
.checkout-summary:where(:has(.kit-payment-notes)) {
  padding-block-end: .875rem;
  border-block-end: 1px solid var(--border, #d9d3c7);
}
/* Measure the space the payment step actually has, including on the dashboard. */
@media (min-width: 56rem) {
  .modal.expert-modal.expert-checkout-modal:has([data-checkout-mount]:not([hidden]):not(:empty)) {
    container: pathway-payment / inline-size;
    width: min(56rem, calc(100% - 4rem));
    max-width: 56rem;
    padding: 1.5rem;
  }
  .kit-purchase:has([data-checkout-mount]:not([hidden]):not(:empty)) {
    container: pathway-payment / inline-size;
    max-width: 56rem;
  }
}
@container pathway-payment (min-width: 46rem) {
  .expert-checkout-view.checkout-layout, .kit-purchase .checkout-layout {
    display: grid;
    grid-template: "summary fields" auto "back fields" 1fr / minmax(0, .78fr) minmax(0, 1.22fr);
    align-items: start;
    gap: 1rem 1.875rem;
    padding: 1rem .5rem .25rem;
  }
  .checkout-layout > .checkout-summary {
    grid-area: summary;
    position: static;
    min-width: 0;
    margin-inline: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .checkout-layout .expert-request-close { inset: .55rem .65rem auto auto; }
  .checkout-layout .checkout-summary :is(h1, h2, h3) { font-size: 1.7rem; line-height: 1.18; }
  .checkout-layout > .checkout-fields {
    grid-area: fields;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 1.75rem;
    border: 0;
    border-inline-start: 1px solid var(--border, #d9d3c7);
  }
  .checkout-layout > :last-child {
    grid-area: back;
    margin: 0;
    padding: 0;
  }
}
.expert-form-error { padding: 0.625rem 0.75rem; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 0.875rem; line-height: 1.4; }
.modal.expert-modal p.expert-form-intro { font-size: 0.9375rem; color: var(--text-muted, #56586a); margin: 0; }
.expert-contact-grid { display: grid; grid-template-columns: 1fr; gap: 0.875rem; }
.expert-field { display: flex; flex-direction: column; min-width: 0; }
.expert-field-hidden { display: none !important; }
.expert-contact-grid > [hidden] { display: none; }
.expert-field label { display: block; font-size: 0.9375rem; font-weight: 500; line-height: 1.35; color: var(--text, #1f2338); margin-bottom: 0.375rem; text-transform: none; letter-spacing: 0; }
.expert-field label span[aria-hidden="true"] { color: #c00; }
.expert-field label .expert-optional { color: var(--text-muted, #56586a); font-weight: 400; }
.expert-contact-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.expert-contact-field-heading button { padding: 0; border: 0; background: none; color: var(--brand-primary); font: inherit; font-size: 0.8125rem; text-decoration: underline; cursor: pointer; }
.expert-request-modal .stage-renderer-field { margin-bottom: 0; position: relative; padding-left: 1.25rem; }
.expert-request-modal .stage-renderer-field > label::before { content: ''; display: inline-block; width: 0.4375rem; height: 0.4375rem; background: #4a7c59; opacity: 0.75; vertical-align: 0.1em; margin-right: 0.5rem; margin-left: -1.25rem; }
.expert-request-modal .stage-renderer-field label .req { color: #c00; }
.expert-request-modal .field-desc { font-size: 0.875rem; line-height: 1.5; color: #666; margin-bottom: 0.875rem; }
.expert-request-modal .sr-field-body { min-width: 0; }
.expert-field input[type="text"],
.expert-field input[type="email"],
.expert-field input[type="tel"],
.expert-field input[type="number"],
.expert-field input[type="date"],
.expert-field textarea,
.expert-field select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--text, #1f2338);
  box-sizing: border-box;
  margin: 0;
}
.expert-field input:focus,
.expert-field select:focus,
.expert-field textarea:focus { outline: none; border-color: #111; }
.expert-field .custom-select { display: block; width: 100%; --cs-border: #d1d5db; --cs-border-active: #111; --cs-bg: #fff; --cs-text: var(--text, #1f2338); --cs-arrow: var(--text-muted, #56586a); --cs-min-width: 100%; --cs-options-max-width: 100%; --cs-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.expert-field .custom-select-display { width: 100%; min-height: 2.375rem; border-radius: 6px; box-sizing: border-box; }
.expert-field .custom-select.open .custom-select-display { border-radius: 6px 6px 0 0; }
.expert-field .custom-select-options { border-radius: 0 0 6px 6px; z-index: 60; }
.expert-field .custom-select-option.selected::before { content: '✓ '; font-weight: 600; color: #111; margin-right: 0.25rem; }
.expert-contact-picker .custom-select { width: fit-content; max-width: 100%; }
.expert-contact-picker .custom-select-display { font-family: inherit; font-weight: 600; min-height: 2.5rem; cursor: pointer; }
.expert-intake-questions .expert-field.custom-select-field-active { position: relative; z-index: 60; }
.expert-intake-questions .expert-field:has(.custom-select.open) { position: relative; z-index: 60; }
.expert-field .sr-filter-wrap { position: relative; }
.expert-field .sr-filter-wrap.open { z-index: 60; }
.expert-field .sr-filter-wrap input.sr-filter-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--text, #1f2338);
  box-sizing: border-box;
  margin: 0;
}
.expert-field .sr-filter-wrap::after { content: ''; position: absolute; right: 0.75rem; top: 50%; border: 4px solid transparent; border-top: 5px solid var(--text-muted, #56586a); border-bottom: 0; pointer-events: none; transition: transform 0.2s ease; transform: translateY(-50%); }
.expert-field .sr-filter-wrap.open::after { transform: translateY(-50%) rotate(180deg); }
.expert-field .sr-filter-wrap input.sr-filter-input:focus { outline: none; border-color: #111; }
.expert-field .sr-filter-wrap.open input.sr-filter-input { border-radius: 6px 6px 0 0; }
.expert-field .sr-filter-wrap.open.open-up input.sr-filter-input { border-radius: 0 0 6px 6px; }
.expert-field .sr-filter-wrap .sr-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 60;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}
.expert-field .sr-filter-wrap.open .sr-dropdown { max-height: min(320px, 50vh); overflow-y: auto; opacity: 1; box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.expert-field .sr-filter-wrap.open.open-up .sr-dropdown { top: auto; bottom: 100%; border-top: 1px solid #d1d5db; border-bottom: none; border-radius: 6px 6px 0 0; box-shadow: 0 -6px 16px rgba(0,0,0,0.08); }
.sr-dropdown.expert-filter-select-portal {
  position: fixed;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1;
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 1200;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  box-sizing: border-box;
}
.sr-dropdown.expert-filter-select-portal.open-up {
  border-top: 1px solid #d1d5db;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -10px 24px rgba(0,0,0,0.12);
}
.expert-field .sr-dropdown .sr-option,
.sr-dropdown.expert-filter-select-portal .sr-option { padding: 0.5rem 1.75rem 0.5rem 0.75rem; font-size: 0.875rem; cursor: pointer; position: relative; }
.expert-field .sr-dropdown .sr-option:hover,
.expert-field .sr-dropdown .sr-option.highlighted,
.sr-dropdown.expert-filter-select-portal .sr-option:hover,
.sr-dropdown.expert-filter-select-portal .sr-option.highlighted { background: #f3f4f6; }
.expert-field .sr-dropdown .sr-option.selected,
.sr-dropdown.expert-filter-select-portal .sr-option.selected { font-weight: 600; }
.expert-field .sr-dropdown .sr-option.selected::before,
.sr-dropdown.expert-filter-select-portal .sr-option.selected::before { content: '✓ '; font-weight: 600; color: #111; margin-right: 0.25rem; }
.expert-field .sr-dropdown .sr-no-match,
.sr-dropdown.expert-filter-select-portal .sr-no-match { padding: 0.5rem 0.75rem; font-size: 0.8125rem; color: #999; font-style: italic; }
.expert-field .sr-dropdown .sr-option-separator,
.sr-dropdown.expert-filter-select-portal .sr-option-separator { height: 1px; background: #e5e7eb; margin: 0.25rem 0; pointer-events: none; }
.expert-intake-questions .expert-field:has(.sr-filter-wrap.open) { position: relative; z-index: 60; }
.expert-field.sr-error > input,
.expert-field.sr-error > select,
.expert-field.sr-error > textarea,
.expert-field.sr-error .custom-select-display,
.expert-field.sr-error .sr-filter-input,
.expert-field.sr-error .radio-group,
.expert-field.sr-error .checkbox-group { border-color: #c00 !important; box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.expert-field .sr-error-msg { font-size: 0.8125rem; color: #c00; margin-top: 0.25rem; animation: sr-error-in 0.3s ease; }
.expert-intake-questions { display: flex; flex-direction: column; gap: 2.3rem; }
.expert-request-modal .radio-group,
.expert-request-modal .checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; border: 1px solid transparent; border-radius: 6px; padding: 0.125rem 0; }
.expert-request-modal .radio-group label,
.expert-request-modal .checkbox-group label { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; -webkit-user-select: none; user-select: none; margin: 0; }
.modal.expert-request-modal .checkbox-group label { align-items: flex-start; }
.expert-request-modal .radio-group input { margin: 0; }
.expert-request-modal .checkbox-group input[type="checkbox"] { flex: 0 0 1rem; width: 1rem; height: 1rem; font: inherit; margin: calc((1lh - 1rem) / 2) 0 0; }

/* Post-submit success view: animated check-draw on a popping green disc, with
 * a soft halo that scales out behind it. ~700ms total, prefers-reduced-motion
 * collapses to a static icon. */
.expert-success { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1rem 0 1.5rem; }
.expert-success-disc { position: relative; width: 64px; height: 64px; margin-bottom: 1.75rem; }
.expert-success-halo { position: absolute; inset: 0; border-radius: 50%; background: var(--brand-primary); opacity: 0.35; animation: expertSuccessHalo 0.9s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.expert-success-icon { position: relative; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; animation: expertSuccessPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.expert-success-icon svg { width: 36px; height: 36px; }
.expert-success-icon polyline { stroke-dasharray: 30; stroke-dashoffset: 30; animation: expertSuccessDraw 0.4s 0.3s ease-out both; }
.expert-success h3 { margin: 0 0 0.875rem; }
.expert-success p { margin: 0; max-width: 32ch; }
.modal.expert-modal p.expert-account-offer { margin-top: 1rem; color: var(--text-muted, #56586a); font-size: 0.875rem; line-height: 1.5; }
.expert-success-actions { justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.expert-success-actions .btn { margin: 0; }

@keyframes expertSuccessPop { 0% { transform: scale(0.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes expertSuccessDraw { to { stroke-dashoffset: 0; } }
@keyframes expertSuccessHalo { 0% { transform: scale(1); opacity: 0.4; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes expertSubmitSpin { to { transform: rotate(360deg); } }

/* Assistance can render without stage-renderer.css on non-pathway pages.
   Protect every editable field from iOS WebKit's sub-16px focus zoom. */
@supports (-webkit-touch-callout: none) {
  .expert-field input[type="text"],
  .expert-field input[type="email"],
  .expert-field input[type="tel"],
  .expert-field input[type="number"],
  .expert-field input[type="date"],
  .expert-field textarea,
  .expert-field select,
  .expert-field .sr-filter-wrap input.sr-filter-input { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .expert-success-halo { display: none; }
  .expert-success-icon, .expert-success-icon polyline { animation: none; }
  .expert-success-icon polyline { stroke-dashoffset: 0; }
  .modal.expert-modal .expert-submit-btn.is-loading .expert-submit-spinner { animation: none; }
}

@media (max-width: 600px) {
  .modal.expert-modal { max-height: calc(100dvh - 2rem); }
  .modal.expert-modal.expert-assistance-dialog.expert-checkout-modal {
    box-sizing: border-box;
    max-width: none;
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
  .modal-backdrop:has(.expert-request-modal) .modal { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .expert-request-body { max-height: 68dvh; padding-right: 0.875rem; margin-right: -0.875rem; }
  .expert-success-actions { flex-wrap: wrap; }
  .expert-success-actions .btn { flex: 1 1 10rem; }
}

.modal.expert-modal.expert-partner-opt-in,
.modal.expert-modal.expert-provider-loading { box-sizing:border-box; max-width:558px; padding:30px; border:1px solid var(--border, #e6e8e0); border-radius:14px; overflow-y:auto; overscroll-behavior:contain; font-size:15px; line-height:1.55; }
.expert-assistance-loader { display:flex; flex:1; align-items:center; justify-content:center; min-height:200px; }
.expert-assistance-logo { width:56px; height:56px; clip-path:circle(50%); }
.expert-logo-wave { fill:none; stroke:#d1d5db; stroke-width:2.24; stroke-miterlimit:10; animation:expertLogoWave 1.4s ease-in-out infinite; }
.expert-logo-wave:nth-child(2) { animation-delay:.1s; }
.expert-logo-wave:nth-child(3) { animation-delay:.2s; }
.expert-logo-wave:nth-child(4) { animation-delay:.3s; }
.expert-logo-wave:nth-child(5) { animation-delay:.4s; }
.expert-logo-wave:nth-child(6) { animation-delay:.5s; }
.expert-logo-wave:nth-child(7) { animation-delay:.6s; }
@keyframes expertLogoWave { 0%,100% { stroke:#d1d5db; } 30% { stroke:#4a7c59; } 60% { stroke:#d1d5db; } }
@media (prefers-reduced-motion:reduce) { .expert-logo-wave { animation:none; stroke:#4a7c59; } }
.expert-partner-opt-in { --expert-sheet-padding: 30px; }
.modal.expert-partner-opt-in p { font-size:inherit; line-height:inherit; }
.expert-partner-profile { margin-bottom:24px; }
.expert-partner-profile-details { display:flex; align-items:flex-start; gap:18px; }
.expert-partner-logo { display:block; width:auto; max-width:96px; height:47px; flex:0 0 auto; object-fit:contain; object-position:left top; }
.expert-partner-logo[hidden] { display:none; }
.expert-partner-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.expert-partner-opt-in .expert-partner-firm { margin:0; font-size:18px; font-weight:650; letter-spacing:-.025em; line-height:1.35; }
.expert-partner-label { display:block; width:fit-content; margin-bottom:8px; padding:3px 8px; border-radius:4px; background:#edf3ec; color:var(--brand-primary, #4a7c59); font-size:11px; font-weight:600; line-height:1.5; letter-spacing:0; white-space:nowrap; }
.modal.expert-partner-opt-in p.expert-partner-description { margin:14px 0 0; color:var(--text-muted, #61675f); white-space:pre-wrap; overflow-wrap:anywhere; }
.expert-partner-pricing { min-width:0; }
.expert-citizeo-costs { margin:1.35rem 0 1.5rem; padding:1rem 1.1rem; border:1px solid #ccdeed; border-radius:10px; background:#eff6fc; overflow-wrap:anywhere; }
#assistance-review-title + .expert-citizeo-costs,
.expert-partner-profile + .expert-citizeo-costs { margin-top:0; }
.modal.expert-modal p.expert-citizeo-eyebrow { margin:0 0 .4rem; color:#315b7c; font-size:.6875rem; font-weight:700; line-height:1.4; letter-spacing:.08em; text-transform:uppercase; }
.modal.expert-modal .expert-citizeo-costs h4 { margin:0; font-size:.9375rem; font-weight:650; line-height:1.4; }
.modal.expert-modal p.expert-citizeo-summary { margin:.45rem 0 .85rem; color:#315b7c; font-size:.8125rem; line-height:1.5; white-space:pre-line; }
.expert-citizeo-fees { margin:.45rem 0 0; }
.expert-citizeo-fees > div { display:grid; grid-template-columns:minmax(0, 1fr) max-content; align-items:baseline; column-gap:.75rem; row-gap:.15rem; padding:.35rem 0; }
.expert-citizeo-fees > .expert-citizeo-price-only { grid-template-columns:minmax(0, 1fr); }
.expert-citizeo-fees dt { font-size:.875rem; line-height:1.5; }
.expert-citizeo-fees dd { margin:0; display:flex; flex-wrap:wrap; align-items:baseline; gap:.5rem; min-width:0; font-variant-numeric:tabular-nums; }
.expert-citizeo-price-amount { display:inline-flex; align-items:baseline; gap:.5rem; white-space:nowrap; }
.expert-citizeo-refund-badge { appearance:none; display:inline-block; max-width:100%; padding:3px 8px; border:1px solid #655438; border-radius:4px; background:#fffaf2; color:#655438; font-family:inherit; font-size:11px; font-weight:500; line-height:1.5; cursor:help; transition:background-color .15s ease, border-color .15s ease, color .15s ease; }
.expert-citizeo-refund-badge:is(:hover, :focus-visible) { border-color:#816126; background:#fff4e3; color:#6b4d1f; }
.expert-citizeo-refund-badge:focus-visible { outline:2px solid var(--brand-primary, #4a7c59); outline-offset:3px; }
@media (prefers-reduced-motion:reduce) { .expert-citizeo-refund-badge { transition:none; } }
.expert-citizeo-refund-popover { position:fixed; inset:auto; box-sizing:border-box; width:18rem; max-width:calc(100vw - 24px); margin:0; padding:.7rem .85rem; overflow:visible; border:1px solid var(--border, #d9d3c7); border-radius:8px; background:#fff; color:var(--text, #1f2338); box-shadow:0 6px 24px rgba(31,35,56,.16); font-size:.8125rem; font-weight:400; line-height:1.5; text-align:left; }
.expert-citizeo-refund-popover::after { content:""; position:absolute; top:100%; left:var(--refund-arrow-left, 50%); width:8px; height:8px; border-right:1px solid var(--border, #d9d3c7); border-bottom:1px solid var(--border, #d9d3c7); background:#fff; transform:translate(-50%, -4px) rotate(45deg); }
.expert-citizeo-refund-popover.is-below::after { top:auto; bottom:100%; border:0; border-top:1px solid var(--border, #d9d3c7); border-left:1px solid var(--border, #d9d3c7); transform:translate(-50%, 4px) rotate(45deg); }
.expert-citizeo-currency { color:var(--text-muted, #61675f); font-size:.6875rem; letter-spacing:.04em; }
.expert-citizeo-fees dd strong { font-size:1.25rem; font-weight:650; }
.expert-citizeo-fees [data-citizeo-hiring-fee] { color:var(--text-muted, #61675f); }
.expert-citizeo-fees [data-citizeo-hiring-fee] :is(dt, strong) { font-size:.85rem; }
.expert-citizeo-fees [data-citizeo-hiring-fee] strong { font-weight:500; }
.expert-citizeo-regular { font-size:.875rem; font-weight:400; color:var(--text-muted, #61675f); text-decoration-thickness:1px; }
.expert-citizeo-upfront-emphasis dt strong { font-weight:650; }
.expert-citizeo-fees .expert-citizeo-upfront-emphasis dd strong { font-size:1.375rem; color:#234e70; }
.modal.expert-modal .expert-citizeo-total { display:flex; align-items:baseline; justify-content:space-between; gap:.75rem; margin:.6rem 0 0; padding-top:.65rem; border-top:1px solid #ccdeed; color:var(--text, #1f2338); font-size:.875rem; line-height:1.5; }
.expert-citizeo-total-label { flex:1; min-width:0; font-weight:500; }
.expert-citizeo-total-amount { display:flex; flex-shrink:0; align-items:baseline; gap:.45rem; margin-left:auto; white-space:nowrap; font-variant-numeric:tabular-nums; }
.expert-citizeo-total-amount strong { color:#234e70; font-size:1.125rem; font-weight:600; text-align:right; font-variant-numeric:tabular-nums; }
.modal.expert-modal p.expert-citizeo-credit { margin:.4rem 0 0; color:#315b7c; font-size:.8125rem; line-height:1.5; }
.expert-citizeo-costs-deducted .expert-citizeo-fees [data-citizeo-hiring-fee] :is(dt, strong) { font-weight:400; }
.expert-partner-opt-in h4 { font-size:15px; font-weight:650; margin:0 0 8px; line-height:1.4; color:var(--text); }
.modal.expert-partner-opt-in p.expert-partner-no-estimate { color:var(--text-muted, #61675f); }
.expert-partner-process { margin-top:23px; overflow-wrap:anywhere; }
.expert-partner-process strong { font-weight:600; }
.expert-partner-opt-in .modal-actions { justify-content:flex-end; align-items:center; }
@media (max-width:520px) {
  .expert-partner-profile-details { flex-direction:column; gap:16px; }
  .expert-partner-logo { height:40px; }
}
.expert-partner-estimate { overflow-wrap:anywhere; margin-bottom:.6rem; }
.modal.expert-modal .expert-partner-estimate p { white-space:normal; margin:.6rem 0; }
.expert-partner-estimate ul, .expert-partner-estimate ol { margin:.6rem 0; padding-left:1.4rem; }
.expert-partner-estimate li + li { margin-top:.25rem; }
.modal.expert-modal .expert-partner-estimate :is(h1,h2,h3,h4,h5,h6) { font-size:1rem; line-height:1.4; margin:1rem 0 .4rem; }
.expert-partner-estimate blockquote { margin:.75rem 0; padding-left:.75rem; }
.expert-partner-estimate pre { max-width:100%; overflow-x:auto; padding:.75rem; }
.expert-partner-estimate img { max-width:100%; height:auto; }
.expert-partner-estimate table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; margin:.75rem 0; }
.expert-partner-estimate th, .expert-partner-estimate td { text-align:left; vertical-align:top; padding:.4rem .6rem; border-bottom:1px solid #d9d3c7; }
.modal.expert-modal .expert-partner-estimate > :first-child { margin-top:0; }
.modal.expert-modal .expert-partner-estimate > :last-child { margin-bottom:0; }

.modal.expert-modal.expert-assistance-dialog.expert-sheet { padding: 0; overflow: hidden; }
.modal.expert-modal.expert-sheet > .expert-sheet-scroll {
  flex-shrink: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: var(--expert-sheet-cue-height);
}
.expert-sheet-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--expert-sheet-padding, 1.5rem);
}
.expert-sheet { --expert-sheet-cue-height: 3.5rem; }
.expert-sheet-scroll-cue {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  display: grid;
  place-items: center;
  height: var(--expert-sheet-cue-height);
  background: linear-gradient(transparent, #73a9df 85%);
  color: #102d48;
  pointer-events: none;
}
.expert-sheet-scroll-cue[inert] { opacity: 0; visibility: hidden; }
.expert-sheet-scroll-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.expert-sheet-scroll-cue:not([inert]) .expert-sheet-scroll-button { pointer-events: auto; }
.expert-sheet-scroll-button:focus-visible { outline: 2px solid #fff; outline-offset: -1px; }
.expert-sheet-scroll-button svg {
  box-sizing: border-box;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.4375rem;
  border-radius: 50%;
  background: #fff;
}

@media (width > 760px) {
  .modal.expert-modal.expert-assistance-review.expert-sheet { overflow-y: auto; }
  .modal.expert-modal.expert-assistance-review > .expert-sheet-scroll { flex-shrink: 0; overflow: visible; }
  .expert-assistance-review > .expert-sheet-scroll-cue { display: none; }
}
@media (max-width: 760px) {
  .modal.expert-modal.expert-assistance-dialog.expert-sheet,
  .modal.expert-modal.expert-provider-loading.expert-sheet {
    align-self: flex-end;
    width: 100%;
    max-width: none;
    max-height: 100%;
    border: 0;
    border-radius: 18px 18px 0 0;
  }
  .modal.expert-modal.expert-sheet.expert-sheet-full-height { border-radius: 0; }
  .expert-partner-opt-in { --expert-sheet-padding: 1.5rem; }
  .expert-sheet-content {
    padding: max(var(--expert-sheet-padding, 1.5rem), env(safe-area-inset-top))
      max(var(--expert-sheet-padding, 1.5rem), env(safe-area-inset-right))
      max(var(--expert-sheet-padding, 1.5rem), env(safe-area-inset-bottom))
      max(var(--expert-sheet-padding, 1.5rem), env(safe-area-inset-left));
  }
  .expert-sheet .expert-opt-in-close {
    top: max(0.875rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .expert-sheet-scroll-cue { transition: opacity 180ms ease, visibility 180ms; }
  @starting-style {
    .expert-sheet-scroll-cue:not([inert]) { opacity: 0; }
  }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .modal.expert-sheet { animation: expert-sheet-slide-up 180ms ease-out; }
  @keyframes expert-sheet-slide-up {
    from { opacity: 0; transform: translateY(2rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}
