/*
 * Canonical responsive shell
 * --------------------------
 * Page structure has exactly three supported modes:
 *   narrow  < 640px
 *   medium  640px–1199px
 *   wide    >= 1200px
 *
 * Component container queries may still protect dense controls inside a mode,
 * but viewport width does not select any additional page composition.
 */

html[data-layout-mode] {
  --motion-fast:160ms;
  --motion-slow:280ms;
  --motion-ease:cubic-bezier(.2,.8,.2,1);
  --refinement-dock-offset:54px;
  --explore-filter-value-font-size:.84rem;
  --unified-refinement-surface:var(--color-action-soft);
  --options-menu-surface:var(--unified-refinement-surface);
  --unified-search-max-width:624px;
  --expanded-panel-top-offset:124px;
  --expanded-panel-edge-inset:calc((var(--mode-header-height) - var(--header-control-size)) / 2);
  --refinement-viewport-height:100dvh;
}

html.refinement-viewport-locked,
body.refinement-viewport-locked {
  overflow:hidden;
  overscroll-behavior:none;
}

html:is([data-theme="dark"],.theme-dark)[data-layout-mode] {
  --options-menu-surface:var(--unified-refinement-surface);
}

html[data-layout-mode="narrow"] {
  --header-control-size:48px;
  --mode-gutter:16px;
  --mode-header-height:64px;
  --mode-search-height:58px;
  --mode-search-width:100%;
  --mode-panel-width:100%;
  --mode-search-icon-inset:16px;
  --mode-search-icon-gap:12px;
  --mode-search-icon-size:22px;
  --explore-filter-value-font-size:.84rem;
}

html[data-layout-mode="medium"] {
  --header-control-size:48px;
  --mode-gutter:24px;
  --mode-header-height:76px;
  --mode-search-height:62px;
  --mode-search-width:min(100%,var(--unified-search-max-width));
  --mode-panel-width:min(100%,960px);
  --mode-search-icon-inset:16px;
  --mode-search-icon-gap:12px;
  --mode-search-icon-size:22px;
}

html[data-layout-mode="wide"] {
  --header-control-size:56px;
  --mode-gutter:32px;
  --mode-header-height:88px;
  --mode-search-height:64px;
  --mode-search-width:min(100%,var(--unified-search-max-width));
  --mode-panel-width:min(100%,960px);
  --mode-search-icon-inset:16px;
  --mode-search-icon-gap:12px;
  --mode-search-icon-size:22px;
}

/* Header chrome is part of the page canvas, not a separate ruled surface. */
html[data-layout-mode] .app-header,
html[data-layout-mode] body.workspace-active .app-header {
  position:sticky;
  z-index:100;
  top:0;
  width:100%;
  height:var(--mode-header-height);
  min-height:var(--mode-header-height);
  align-content:center;
  align-items:center;
  padding-inline:var(--mode-gutter);
  padding-block:0;
  border-bottom:0 !important;
  background:var(--canvas);
  box-shadow:none;
  container-name:app-header;
  container-type:inline-size;
}

html[data-layout-mode] .app-header[hidden] {
  display:none !important;
}

/* Medium and wide share the full navigation composition. */
html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .app-header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  grid-template-rows:1fr;
  align-items:center;
  column-gap:16px;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .app-header .brand {
  display:flex;
  grid-column:1;
  grid-row:1;
  width:auto;
  height:var(--header-control-size);
  justify-self:start;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .app-header .brand-mark {
  display:none;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .app-header .brand-text {
  display:block;
}

html[data-layout-mode="medium"] .app-header .brand-wordmark {
  width:calc(var(--header-control-size) * 394 / 161);
  height:var(--header-control-size);
}

html[data-layout-mode="wide"] .app-header .brand-wordmark {
  width:calc(var(--header-control-size) * 394 / 161);
  height:var(--header-control-size);
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .primary-nav {
  position:relative;
  grid-column:2;
  grid-row:1;
  display:flex;
  width:max-content;
  min-width:0;
  min-height:56px;
  align-self:center;
  justify-self:center;
  justify-content:center;
  margin:0;
  padding:5px 6px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--surface) 76%,var(--panel));
}

html[data-layout-mode="medium"] .primary-nav {
  min-height:52px;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .primary-nav-toggle {
  display:none;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .primary-nav-links {
  position:static;
  z-index:1;
  display:flex;
  width:auto;
  max-height:none;
  align-items:center;
  gap:.25rem;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  opacity:1;
  visibility:visible;
  transform:none;
  pointer-events:auto;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .primary-nav a {
  flex:0 0 auto;
  min-height:42px;
  padding:.55rem .9rem;
  border-radius:999px;
  font-size:.9rem;
  text-align:center;
}

html[data-layout-mode="wide"] .primary-nav a {
  min-height:46px;
  padding:.65rem 1.25rem;
  font-size:1rem;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .header-controls {
  display:block;
  grid-column:3;
  grid-row:1;
  min-width:0;
  max-width:100%;
  justify-self:end;
  margin:0;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .account-menu {
  min-width:0;
  max-width:100%;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle {
  width:max-content;
  max-width:100%;
  height:var(--header-control-size);
  min-height:var(--header-control-size);
  gap:.25rem;
  padding:0;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle .account-avatar-trigger {
  width:var(--header-control-size);
  height:var(--header-control-size);
  font-size:.9rem;
  line-height:1;
  text-align:center;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle .account-trigger-copy {
  min-width:0;
  max-width:100%;
  margin-left:4px;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle .account-trigger-copy strong {
  display:grid;
  gap:0;
  max-width:none;
  overflow:visible;
  overflow-wrap:anywhere;
  font-size:.9rem;
  line-height:1.15;
  text-overflow:clip;
  white-space:normal;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle .account-trigger-copy strong > span {
  line-height:1;
  white-space:nowrap;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle .account-trigger-copy small {
  display:none;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) #account-menu-toggle .account-menu-chevron {
  margin-left:0;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"])
  .app-header.account-label-measuring #account-menu-toggle {
  max-width:none;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"])
  .app-header.account-label-measuring #account-menu-toggle .account-trigger-copy strong {
  overflow-wrap:normal;
  white-space:nowrap;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"])
  .app-header.account-label-compact #account-menu-toggle {
  width:56px;
  max-width:56px;
  height:44px;
  justify-content:center;
  gap:4px;
  padding:0;
}

html:is([data-layout-mode="medium"],[data-layout-mode="wide"])
  .app-header.account-label-compact #account-menu-toggle .account-trigger-copy {
  display:none;
  margin-left:0;
}

html[data-layout-mode="medium"] .app-header,
html[data-layout-mode="medium"] body.workspace-active .app-header {
  column-gap:16px;
  padding-inline:24px;
}

html[data-layout-mode="medium"] .primary-nav a {
  padding-inline:0;
}

@media (min-width:768px) {
  html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .primary-nav-links {
    gap:.5rem;
  }

  html:is([data-layout-mode="medium"],[data-layout-mode="wide"]) .primary-nav a {
    padding-inline:.95rem;
  }

  html[data-layout-mode="wide"] .primary-nav a {
    padding-inline:.95rem;
  }
}

html[data-layout-mode="wide"] .about-section-tabs [role="tab"] {
  padding-inline:.95rem;
}

html[data-layout-mode="wide"] .primary-nav-links {
  gap:.46875rem;
}

html[data-layout-mode="medium"] .about-section-tabs {
  min-height:52px;
}

html[data-layout-mode="medium"] .about-section-tabs [role="tab"] {
  min-height:42px;
  padding:.55rem 0;
  font-size:.9rem;
}

@media (min-width:760px) {
  html[data-layout-mode="medium"] .about-section-tabs [role="tab"] {
    padding-inline:.95rem;
  }
}

html[data-layout-mode="medium"] #account-menu-toggle {
  width:max-content;
  max-width:100%;
  height:var(--header-control-size);
  min-height:var(--header-control-size);
  justify-content:flex-start;
  gap:4px;
  padding:0;
}

html[data-layout-mode="medium"] #account-menu-toggle .account-trigger-copy {
  display:grid;
}

html[data-layout-mode="medium"] #account-menu-toggle .account-avatar-trigger {
  width:var(--header-control-size);
  height:var(--header-control-size);
}

/* Narrow has one cohesive header row and the animated navigation disclosure. */
html[data-layout-mode="narrow"] .app-header {
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 60px;
  grid-template-rows:64px;
  gap:8px;
  align-items:center;
  padding-block:0;
}

html[data-layout-mode="narrow"] .app-header .brand {
  grid-column:1;
  grid-row:1;
  width:var(--header-control-size);
  height:var(--header-control-size);
  justify-content:center;
  padding:0;
}

html[data-layout-mode="narrow"] .app-header .brand-mark {
  display:inline-flex;
  width:var(--header-control-size);
  height:var(--header-control-size);
}

html[data-layout-mode="narrow"] .app-header .brand-text {
  display:none;
}

html[data-layout-mode="narrow"] .primary-nav {
  grid-column:2;
  grid-row:1;
  display:block;
  width:min(100%,196px);
  min-width:0;
  height:var(--header-control-size);
  min-height:var(--header-control-size);
  justify-self:center;
  margin:0;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
}

html[data-layout-mode="narrow"] .primary-nav-toggle {
  position:relative;
  display:flex;
  width:100%;
  height:var(--header-control-size);
  min-height:var(--header-control-size);
  align-items:center;
  justify-content:center;
  gap:0;
  padding:.55rem 2.35rem;
  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-ui);
  font-size:.92rem;
  font-weight:700;
}

html[data-layout-mode="narrow"] .primary-nav-toggle > .primary-nav-toggle-chevron {
  position:absolute;
  top:50%;
  right:1rem;
  transform:translateY(-50%);
}

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

html[data-layout-mode="narrow"] .primary-nav-toggle-icon {
  display:inline-flex;
  width:17px;
  height:17px;
  align-items:center;
  justify-content:center;
  margin-right:8px;
}

html[data-layout-mode="narrow"] .primary-nav-toggle-icon svg {
  width:17px;
  height:17px;
}

html[data-layout-mode="narrow"] .primary-nav-indicator {
  display:none;
}

html[data-layout-mode="narrow"] .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 7px;
  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;
  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;
}

html[data-layout-mode="narrow"] .primary-nav[data-mobile-open="true"] .primary-nav-links {
  max-height:240px;
  gap:3px;
  padding:7px;
  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;
}

html[data-layout-mode="narrow"] .primary-nav a {
  min-height:44px;
  justify-content:center;
  padding:.65rem .8rem;
  border-radius:11px;
  font-size:.9rem;
  text-align:center;
}

html[data-layout-mode="narrow"] .header-controls {
  display:block;
  grid-column:3;
  grid-row:1;
  justify-self:end;
  margin:0;
}

html[data-layout-mode="narrow"] #account-menu-toggle {
  width:56px;
  height:44px;
  min-height:44px;
  justify-content:center;
  gap:4px;
  padding:0;
}

html[data-layout-mode="narrow"] #account-menu-toggle .account-trigger-copy {
  display:none;
}

html[data-layout-mode="narrow"] #account-menu-toggle .account-avatar-trigger {
  width:var(--header-control-size);
  height:var(--header-control-size);
  font-size:.9rem;
  line-height:1;
  text-align:center;
}

html[data-layout-mode="narrow"] #account-menu-toggle .account-menu-chevron {
  display:block;
  width:12px;
  height:12px;
}

/* Preserve the full desktop capsule until it no longer clears the brand and
 * account controls, then switch directly to the disclosure treatment. */
@media (min-width:640px) and (max-width:767px) {
  html[data-layout-mode="medium"] .app-header {
    grid-template-columns:44px minmax(0,1fr) 60px;
    grid-template-rows:64px;
    gap:8px;
    padding-block:0;
  }

  html[data-layout-mode="medium"] .app-header .brand {
    grid-column:1;
    grid-row:1;
    width:var(--header-control-size);
    height:var(--header-control-size);
    justify-content:center;
    padding:0;
  }

  html[data-layout-mode="medium"] .app-header .brand-mark {
    display:inline-flex;
    width:var(--header-control-size);
    height:var(--header-control-size);
  }

  html[data-layout-mode="medium"] .app-header .brand-text {
    display:none;
  }

  html[data-layout-mode="medium"] .primary-nav {
    display:block;
    width:196px;
    height:var(--header-control-size);
    min-height:var(--header-control-size);
    padding:0;
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
  }

  html[data-layout-mode="medium"] .primary-nav-toggle {
    position:relative;
    display:flex;
    width:100%;
    height:var(--header-control-size);
    min-height:var(--header-control-size);
    align-items:center;
    justify-content:center;
    padding:.55rem 2.35rem;
    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-ui);
    font-size:.92rem;
    font-weight:700;
  }

  html[data-layout-mode="medium"] .primary-nav-toggle > .primary-nav-toggle-chevron {
    position:absolute;
    top:50%;
    right:1rem;
    transform:translateY(-50%);
  }

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

  html[data-layout-mode="medium"] .primary-nav-toggle-icon {
    display:inline-flex;
    width:17px;
    height:17px;
    align-items:center;
    justify-content:center;
    margin-right:8px;
  }

  html[data-layout-mode="medium"] .primary-nav-toggle-icon svg {
    width:17px;
    height:17px;
  }

  html[data-layout-mode="medium"] .primary-nav-indicator {
    display:none;
  }

  html[data-layout-mode="medium"] .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 7px;
    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;
    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;
  }

  html[data-layout-mode="medium"] .primary-nav[data-mobile-open="true"] .primary-nav-links {
    max-height:240px;
    gap:3px;
    padding:7px;
    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;
  }

  html[data-layout-mode="medium"] .primary-nav a {
    min-height:44px;
    justify-content:center;
    padding:.65rem .8rem;
    border-radius:11px;
    font-size:.9rem;
    text-align:center;
  }

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

  html[data-layout-mode="medium"] .header-controls {
    display:block;
    grid-column:3;
    grid-row:1;
    justify-self:end;
    margin:0;
  }

  html[data-layout-mode="medium"] #account-menu-toggle {
    width:56px;
    height:44px;
    min-height:44px;
    justify-content:center;
    gap:4px;
    padding:0;
  }

  html[data-layout-mode="medium"] #account-menu-toggle .account-trigger-copy {
    display:none;
  }

  html[data-layout-mode="medium"] #account-menu-toggle .account-avatar-trigger {
    width:var(--header-control-size);
    height:var(--header-control-size);
    font-size:.9rem;
    line-height:1;
    text-align:center;
  }

  html[data-layout-mode="medium"] #account-menu-toggle .account-menu-chevron {
    display:block;
    width:12px;
    height:12px;
  }
}

