/* Browser-comment refinements loaded after the established staged-Explore styles. */
/* Selected header direction: editorial brand, centered capsule navigation, and a
   measured active pill that glides between labels without assuming equal widths. */
.app-header {
  background:var(--canvas);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

.primary-nav {
  position:relative;
  isolation:isolate;
  overflow:hidden;
}

.primary-nav-toggle {
  display:none;
}

.primary-nav-links {
  display:flex;
  align-items:center;
  gap:clamp(.28rem,.65vw,.42rem);
}

.primary-nav-indicator,
.contribution-section-nav-indicator,
.admin-section-nav-indicator,
.about-section-tab-indicator {
  position:absolute;
  z-index:0;
  top:5px;
  bottom:5px;
  left:0;
  width:var(--nav-indicator-width,var(--contribution-nav-indicator-width,var(--admin-nav-indicator-width,var(--about-nav-indicator-width,0px))));
  border:1px solid color-mix(in srgb,var(--brand) 32%,var(--line-soft));
  border-radius:999px;
  background:var(--brand-soft);
  box-shadow:0 7px 18px color-mix(in srgb,var(--brand) 7%,transparent);
  opacity:0;
  pointer-events:none;
  transform:translate3d(var(--nav-indicator-x,var(--contribution-nav-indicator-x,var(--admin-nav-indicator-x,var(--about-nav-indicator-x,0px)))),0,0);
  transform-origin:left center;
  transition:transform .38s cubic-bezier(.22,1,.36,1),
    width .38s cubic-bezier(.22,1,.36,1),
    opacity .16s ease-out,
    background .2s var(--ease);
}

.primary-nav[data-indicator-ready="true"] .primary-nav-indicator,
.contribution-section-nav[data-indicator-ready="true"] .contribution-section-nav-indicator,
.admin-section-nav[data-indicator-ready="true"] .admin-section-nav-indicator,
.about-section-nav[data-indicator-ready="true"] .about-section-tab-indicator {
  opacity:1;
}

.primary-nav.primary-nav-is-measuring .primary-nav-indicator,
.contribution-section-nav.contribution-section-nav-is-measuring .contribution-section-nav-indicator,
.section-nav-is-measuring :is(.admin-section-nav-indicator,.about-section-tab-indicator) {
  transition:none;
}

.contribution-section-nav-indicator,
.admin-section-nav-indicator,
.about-section-tab-indicator {
  top:.3rem;
  bottom:.3rem;
}

.contribution-section-nav a,
.admin-section-nav a,
.about-section-nav [role="tab"] {
  position:relative;
  z-index:1;
  background:transparent;
  box-shadow:none !important;
  transition:color .2s var(--ease);
}

:is(.contribution-section-nav,.admin-section-nav) a:hover,
:is(.contribution-section-nav,.admin-section-nav) a:focus-visible,
:is(.contribution-section-nav,.admin-section-nav) a[aria-current="page"],
.about-section-nav [role="tab"]:is(:hover,:focus-visible,[aria-selected="true"]) {
  background:transparent;
  color:var(--action-strong);
  box-shadow:none !important;
  transform:none;
}

.primary-nav a {
  z-index:1;
  background:transparent;
  box-shadow:none !important;
  transition:color .2s var(--ease);
}

.primary-nav a::after {
  display:none;
}

.primary-nav a:hover {
  color:var(--action-strong);
  transform:none;
}

.primary-nav a:active {
  transform:none;
}

@media (min-width:901px) {
  .app-header {
    min-height:88px;
    padding:.75rem clamp(1.35rem,3.2vw,2.4rem);
  }

  .brand {
    gap:.85rem;
  }

  .brand-mark svg {
    width:38px;
    height:38px;
  }

  .brand-text {
    width:8.4rem;
  }

  .app-header .brand-name {
    font-size:1.52rem;
    line-height:.94;
    white-space:normal;
  }

  .primary-nav {
    align-self:center;
    min-width:370px;
    min-height:60px;
    gap:0;
    justify-content:center;
    padding:6px 7px;
    border:1px solid var(--line);
    border-radius:999px;
    background:color-mix(in srgb,var(--surface) 76%,var(--panel));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--surface) 80%,transparent);
  }

  .primary-nav a {
    min-height:46px;
    padding:.65rem clamp(1rem,1.65vw,1.35rem);
    border-radius:999px;
    font-size:clamp(.92rem,1.35vw,1.02rem);
  }

  .header-controls {
    min-width:0;
  }

  .account-menu-toggle {
    min-height:52px;
    gap:.6rem;
    padding:.35rem .3rem .35rem .35rem;
  }

  .account-avatar-trigger {
    width:38px;
    height:38px;
    font-size:.78rem;
  }

  #account-menu-toggle .account-trigger-copy {
    display:grid;
  }

  #account-menu-toggle .account-trigger-copy strong {
    font-size:.9rem;
    line-height:1.15;
  }

  #account-menu-toggle .account-trigger-copy small {
    display:none;
  }

  .account-menu-chevron {
    margin-left:.05rem;
  }
}

