.range-primary,
.range-secondary {
  width: 100%;
  display: block;
  text-align: center;
}

.range-primary {
  margin: -1px 0 2px;
  color: #173965;
  font-size: .78rem;
  font-weight: 400;
}

.range-secondary {
  margin-top: 1px;
  color: #173965;
  font-size: .78rem;
  font-weight: 400;
}

.field-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: var(--blue2);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dual-range {
  --low: 0%;
  --high: 100%;
  position: relative;
  height: 26px;
  margin: 0 3px;
}

.dual-range::before {
  content: "";
  position: absolute;
  top: 11px;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #b8c7d8 0 var(--low), var(--blue2) var(--low) var(--high), #b8c7d8 var(--high) 100%);
}

.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 26px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue2);
  box-shadow: 0 1px 4px rgba(7, 23, 53, .28);
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  cursor: grab;
}

.dual-range input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue2);
  box-shadow: 0 1px 4px rgba(7, 23, 53, .28);
  pointer-events: auto;
  cursor: grab;
}

.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(23, 104, 197, .25);
  outline-offset: 2px;
}

.section-kicker {
  color: var(--ink);
  font-weight: 400;
}

.content-topline h2 {
  font-size: clamp(calc(1.75rem - 21px - 2pt), calc(2.8vw - 21px - 2pt), calc(3.25rem - 21px - 2pt));
  font-weight: 400;
}

.welcome-copy > p:first-child {
  font-weight: 400;
}

.field > span,
.filter-group legend {
  font-weight: 400;
}

.field {
  margin-bottom: 10px;
}

.filter-group {
  margin-bottom: 12px;
}

.compact-field {
  margin-bottom: 7px;
}