/* One search component per mode: changing Explore stage only moves it. */
html[data-layout-mode] body[data-view="explore"] .filter-primary .field-search,
html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"] .filter-primary .field-search,
html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-primary .field-search {
  grid-column:1 / -1;
  justify-self:center;
  width:var(--mode-search-width);
}

html[data-layout-mode] body[data-view="explore"] .search-wrap input,
html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"] .search-wrap input,
html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .search-wrap input {
  height:var(--mode-search-height);
  min-height:var(--mode-search-height);
  padding-left:calc(
    var(--mode-search-icon-inset) +
    var(--mode-search-icon-size) +
    var(--mode-search-icon-gap)
  );
  border-radius:999px;
}

html[data-layout-mode] body[data-view="explore"] .search-icon {
  left:var(--mode-search-icon-inset);
  width:var(--mode-search-icon-size);
  height:var(--mode-search-icon-size);
}

html[data-layout-mode] body[data-view="explore"] .search-wrap input#search::placeholder {
  color:var(--faint);
  opacity:.82;
}

/* iOS zooms focused form controls below 16px. Keep the narrow search readable
   without relying on a restrictive viewport-scale declaration. */
html[data-layout-mode="narrow"] body[data-view="explore"] .search-wrap input#search {
  font-size:1rem;
}

/* Search is input-led in every mode: Enter still submits and the conditional
   Clear action occupies the trailing edge. Preserve the established outer
   measures so medium/wide retain breathing room beyond the placeholder. */
html[data-layout-mode] body[data-view="explore"] .search-wrap,
html[data-layout-mode] body[data-view="explore"] .search-wrap.has-search-value {
  --search-submit-width:0px !important;
}

html[data-layout-mode] body[data-view="explore"] .search-submit {
  display:none !important;
}

html[data-layout-mode] body[data-view="explore"] .search-wrap:not(.has-search-value) input#search {
  padding-right:var(--mode-search-icon-inset);
}

html[data-layout-mode] body[data-view="explore"] .filter-bar {
  width:100%;
  padding-inline:var(--mode-gutter);
}

html[data-layout-mode] body[data-view="explore"] .filter-primary {
  display:grid;
  grid-template-columns:minmax(0,1fr);
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded {
  row-gap:15px !important;
}

html[data-layout-mode] body[data-view="explore"] .filter-quick-row {
  justify-content:center;
}

/* Closed landing: center the complete editorial/search/disclosure group. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"] main {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) auto;
  min-height:calc(100dvh - var(--mode-header-height));
  height:auto;
  overflow:visible;
}

html[data-layout-mode="narrow"] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .filter-bar {
  position:relative;
  grid-column:1;
  grid-row:1;
  display:grid;
  align-self:center;
  grid-template-rows:auto auto auto;
  gap:20px;
  width:100%;
  margin:0 auto;
  padding:24px var(--mode-gutter);
}

html[data-layout-mode="narrow"] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .filter-primary {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  margin-top:24px;
}

html[data-layout-mode="narrow"] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .explore-hero-copy,
html[data-layout-mode="narrow"] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .filter-primary .field-search,
html[data-layout-mode="narrow"] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="true"]
) .refine-entry-row {
  grid-row:auto;
  align-self:auto;
  margin:0;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="landing"] .explore-hero-copy {
  display:grid;
  justify-items:center;
  gap:20px;
  text-align:center;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="landing"] .explore-hero-copy h2 {
  font-size:min(clamp(2.55rem,13vw,3.25rem),calc(10.4vw - .25rem));
  line-height:.96;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="landing"] .explore-hero-copy p {
  display:block !important;
  max-width:32ch;
  font-size:.9rem;
  line-height:1.45;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="landing"] .guardrail-band {
  grid-column:1;
  grid-row:2;
  width:calc(100% - (2 * var(--mode-gutter)));
  margin:0 auto 12px;
}

/* Open landing and post-search stages share the same focused top composition. */
html[data-layout-mode] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) {
  display:block;
  height:auto;
  min-height:100dvh;
  overflow-x:hidden;
  overflow-y:auto;
}

html[data-layout-mode] body.workspace-active[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) main {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(min-content,1fr);
  align-content:start;
  height:auto;
  min-height:calc(100dvh - var(--mode-header-height));
  padding-bottom:0;
  overflow:visible;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .filter-bar,
html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-bar {
  grid-column:1 / -1;
  grid-row:1;
  align-self:start;
  width:100%;
  gap:12px;
  margin:0;
  padding:12px var(--mode-gutter) 18px;
  border:0;
  background:var(--canvas);
  box-shadow:none;
}

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

html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .guardrail-band {
  grid-column:1;
  grid-row:2;
  align-self:end;
  margin-top:24px;
}

html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) main {
  min-height:calc(100dvh - var(--mode-header-height));
}

/* The refinement disclosure is one grid-track transition with no dock rewrite. */
html[data-layout-mode] .advanced-filters,
html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"] .advanced-filters {
  position:relative;
  display:grid;
  grid-template-rows:0fr;
  width:var(--mode-panel-width);
  max-height:none !important;
  margin:0 auto !important;
  padding:0 !important;
  overflow:clip;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:grid-template-rows var(--motion-slow) var(--motion-ease),
    opacity var(--motion-fast) ease-out,
    visibility 0s linear var(--motion-slow);
}

html[data-layout-mode] .advanced-filters[aria-hidden="false"],
html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"] .advanced-filters[aria-hidden="false"] {
  grid-template-rows:1fr;
  max-height:none !important;
  margin:calc(-1 * var(--refinement-dock-offset)) auto 0 !important;
  padding:0 !important;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:grid-template-rows var(--motion-slow) var(--motion-ease),
    opacity var(--motion-fast) ease-out,
    visibility 0s;
}

html[data-layout-mode] .advanced-filters-inner,
html[data-layout-mode] body[data-view="explore"] .advanced-filters-inner,
html[data-layout-mode] body[data-view="explore"] .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  min-height:0;
  max-height:none;
  padding-right:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:none;
  opacity:1;
  transform:none;
  clip-path:none;
  transition:box-shadow 240ms cubic-bezier(.22,1,.36,1);
}

html[data-layout-mode] .advanced-filters[aria-hidden="true"] > .advanced-filters-inner {
  border-color:transparent;
  opacity:1;
  visibility:visible;
}

html[data-layout-mode] .advanced-filter-heading {
  min-height:76px;
  max-height:none;
  padding:16px !important;
}

html[data-layout-mode] .advanced-filter-heading[data-visible="false"] {
  min-height:0;
  max-height:0;
  padding:0 !important;
}

html[data-layout-mode] .advanced-filter-fields,
html[data-layout-mode] .advanced-filters-inner > .advanced-filter-section,
html[data-layout-mode] .advanced-filter-columns > .advanced-filter-section,
html[data-layout-mode] .sort-filter-section {
  padding:16px !important;
}

html[data-layout-mode] .advanced-filters-inner:has(
  > .advanced-filter-heading[data-visible="false"]
) > .sort-filter-section {
  padding:42px 16px 16px !important;
}

html[data-layout-mode] .sort-filter-section {
  gap:12px;
  border:0 !important;
}

html[data-layout-mode] .advanced-filter-columns .segment-group > button,
html[data-layout-mode] .referral-preferences-section .referral-segments > button,
html[data-layout-mode] .referral-preferences-section .accepting-filter-pill {
  min-height:44px !important;
}

/* Panel density is selected only by the canonical page mode. */
html[data-layout-mode="wide"] .advanced-filter-fields {
  grid-template-columns:repeat(4,minmax(0,1fr));
}

html[data-layout-mode="wide"] .advanced-filter-columns {
  grid-template-columns:minmax(250px,.78fr) minmax(450px,1.42fr);
}

html[data-layout-mode="medium"] .advanced-filter-fields {
  grid-template-columns:repeat(2,minmax(0,1fr));
}

html[data-layout-mode="medium"] .advanced-filter-columns {
  grid-template-columns:minmax(0,1fr);
}

html[data-layout-mode="narrow"] .advanced-filter-fields,
html[data-layout-mode="narrow"] .advanced-filter-columns,
html[data-layout-mode="narrow"] .referral-preferences-grid {
  grid-template-columns:minmax(0,1fr);
}

html[data-layout-mode="narrow"] .advanced-filter-heading {
  grid-template-columns:minmax(0,1fr);
  min-height:0;
  gap:9px;
  padding:42px 16px 8px !important;
}

html[data-layout-mode="narrow"] .sort-filter-section {
  padding:12px 16px !important;
}

html[data-layout-mode="narrow"] .advanced-filter-fields {
  gap:16px;
}

html[data-layout-mode="narrow"] body[data-view="explore"]
  .advanced-filters[aria-hidden="false"] .advanced-filter-fields {
  padding-top:28px !important;
}

html[data-layout-mode="narrow"] .advanced-filter-close {
  width:100%;
  max-width:none;
}

html[data-layout-mode="narrow"] .referral-preferences-section .accepting-filter-pill {
  justify-self:start;
}