@media (min-width:641px) and (max-width:900px) {
  .app-header {
    grid-template-columns:minmax(112px,1fr) auto minmax(112px,1fr);
    grid-template-rows:72px;
    min-height:72px;
    gap:clamp(.5rem,1vw,.8rem);
    padding:.35rem clamp(.75rem,2vw,1.1rem);
  }

  .brand {
    grid-column:1;
    grid-row:1;
    width:auto;
    height:auto;
    justify-content:flex-start;
    border-radius:0;
  }

  .brand:hover,
  .brand:focus-visible {
    background:transparent;
  }

  .app-header .brand-mark {
    display:none;
  }

  .app-header .brand-text {
    display:block;
  }

  .brand-wordmark {
    width:clamp(112px,16vw,128px);
  }

  .primary-nav {
    grid-column:2;
    grid-row:1;
    align-self:center;
    justify-self:center;
    width:max-content;
    min-width:0;
    min-height:54px;
    gap:0;
    padding:5px 7px;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:999px;
    background:color-mix(in srgb,var(--surface) 76%,var(--panel));
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--surface) 80%,transparent);
  }

  .primary-nav-indicator {
    display:block;
  }

  .primary-nav a {
    position:relative;
    min-height:42px;
    padding:.55rem clamp(.72rem,1.45vw,.92rem);
    border-radius:999px;
    font-size:clamp(.86rem,1.7vw,.94rem);
  }

  .primary-nav a::after {
    display:none;
  }

  .header-controls {
    grid-column:3;
    grid-row:1;
    justify-self:end;
  }
}

/* Result-list rhythm: reserve the scrollbar lane, keep card content away from
   both edges, and use a stable two-row cadence through tablet widths. */
body[data-view="explore"][data-explore-stage="results"] #results {
  padding-inline:var(--space-3);
  scrollbar-gutter:stable;
}

body[data-view="explore"][data-explore-stage="results"] .result-card {
  gap:.5rem .75rem;
  padding:1rem;
}

body[data-view="explore"][data-explore-stage="results"] .result-identity {
  gap:.25rem;
}