.reset-button {
  min-height: 38px;
  margin-top: 3px;
  border: 1px solid var(--blue2);
  border-radius: 6px;
  color: var(--blue);
  background: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.reset-button:hover,
.reset-button:focus-visible {
  color: #fff;
  background: var(--blue2);
  box-shadow: 0 4px 12px rgba(23, 104, 197, .2);
  outline: none;
}

.brand-name {
  color: #174a8b;
  background: none;
  -webkit-text-fill-color: currentColor;
  letter-spacing: -.045em;
  text-shadow: 0 2px 12px rgba(23, 104, 197, .09);
}

.brand-name span:nth-child(1) { color: #194f91; }
.brand-name span:nth-child(2) { color: #df7055; }
.brand-name span:nth-child(3) { color: #168f96; }
.brand-name span:nth-child(4) { color: #6750a4; }
.brand-name span:nth-child(5) { color: #2878b9; }
.brand-name span:nth-child(6) { color: #c75d70; }
.brand-name span:nth-child(7) { color: #248b82; }

.header-actions {
  gap: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.language-control {
  min-height: auto;
  padding: 0 14px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
}

.language-control select,
.field select {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
}

.header-actions > a {
  padding: 0 6px;
  border-left: 1px solid #53657b;
  line-height: 1;
}

.language-control {
  padding-right: 6px;
}

.header-actions > a:last-child {
  padding-right: 0;
}

.header-actions > a:hover,
.header-actions > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-open { overflow: hidden; }

.modal-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 29, 41, .2);
  backdrop-filter: blur(1px);
}

.modal-backdrop[hidden] { display: none; }

.modal-card {
  width: min(420px, 100%);
  padding: 24px 23px 22px;
  border: 1px solid #d8e0e7;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(20, 35, 50, .18);
}

.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.modal-heading h2 { margin: 0; font-size: 22px; font-weight: 400; }
.modal-close { padding: 0 4px; border: 0; background: transparent; color: #27384a; font-size: 22px; line-height: 1; }
.modal-close:hover, .modal-close:focus-visible { color: var(--blue2); outline: none; }

.form-field { display: block; margin-bottom: 16px; }
.form-field > span { display: block; margin-bottom: 8px; color: #263747; font-size: 13px; font-weight: 600; }
.form-field input, .form-field textarea {
  width: 100%;
  border: 1px solid #bdc9d2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 400 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
}
.form-field input { min-height: 45px; padding: 0 12px; }
.form-field textarea { min-height: 112px; padding: 10px 12px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(23, 104, 197, .1); }
.form-note { min-height: 18px; margin: -4px 0 12px; color: #52677e; font-size: 12px; }
.modal-actions { display: flex; gap: 10px; }
.button-primary, .button-secondary { min-height: 36px; padding: 0 17px; border-radius: 7px; font: 400 13px Inter, ui-sans-serif, system-ui, sans-serif; }
.button-secondary { border: 1px solid #bdc9d2; background: #f8fafb; color: #25384b; }
.button-primary { border: 1px solid #d7a18e; background: #fff5f0; color: #98503b; }
.button-secondary:hover, .button-secondary:focus-visible { border-color: #74889a; background: #eef3f6; outline: none; }
.button-primary:hover, .button-primary:focus-visible { border-color: #c67c64; background: #ffece4; outline: none; }

.seeking-filter { margin-top: 1px; }
.seeking-switch { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid #b9cadb; border-radius: 7px; background: #fff; }
.seeking-switch label { min-width: 0; cursor: pointer; }
.seeking-switch label + label { border-left: 1px solid #b9cadb; }
.seeking-switch input { position: absolute; opacity: 0; pointer-events: none; }
.seeking-switch label > span { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #294867; font-size: 13px; transition: color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.seeking-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.seeking-switch input:checked + span { color: #fff; background: var(--blue2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.seeking-switch label:hover > span { background: #e9f2fc; color: #104f99; }
.seeking-switch input:checked + span:hover { color: #fff; background: #155dad; }
.seeking-switch input:focus-visible + span { outline: 3px solid rgba(23,104,197,.22); outline-offset: -3px; }

.mobile-header-tools,
.mobile-bottom-nav,
.mobile-more-filters,
.mobile-intro-splash { display: none; }
.mobile-filter-title { display: none; }
.mobile-seeking-row { display: contents; }
.mobile-seeking-label { display: none; }
.mobile-search-submit { display: block; min-height: 38px; border: 1px solid #1768c5; border-radius: 6px; color: #fff; background: #1768c5; font-size: 12px; cursor: pointer; }
.mobile-search-submit:hover:not(:disabled) { background: #1055a4; }
.mobile-search-submit:disabled { color: #8293a4; background: #e7edf3; border-color: #c5d1dd; cursor: default; }
.search-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; order: 6 !important; }
.search-actions .reset-button { margin: 0; padding: 6px; font-size: 11px; min-height: 38px; }
.search-actions .reset-button:hover { background: #d9e9fa; border-color: #1768c5; color: #104f99; }
.mobile-profile-total { display: none; }
.profile-total[hidden],.mobile-profile-total:empty { display: none; }
.more-profiles { display: block; margin: 18px auto; padding: 10px 24px; border: 1px solid #1768c5; border-radius: 6px; background: #fff; color: #1768c5; cursor: pointer; }
.more-profiles[hidden],.profile-results[hidden] { display: none; }
.search-preferences { padding: 10px; color: #244f77; }
.search-preferences summary { cursor: pointer; }
.search-preferences button { margin-top: 10px; padding: 8px 12px; border: 1px solid #b9cadb; border-radius: 6px; background: #fff; color: #244f77; cursor: pointer; }
.content-panel.has-results .welcome-card,
.content-panel.has-results .empty-explanation { display: none; }
.content-panel { padding-top: 8px; }
.content-topline { position: relative; height: 42px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.content-topline > div:first-child { margin-left: auto; text-align: right; }
.content-topline .profile-total { position: absolute; top: 0; left: 0; order: -1; }
.content-panel.has-results { padding-top: 8px; }
.content-panel.has-results .content-topline > div:first-child { display: none; }
.content-panel.has-results .content-topline { justify-content: flex-start; margin-bottom: 12px; }
.directory-layout:has(.content-panel.has-results) .mobile-intro-splash h2 { display: none; }
.profile-results { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(auto-fill,minmax(min(190px,100%),1fr)); gap: 14px; }
.profile-card { overflow: hidden; border: 1px solid #cfdeec; border-radius: 10px; background: #fff; box-shadow: 0 7px 22px rgba(23,57,91,.08); }
.profile-card-photo { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(145deg,#4b83b7,#79b9b0); font-size: 2rem; font-weight: 700; }
.profile-card-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-card-body { padding: 11px 12px 13px; }
.profile-card-body h3 { margin: 0; color: #102d4b; font-size: 15px; }
.profile-card-meta { margin: 4px 0 0; color: #55708b; font-size: 11px; }
.profile-card-intro { margin: 8px 0 0; color: #29445f; font-size: 11px; line-height: 1.4; }
.profile-total { color: #173965; }
.result-pagination { position: absolute; top: 0; left: 140px; right: 0; display: flex; align-items: center; gap: 16px; min-height: 30px; color: #173965; font-family: inherit; font-size: 1rem; font-weight: 400; }
.result-pagination[hidden] { display: none; }
#result-page { margin-left: auto; white-space: nowrap; }
.page-buttons { display: flex; gap: 5px; }
.page-buttons button { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid #b9cadb; border-radius: 5px; color: #1253a4; background: #fff; line-height: 1; }
.page-buttons svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page-buttons button:hover:not(:disabled) { background: #deedfc; border-color: #1768c5; }
.page-buttons button:disabled { color: #a3b0bd; background: #f1f5f9; cursor: default; }
.profile-results-empty { grid-column: 1 / -1; padding: 24px 14px; color: #49657f; text-align: center; }

@media (min-width: 681px) {
  .app-shell.showing-results { height: auto; min-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
  .showing-results .site-header { flex-shrink: 0; }
  .showing-results .directory-layout { flex: none; min-height: var(--result-main-height,0px); overflow: hidden; }
  .showing-results .filter-panel { min-height: 0; overflow: visible; }
  .showing-results .content-panel { min-height: 0; overflow: hidden; padding-bottom: 16px; }
  .showing-results .profile-results { height: var(--profile-grid-height,auto); gap: 10px; grid-template-columns: repeat(var(--profile-columns,5),minmax(0,1fr)); grid-template-rows: repeat(var(--profile-rows,4),minmax(0,1fr)); }
  .showing-results .profile-card { min-height: 0; display: flex; flex-direction: column; border-radius: 7px; }
  .showing-results .profile-card-photo { flex: 1; min-height: 0; aspect-ratio: auto; }
  .showing-results .profile-card-photo img { object-position: center 35%; }
  .showing-results .profile-card-body { flex-shrink: 0; padding: 7px 9px; }
  .showing-results .profile-card-body h3 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .showing-results .profile-card-meta { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .showing-results .profile-card-intro { display: none; }
  html { scrollbar-gutter: stable; }
  .directory-layout,.content-panel { min-width: 0; }
  .content-panel { width: 100%; }
  .profile-card { min-width: 0; }
  .profile-card-body { overflow-wrap: anywhere; }
  .content-panel:not(.has-results) .content-topline { align-items: center; margin-bottom: 0; }
  .content-panel:not(.has-results) .welcome-card { margin-top: 8px; }
  #people-filters { display: flex; flex-direction: column; }
  #people-filters > .mobile-seeking-row { display: block; order: 0; }
  #people-filters > .field:nth-of-type(1) { order: 1; }
  #people-filters > .field:nth-of-type(2) { order: 2; }
  #people-filters > .field:nth-of-type(3) { order: 3; }
  #people-filters > :not(.field):not(.mobile-seeking-row) { order: 5; }
  #people-filters > .field:nth-of-type(n+4) { order: 5; }
}

@media (max-width: 680px) {
  html,body { height: 100%; overflow: hidden; }
  body { padding: 0; background: #f3f8fd; }
  .app-shell { height: 100dvh; min-height: 0; padding: 74px 0 53px; overflow: hidden; background: #f8fbff; }
  .site-header { position: fixed; z-index: 50; top: 0; right: 0; left: 0; width: 100%; height: 74px; min-height: 74px; padding: 9px 15px; background: #fff; box-shadow: 0 1px 0 #d8e5f1; }
  .brand { transform: translateY(3px); }
  .brand-name { font-size: 1.9rem; letter-spacing: -.045em; }
  .brand-line { display: block; margin-top: 4px; font-size: .66rem; font-weight: 600; }
  .header-actions { display: none; }
  .mobile-header-tools { position: relative; display: flex; align-items: center; }
  .mobile-profile-button { width: 42px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #244f77; }
  .hamburger-bars { width: 24px; display: grid; gap: 5px; }
  .hamburger-bars i { height: 2px; display: block; border-radius: 2px; background: currentColor; }
  .mobile-profile-menu { position: absolute; z-index: 50; top: 47px; right: 0; width: min(315px,calc(100vw - 30px)); padding: 7px; border: 1px solid #cfdeec; border-radius: 11px; background: #fff; box-shadow: 0 18px 45px rgba(29,64,97,.2); }
  .mobile-profile-menu[hidden] { display: none; }
  .mobile-profile-menu a,
  .mobile-profile-menu label { min-height: 56px; padding: 9px 10px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 7px; border-bottom: 1px solid #e7eef5; color: #233f5b; font-size: 13px; }
  .mobile-profile-menu a:last-child { border-bottom: 0; }
  .mobile-profile-menu b { color: #2d679a; font-size: 17px; font-weight: 400; text-align: center; }
  .mobile-profile-menu span { display: block; }
  .mobile-profile-menu small { margin-top: 3px; display: block; color: #72869a; font-size: 9px; }
  .mobile-profile-menu select { max-width: 84px; border: 0; background: transparent; color: #1768c5; font-size: 11px; }
  .directory-layout { height: 100%; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; }
  .mobile-intro-splash { padding: 15px 15px 14px; display: block; border-bottom: 1px solid #d5e3ef; background: linear-gradient(155deg,#f9fcff,#edf6fd); }
  .mobile-intro-splash h2 { margin: 0 0 11px; color: #173653; font-size: 18px; font-weight: 450; line-height: 1.12; letter-spacing: -.025em; }
  .mobile-face-row { position: relative; aspect-ratio: 3 / 1; overflow: hidden; border: 1px solid #cadbea; border-radius: 7px; box-shadow: 0 5px 15px rgba(31,69,104,.08); }
  .mobile-face-row img { position: absolute; top: 50%; left: 0; width: 200%; max-width: none; height: auto; display: block; transform: translateY(-32%); }
  .filter-panel { padding: 12px 16px 18px; border: 0; border-bottom: 1px solid #d7e4f0; background: linear-gradient(155deg,#f9fcff,#edf6fd); }
  .filter-heading { display: none; }
  #people-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
  .mobile-seeking-row { grid-column: 1 / -1; display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 8px; align-items: center; margin-bottom: 11px; }
  .mobile-seeking-label { grid-column: 1; grid-row: 1; display: block; color: #173653; font-size: 14px; font-weight: 500; white-space: nowrap; }
  #people-filters > .field:nth-of-type(1) { grid-column: 1 / -1; }
  #people-filters > .field:nth-of-type(2),
  #people-filters > .field:nth-of-type(3) { grid-column: auto; }
  .mobile-seeking-row .seeking-filter { grid-column: 2; grid-row: 1; margin: 0; }
  .seeking-filter legend { display: none; }
  .range-filter,
  .mobile-more-filters,
  .advanced-mobile-filter,
  .reset-button { grid-column: 1 / -1; }
  .field { margin-bottom: 11px; }
  .field > span,.filter-group legend { font-size: 10px; }
  .field select { min-height: 40px; font-size: 11px; }
  .seeking-switch { width: 80%; margin-left: auto; }
  .seeking-switch label > span { min-height: 34px; font-size: 11px; }
  .seeking-switch svg { width: 16px; height: 16px; }
  .range-filter { margin-top: 3px; }
  .range-filter:not(.height-filter) { display: grid; grid-template-columns: 54px minmax(0,1fr) 42px; align-items: center; column-gap: 8px; margin-bottom: 9px; }
  .range-filter:not(.height-filter) legend { grid-column: 1; grid-row: 1; margin: 0; }
  .range-filter:not(.height-filter) .dual-range { grid-column: 2; grid-row: 1; width: 100%; margin: 0; }
  .range-filter:not(.height-filter) .range-primary { grid-column: 3; grid-row: 1; margin: 0; text-align: right; }
  .range-primary { font-size: 11px; }
  .range-secondary { font-size: 9px; }
  .height-filter { display: none; }
  .mobile-search-submit { grid-column: 1 / -1; min-height: 38px; margin: 0; display: block; border: 1px solid #1768c5; border-radius: 6px; color: #fff; background: #1768c5; font-size: 12px; font-weight: 650; box-shadow: 0 5px 14px rgba(23,104,197,.18); }
  .mobile-search-submit:disabled { border-color: #c5d1dd; color: #8293a4; background: #e7edf3; box-shadow: none; cursor: default; }
  .mobile-more-filters { display: none; }
  .advanced-mobile-filter { display: none; }
  #people-filters.mobile-advanced-open .advanced-mobile-filter { display: block; }
  .reset-button { display: none; }
  .content-panel { display: none; padding: 0; background: #f8fbff; }
  .content-panel.has-results { display: block; padding: 8px 15px 24px; }
  .content-topline { display: none; }
  .content-panel.has-results .content-topline { display: flex; }
  .content-panel.has-results .content-topline { height: 78px; }
  .result-pagination { top: 25px; left: 0; flex-wrap: wrap; gap: 6px; font-size: 10px; }
  .page-buttons button { width: 27px; height: 27px; }
  .search-actions { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .mobile-profile-total { display: block; grid-column: 1 / -1; margin: 0 0 8px; color: #244f77; font-size: 11px; }
  .profile-total { font-size: 10px; }
  .profile-total strong { font-size: 15px; }
  .welcome-card { display: none; }
  .empty-explanation { display: none; }
  .welcome-card img { min-height: 0; max-height: none; aspect-ratio: 3 / 1; object-fit: cover; }
  .welcome-copy { min-height: 0; padding: 14px 15px; }
  .welcome-copy > p:first-child { font-size: 12px; line-height: 1.42; }
  .filter-status { margin-top: 7px; font-size: 10px; }
  .empty-explanation { margin-top: 13px; }
  .empty-explanation article { padding: 12px 14px; }
  .profile-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .profile-card { border-radius: 8px; }
  .profile-card-photo { aspect-ratio: 1; font-size: 1.55rem; }
  .profile-card-body { padding: 8px 9px 10px; }
  .profile-card-body h3 { font-size: 12px; }
  .profile-card-meta,.profile-card-intro { font-size: 9px; }
  .mobile-bottom-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; height: 53px; display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid #ceddea; background: rgba(255,255,255,.98); box-shadow: 0 -7px 24px rgba(28,62,94,.08); }
  .mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #788da1; }
  .mobile-bottom-nav span { font-size: 19px; line-height: 1; }
  .mobile-bottom-nav b { font-size: 10px; font-weight: 500; }
  .mobile-bottom-nav a[aria-current="page"] { color: #1768c5; }
}