/* Results/profile page structure switches only at the wide boundary. */
html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body.workspace-active[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) {
  display:block;
  height:auto;
  min-height:100dvh;
  overflow-x:hidden;
  overflow-y:auto;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) main {
  display:block;
  width:100%;
  height:auto;
  min-height:calc(100dvh - var(--mode-header-height));
  overflow:visible;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"] .workspace {
  display:grid;
  grid-column:auto;
  grid-row:auto;
  grid-template-columns:minmax(0,1fr);
  width:100%;
  height:auto;
  overflow:visible;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"] .result-list {
  overflow-y:visible;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .results-panel {
  display:none;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-panel,
html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body.workspace-active[data-view="explore"][data-explore-stage="profile"] .profile-panel {
  display:block;
  grid-column:1;
  grid-row:1;
  width:100%;
  height:auto;
  min-height:0;
  margin:0;
  padding:0 var(--mode-gutter) 32px;
  background:var(--canvas);
  overflow:visible;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-button {
  display:inline-flex;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-header {
  margin-block:0;
  margin-inline:calc(var(--mode-gutter) * -1);
  padding:12px var(--mode-gutter) 14px;
  background:var(--canvas);
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-button {
  min-height:34px;
  align-items:center;
  gap:6px;
  padding:6px 11px 6px 4.25px;
  border:1px solid color-mix(in srgb,var(--action) 46%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--action-soft) 62%,var(--surface));
  color:var(--action-strong);
  font-family:var(--font-sans);
  font-size:.76rem;
  font-weight:700;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-button:hover:not(:disabled),
html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-button:focus-visible {
  background:var(--action-soft);
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-row {
  display:flex;
  margin-inline:calc(var(--mode-gutter) * -1);
  padding:12px var(--mode-gutter) 0;
  background:var(--canvas);
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-button svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"] .workspace {
  display:grid;
  grid-column:1 / -1;
  grid-row:2;
  grid-template-columns:430px minmax(0,1fr);
  width:100%;
  min-height:0;
  overflow:hidden;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"] .results-panel {
  display:grid;
  grid-column:1;
  grid-row:1;
  grid-template-rows:auto minmax(0,1fr);
  min-width:0;
  height:100%;
  background:var(--canvas);
  overflow:hidden;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .results-panel .section-heading {
  padding-inline:24px;
  background:var(--canvas);
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .results-panel .result-list {
  padding-inline:24px;
  background:var(--canvas);
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"] .profile-panel {
  display:block;
  grid-column:2;
  grid-row:1;
  min-width:0;
  height:100%;
  padding-inline:24px;
  background:var(--canvas);
  overflow-y:auto;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"] .profile-header {
  margin-inline:-24px;
  padding-inline:24px;
  background:var(--canvas);
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"] .profile-back-button {
  display:none;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"] .profile-back-row {
  display:none;
}

/* One horizontal gutter governs all narrow Explore surfaces. */
html[data-layout-mode="narrow"] body[data-view="explore"]:is(
  [data-explore-stage="results"],
  [data-explore-stage="profile"]
) .filter-bar,
html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="landing"]:has(
  .advanced-filters[aria-hidden="false"]
) .filter-bar {
  padding-inline:var(--mode-gutter);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"] .results-panel {
  width:100%;
  padding-inline:var(--mode-gutter);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"] :is(
  .section-heading,
  .result-list
) {
  padding-inline:0;
}

@media (prefers-reduced-motion:reduce) {
  html[data-layout-mode] .advanced-filters,
  html[data-layout-mode] .advanced-filters-inner {
    transition-duration:.01ms !important;
  }
}

/* Unified search and refinement bar (2026-07-17).
 * The control deliberately has no viewport breakpoints beyond the canonical
 * page modes declared at the top of this file. */
html[data-layout-mode] {
  --unified-bar-motion:240ms;
  --unified-swap-motion:170ms;
  --unified-ease:cubic-bezier(.22,1,.36,1);
  --motion-slow:var(--unified-bar-motion);
  --motion-fast:var(--unified-swap-motion);
  --motion-ease:var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .filter-primary {
  display:block;
  width:var(--mode-search-width);
  max-width:var(--unified-search-max-width);
  margin-inline:auto;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar {
  display:grid;
  grid-template-rows:56px 56px;
  width:100%;
  max-width:var(--unified-search-max-width);
  height:112px;
  margin-inline:auto;
  overflow:hidden;
  border:1px solid var(--color-border-interactive);
  border-radius:32px;
  background:var(--color-surface);
  box-shadow:0 6px 22px rgb(23 37 44 / 5%);
  transition:box-shadow var(--unified-bar-motion) var(--unified-ease),
    border-color var(--unified-swap-motion) var(--unified-ease),
    border-radius var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar:focus-within {
  border-color:color-mix(in srgb,var(--color-action) 55%,var(--color-border));
  box-shadow:0 7px 24px rgb(36 59 83 / 9%);
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded .unified-search-bar {
  border-radius:32px 32px 0 0;
  box-shadow:0 4px 16px rgb(23 37 44 / 4%);
}

html[data-layout-mode] body[data-view="explore"]:is(
  [data-explore-stage="results"],
  [data-explore-stage="profile"]
) .filter-bar .unified-search-bar,
html[data-layout-mode] body[data-view="explore"]:is(
  [data-explore-stage="results"],
  [data-explore-stage="profile"]
) .filter-bar .unified-search-bar:focus-within {
  box-shadow:none;
  transition:grid-template-rows var(--unified-bar-motion) var(--unified-ease),
    height var(--unified-bar-motion) var(--unified-ease),
    border-color var(--unified-swap-motion) var(--unified-ease),
    border-radius var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .field-search {
  display:block;
  grid-column:1 !important;
  grid-row:1 !important;
  justify-self:stretch;
  width:auto;
  min-width:0;
  min-height:56px;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .field-search > .field-label {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-wrap,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-wrap input#search {
  width:100%;
  height:56px;
  min-height:56px;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-wrap input#search {
  border:0;
  border-radius:0;
  background:var(--color-surface);
  box-shadow:none;
  font-size:1.05rem;
}

html[data-layout-mode="narrow"] body[data-view="explore"] .unified-search-bar .search-wrap input#search {
  font-size:1rem;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refine-entry-row {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-column:1 !important;
  grid-row:2 !important;
  align-items:stretch;
  justify-content:center;
  gap:0;
  min-height:48px;
  max-height:none;
  margin:0 !important;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:var(--unified-refinement-surface);
  transition:background var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refine-entry-row::before {
  position:absolute;
  z-index:3;
  top:0;
  right:0;
  left:0;
  height:1px;
  background:var(--color-border-subtle);
  content:"";
  pointer-events:none;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-disclosure {
  position:absolute;
  z-index:1;
  inset:0;
  display:block;
  width:100%;
  min-width:0;
  min-height:48px;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:var(--color-action-strong);
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transition:background var(--unified-swap-motion) var(--unified-ease),
    color var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-disclosure:hover,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-disclosure:focus-visible,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-disclosure:active {
  border:0;
  background:color-mix(in srgb,var(--color-action) 10%,transparent);
  color:var(--color-action-strong);
  box-shadow:none;
  transform:none;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refine-entry-row:has(
  .refinement-disclosure:is(:hover,:focus-visible,:active)
) .refinement-disclosure-content {
  color:var(--color-action-strong);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-disclosure-content {
  position:relative;
  z-index:2;
  display:flex;
  grid-column:1;
  grid-row:1;
  align-items:center;
  align-self:center;
  justify-content:center;
  justify-self:center;
  gap:8px;
  min-width:0;
  color:var(--color-action-strong);
  pointer-events:none;
  transition:margin var(--unified-swap-motion) var(--unified-ease),
    transform var(--unified-swap-motion) var(--unified-ease),
    color var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-disclosure-copy {
  display:grid;
  flex:none;
  min-width:0;
  place-items:center;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-label {
  color:currentColor;
  font-size:1.05rem;
  line-height:1;
}

html[data-layout-mode="narrow"] body[data-view="explore"] .unified-search-bar .refinement-label {
  font-size:1rem;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-filter-icon {
  position:relative;
  display:grid;
  flex:none;
  place-items:center;
  width:20px;
  height:20px;
}

html[data-layout-mode] body[data-view="explore"] .refinement-filter-glyph,
html[data-layout-mode] body[data-view="explore"] .refinement-dismiss-glyph {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  transition:opacity var(--unified-swap-motion) var(--unified-ease),
    transform var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .refinement-dismiss-glyph {
  width:16px;
  height:16px;
  margin:2px;
  border-radius:50%;
  background:var(--color-action);
  color:var(--on-action);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--color-action-strong) 32%,transparent);
  opacity:0;
  transform:scale(.68) rotate(-35deg);
}

html[data-layout-mode] body[data-view="explore"] .refinement-dismiss-glyph svg [stroke] {
  stroke-width:2.4;
}

html[data-layout-mode] body[data-view="explore"] .refinement-dismiss-glyph svg {
  width:10px;
  height:10px;
}

html[data-layout-mode] body[data-view="explore"] .refine-entry-row:has(
  .refinement-disclosure[aria-expanded="true"]
) .refinement-filter-glyph {
  opacity:0;
  transform:scale(.72) rotate(30deg);
}

html[data-layout-mode] body[data-view="explore"] .refine-entry-row:has(
  .refinement-disclosure[aria-expanded="true"]
) .refinement-dismiss-glyph {
  opacity:1;
  transform:none;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refinement-chevron {
  flex:none;
  margin:0 0 3px 6px;
  transition:transform var(--unified-swap-motion) var(--unified-ease),
    margin var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refine-entry-row:has(
  .refinement-disclosure[aria-expanded="true"]
) .refinement-chevron {
  margin-top:3px;
  transform:rotate(225deg);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .filter-count {
  display:inline-grid;
  place-items:center;
  width:auto;
  max-width:0;
  min-width:0;
  height:20px;
  margin:0;
  padding:0 !important;
  overflow:hidden;
  font-size:.75rem;
  line-height:1;
  text-align:center;
  opacity:0;
  transform:translateX(-4px) scale(.88);
  white-space:nowrap;
  visibility:hidden;
  transition:max-width var(--unified-swap-motion) var(--unified-ease),
    padding var(--unified-swap-motion) var(--unified-ease),
    opacity var(--unified-swap-motion) var(--unified-ease),
    transform var(--unified-swap-motion) var(--unified-ease),
    visibility 0s linear var(--unified-swap-motion);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .filter-count[data-visible="true"] {
  width:20px;
  max-width:20px;
  min-width:20px;
  padding:0 !important;
  opacity:1;
  transform:none;
  visibility:visible;
  transition:opacity var(--unified-swap-motion) var(--unified-ease),
    transform var(--unified-swap-motion) var(--unified-ease),
    max-width var(--unified-swap-motion) var(--unified-ease),
    padding var(--unified-swap-motion) var(--unified-ease),
    visibility 0s;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .advanced-filter-reset {
  position:relative;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  width:auto;
  max-width:0;
  min-width:0;
  min-height:48px;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--color-text-subtle);
  font-size:.78rem;
  font-weight:600;
  opacity:0;
  visibility:hidden;
  transform:translateX(-6px);
  white-space:nowrap;
  pointer-events:none;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transition:max-width var(--unified-swap-motion) var(--unified-ease),
    min-width var(--unified-swap-motion) var(--unified-ease),
    margin-right var(--unified-swap-motion) var(--unified-ease),
    padding var(--unified-swap-motion) var(--unified-ease),
    opacity var(--unified-swap-motion) var(--unified-ease),
    transform var(--unified-swap-motion) var(--unified-ease),
    background var(--unified-swap-motion) var(--unified-ease),
    visibility 0s linear var(--unified-swap-motion);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .advanced-filter-reset[data-visible="true"] {
  max-width:92px;
  min-width:36px;
  margin-right:14px;
  padding:0 10px 0 8px;
  opacity:1;
  visibility:visible;
  transform:none;
  pointer-events:auto;
  transition:max-width var(--unified-swap-motion) var(--unified-ease),
    min-width var(--unified-swap-motion) var(--unified-ease),
    margin-right var(--unified-swap-motion) var(--unified-ease),
    padding var(--unified-swap-motion) var(--unified-ease),
    opacity var(--unified-swap-motion) var(--unified-ease),
    transform var(--unified-swap-motion) var(--unified-ease),
    background var(--unified-swap-motion) var(--unified-ease),
    visibility 0s;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .refine-entry-row:has(
  .advanced-filter-reset[data-visible="true"]
) .refinement-disclosure-content {
  justify-self:start;
  margin-left:calc(
    var(--mode-search-icon-inset) +
    var(--mode-search-icon-size) +
    var(--mode-search-icon-gap)
  );
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .advanced-filter-reset:hover,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .advanced-filter-reset:focus-visible,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .advanced-filter-reset:active {
  border:0;
  background:color-mix(in srgb,var(--color-action) 10%,transparent);
  color:var(--color-action-strong);
  transform:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"] .unified-search-bar .reset-filter-label {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"] .unified-search-bar .advanced-filter-reset[data-visible="true"] {
  max-width:42px;
  padding-inline:8px;
}

html[data-layout-mode] body[data-view="explore"] .advanced-filters[aria-hidden="false"] {
  margin:-1px auto 0 !important;
  border-radius:0 0 32px 32px;
  box-shadow:none;
  transition:grid-template-rows var(--unified-bar-motion) var(--unified-ease),
    opacity var(--unified-swap-motion) var(--unified-ease),
    visibility 0s;
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded {
  --unified-expanded-border:var(--color-border);
  position:relative;
  z-index:70;
  row-gap:0 !important;
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded
  .unified-search-bar .refinement-disclosure {
  background:color-mix(in srgb,var(--control-selected-soft) 72%,transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--color-action) 46%,transparent);
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded:focus-within {
  --unified-expanded-border:color-mix(in srgb,var(--color-action) 55%,var(--color-border));
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded .unified-search-bar,
html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded
  .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  border-color:var(--unified-expanded-border);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage] .filter-bar.refine-is-expanded
  > .advanced-filters[aria-hidden="false"] {
  margin:-1px auto 0 !important;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage] .advanced-filters {
  width:var(--mode-search-width);
  max-width:var(--unified-search-max-width);
  max-height:var(--refinement-collapse-height,none) !important;
  overflow:clip;
  opacity:1;
  isolation:isolate;
  visibility:visible;
  transition:grid-template-rows var(--unified-bar-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage]
  .advanced-filters[aria-hidden="false"] {
  opacity:1;
  visibility:visible;
  transition:grid-template-rows var(--unified-bar-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .advanced-filters-inner,
html[data-layout-mode] body[data-view="explore"] .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  border-top-width:0;
  border-radius:0 0 32px 32px;
  background:var(--options-menu-surface);
}

html[data-layout-mode] body[data-view="explore"] .advanced-filter-footer {
  --advanced-filter-footer-height:68px;
  position:sticky;
  z-index:6;
  order:5;
  bottom:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:var(--advanced-filter-footer-height);
  padding:10px 16px max(10px,env(safe-area-inset-bottom));
  border-top:1px solid var(--color-border-subtle);
  border-radius:0 0 31px 31px;
  background:color-mix(in srgb,var(--options-menu-surface) 94%,var(--surface));
  box-shadow:0 -10px 18px -10px rgb(23 37 44 / 34%);
}

html:is([data-theme="dark"],.theme-dark)[data-layout-mode] body[data-view="explore"]
  .advanced-filter-footer {
  box-shadow:0 -10px 20px -10px rgb(0 0 0 / 72%);
}

html[data-layout-mode] body[data-view="explore"] #advanced-filter-live-application {
  color:var(--color-text-muted);
  font-size:.72rem;
  font-weight:500;
}

html[data-layout-mode] body[data-view="explore"] .advanced-filter-done {
  flex:none;
  justify-content:center;
  min-width:104px;
  min-height:42px;
  margin:0;
}

html[data-layout-mode="narrow"] body[data-view="explore"] .advanced-filter-footer {
  --advanced-filter-footer-height:64px;
  gap:10px;
  padding-inline:12px;
}

html[data-layout-mode="narrow"] body[data-view="explore"] #advanced-filter-live-application {
  font-size:.68rem;
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded
  > .advanced-filters[aria-hidden="false"] {
  filter:drop-shadow(0 20px 18px rgb(23 37 44 / 20%));
}

html:is([data-theme="dark"],.theme-dark)[data-layout-mode] body[data-view="explore"]
  .filter-bar.refine-is-expanded > .advanced-filters[aria-hidden="false"] {
  filter:drop-shadow(0 20px 20px rgb(0 0 0 / 48%));
}

html[data-layout-mode] body[data-view="explore"]
  .advanced-filters[aria-hidden="true"] > .advanced-filters-inner {
  border-width:0;
  background:transparent;
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded:not(.refine-is-settled)
  .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  border-bottom-color:transparent;
}

html[data-layout-mode] body[data-view="explore"] .advanced-filters
  :is(button,input,[role="radio"],[role="checkbox"]) {
  -webkit-tap-highlight-color:transparent;
}

html[data-layout-mode] body[data-view="explore"] .advanced-filters button:active:not(:disabled) {
  transform:none;
}

html[data-layout-mode="wide"] body[data-view="explore"] .advanced-filter-fields {
  grid-template-columns:repeat(2,minmax(0,1fr));
}

html[data-layout-mode="wide"] body[data-view="explore"] .advanced-filter-columns {
  grid-template-columns:minmax(0,1fr);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"]:has(.advanced-filters[aria-hidden="false"]) .filter-bar,
html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"]) .filter-bar {
  padding-top:12px;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar {
  --viewport-frame-inline-extension:max(
    0px,
    calc((100vw - (2 * var(--mode-gutter)) - 89vw) / 2)
  );
  position:sticky;
  z-index:30;
  top:var(--mode-header-height);
  width:89%;
  margin-inline:auto;
  padding-inline:0;
  background:transparent;
  isolation:isolate;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar::before {
  position:absolute;
  z-index:-1;
  inset-block:0;
  inset-inline:calc(-1 * var(--viewport-frame-inline-extension));
  background:var(--canvas);
  content:"";
  pointer-events:none;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-primary {
  --viewport-control-width:min(
    var(--unified-search-max-width),
    calc(100% + (2 * var(--viewport-frame-inline-extension)))
  );
  width:var(--viewport-control-width);
  margin-inline:calc((100% - var(--viewport-control-width)) / 2);
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"] main {
  overflow-anchor:none;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar > .advanced-filters {
  position:absolute;
  z-index:29;
  top:var(--expanded-panel-top-offset);
  left:50%;
  margin:0 !important;
  transform:translateX(-50%);
}

html[data-layout-mode="narrow"]
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar > .advanced-filters {
  width:calc(100% + (2 * var(--viewport-frame-inline-extension)));
}

html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar .advanced-filters[aria-hidden="false"] {
  max-height:calc(var(--refinement-viewport-height) - var(--mode-header-height) - var(--expanded-panel-top-offset) - var(--expanded-panel-edge-inset)) !important;
}

html[data-layout-mode] body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  max-height:calc(var(--refinement-viewport-height) - var(--mode-header-height) - var(--expanded-panel-top-offset) - var(--expanded-panel-edge-inset));
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

html[data-layout-mode] body[data-view="explore"] .filter-bar.refine-is-expanded .filter-primary {
  position:sticky;
  z-index:30;
  top:calc(var(--mode-header-height) + 12px);
}

html[data-layout-mode="wide"] body[data-view="explore"] .filter-bar.refine-is-expanded .filter-primary {
  top:12px;
}

@media (prefers-reduced-motion:reduce) {
  html[data-layout-mode] body[data-view="explore"] :is(.unified-search-bar,.advanced-filters,.refinement-label,.refinement-chevron,.filter-count,.advanced-filter-reset) {
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
  }
}

/* Annotation follow-through: shared gutters, connected profile cards, and
 * the responsive result-to-profile handoff all use the canonical mode tokens. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage] .filter-bar {
  padding-bottom:12px;
}

html[data-layout-mode] body[data-view="explore"]:is(
  [data-explore-stage="results"],
  [data-explore-stage="profile"]
) .filter-bar {
  row-gap:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage] .filter-bar.refine-is-expanded
  .unified-search-bar {
  border-bottom-color:var(--unified-refinement-surface);
  box-shadow:none;
}

html:is([data-theme="dark"],.theme-dark)[data-layout-mode] body[data-view="explore"][data-explore-stage]
  .filter-bar.refine-is-expanded .unified-search-bar {
  box-shadow:none;
}

html[data-layout-mode] body[data-view="explore"]
  .filter-bar.refine-is-expanded.refinement-content-is-scrolled
  .unified-search-bar {
  box-shadow:0 9px 14px -12px rgb(23 37 44 / 42%);
}

html[data-theme="dark"][data-layout-mode] body[data-view="explore"]
  .filter-bar.refine-is-expanded.refinement-content-is-scrolled .unified-search-bar,
html.theme-dark[data-layout-mode] body[data-view="explore"]
  .filter-bar.refine-is-expanded.refinement-content-is-scrolled .unified-search-bar {
  box-shadow:0 9px 14px -12px rgb(0 0 0 / 88%);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar
  .advanced-filter-reset[data-visible="true"] {
  margin-right:calc(
    var(--mode-search-icon-inset) +
    var(--mode-search-icon-size) +
    var(--mode-search-icon-gap)
  );
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar > .advanced-filters[aria-hidden="false"] {
  max-height:calc(var(--refinement-viewport-height) - var(--mode-header-height) - var(--expanded-panel-top-offset) - var(--expanded-panel-edge-inset)) !important;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"]:is([data-explore-stage="results"],[data-explore-stage="profile"])
  .filter-bar > .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  max-height:calc(var(--refinement-viewport-height) - var(--mode-header-height) - var(--expanded-panel-top-offset) - var(--expanded-panel-edge-inset));
}

html[data-layout-mode] body:is(
  [data-view="invite"],
  [data-view="contributions"],
  [data-view="about"],
  [data-view="adminAccess"]
) .page-view-inner {
  width:100%;
  max-width:none;
  padding-inline:var(--mode-gutter);
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="results"]
  .results-panel .section-heading {
  padding-left:28px;
  padding-right:calc(28px + var(--results-scrollbar-width,0px));
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .profile-title-meta,
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .profile-source-line {
  font-family:var(--font-sans);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-title-meta > * {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-sans);
  font-size:.9rem;
  font-weight:500;
  line-height:1.3;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-title-meta svg {
  width:18px;
  height:18px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-title-meta .profile-language-line {
  align-items:flex-start;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-title-meta .profile-language-line svg {
  flex:0 0 18px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-line .ard-link {
  display:inline;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--action-strong);
  font:inherit;
  font-weight:700;
  line-height:inherit;
  vertical-align:baseline;
  text-decoration:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-line .ard-link:hover {
  background:transparent;
  color:var(--action);
  text-decoration:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-item {
  display:inline-flex;
  max-width:100%;
  align-items:center;
  gap:4px;
  color:var(--color-text-muted);
  font-family:var(--font-sans);
  font-size:.76rem;
  font-weight:500;
  line-height:1.45;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-item-copy {
  display:inline-flex;
  align-items:baseline;
  gap:.25em;
  line-height:inherit;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-freshness time {
  color:inherit;
  font:inherit;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-item-icon {
  display:inline-flex;
  flex:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-item-icon svg {
  width:13px;
  height:13px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-source-freshness:is(.is-stale,.is-unknown) {
  color:var(--color-caution);
}

@container profile-pane (max-width:680px) {
  html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
    .profile-source-item {
    flex-wrap:wrap;
  }

  html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
    .profile-source-freshness-separator {
    display:none;
  }

  html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
    .profile-source-freshness.is-stale time {
    flex-basis:100%;
    padding-left:17px;
  }
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  :is(.summary-section,.profile-section) {
  border-radius:10px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .rating-overview.summary-section {
  margin-top:16px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .at-glance.summary-section {
  margin-top:12px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-content-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  margin-top:12px;
  overflow:visible;
  border:0;
  border-radius:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section {
  padding:0;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--surface);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section + .profile-section {
  border-top:1px solid var(--line);
  border-left:1px solid var(--line);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-head {
  min-height:52px;
  margin:0;
  padding:13px 16px;
  border-bottom:1px solid var(--line-soft);
  background:color-mix(in srgb,var(--line-soft) 55%,var(--panel));
}

/* Keep icons on the mathematical centreline and use one consistent optical
 * correction for adjacent title copy. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-head > :is(h3,.profile-section-context) {
  transform:none;
}

/* Service titles use the same Lexend metrics as the other profile sections. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .service-profile-shell .profile-section-head > h3 {
  transform:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .service-profile-shell .location-details .profile-section-head > .profile-section-context {
  transform:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-body {
  padding:16px;
  overflow:hidden;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-report-footer {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid var(--line-soft);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-report-status {
  color:var(--muted);
  font-size:.76rem;
  line-height:1.35;
  text-align:right;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-report-footer .profile-report-button {
  display:inline-flex;
  width:auto;
  min-height:38px;
  align-items:center;
  gap:7px;
  margin:0;
  padding:7px 12px;
  border-radius:999px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-report-footer .profile-report-button span {
  display:inline;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-header {
  position:relative;
  top:auto;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .summary-section > h3 {
  padding:11px 14px 9px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .at-glance-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .at-glance-item {
  grid-template-rows:minmax(18px,auto) minmax(24px,auto) 14px;
  min-height:80px;
  padding:8px 16px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary {
  grid-template-columns:minmax(0,1fr);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary-item {
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  min-height:80px;
  align-content:center;
  align-items:center;
  gap:2px 16px;
  padding:8px 14px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary-label {
  grid-column:1;
  grid-row:1 / 3;
  align-self:center;
  gap:8px;
  color:var(--ink-2);
  font-size:.86rem;
  font-weight:500;
  line-height:1.2;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary-label .summary-item-icon,
html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary-label .summary-item-icon .icon {
  width:22px;
  height:22px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary-value {
  grid-column:2;
  grid-row:1;
  justify-self:end;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .rating-summary-item > .summary-item-detail {
  grid-column:2;
  grid-row:2;
  justify-self:end;
  text-align:right;
}

/* Interaction polish: the query grows to four readable lines while the
 * refinement tier remains attached to the same rigid surface. */
html[data-layout-mode] body[data-view="explore"] .unified-search-bar {
  --search-tier-height:56px;
  grid-template-rows:var(--search-tier-height) 56px;
  height:calc(var(--search-tier-height) + 56px);
  transition:grid-template-rows var(--unified-bar-motion) var(--unified-ease),
    height var(--unified-bar-motion) var(--unified-ease),
    box-shadow var(--unified-bar-motion) var(--unified-ease),
    border-color var(--unified-swap-motion) var(--unified-ease),
    border-radius var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .field-search,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-wrap {
  height:100%;
  min-height:0;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar textarea#search {
  display:block;
  width:100%;
  height:100%;
  min-height:56px;
  margin:0;
  padding:18px var(--mode-search-icon-inset) 16px calc(
    var(--mode-search-icon-inset) +
    var(--mode-search-icon-size) +
    var(--mode-search-icon-gap)
  );
  overflow-y:hidden;
  border:0;
  border-radius:0;
  outline:0;
  resize:none;
  background:var(--color-surface);
  box-shadow:none;
  color:var(--ink);
  font-family:var(--font-sans);
  font-size:1.05rem;
  line-height:22px;
  transition:padding-right var(--unified-swap-motion) var(--unified-ease);
}

html[data-layout-mode="narrow"] body[data-view="explore"] .unified-search-bar textarea#search {
  font-size:16px;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar textarea#search::placeholder {
  color:var(--faint);
  opacity:.82;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-wrap.has-search-value
  textarea#search {
  padding-right:calc(var(--search-clear-size) + var(--mode-search-icon-inset) + 10px);
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-icon {
  top:17px;
}

html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-clear,
html[data-layout-mode] body[data-view="explore"] .unified-search-bar .search-wrap.has-search-value
  .search-clear {
  top:28px;
}

/* The landing panel is viewport-bounded too. Its content now scrolls into the
 * bar/panel seam instead of travelling behind the sticky bar in page flow. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"]
  .filter-bar > .advanced-filters[aria-hidden="false"] {
  max-height:calc(100dvh - var(--mode-header-height) - var(--expanded-panel-top-offset) - var(--expanded-panel-edge-inset)) !important;
  overflow:hidden;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="landing"]
  .filter-bar > .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  max-height:calc(100dvh - var(--mode-header-height) - var(--expanded-panel-top-offset) - var(--expanded-panel-edge-inset));
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

body.refinement-stage-switch,
body.refinement-stage-switch main,
body.refinement-stage-switch #filter-bar,
body.refinement-stage-switch #advanced-filters,
body.refinement-stage-switch .advanced-filters-inner {
  overflow-anchor:none;
}

/* Medium headings use the same twelve-pixel result-card inset on both sides. */
html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="results"]
  .results-panel .section-heading {
  margin-left:12px;
  margin-right:calc(12px + var(--results-scrollbar-width,0px));
  padding-left:0;
  padding-right:0;
}

/* Every search-like field reports at least 16px on phones, preventing iOS
 * focus zoom while compact padding and line-height preserve the visual density. */
html[data-layout-mode="narrow"] body[data-view="explore"]
  :is(textarea#search,input#location-input) {
  font-size:16px !important;
}

html[data-layout-mode] body[data-view="explore"]
  .advanced-filters[aria-hidden="false"] .advanced-filter-fields .multi-trigger {
  font-size:var(--explore-filter-value-font-size) !important;
}

html[data-layout-mode] body[data-view="explore"]
  .advanced-filters[aria-hidden="false"] input#location-input,
html[data-layout-mode] body[data-view="explore"]
  .advanced-filters[aria-hidden="false"] input#location-input::placeholder {
  font-size:var(--explore-filter-value-font-size) !important;
  font-weight:500;
  line-height:1.35;
}

/* Ratings and referral summary now use the exact location/referral section
 * header and container grammar, including icon-led header bands. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .summary-section.profile-section {
  padding:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .summary-section .profile-section-head {
  display:flex;
  min-height:52px;
  align-items:center;
  gap:9px;
  margin:0;
  padding:13px 16px;
  border-bottom:1px solid var(--line-soft);
  background:color-mix(in srgb,var(--line-soft) 55%,var(--panel));
  color:var(--action);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .summary-section .profile-section-head h3 {
  position:static;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:var(--ink);
  font-family:var(--font-serif);
  font-size:1.08rem;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .summary-section .summary-section-body {
  padding:0;
  overflow:hidden;
  border-radius:0 0 9px 9px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .summary-section :is(.rating-summary,.at-glance-grid) {
  border-top:0;
  border-bottom:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-outbound-pill {
  display:inline-flex;
  width:max-content;
  min-height:34px;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0;
  padding:6px 11px;
  border:1px solid color-mix(in srgb,var(--action) 46%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--action-soft) 62%,var(--surface));
  color:var(--action-strong);
  font-family:var(--font-sans);
  font-size:.76rem;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-outbound-pill:hover {
  background:var(--action-soft);
  text-decoration:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  :is(.referral-actions .ard-link,.loc-directions.profile-outbound-pill) {
  border-radius:999px;
}

.profile-loading-stage {
  position:absolute;
  z-index:2;
  inset:0;
  display:grid;
  min-height:clamp(180px,28vh,300px);
  place-content:center;
  justify-items:center;
  gap:12px;
  color:var(--muted);
  opacity:0;
  transform:translateY(4px);
  transition:opacity 140ms ease-out,transform 180ms var(--ease);
  pointer-events:none;
}

.profile-shell-loading {
  position:relative;
  min-width:0;
  min-height:clamp(420px,70vh,760px);
  overflow:hidden;
}

.profile-loading-skeleton {
  display:grid;
  gap:16px;
  min-width:0;
  opacity:.72;
}

.profile-shell-loading.is-spinner-only .profile-loading-skeleton {
  visibility:hidden;
}

.profile-loading-skeleton-header {
  display:grid;
  grid-template-columns:64px minmax(0,1fr) 92px;
  align-items:center;
  gap:16px;
  min-width:0;
  min-height:96px;
}

.profile-loading-skeleton-avatar,
.profile-loading-skeleton-action,
.profile-loading-skeleton-section {
  display:block;
  border:1px solid var(--line);
  background:color-mix(in srgb,var(--surface) 90%,var(--canvas));
}

.profile-loading-skeleton-avatar {
  width:64px;
  height:64px;
  border-radius:50%;
}

.profile-loading-skeleton-heading {
  display:block;
  min-width:0;
}

.profile-loading-skeleton-action {
  width:92px;
  height:38px;
  border-radius:999px;
}

.profile-loading-skeleton-section {
  min-height:136px;
  padding:18px;
  border-radius:10px;
}

.profile-loading-skeleton .sk-line,
.profile-loading-skeleton .sk-chips {
  margin-bottom:12px;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"]) .profile-loading-skeleton-header {
  grid-template-columns:56px minmax(0,1fr) 44px;
  gap:12px;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"]) .profile-loading-skeleton-avatar {
  width:56px;
  height:56px;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"]) .profile-loading-skeleton-action {
  width:44px;
  height:44px;
}

.profile-loading-stage.is-visible {
  opacity:1;
  transform:none;
}

.profile-loading-stage.is-leaving {
  opacity:0;
  transform:translateY(-2px);
}

.profile-loading-indicator {
  position:relative;
  display:grid;
  width:48px;
  height:48px;
  place-items:center;
  border-radius:50%;
  color:var(--action);
}

.profile-loading-indicator::before {
  position:absolute;
  inset:0;
  border:1.5px solid color-mix(in srgb,var(--action) 20%,var(--line));
  border-top-color:var(--action);
  border-radius:inherit;
  animation:profile-loading-spin .82s linear infinite;
  content:"";
}

.profile-loading-mark {
  display:grid;
  width:30px;
  height:30px;
  place-items:center;
  border-radius:50%;
  background:color-mix(in srgb,var(--action-soft) 72%,var(--surface));
}

.profile-loading-quip {
  min-height:1.3em;
  color:var(--ink-2);
  font-size:.78rem;
  font-weight:600;
  line-height:1.3;
  text-align:center;
}

@keyframes profile-loading-spin {
  to { transform:rotate(1turn); }
}

@media (prefers-reduced-motion:reduce) {
  .profile-loading-stage {
    transform:none;
    transition:none;
  }

  .profile-loading-indicator::before {
    animation:none;
  }
}

/* Referral status uses the same circular signal in result cards, profile
 * metadata, referral summaries, and individual location cards. */
html[data-layout-mode] .referral-status .referral-status-badge svg {
  width:11px;
  height:11px;
  color:inherit;
}

html[data-layout-mode] .referral-status.badge-yes .referral-status-badge svg {
  width:12px;
  height:12px;
}

html[data-layout-mode] .result-referral-status.badge-yes .referral-status-badge svg {
  width:11px;
  height:11px;
}

html[data-layout-mode] .result-referral-status .referral-status-badge {
  width:14px;
  height:14px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-title-meta .referral-status .referral-status-badge svg {
  width:11px;
  height:11px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-title-meta .referral-status.badge-yes .referral-status-badge svg {
  width:12px;
  height:12px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .referral-status-summary .summary-referral-status {
  align-self:center;
}

/* Narrow results adopt the editorial-row hierarchy: identity first, then one
 * quiet scan line for overall rating and referral readiness. */
html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-card {
  grid-template-columns:18px 44px minmax(0,1fr) 16px;
  grid-template-rows:auto auto;
  gap:.25rem .55rem;
  min-height:112px;
  padding:14px 16px;
  border-radius:16px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-rank {
  display:block;
  grid-column:1;
  grid-row:1 / 3;
  align-self:center;
  justify-self:center;
  min-width:0;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-avatar {
  display:grid;
  grid-column:2;
  grid-row:1 / 3;
  align-self:center;
  justify-self:start;
  width:44px;
  height:44px;
  font-size:1rem;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-identity {
  grid-column:3;
  grid-row:1;
  align-self:end;
  gap:.25rem;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-title {
  font-size:1.0625rem;
  line-height:1.15;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-specialty {
  font-size:.78rem;
  line-height:1.3;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-metrics {
  grid-column:3;
  grid-row:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  min-height:24px;
  align-items:center;
  align-self:start;
  justify-content:stretch;
  gap:0 .65rem;
  width:100%;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-ratings-section {
  display:flex;
  min-height:24px;
  align-items:center;
  justify-content:flex-start;
  width:100%;
}

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

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  :is(.result-rating-overall,.result-accepting) {
  display:inline-flex;
  width:auto;
  height:auto;
  min-height:24px;
  align-items:center;
  justify-content:flex-start;
  gap:0;
  padding:0;
  text-align:left;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-accepting {
  width:100%;
  align-items:center;
  justify-content:flex-start;
  text-align:left;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  :is(.result-rating-overall,.result-accepting) > .result-rating-label {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-rating-overall .result-metric-value {
  justify-content:flex-start;
  overflow:visible;
  color:var(--ink-2);
  font-size:.78rem;
  font-weight:500;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-rating-overall .result-metric-value svg {
  width:18px;
  height:18px;
  color:var(--rating);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-rating-count {
  display:inline-flex;
  align-items:baseline;
  margin-left:.22rem;
  color:var(--muted);
  font-size:.6rem;
  font-weight:500;
  line-height:1;
  letter-spacing:.01em;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-rating-count-compact {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-rating-count-expanded {
  display:inline;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-referral-status {
  gap:.3rem;
  font-size:.72rem;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-referral-status .referral-status-label-full {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-referral-status .referral-status-label-compact {
  display:inline;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-distance {
  display:none;
}

/* Medium cards expose metric headings, so their headings and values share one
 * left edge inside each rating/referral column. */
html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="results"]
  :is(.result-rating-overall,.result-rating-component,.result-accepting) {
  justify-items:start;
  text-align:left;
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="results"]
  :is(.result-rating-overall,.result-rating-component,.result-accepting)
  :is(.result-rating-label,.result-metric-value) {
  justify-content:flex-start;
  justify-self:start;
  text-align:left;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .result-chevron {
  grid-column:4;
  grid-row:1 / 3;
  align-self:center;
}

@container results-pane (max-width:340px) {
  html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
    .result-card {
    grid-template-columns:18px minmax(0,1fr) 16px;
  }

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

  html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
    :is(.result-identity,.result-metrics) {
    grid-column:2;
  }

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

/* Per-location rating cards: the same information follows the approved wide,
 * medium, and narrow compositions without introducing another breakpoint. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-context {
  margin-left:2px;
  color:var(--ink-2);
  font-size:.7rem;
  font-weight:500;
  line-height:1.2;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .location-details .profile-section-body {
  padding:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .location-details .loc-list {
  display:block;
  overflow:visible;
  border:0;
  border-radius:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .location-details .loc-card {
  min-width:0;
  padding:0;
  border:0;
  border-bottom:1px solid var(--line);
  background:var(--surface);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .location-details .loc-card:last-child {
  border-bottom:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-heading-group {
  display:grid;
  justify-items:start;
  gap:7px;
  min-width:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-name {
  color:var(--ink);
  font-family:var(--font-serif);
  font-size:.98rem;
  font-weight:700;
  line-height:1.2;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy {
  min-width:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-addr {
  margin:12px 0 0;
  color:var(--ink-2);
  font-size:.76rem;
  line-height:1.55;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-meta {
  margin:5px 0 0;
  color:var(--muted);
  font-size:.72rem;
  line-height:1.4;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-notes {
  margin:5px 0 0;
  color:var(--ink-2);
  font-size:.72rem;
  font-style:italic;
  line-height:1.4;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-support {
  display:flex;
  min-width:0;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  color:var(--ink);
  font-size:.76rem;
  font-weight:600;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-phone {
  color:inherit;
  text-decoration:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-overall {
  display:grid;
  min-width:0;
  align-content:center;
  justify-items:start;
  gap:5px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-score {
  display:inline-flex;
  align-items:baseline;
  color:var(--ink);
  font-variant-numeric:tabular-nums;
  line-height:1;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-score strong {
  font-size:1.06rem;
  font-weight:700;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-score small {
  color:var(--ink-2);
  font-size:.68rem;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-overall > small,
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-category > small {
  color:var(--muted);
  font-size:.62rem;
  font-weight:400;
  line-height:1.2;
  white-space:nowrap;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-overall .star-row-display {
  gap:1px;
  margin:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-overall .star-display {
  width:16px;
  height:16px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-overall .star-display .icon {
  width:16px;
  height:16px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-categories {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  min-width:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-category {
  display:grid;
  min-width:0;
  align-content:center;
  gap:5px;
  padding:14px;
  border-left:1px solid var(--line-soft);
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-category > span {
  overflow:hidden;
  color:var(--ink-2);
  font-size:.66rem;
  font-weight:500;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-category > strong {
  color:var(--ink);
  font-size:.94rem;
  font-variant-numeric:tabular-nums;
  line-height:1;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-category > strong small {
  color:var(--ink-2);
  font-size:.65em;
  font-weight:400;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-toggle,
html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-panel {
  display:none;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout {
  display:grid;
  grid-template-columns:minmax(220px,1.35fr) minmax(118px,.55fr) minmax(300px,1.45fr);
  min-width:0;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-details {
  min-width:0;
  padding:16px;
  border-right:1px solid var(--line-soft);
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout > .loc-rating-overall {
  padding:16px;
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout {
  display:grid;
  grid-template-columns:minmax(140px,.72fr) minmax(0,2.28fr);
  min-width:0;
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-details {
  display:contents;
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-heading-group {
  grid-column:1 / -1;
  grid-row:1;
  padding:16px 16px 10px;
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout > .loc-rating-overall {
  grid-column:1;
  grid-row:2;
  padding:12px 16px;
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout > .loc-rating-categories {
  grid-column:2;
  grid-row:2;
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-details > .loc-detail-copy {
  grid-column:1 / -1;
  grid-row:3;
  padding:2px 16px 16px;
}

html[data-layout-mode="medium"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-rating-category {
  padding:12px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle {
  display:grid;
  width:100%;
  min-height:72px;
  grid-template-columns:minmax(0,1fr) auto 12px;
  align-items:center;
  gap:9px;
  padding:10px 16px;
  border:0;
  border-radius:0;
  background:var(--surface);
  color:var(--ink);
  text-align:left;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle:hover,
html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle:focus-visible {
  background:var(--panel);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-identity {
  display:grid;
  justify-items:start;
  gap:6px;
  min-width:0;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-identity .loc-title-line > strong {
  overflow-wrap:anywhere;
  font-family:var(--font-serif);
  font-size:.88rem;
  line-height:1.15;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle .referral-status {
  gap:4px;
  padding:0;
  background:transparent;
  font-size:.59rem;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle .loc-rating-overall {
  grid-template-columns:auto auto;
  align-items:center;
  justify-items:end;
  gap:3px 4px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle .loc-rating-overall > small {
  grid-column:1 / -1;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-chevron {
  width:7px;
  height:7px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  color:var(--muted);
  transform:rotate(45deg) translateY(-2px);
  transition:transform 180ms ease;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle[aria-expanded="true"] .loc-mobile-chevron {
  transform:rotate(225deg) translate(-1px,-1px);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel {
  border-top:1px solid var(--line-soft);
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel[hidden] {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel .loc-rating-categories {
  margin:10px 16px 0;
  border:1px solid var(--line-soft);
  border-radius:6px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel .loc-rating-category {
  min-height:60px;
  padding:9px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel .loc-rating-category:first-child {
  border-left:0;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy-mobile {
  padding:10px 16px 12px;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy-mobile .loc-addr {
  margin-top:0;
}

/* Every initials surface uses the same independent line box and optical
 * baseline correction, so font metrics cannot shift one monogram differently. */
html[data-layout-mode] [data-monogram] {
  box-sizing:border-box;
  display:grid;
  place-items:center;
  aspect-ratio:1;
  padding:0;
  line-height:1;
  text-align:center;
}

html[data-layout-mode] [data-monogram] > .monogram-text {
  display:block;
  line-height:1;
  transform:translateY(1px);
}

html[data-layout-mode] :is(.result-avatar,.profile-photo)[data-monogram] > .monogram-text {
  transform:none;
}

html[data-layout-mode] .profile-photo[data-monogram] > .monogram-text {
  transform:translateY(.35px);
}

/* The compact account initials already sit on the visual centre of their
 * circle; the shared baseline correction would place pairs such as JP low. */
html[data-layout-mode] #account-trigger-avatar > .monogram-text {
  transform:none;
}

html[data-layout-mode] body[data-view="explore"] .result-avatar {
  min-width:44px;
  min-height:44px;
}

.profile-scroll-context {
  display:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .profile-title-block {
  min-width:0;
  flex:1 1 auto;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .profile-title-row {
  display:flex;
  min-width:0;
  align-items:flex-start;
  gap:12px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .profile-title-row > h3 {
  min-width:0;
  margin-right:auto;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-header {
  position:relative;
  top:auto;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .profile-panel.profile-context-compact .profile-scroll-context {
  position:fixed;
  z-index:24;
  top:var(--profile-context-top,var(--mode-header-height));
  right:var(--mode-gutter);
  left:var(--mode-gutter);
  display:flex;
  box-sizing:border-box;
  min-height:56px;
  align-items:center;
  gap:10px;
  padding:7px 10px;
  padding-right:246px;
  border-bottom:1px solid var(--line-soft);
  background:var(--canvas);
  box-shadow:var(--shadow-1);
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .profile-panel.profile-context-compact .profile-title-row .profile-save-control {
  position:fixed;
  z-index:26;
  top:calc(var(--profile-context-top,var(--mode-header-height)) + 7px);
  right:calc(var(--mode-gutter) + 10px);
  margin:0;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .profile-panel.profile-context-compact .profile-save-button {
  height:34px;
  min-height:34px;
}

/* On page-scrolling layouts the results label becomes the stable list header.
 * Its medium inset matches the result-card edge; narrow cards already share
 * the panel gutter. */
html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"] .results-panel {
  overflow:visible;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .results-panel .section-heading {
  box-sizing:border-box;
  position:sticky;
  z-index:25;
  top:var(--results-heading-top,var(--mode-header-height));
  width:auto;
  margin-inline:0;
  padding-inline:16px;
  border-top:0;
  background:transparent;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .results-panel .section-heading::before {
  position:absolute;
  z-index:-1;
  inset:0;
  background:var(--canvas);
  content:"";
  pointer-events:none;
}

html[data-layout-mode="medium"]
  body[data-view="explore"][data-explore-stage="results"]
  .results-panel .section-heading {
  margin-left:12px;
  margin-right:calc(12px + var(--results-scrollbar-width,0px));
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .results-panel.results-are-scrolled .section-heading {
  box-shadow:var(--shadow-1);
}

/* Section bands retain referral context while their card contents scroll.
 * `overflow:clip` preserves the rounded card boundary without creating the
 * scroll container that disables sticky positioning. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  :is(.profile-section,.summary-section.profile-section) {
  overflow:clip;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-sticky-frame {
  position:sticky;
  z-index:3;
  top:var(--profile-section-sticky-top,0px);
  width:100%;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-head {
  position:static;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-sticky-frame {
  width:calc(100% - 48px);
  margin-inline:auto;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-sticky-frame > .profile-section-head {
  width:calc(100% + 48px);
  margin-inline:-24px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .profile-section-body {
  border-radius:0 0 9px 9px;
}

.profile-scroll-context .profile-context-back {
  display:inline-flex;
  flex:none;
  min-height:34px;
  align-items:center;
  gap:4px;
  padding:4px 6px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--action);
  font-family:var(--font-sans);
  font-size:.78rem;
  font-weight:700;
}

.profile-scroll-context .profile-context-back:hover,
.profile-scroll-context .profile-context-back:focus-visible {
  background:var(--action-soft);
}

.profile-scroll-context .profile-context-back svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html[data-layout-mode="narrow"] .profile-scroll-context .profile-context-back {
  width:34px;
  justify-content:center;
  padding:4px;
}

html[data-layout-mode="narrow"] .profile-scroll-context .profile-context-back > span {
  display:none;
}

.profile-scroll-context h3 {
  min-width:0;
  margin:0;
  overflow:hidden;
  color:var(--ink);
  font-family:var(--font-serif);
  font-size:1.08rem;
  font-weight:700;
  padding-block:2px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Contact data is technical copy: tabular mono numerals, one contact per row,
 * and a compact adjacent action that confirms successful copying in place. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .loc-address-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin-top:10px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .loc-address-copy {
  min-width:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .loc-address-row .loc-addr {
  margin:0;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .loc-address-row .loc-directions {
  flex:none;
  justify-self:end;
  white-space:nowrap;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .loc-support {
  display:grid;
  justify-items:start;
  gap:6px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .loc-contact {
  display:grid;
  grid-template-columns:38px max-content auto;
  align-items:center;
  gap:8px;
  color:var(--ink-2);
  font-size:.76rem;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  :is(.contact-number,.loc-phone) {
  color:var(--ink-2);
  font-family:var(--font-mono);
  font-size:.76rem;
  font-variant-numeric:tabular-nums;
  font-weight:500;
  letter-spacing:.01em;
  text-decoration:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .contact-copy-row {
  display:flex;
  width:100%;
  min-width:0;
  align-items:center;
  gap:8px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .contact-value-group {
  display:inline-flex;
  min-width:0;
  align-items:center;
  gap:8px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .contact-copy-row > .field-provenance-wide {
  margin-left:auto;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-contact-grid .referral-fact {
  grid-template-columns:minmax(74px,.44fr) minmax(0,1fr);
  align-items:center;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-contact-grid .contact-copy-button {
  justify-self:end;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .contact-copy-button {
  display:inline-flex;
  flex:none;
  min-width:50px;
  min-height:24px;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:2px 7px;
  border:1px solid color-mix(in srgb,var(--action) 38%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--action-soft) 46%,var(--surface));
  color:var(--action-strong);
  font-family:var(--font-sans);
  font-size:.62rem;
  font-weight:700;
  line-height:1;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .contact-copy-button:is(:hover,:focus-visible),
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .contact-copy-button[data-copy-state="success"] {
  border-color:var(--action);
  background:var(--action-soft);
}

.contact-copy-icon {
  position:relative;
  display:block;
  width:10px;
  height:10px;
}

.contact-copy-success-icon {
  display:none;
  width:12px;
  height:12px;
}

.contact-copy-success-icon svg {
  display:block;
  width:12px;
  height:12px;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .contact-copy-button[data-copy-state="success"] .contact-copy-icon {
  display:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .contact-copy-button[data-copy-state="success"] .contact-copy-success-icon {
  display:block;
}

.contact-copy-icon::before,
.contact-copy-icon::after {
  position:absolute;
  width:6px;
  height:7px;
  border:1px solid currentColor;
  border-radius:2px;
  content:"";
}

.contact-copy-icon::before {
  top:0;
  right:0;
}

.contact-copy-icon::after {
  bottom:0;
  left:0;
  background:inherit;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"] .referral-fact-value {
  color:var(--ink-2);
  font-size:.78rem;
  font-weight:500;
  line-height:1.4;
  overflow-wrap:anywhere;
}

html[data-profile-layout="stacked"]
  body[data-view="explore"][data-explore-stage="profile"]
  .field-provenance-wide {
  display:none;
}

html[data-profile-layout="stacked"]
  body[data-view="explore"][data-explore-stage="profile"]
  .field-provenance-info-wrap {
  display:inline-flex;
}

html[data-profile-layout="stacked"]
  body[data-view="explore"][data-explore-stage="profile"]
  .contact-value-group {
  width:100%;
}

html[data-profile-layout="stacked"]
  body[data-view="explore"][data-explore-stage="profile"]
  .contact-copy-button {
  margin-left:auto;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .service-location-card .referral-contact-fact {
  align-items:center;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"] .loc-address-row {
  align-items:center;
}

/* Every location uses one disclosure grammar. On wider canvases the compact
 * identity row expands to include the overall and category ratings, while the
 * disclosed body becomes a two-column referral/address workspace. */
html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-desktop-layout {
  display:none;
}

html[data-layout-mode] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel[hidden] {
  display:none;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-toggle {
  display:grid;
  width:100%;
  min-height:88px;
  grid-template-columns:minmax(150px,1fr) minmax(104px,.55fr) minmax(270px,1.5fr) 40px;
  align-items:stretch;
  gap:0;
  padding:0;
  border:0;
  border-radius:0;
  background:var(--surface);
  color:var(--ink);
  cursor:pointer;
  text-align:left;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-toggle:hover,
html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-toggle:focus-visible {
  background:var(--panel);
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-identity {
  display:grid;
  min-width:0;
  align-content:center;
  justify-items:start;
  gap:7px;
  padding:16px;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle > .loc-rating-overall {
  align-content:center;
  padding:16px;
  border-left:1px solid var(--line-soft);
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle > .loc-rating-categories {
  display:grid;
  align-self:stretch;
  border-left:1px solid var(--line-soft);
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle > .loc-rating-categories .loc-rating-category {
  padding:12px;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-chevron {
  align-self:center;
  justify-self:center;
  width:9px;
  height:9px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  color:var(--action);
  transform:rotate(45deg) translateY(-2px);
  transition:transform 180ms ease;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle[aria-expanded="true"] .loc-mobile-chevron {
  transform:rotate(225deg) translate(-1px,-1px);
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-mobile-panel {
  display:block;
  border-top:1px solid var(--line-soft);
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-panel > .loc-rating-categories {
  display:none;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"] .loc-detail-copy-mobile {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-areas:
    "referral referral"
    "contacts contacts"
    "notes notes"
    "distance distance";
  align-items:start;
  gap:8px 32px;
  padding:16px;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy-mobile .loc-referral-route {
  grid-area:referral;
  margin:0;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy-mobile .loc-contact-grid {
  grid-area:contacts;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:4px;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy-mobile .loc-foot {
  grid-area:distance;
  margin-top:0;
}

html:is([data-layout-mode="wide"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="profile"]
  .loc-detail-copy-mobile .loc-notes {
  grid-area:notes;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"]
  .loc-mobile-toggle > .loc-rating-categories {
  display:none;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="profile"] .profile-source-line .ard-link {
  min-width:0;
  max-width:100%;
  padding-inline:0;
  font-size:inherit;
}

/* Services use the same editorial result-card rhythm without reserving a
 * physician-portrait column. Keep identity and evidence aligned to the open
 * track at every canonical layout mode. */
html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="results"]
  .service-result-card {
  grid-template-columns:28px minmax(220px,1fr) minmax(360px,.9fr) 18px;
  grid-template-rows:1fr;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .service-result-identity {
  grid-column:2;
  grid-row:1;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .service-result-metrics {
  grid-column:3;
  grid-row:1;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .result-chevron {
  grid-column:4;
  grid-row:1;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"] .service-result-card {
  grid-template-columns:18px minmax(0,1fr) 16px;
  grid-template-rows:auto auto;
  gap:8px 10px;
  min-height:112px;
  padding:14px 16px;
  border-radius:16px;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .result-rank {
  grid-column:1;
  grid-row:1 / 3;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .service-result-identity {
  grid-column:2;
  grid-row:1;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .service-result-metrics {
  grid-column:2;
  grid-row:2;
}

html:is([data-layout-mode="narrow"],[data-layout-mode="medium"])
  body[data-view="explore"][data-explore-stage="results"]
  .service-result-card .result-chevron {
  grid-column:3;
  grid-row:1 / 3;
}

html[data-layout-mode="narrow"] body[data-view="explore"][data-explore-stage="results"]
  .service-result-card {
  min-height:128px;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .service-result-card {
  grid-template-columns:18px minmax(0,1fr) 16px;
  grid-template-rows:auto auto;
  gap:8px 10px;
  min-height:128px;
  padding:14px 16px;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .service-result-card .result-rank {
  grid-column:1;
  grid-row:1 / 3;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .service-result-card .service-result-identity {
  grid-column:2;
  grid-row:1;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .service-result-card .service-result-metrics {
  grid-column:2;
  grid-row:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  width:100%;
  overflow:visible;
}

html[data-layout-mode="wide"] body[data-view="explore"][data-explore-stage="profile"]
  .service-result-card .result-chevron {
  grid-column:3;
  grid-row:1 / 3;
}

/* The landing trust signature retains its quiet bottom anchor. The text carries
 * the evidence while neutral icons support scanning without reading as seals. */
body[data-view="explore"][data-explore-stage="landing"] .trust-evidence {
  display:block !important;
  grid-column:1 !important;
  grid-row:2 !important;
  align-self:end;
  justify-self:center;
  width:min(100%,624px);
  max-width:none;
  min-height:0;
  margin:0 auto 18px !important;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:var(--ink);
  font-family:var(--font-sans);
  text-align:left;
}

body[data-view="explore"][data-explore-stage="landing"] .trust-evidence-list {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  width:100%;
  margin:0;
  padding:0;
  list-style:none;
}

body[data-view="explore"][data-explore-stage="landing"]
  .trust-evidence-list > .guardrail-signal,
body[data-view="explore"][data-explore-stage="landing"]
  .trust-evidence-list > .guardrail-signal + .guardrail-signal {
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  grid-template-rows:auto;
  align-items:start;
  justify-content:start;
  gap:10px;
  min-width:0;
  min-height:0;
  padding:0;
  border:0;
  color:var(--ink);
  font-family:var(--font-sans);
  text-align:left;
}

body[data-view="explore"][data-explore-stage="landing"] .trust-evidence .guardrail-copy {
  display:grid;
  grid-column:2 !important;
  gap:3px;
  width:auto !important;
  min-width:0;
  min-height:0;
  padding:0;
  border:0;
  align-items:start;
  justify-content:start;
  justify-items:start;
  color:inherit;
  font-family:var(--font-sans);
  text-align:left;
  white-space:normal;
}

body[data-view="explore"][data-explore-stage="landing"] .trust-evidence .guardrail-copy strong {
  color:var(--ink);
  font-size:14px;
  font-weight:600;
  line-height:1.35;
}

body[data-view="explore"][data-explore-stage="landing"] .trust-evidence .guardrail-copy small {
  color:var(--muted);
  font-size:13px;
  font-weight:400;
  line-height:1.45;
}

body[data-view="explore"][data-explore-stage="landing"] .trust-evidence svg {
  width:36px;
  height:36px;
  margin-top:0;
  color:var(--muted);
}

html[data-layout-mode="narrow"]
  body[data-view="explore"][data-explore-stage="landing"] .trust-evidence {
  width:calc(100% - (2 * var(--mode-gutter)));
  margin:0 auto 16px !important;
}

html[data-layout-mode]
  body[data-view="explore"][data-explore-stage="landing"]:has(.advanced-filters[aria-hidden="false"])
  .trust-evidence {
  margin:24px auto 18px !important;
}

html[data-layout-mode="narrow"]
  body[data-view="explore"][data-explore-stage="landing"] .trust-evidence-list {
  grid-template-columns:minmax(0,1fr);
  gap:12px;
}

html[data-layout-mode="narrow"]
  body[data-view="explore"][data-explore-stage="landing"]
  .trust-evidence-list > .guardrail-signal {
  grid-template-columns:36px minmax(0,1fr);
  gap:12px;
}

/* Selected-profile wide layout is capability-gated after self-hosted fonts
 * settle. It remains one canonical wide mode; data-profile-layout only chooses
 * whether the selected-profile composition can safely fit inside that mode. */
.profile-split-capability-probe {
  position:fixed !important;
  z-index:-1 !important;
  top:-10000px !important;
  left:-10000px !important;
  display:block !important;
  width:max-content !important;
  max-width:none !important;
  height:auto !important;
  overflow:visible !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

.profile-split-capability-probe .refine-entry-row {
  display:grid !important;
  width:max-content !important;
  min-width:0 !important;
  max-width:none !important;
  grid-template-columns:140px max-content max-content !important;
  gap:0 !important;
  padding:6px 16px !important;
}

.profile-split-capability-probe .explore-mode-switch {
  display:block !important;
  width:140px !important;
}

.profile-split-capability-probe :is(.explore-mode-dropdown-toggle) {
  display:flex !important;
  width:140px !important;
}

.profile-split-capability-probe :is(.explore-mode-options,.explore-mode-indicator) {
  display:none !important;
}

.profile-split-capability-probe :is(.refinement-disclosure-copy,.filter-count,.reset-filter-label,.refinement-chevron) {
  display:inline-grid !important;
}

.profile-split-capability-probe .advanced-filter-reset[data-visible="true"] {
  display:inline-flex !important;
  width:max-content !important;
  max-width:none !important;
  min-width:max-content !important;
  padding-inline:8px 10px !important;
  opacity:1 !important;
  visibility:visible !important;
}

html[data-layout-mode="wide"][data-profile-layout="split"] {
  height:100dvh;
  overflow:hidden;
  overscroll-behavior:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body.workspace-active[data-view="explore"][data-explore-stage="profile"] {
  position:fixed;
  inset:0;
  width:100%;
  height:100dvh;
  min-height:100dvh;
  overflow:hidden;
  overscroll-behavior:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] main {
  display:grid;
  grid-template-columns:var(--profile-split-rail-width,572px) minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
  column-gap:16px;
  width:100%;
  height:calc(100dvh - var(--mode-header-height));
  min-height:0;
  padding:12px var(--mode-gutter);
  overflow:hidden;
  background:var(--canvas);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .filter-bar {
  position:relative;
  z-index:12;
  grid-column:1;
  grid-row:1;
  width:100%;
  min-width:0;
  margin:0;
  padding:16px 16px 12px;
  border:1px solid var(--line);
  border-bottom:0;
  border-radius:20px 20px 0 0;
  background:var(--unified-refinement-surface);
  box-shadow:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .filter-primary,
html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .unified-search-bar {
  width:100%;
  max-width:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .unified-search-bar .refine-entry-row {
  grid-template-columns:140px max-content max-content !important;
  justify-content:center;
  column-gap:10px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .refinement-disclosure-content {
  grid-column:2 !important;
  grid-row:1 !important;
  justify-self:center;
  margin-left:0 !important;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .advanced-filter-reset[data-visible="true"] {
  grid-column:3 !important;
  grid-row:1 !important;
  min-width:max-content;
  margin-left:4px;
  margin-right:0;
  padding-inline:6px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .explore-mode-switch {
  z-index:24;
  grid-column:1 !important;
  grid-row:1 !important;
  justify-self:start;
  width:140px;
  overflow:hidden;
  padding:3px;
  transition:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .explore-mode-dropdown-toggle {
  position:relative;
  z-index:2;
  display:flex;
  width:100%;
  height:34px;
  min-height:34px;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:.35rem 1.1rem;
  border:0;
  border-radius:999px;
  background:transparent;
  box-shadow:none;
  color:var(--ink);
  font-size:.78rem;
  font-weight:600;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .explore-mode-dropdown-icon {
  position:absolute;
  top:50%;
  left:.5rem;
  display:inline-flex;
  width:16px;
  height:16px;
  align-items:center;
  justify-content:center;
  transform:translateY(calc(-50% - 1px));
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .explore-mode-dropdown-icon svg {
  width:16px;
  height:16px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .explore-mode-dropdown-chevron {
  position:absolute;
  top:50%;
  right:.5rem;
  width:14px;
  height:14px;
  transform:translateY(-50%);
  transition:transform var(--dur) var(--ease);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .explore-mode-switch[data-dropdown-open="true"] {
  border-color:color-mix(in srgb,var(--control-selected) 52%,var(--control-border));
  border-bottom-color:transparent;
  border-radius:20px 20px 0 0;
  background:var(--control-surface);
  box-shadow:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .explore-mode-switch[data-dropdown-open="true"] .explore-mode-dropdown-chevron {
  transform:translateY(-50%) rotate(180deg);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .explore-mode-switch > :is(.explore-mode-indicator,.explore-mode-options) {
  display:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body > .explore-mode-options[data-compact-overlay="true"] {
  position:absolute;
  z-index:90;
  top:var(--explore-mode-overlay-top);
  left:var(--explore-mode-overlay-left);
  display:grid;
  width:var(--explore-mode-overlay-width);
  height:auto;
  grid-template-columns:1fr;
  grid-template-rows:38px;
  gap:0;
  padding:3px;
  border:1px solid color-mix(in srgb,var(--control-selected) 52%,var(--control-border));
  border-top:0;
  border-radius:0 0 20px 20px;
  background:var(--control-surface);
  box-shadow:0 12px 24px rgb(36 59 83 / 12%);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body > .explore-mode-options[data-compact-overlay="true"] > button[aria-checked="true"] {
  display:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body > .explore-mode-options[data-compact-overlay="true"] > button {
  min-height:38px;
  gap:0;
  padding:.35rem .75rem;
  border-radius:14px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body > .explore-mode-options[data-compact-overlay="true"]
  > button:is(:hover,:focus-visible) {
  background:var(--action-soft);
  color:var(--action-strong);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body > .explore-mode-options[data-compact-overlay="true"] .explore-mode-icon {
  display:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .reset-filter-label {
  display:inline;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .advanced-filter-reset[data-visible="true"] {
  max-width:92px;
  min-width:36px;
  padding:0 10px 0 8px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .filter-bar > .advanced-filters {
  position:absolute;
  z-index:35;
  top:124px;
  left:16px;
  width:calc(100% - 32px);
  margin:0 !important;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .filter-bar > .advanced-filters[aria-hidden="false"] {
  max-height:calc(100dvh - var(--mode-header-height) - 152px) !important;
  overflow:hidden;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .filter-bar > .advanced-filters[aria-hidden="false"] > .advanced-filters-inner {
  max-height:calc(100dvh - var(--mode-header-height) - 152px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .workspace {
  display:contents;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .results-panel {
  display:grid;
  grid-column:1;
  grid-row:2;
  grid-template-rows:auto minmax(0,1fr);
  width:100%;
  min-width:0;
  height:100%;
  min-height:0;
  padding:0;
  border:1px solid var(--line);
  border-top:0;
  border-radius:0 0 20px 20px;
  background:var(--unified-refinement-surface);
  overflow:hidden;
}

/* Every split-rail boundary opts out of grid/flex min-content expansion.
 * This is intentionally redundant at each nesting level: restored filters can
 * produce long production names and counts before the profile stage is
 * selected, and no descendant may be allowed to widen the fixed rail track. */
html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  :is(.results-panel,.results-panel .section-heading,.results-panel .result-list,
      .results-panel .result-list > [role="listitem"],.results-panel .result-card) {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:100%;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .results-panel .result-card > * {
  min-width:0;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .results-panel .section-heading {
  padding:12px 20px 10px;
  background:var(--unified-refinement-surface);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .results-panel .result-list {
  min-height:0;
  padding:4px 16px 16px;
  background:var(--unified-refinement-surface);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .result-card.selected {
  border-color:color-mix(in srgb,var(--action) 58%,var(--line));
  background:color-mix(in srgb,var(--action-soft) 72%,var(--surface));
  box-shadow:var(--shadow-1);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .profile-panel {
  display:block;
  grid-column:2;
  grid-row:1 / 3;
  width:100%;
  min-width:0;
  height:100%;
  min-height:0;
  padding:0 16px 16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--surface);
  box-shadow:var(--shadow-1);
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .profile-header {
  top:0;
  margin-block:0;
  margin-inline:-16px;
  padding-block:16px 14px;
  padding-inline:16px;
  background:var(--surface);
}

/* Browser-review refinements for the capable selected-profile composition. */
html[data-layout-mode="wide"] #account-menu-toggle .account-avatar-trigger {
  display:grid;
  width:42px;
  height:42px;
  place-items:center;
  font-size:.78rem;
  line-height:1;
}

html[data-layout-mode="wide"] #account-trigger-avatar > .monogram-text {
  line-height:1;
  transform:none;
}

@media (min-width:1200px) and (max-width:1279px) {
  html[data-layout-mode="wide"] #account-menu-toggle .account-avatar-trigger {
    width:46px;
    height:46px;
    font-size:.86rem;
  }

  html[data-layout-mode="wide"] #account-menu-toggle .account-trigger-copy strong {
    font-size:.95rem;
    line-height:1.1;
  }
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  column-gap:8px;
  width:100%;
  min-height:24px;
  overflow:visible;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-ratings-section {
  display:contents;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-overall {
  grid-column:1;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-details {
  display:grid;
  grid-column:2;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:minmax(18px,auto);
  align-items:center;
  gap:4px;
  transform:translateX(-31.6px);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-accepting {
  grid-column:3;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card)
  :is(.result-rating-overall,.result-rating-component,.result-accepting) {
  display:flex;
  min-width:0;
  width:100%;
  align-items:center;
  justify-content:flex-start;
  gap:0;
  padding:0;
  text-align:left;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card)
  :is(.result-rating-overall,.result-rating-component,.result-accepting)
  > .result-rating-label {
  display:none;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-metric-value {
  display:flex;
  min-width:0;
  justify-content:flex-start;
  overflow:visible;
  font-size:.7rem;
  white-space:nowrap;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-component .result-metric-value svg {
  width:12px;
  height:12px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-component .result-metric-value {
  gap:2px;
  font-size:.7rem;
  justify-content:center;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-component .result-rating-score {
  display:inline-block;
  min-width:1.4em;
  font-variant-numeric:tabular-nums;
  text-align:left;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-count {
  margin-left:4px;
  color:var(--muted);
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-accepting {
  justify-content:flex-start;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-rating-overall {
  justify-content:flex-start;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card)
  :is(.result-rating-overall .result-metric-value,.result-referral-status) {
  font-size:.7rem;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"]
  .result-card:not(.service-result-card) .result-distance {
  display:none;
}

.result-divider {
  display:flex;
  min-height:48px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 4px;
  padding:12px 16px 10px;
  color:var(--ink);
  letter-spacing:0;
}

.result-divider::before,
.result-divider::after,
.result-divider-label::after {
  content:none;
}

.result-divider-label {
  display:block;
  padding:0;
  color:var(--ink);
  font-family:var(--font-editorial);
  font-size:1.28rem;
  font-weight:var(--weight-semibold);
  line-height:var(--leading-title);
  letter-spacing:var(--tracking-title);
}

.result-divider-count {
  min-width:0;
  min-height:24px;
  padding:.2rem .55rem;
  border:1px solid var(--color-border);
  border-radius:999px;
  background:var(--color-surface);
  color:var(--color-text-subtle);
  font-family:var(--font-sans);
  font-size:.72rem;
  font-weight:600;
  line-height:1;
}

.result-divider.is-handed-off > * {
  visibility:hidden;
}

#results-count[data-sticky-group="true"] > .results-count-copy:not(.sticky-result-count) {
  display:none;
}

#results-count[data-sticky-group="true"] > .sticky-result-count {
  display:inline-flex;
  align-items:center;
  animation:result-group-summary-in 170ms var(--ease) both;
}

@keyframes result-group-summary-in {
  from { opacity:0; transform:translateY(2px); }
  to { opacity:1; transform:none; }
}

@media (prefers-reduced-motion:reduce) {
  #results-count[data-sticky-group="true"] > .sticky-result-count {
    animation:none;
  }
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .result-divider {
  padding-inline:4px;
}

html[data-layout-mode="wide"][data-profile-layout="split"]
  body[data-view="explore"][data-explore-stage="profile"] .result-divider-label {
  font-size:1.13rem;
}

.snapshot-experience {
  padding:0 1rem .65rem;
}

.snapshot-experience legend {
  padding:.85rem 0 0;
}

.snapshot-experience-grid {
  margin-top:.35rem;
}

@container snapshot-form (max-width:920px) {
  .rating-form .snapshot-experience-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .rating-form:not(.service-wait-form) .snapshot-experience-grid > .snap-field:last-child {
    grid-column:1 / -1;
  }
}

@container snapshot-form (max-width:680px) {
  .rating-form .snapshot-experience-grid {
    grid-template-columns:minmax(0,1fr);
  }

  .rating-form:not(.service-wait-form) .snapshot-experience-grid > .snap-field:last-child {
    grid-column:1;
  }
}

/* A wide viewport that cannot satisfy the measured rail plus profile minimum
 * uses the established stacked selected-profile behavior without changing the
 * canonical layout mode or introducing another page breakpoint. */
html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body.workspace-active[data-view="explore"][data-explore-stage="profile"] {
  display:block;
  height:auto;
  min-height:100dvh;
  overflow-x:hidden;
  overflow-y:auto;
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] main {
  display:block;
  width:100%;
  height:auto;
  min-height:calc(100dvh - var(--mode-header-height));
  overflow:visible;
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] .workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  width:100%;
  height:auto;
  overflow:visible;
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] .results-panel {
  display:none;
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-panel {
  display:block;
  grid-column:1;
  grid-row:1;
  width:100%;
  height:auto;
  min-height:0;
  margin:0;
  padding:0 var(--mode-gutter) 32px;
  background:var(--canvas);
  overflow:visible;
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-row {
  display:flex;
  margin-inline:calc(var(--mode-gutter) * -1);
  padding:12px var(--mode-gutter) 0;
  background:var(--canvas);
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-back-button {
  display:inline-flex;
  min-height:34px;
  align-items:center;
  gap:6px;
  padding:6px 11px;
  border:1px solid color-mix(in srgb,var(--action) 46%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--action-soft) 62%,var(--surface));
  color:var(--action);
  font-family:var(--font-sans);
  font-size:.76rem;
  font-weight:700;
}

html[data-layout-mode="wide"]:not([data-profile-layout="split"])
  body[data-view="explore"][data-explore-stage="profile"] .profile-header {
  margin-inline:calc(var(--mode-gutter) * -1);
  padding:12px var(--mode-gutter) 14px;
  background:var(--canvas);
}