body[data-view="explore"][data-explore-stage="results"] .result-avatar {
  display:grid;
  place-items:center;
  padding:0;
  font-family:var(--font-ui);
  font-weight:600;
  line-height:1;
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .result-title {
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  max-width:100%;
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .result-title .result-title-text {
  display:-webkit-box;
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  overflow-wrap:anywhere;
  line-height:1.2;
  max-height:2.4em;
  text-overflow:ellipsis;
  white-space:normal;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .result-title .result-card-status-markers {
  flex:none;
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .result-title .caution {
  display:inline-grid;
  flex:none;
  margin-inline-start:0;
  place-items:center;
  align-self:center;
  line-height:1;
  vertical-align:middle;
}

/* On compact result panes, keep only the overall score and referral status in
   the scan row. The profile retains the complete rating breakdown. */
@container results-pane (max-width:559px) {
  body[data-view="explore"][data-explore-stage="results"] .result-metrics {
    grid-template-columns:minmax(56px,.9fr) minmax(74px,1.1fr);
    gap:0 .25rem;
    align-items:stretch;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-ratings-section {
    display:block;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-rating-details {
    display:none;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-rating-overall,
  body[data-view="explore"][data-explore-stage="results"] .result-accepting {
    height:100%;
    padding-inline:0;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-accepting {
    grid-column:2;
    grid-row:1;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-distance[data-visible="true"] {
    display:none;
    grid-column:1 / -1;
  }
}

/* At the smallest supported result width, identity copy carries more value
   than the decorative monogram. Reclaim that column for names and status. */
@container results-pane (max-width:359px) {
  body[data-view="explore"][data-explore-stage="results"] .result-card {
    grid-template-columns:18px minmax(0,1fr) 14px;
    column-gap:.5rem;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-avatar {
    display:none;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-identity,
  body[data-view="explore"][data-explore-stage="results"] .result-metrics {
    grid-column:2;
  }

  body[data-view="explore"][data-explore-stage="results"] .result-chevron {
    grid-column:3;
  }
}

@media (prefers-reduced-motion:reduce) {
  .advanced-filters-inner,
  body[data-view="explore"] .advanced-filters-inner {
    transition-duration:.01ms;
  }
}

/* The application header remains the viewport anchor when phone layouts
   switch from the fixed workspace shell to document scrolling. */
body.workspace-active .app-header {
  position:sticky;
  z-index:100;
  top:0;
}

@media (min-width:720px) and (max-width:900px) {
  .account-menu-toggle {
    width:auto;
    min-height:48px;
    gap:.45rem;
    padding:.3rem .15rem .3rem .3rem;
  }

  .account-avatar-trigger {
    width:34px;
    height:34px;
  }

  #account-menu-toggle .account-trigger-copy {
    display:grid;
  }

  #account-menu-toggle .account-trigger-copy strong {
    max-width:112px;
    overflow:hidden;
    font-size:.82rem;
    line-height:1.15;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  #account-menu-toggle .account-trigger-copy small {
    display:none;
  }

  .account-menu-chevron {
    display:block;
  }
}

@media (max-width:640px) {
  .app-header {
    grid-template-columns:44px minmax(0,1fr) 52px;
    grid-template-rows:64px;
    min-height:64px;
    gap:.35rem;
    padding:0 .55rem;
  }

  .app-header .brand {
    grid-column:1;
    grid-row:1;
    width:44px;
    height:44px;
    justify-content:center;
    border-radius:50%;
  }

  .app-header .brand-mark {
    display:inline-flex;
    width:40px;
    height:40px;
  }

  .app-header .brand-text {
    display:none;
  }

  .primary-nav {
    grid-column:2;
    grid-row:1;
    align-self:center;
    justify-self:center;
    display:block;
    width:min(170px,100%);
    min-width:0;
    min-height:44px;
    padding:0;
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }

  .primary-nav-toggle {
    position:relative;
    display:flex;
    width:100%;
    min-height:48px;
    align-items:center;
    justify-content:center;
    gap:0;
    padding:.55rem 2.5rem;
    border:1px solid var(--line);
    border-radius:999px;
    background:color-mix(in srgb,var(--surface) 78%,var(--panel));
    color:var(--action-strong);
    font-family:var(--font-serif);
    font-size:.9rem;
    font-weight:600;
    box-shadow:0 5px 16px rgb(23 37 44 / 4%);
  }

  .primary-nav-toggle:hover:not(:disabled),
  .primary-nav-toggle:focus-visible,
  .primary-nav-toggle[aria-expanded="true"] {
    border-color:color-mix(in srgb,var(--action) 40%,var(--line));
    background:var(--action-soft);
    color:var(--action-strong);
  }

  .primary-nav-toggle > .primary-nav-toggle-chevron {
    position:absolute;
    top:50%;
    right:1rem;
    flex:none;
    transform:translateY(-50%);
    transition:transform .18s cubic-bezier(.22,1,.36,1);
  }

  .primary-nav[data-mobile-open="true"] .primary-nav-toggle > .primary-nav-toggle-chevron {
    transform:translateY(-50%) rotate(180deg);
  }

  .primary-nav-indicator {
    display:none;
  }

  .primary-nav-links {
    position:absolute;
    z-index:60;
    top:calc(100% + 8px);
    left:0;
    display:grid;
    width:100%;
    max-height:0;
    gap:0;
    padding:0 .4rem;
    overflow:hidden;
    border:1px solid transparent;
    border-radius:22px;
    background:color-mix(in srgb,var(--surface) 97%,transparent);
    box-shadow:none;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    clip-path:none;
    transform:none;
    transition:max-height .28s cubic-bezier(.22,1,.36,1),
      padding .28s cubic-bezier(.22,1,.36,1),
      opacity .18s ease-out,
      border-color .18s ease-out,
      box-shadow .24s cubic-bezier(.22,1,.36,1),
      visibility 0s linear .2s;
  }

  .primary-nav[data-mobile-open="true"] .primary-nav-links {
    max-height:240px;
    gap:.2rem;
    padding:.45rem .4rem;
    border-color:var(--line);
    box-shadow:0 16px 38px rgb(23 37 44 / 14%);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:max-height .3s cubic-bezier(.22,1,.36,1),
      padding .3s cubic-bezier(.22,1,.36,1),
      opacity .18s ease-out,
      border-color .18s ease-out,
      box-shadow .24s cubic-bezier(.22,1,.36,1),
      visibility 0s;
  }

  .primary-nav a {
    min-height:44px;
    justify-content:center;
    padding:.65rem .8rem;
    border-radius:11px;
    font-size:.92rem;
    text-align:center;
  }

  .primary-nav a::after {
    display:none;
  }

  .primary-nav a[aria-current="page"] {
    background:var(--action-soft) !important;
    color:var(--action-strong);
  }

  .header-controls {
    grid-column:3;
    grid-row:1;
  }
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-bar {
  border-bottom:0;
  background:transparent;
  box-shadow:none;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) main {
  display:grid;
  grid-template-rows:auto auto;
  align-content:start;
  height:auto;
  min-height:calc(100dvh - 88px);
  overflow:visible;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .filter-bar {
  align-self:start;
  margin:1rem auto 1.5rem;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .explore-hero-copy {
  display:none;
}

.results-panel .result-accepting,
.results-panel .result-accepting.status-unknown {
  align-items:center;
}

.results-panel .result-accepting > svg {
  flex:none;
}

@container results-pane (min-width:1000px) {
  .results-panel .result-metric,
  .results-panel .result-rank {
    gap:.32rem;
    font-size:.82rem;
    font-weight:500;
    line-height:1.25;
  }

  .results-panel .result-metric svg {
    width:19px;
    height:19px;
    shape-rendering:geometricPrecision;
    stroke-width:1.9;
  }
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .result-card.selected,
body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .result-card[aria-current="true"] {
  border:1px solid color-mix(in srgb,var(--action) 42%,var(--line));
  background:color-mix(in srgb,var(--action-soft) 42%,var(--surface));
  box-shadow:none;
  transform:none;
}

body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .result-card.selected::before,
body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .result-card[aria-current="true"]::before {
  display:none;
}

.result-card.is-opening {
  animation:result-selection-cue .2s var(--ease) both;
}

@keyframes result-selection-cue {
  0% { transform:scale(.995); }
  55% { transform:scale(1.002); }
  100% { transform:none; }
}

@keyframes specialist-workspace-out {
  to { opacity:.16; transform:scale(.985); }
}

@keyframes specialist-workspace-in {
  from { opacity:0; transform:scale(.985); }
  to { opacity:1; transform:none; }
}

.refine-entry-row > .refinement-disclosure {
  background:var(--surface);
  transition:border-color .18s var(--ease), background .18s var(--ease),
    color .18s var(--ease), box-shadow .18s var(--ease);
}

.refine-entry-row > .refinement-disclosure:hover,
.refine-entry-row > .refinement-disclosure:focus-visible,
.refine-entry-row > .refinement-disclosure[aria-expanded="true"] {
  background:var(--action-soft);
}

.refine-entry-row .refinement-label-stack {
  transition-duration:.18s;
}

.refinement-label {
  transition:opacity .12s ease-out, transform .18s var(--ease);
}

.filter-count {
  transition:width .18s var(--ease), min-width .18s var(--ease), padding .18s var(--ease),
    opacity .12s ease-out, transform .18s var(--ease);
}

.invite-page-form {
  display:grid;
  gap:1rem;
  padding:1.1rem 1.25rem 1.25rem;
}

.invite-form-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
}

.invite-form-fields > .field {
  align-content:start;
  min-width:0;
}

.invite-email-label-row,
.idv-email-label-row {
  position:relative;
  display:flex;
  align-items:center;
  gap:.28rem;
  width:max-content;
  max-width:100%;
}

.invite-email-label-row > label,
.idv-email-label-row > label { cursor:pointer; }

.field-info-trigger {
  display:inline-grid;
  place-items:center;
  width:28px;
  min-width:28px;
  height:28px;
  min-height:28px;
  margin:-6px 0;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--action);
  box-shadow:none;
}

.field-info-trigger:hover,
.field-info-trigger:focus-visible,
.field-info-trigger[aria-expanded="true"] {
  background:var(--action-soft);
  color:var(--action-strong);
}

.field-info-tooltip {
  position:absolute;
  z-index:8;
  top:calc(100% + .55rem);
  left:0;
  width:min(290px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  padding:.65rem .72rem;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  color:var(--ink-2);
  box-shadow:var(--shadow-2);
  font-size:.7rem;
  font-weight:500;
  line-height:1.45;
  opacity:0;
  pointer-events:none;
  transform:translateY(-4px);
  visibility:hidden;
  transition:opacity .14s var(--ease), transform .14s var(--ease), visibility .14s;
}

.field-info-tooltip::before,
.field-info-tooltip::after {
  position:absolute;
  left:var(--info-arrow-x,24px);
  width:0;
  height:0;
  content:"";
  pointer-events:none;
  transform:translateX(-50%);
}

.field-info-tooltip:not([data-info-placement="above"])::before {
  top:-9px;
  border-right:8px solid transparent;
  border-bottom:9px solid var(--line);
  border-left:8px solid transparent;
}

.field-info-tooltip:not([data-info-placement="above"])::after {
  top:-7px;
  border-right:7px solid transparent;
  border-bottom:8px solid var(--surface);
  border-left:7px solid transparent;
}

.field-info-tooltip[data-info-placement="above"]::before {
  bottom:-9px;
  border-top:9px solid var(--line);
  border-right:8px solid transparent;
  border-left:8px solid transparent;
}

.field-info-tooltip[data-info-placement="above"]::after {
  bottom:-7px;
  border-top:8px solid var(--surface);
  border-right:7px solid transparent;
  border-left:7px solid transparent;
}

.field-info-trigger:hover + .field-info-tooltip,
.field-info-trigger:focus-visible + .field-info-tooltip,
.invite-email-label-row[data-info-open] .field-info-tooltip,
.idv-email-label-row[data-info-open] .field-info-tooltip {
  opacity:1;
  transform:translateY(0);
  visibility:visible;
}

.cpsa-preflight-label-row {
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  width:max-content;
  max-width:100%;
}

.cpsa-preflight-status {
  display:inline-grid;
  place-items:center;
  width:20px;
  min-width:20px;
  height:20px;
  min-height:20px;
  margin:-3px 0;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--muted);
  box-shadow:none;
  font:inherit;
}

.cpsa-preflight-status[data-state="valid"] { color:var(--positive-strong); }
.cpsa-preflight-status[data-state="not_found"] { color:var(--critical); }
.cpsa-preflight-status[data-state="retry"] { color:var(--caution); cursor:pointer; }
.cpsa-preflight-status .invite-submit-spinner { width:13px; height:13px; border-width:1.5px; }
.cpsa-preflight-status svg { width:15px; height:15px; }
.cpsa-preflight-status:hover + .field-info-tooltip,
.cpsa-preflight-status:focus-visible + .field-info-tooltip {
  opacity:1;
  transform:translateY(0);
  visibility:visible;
}

#idv-claim-form .idv-name-fields {
  grid-template-columns:1fr;
  gap:1rem;
}

.idv-provider-consent,
#idv-account-form .auth-consent {
  font-weight:400;
}

.idv-provider-consent > span {
  padding-top:.2rem;
}

.idv-provider-consent a,
#idv-account-form .auth-consent a {
  color:var(--action-strong);
  font-weight:400;
  text-decoration:none;
}

html[data-theme="dark"] .idv-provider-consent a,
html[data-theme="dark"] #idv-account-form .auth-consent a {
  color:var(--action);
}

#idv-brand[hidden],
#idv-lead[hidden] {
  display:none !important;
}

.invite-form-fields input {
  min-height:48px;
}

.invite-field-help,
.invite-field-validation {
  font-size:.7rem;
  line-height:1.4;
}

.invite-field-help {
  color:var(--muted);
  font-weight:400;
}

.invite-field-validation {
  color:var(--critical);
}

.invite-field-validation[hidden] {
  display:none;
}

.invite-form-fields input[aria-invalid="true"] {
  border-color:color-mix(in srgb,var(--critical) 58%,var(--line));
}

input[type="email"][aria-invalid="true"] {
  border-color:color-mix(in srgb,var(--critical) 58%,var(--line));
}

.invite-page-form[data-submission-state="sending"] .invite-form-fields,
.invite-page-form[data-submission-state="sent"] .invite-form-fields {
  color:var(--muted);
}

.invite-page-form .invite-form-fields input:disabled {
  border-color:var(--line-soft);
  background:var(--line-soft);
  color:var(--muted);
  cursor:not-allowed;
}

.invite-form-note {
  margin:0;
  color:var(--muted);
  font-size:.76rem;
  line-height:1.45;
}

.invite-page-form .auth-error {
  margin:0;
}

.invite-form-actions {
  display:flex;
  align-self:start;
  justify-content:flex-end;
  padding-top:1.35rem;
  border-top:0;
}

.invite-form-actions .btn-primary {
  justify-content:center;
  min-width:154px;
  min-height:44px;
}

.invite-form-actions .btn-primary[data-state="sent"] .icon path {
  stroke-width:2.75;
}

.invite-submit-spinner {
  width:16px;
  height:16px;
  flex:none;
  border:2px solid color-mix(in srgb,currentColor 32%,transparent);
  border-top-color:currentColor;
  border-radius:50%;
  animation:invite-submit-spin .7s linear infinite;
}

@keyframes invite-submit-spin {
  to { transform:rotate(360deg); }
}

@media (min-width:1200px) {
  .invite-form-entry-row {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:1rem;
  }

  .invite-form-fields {
    grid-column:span 2;
  }

  .invite-form-actions,
  .invite-form-actions .btn-primary {
    width:100%;
  }
}

@media (max-width:1199px) {
  .invite-form-entry-row {
    grid-template-columns:1fr;
    gap:.85rem;
  }

  .invite-form-actions {
    justify-self:stretch;
    justify-content:center;
    padding-top:0;
  }
}

.invite-history .table-scroll {
  border-top:0;
}

.profile-panel {
  container-name:profile-pane;
  container-type:inline-size;
}

.profile-specialty {
  display:inline-flex;
  align-items:center;
  gap:.4rem;
}

.profile-specialty svg {
  flex:none;
  color:var(--action);
}

@container profile-pane (max-width:680px) {
  .profile-title-meta {
    align-items:flex-start;
    flex-direction:column;
    gap:.35rem;
  }

  .profile-title-meta > *,
  .profile-title-meta .profile-language-line,
  .profile-title-meta .badge {
    min-height:20px;
    margin:0;
    padding-right:0;
    border-right:0;
    font-size:.82rem;
    font-weight:500;
    line-height:1.35;
  }

  .profile-source-line {
    align-items:flex-start;
    flex-direction:column;
    gap:.35rem;
    margin-top:.25rem;
  }

  .profile-source-divider {
    display:none;
  }
}

@media (max-width:700px) {
  .invite-form-actions {
    justify-self:stretch;
    padding-top:0;
  }
}

@media (max-width:639px) {
  .invite-form-fields {
    grid-template-columns:1fr;
  }

  .invite-form-actions .btn-primary {
    width:100%;
    justify-content:center;
  }
}

@media (max-width:520px) {
  body[data-view="explore"] .search-wrap,
  body[data-view="explore"] .search-wrap.has-search-value,
  body[data-view="explore"][data-explore-stage="landing"] .search-wrap,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .search-wrap {
    --search-clear-size:34px !important;
    --search-submit-width:78px;
    --search-submit-edge:6px;
  }

  body[data-view="explore"] .search-submit,
  body[data-view="explore"][data-explore-stage="landing"] .search-submit,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .search-submit {
    right:var(--search-submit-edge);
    min-width:var(--search-submit-width);
    padding-inline:.75rem;
  }

  body[data-view="explore"] .search-wrap .search-clear {
    top:50%;
    right:calc(var(--search-submit-edge) + var(--search-submit-width) + .45rem);
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
    gap:0;
    padding:0;
    border:0;
    background:color-mix(in srgb,var(--surface) 76%,var(--action-soft));
    transform:translateY(-50%);
    transition:opacity .14s ease-out, visibility 0s linear .14s,
      color var(--dur) var(--ease), background var(--dur) var(--ease);
  }

  body[data-view="explore"] .search-wrap.has-search-value .search-clear {
    transform:translateY(-50%);
    transition:opacity .14s ease-out, visibility 0s,
      color var(--dur) var(--ease), background var(--dur) var(--ease);
  }

  body[data-view="explore"] .search-clear > span {
    display:none;
  }

  body[data-view="explore"] .search-clear svg {
    width:19px;
    height:19px;
  }

  body[data-view="explore"] .search-wrap input#search,
  body[data-view="explore"][data-explore-stage="landing"] .search-wrap input#search,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .search-wrap input#search {
    padding-right:calc(var(--search-submit-width) + 1rem);
  }

  body[data-view="explore"] .search-wrap.has-search-value input#search,
  body[data-view="explore"][data-explore-stage="landing"] .search-wrap.has-search-value input#search,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .search-wrap.has-search-value input#search {
    padding-right:calc(var(--search-submit-width) + var(--search-clear-size) + 1.7rem);
  }

  body[data-view="explore"][data-explore-stage="profile"] .profile-header {
    position:relative;
    z-index:auto;
    top:auto;
  }

  .summary-section {
    overflow:visible;
  }

  .summary-section > h3 {
    position:sticky;
    z-index:8;
    top:0;
    border-bottom:1px solid var(--line-soft);
    border-radius:var(--r-md) var(--r-md) 0 0;
    background:var(--surface);
    box-shadow:0 5px 14px rgb(23 37 44 / 7%);
  }
}

/* Search is one persistent control across Explore stages. Its type, overall measure,
   and icon-only clear action no longer change when a query or breakpoint changes. */
body[data-view="explore"] .filter-primary .field-search,
body[data-view="explore"][data-explore-stage="landing"] .filter-primary .field-search,
body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-primary .field-search {
  width:min(100%,860px);
  justify-self:center;
}

body[data-view="explore"] .search-wrap,
body[data-view="explore"] .search-wrap.has-search-value,
body[data-view="explore"][data-explore-stage="landing"] .search-wrap,
body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .search-wrap {
  --search-clear-size:34px !important;
}

body[data-view="explore"] .search-wrap input#search {
  font-family:var(--font-sans) !important;
}

body[data-view="explore"] .search-submit {
  display:block;
  font-family:var(--font-sans) !important;
  font-size:clamp(1rem,calc(.55rem + 1.2vw),1.125rem) !important;
  font-weight:400;
  line-height:1;
}

body[data-view="explore"] .search-wrap .search-clear,
body[data-view="explore"] .search-wrap.has-search-value .search-clear {
  top:50%;
  display:grid;
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  place-items:center;
  gap:0;
  padding:0;
  border:0;
  border-radius:999px;
  background:color-mix(in srgb,var(--surface) 76%,var(--action-soft));
  font-size:0;
  transform:translateY(-50%);
  transition:opacity .14s ease-out, visibility 0s linear .14s,
    color var(--dur) var(--ease), background var(--dur) var(--ease);
}

body[data-view="explore"] .search-wrap.has-search-value .search-clear {
  transition:opacity .14s ease-out, visibility 0s,
    color var(--dur) var(--ease), background var(--dur) var(--ease);
}

body[data-view="explore"] .search-clear > span {
  display:none;
}

body[data-view="explore"] .search-clear svg {
  width:19px;
  height:19px;
}

/* Expanded criteria keep one type scale while the search switches between
   landing and results. Stage-level filter rules must not resize this content. */
body[data-view="explore"] .advanced-filters[aria-hidden="false"] .advanced-filter-fields
  .field:not(.field-search):not(.field-check) > .field-label {
  min-height:17px !important;
  font-size:.73rem !important;
}

body[data-view="explore"] .advanced-filters[aria-hidden="false"] .advanced-filter-fields
  :is(.multi-trigger,.location-field .loc-autocomplete > input) {
  min-height:50px !important;
  font-size:.84rem !important;
}

/* On the closed Explore landing, anchor the search field itself—not the combined
   hero stack—to the center of the flexible space above the trust signals. */
body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .filter-bar {
  position:relative;
  display:grid;
  align-self:stretch;
  grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);
  gap:0;
  margin:0 auto;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .filter-primary {
  display:contents;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .explore-hero-copy {
  grid-row:1;
  align-self:end;
  margin-bottom:clamp(1.15rem,2.4vh,1.75rem);
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .filter-primary .field-search {
  grid-row:2;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .refine-entry-row {
  grid-row:3;
  align-self:start;
  margin-top:clamp(.85rem,1.8vh,1.25rem);
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .advanced-filters {
  position:absolute;
}

body[data-view="explore"][data-explore-stage="landing"] .explore-hero-copy p {
  display:block !important;
}

/* Status and reset context only exists when a real refinement is active.
   Collapse the parent row so its fixed padding cannot leave an empty band. */
.advanced-filter-heading {
  min-height:84px;
  max-height:96px;
  overflow:hidden;
  opacity:1;
  transform:none;
  visibility:visible;
  transition:min-height .18s cubic-bezier(.22,1,.36,1),
    max-height .18s cubic-bezier(.22,1,.36,1),
    padding .18s cubic-bezier(.22,1,.36,1),
    opacity .14s ease-out,
    transform .18s cubic-bezier(.22,1,.36,1),
    visibility 0s;
}

.advanced-filter-heading[data-visible="false"] {
  min-height:0;
  max-height:0;
  padding-top:0;
  padding-bottom:0;
  opacity:0;
  transform:translateY(-6px);
  visibility:hidden;
  pointer-events:none;
  transition:min-height .18s cubic-bezier(.4,0,.6,1),
    max-height .18s cubic-bezier(.4,0,.6,1),
    padding .18s cubic-bezier(.4,0,.6,1),
    opacity .12s ease-out,
    transform .18s cubic-bezier(.4,0,.6,1),
    visibility 0s linear .18s;
}

.sort-filter-section {
  transition:padding-top .18s cubic-bezier(.22,1,.36,1);
}

.advanced-filters-inner:has(> .advanced-filter-heading[data-visible="false"]) > .sort-filter-section {
  padding-top:2.25rem !important;
}

@media (min-width:521px) {
  body[data-view="explore"] .search-wrap .search-clear {
    right:calc(var(--search-submit-edge) + var(--search-submit-width) + .55rem);
  }

  body[data-view="explore"] .search-wrap.has-search-value input#search {
    padding-right:calc(var(--search-submit-width) + var(--search-clear-size) + 1.55rem);
  }
}

@media (max-width:520px) {
  body[data-view="explore"][data-explore-stage="landing"] .explore-hero-copy p {
    max-width:34ch;
    font-size:clamp(.82rem,3.4vw,.95rem);
    line-height:1.4;
  }

  body[data-view="explore"] .filter-primary .field-search,
  body[data-view="explore"][data-explore-stage="landing"] .filter-primary .field-search,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-primary .field-search {
    width:calc(100% - .75rem);
  }

  body[data-view="explore"] .advanced-filters[aria-hidden="false"] .referral-preferences-grid {
    gap:.65rem;
  }
}

/* Keep the landing footer anchored while the criteria panel changes height.
   The expanded state uses the same two-row contract as the closed landing:
   content consumes the flexible row and the trust signature owns the footer row. */
body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) main {
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  align-content:stretch;
  height:100%;
  min-height:0;
  overflow:auto;
}

body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .guardrail-band,
body[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .guardrail-band {
  grid-row:2;
  align-self:end;
  margin-top:0;
}

/* The official wordmark remains artwork. Operational header copy uses Lexend;
   the brand-name wrapper keeps its dedicated brand fallback role. */
.app-header,
.primary-nav a,
#account-menu-toggle,
#account-menu-toggle .account-trigger-copy,
#account-menu-toggle .account-trigger-copy strong,
#account-menu-toggle .account-trigger-copy small {
  font-family:var(--font-sans);
}

@media (max-width:560px) {
  body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
    .advanced-filters[aria-hidden="false"]
  ) main {
    display:flex;
    height:auto;
    min-height:calc(100dvh - 64px);
    padding-bottom:.6875rem;
    overflow:visible;
  }

  body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
    .advanced-filters[aria-hidden="false"]
  ) .filter-bar {
    margin-top:.85rem;
  }

  body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
    .advanced-filters[aria-hidden="false"]
  ) .guardrail-band {
    margin-top:auto;
  }
}

@media (prefers-reduced-motion:reduce) {
  .primary-nav-indicator,
  .contribution-section-nav-indicator,
  .primary-nav a,
  .primary-nav-toggle,
  .primary-nav-toggle svg,
  .primary-nav-links {
    transition-duration:.01ms !important;
  }

  .refine-entry-row > .refinement-disclosure,
  .refine-entry-row .refinement-label-stack,
  .refinement-label,
  .filter-count {
    transition-duration:.01ms !important;
  }
}

/* Browser-review refinement: the disclosure container already animates its
   grid track. Keep the panel itself on a simple opacity fade so nested clip
   and scale transitions cannot fight the layout animation. */
.advanced-filters-inner,
body[data-view="explore"] .advanced-filters-inner {
  clip-path:none;
  transform:none;
  transition:opacity .18s ease-out, box-shadow .24s var(--motion-ease);
}

.advanced-filters[aria-hidden="true"] > .advanced-filters-inner,
body[data-view="explore"] .advanced-filters[aria-hidden="true"] > .advanced-filters-inner {
  opacity:0;
}

.advanced-filters[aria-hidden="false"] > .advanced-filters-inner,
body[data-view="explore"] .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  opacity:1;
}

/* Align the referral switch with the segmented buttons, not with the method
   field's label-plus-control wrapper. */
.referral-preferences-section .accepting-filter-pill,
body[data-view="explore"][data-explore-stage="landing"] .referral-preferences-section .accepting-filter-pill {
  align-self:end;
  height:44px;
  min-height:44px;
  padding-block:0;
}

@media (min-width:641px) and (max-width:900px) {
  .account-menu-toggle {
    width:58px;
    height:48px;
    min-height:48px;
    padding:4px;
  }

  .account-avatar-trigger {
    width:36px;
    height:36px;
    font-size:.76rem;
  }
}

/* Narrow views share one outer rhythm. Scroll-capable panes reserve their own
   scrollbar lane inside that rhythm instead of borrowing from the page edge. */
@media (max-width:640px) {
  .app-header {
    padding-inline:var(--edge-gutter-narrow);
  }

  body[data-view="explore"] .filter-bar,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-bar {
    padding-inline:var(--edge-gutter-narrow);
  }

  body[data-view="explore"][data-explore-stage="landing"] .filter-bar {
    width:calc(100% - 2 * var(--edge-gutter-narrow));
    padding-inline:0;
  }

  body[data-view="explore"] .filter-primary .field-search,
  body[data-view="explore"][data-explore-stage="landing"] .filter-primary .field-search,
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
    .filter-primary .field-search {
    width:100%;
  }

  body[data-view="explore"][data-explore-stage="results"] .results-panel {
    width:calc(100% - 2 * var(--edge-gutter-narrow));
  }

  body[data-view="explore"][data-explore-stage="results"]
    :is(.section-heading,.results-panel .section-heading) {
    padding-inline:0;
  }

  body[data-view="explore"][data-explore-stage="results"] #results.result-list {
    padding-inline:0;
    scrollbar-gutter:stable;
  }

  body[data-view="explore"] .advanced-filters-inner {
    scrollbar-gutter:stable;
  }
}
