/* Professional-team header, adapted from the approved Stitch preview.
   Scope stays inside the header; the existing navigation and directory keep their styles. */
#main-content #team-directory-header {
  --team-ink: #1f2329;
  --team-muted: #666b73;
  --team-line: #e3e5e8;
  --team-accent: #79171c;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 48px 0 0 !important;
  border: 0;
  border-bottom: 1px solid var(--team-line);
  background: #fff;
  color: var(--team-ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
#team-directory-header *,
#team-directory-header *::before,
#team-directory-header *::after { box-sizing: border-box; }
#team-directory-header .team-stitch-inner {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}
#team-directory-header .team-stitch-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--team-line);
}
#team-directory-header .team-stitch-title { flex: 1; min-width: 0; }
#team-directory-header .team-stitch-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--team-muted);
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .16em;
}
#main-content #team-directory-header h1 {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--team-ink) !important;
  font-family: inherit !important;
  font-size: 48px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  letter-spacing: -.01em !important;
  word-break: keep-all;
}
#main-content #team-directory-header h1::before,
#main-content #team-directory-header h1::after { content: none !important; }
#team-directory-header .team-stitch-search {
  display: flex;
  flex: 0 0 360px;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
#team-directory-header .team-stitch-search label {
  margin: 0;
  color: var(--team-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .02em;
}
#team-directory-header .team-stitch-search-field { position: relative; }
#main-content #team-directory-header input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 48px 0 16px;
  border: 1px solid var(--team-line);
  border-radius: 0;
  outline: none;
  background: #fff;
  color: var(--team-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
  appearance: none;
}
#team-directory-header input::placeholder { color: #8f949e; opacity: 1; }
#team-directory-header input::-webkit-search-cancel-button { -webkit-appearance: none; }
#main-content #team-directory-header .team-stitch-search button {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--team-muted) !important;
  box-shadow: none !important;
  cursor: pointer;
}
#team-directory-header .team-stitch-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
}
#team-directory-header .team-stitch-filter-row { display: flex; align-items: center; min-height: 44px; }
#team-directory-header .team-stitch-filter-label {
  flex: 0 0 88px;
  color: var(--team-muted);
  font-size: 13px;
}
#team-directory-header .team-stitch-filter-options { display: flex; flex: 1; flex-wrap: wrap; gap: 0 28px; }
#main-content #team-directory-header [data-lawyer-filter] {
  position: relative;
  min-height: 44px;
  padding: 10px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--team-ink) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 24px !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}
#main-content #team-directory-header [data-lawyer-filter]:hover,
#main-content #team-directory-header [data-lawyer-filter].filter-active { color: var(--team-accent) !important; }
#main-content #team-directory-header [data-lawyer-filter].filter-active { font-weight: 500 !important; }
#team-directory-header [data-lawyer-filter].filter-active::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1.5px;
  background: currentColor;
  content: "";
}
#team-directory-header .team-stitch-select-wrap { display: none; }
#team-directory-header .team-stitch-footer {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 6px 0;
}
#main-content #team-directory-header [data-lawyer-page-status] {
  position: static !important;
  color: var(--team-muted) !important;
  font-size: 13px !important;
  line-height: 22px !important;
  letter-spacing: .02em !important;
  font-variant-numeric: tabular-nums;
}
#main-content #team-directory-header [data-lawyer-reset] {
  min-height: 44px;
  padding: 0 !important;
  border: 0;
  background: none;
  color: var(--team-accent) !important;
  font-family: inherit;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}
#main-content #team-directory-header [hidden] { display: none !important; }
#main-content #team-directory-header :is(button,input,select):focus-visible {
  outline: 2px solid var(--team-accent) !important;
  outline-offset: 3px;
}
/* The list becomes section 2 after the two old header sections are combined.
   Prevent the old nth-of-type filter-bar border from reaching the directory. */
#main-content #team-directory-header + .team-list-sec { border-bottom: 0; }
/* Existing card rules force display:block; filtered results must still disappear. */
html body.team-directory-page main#main-content [data-lawyer-card][hidden],
html body.team-directory-page main#main-content [data-lawyer-next][hidden] { display: none !important; }
@media (max-width: 1280px) and (min-width: 901px) {
  #team-directory-header .team-stitch-inner { padding-inline: 24px; }
  #main-content #team-directory-header + .team-list-sec {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
@media (max-width: 900px) {
  #team-directory-header .team-stitch-inner { padding-inline: 16px; }
}
@media (max-width: 767px) {
  #main-content #team-directory-header { padding-top: 28px !important; }
  #team-directory-header .team-stitch-top { display: block; padding-bottom: 0; border-bottom: 0; }
  #team-directory-header .team-stitch-eyebrow { margin-bottom: 6px; }
  #main-content #team-directory-header h1 { font-size: 34px !important; line-height: 46px !important; }
  #team-directory-header .team-stitch-search { gap: 6px; margin-top: 20px; }
  #team-directory-header .team-stitch-search label { font-size: 12px; }
  #main-content #team-directory-header input { height: 44px; padding-left: 12px; font-size: 16px; }
  #team-directory-header input::placeholder { font-size: 14px; }
  #main-content #team-directory-header .team-stitch-search button { top: 0; right: 0; }
  #team-directory-header .team-stitch-filters { gap: 10px; padding-top: 16px; }
  #team-directory-header .team-stitch-filter-label,
  #team-directory-header .team-stitch-filter-options { display: none; }
  #team-directory-header .team-stitch-select-wrap { position: relative; display: block; width: 100%; }
  #team-directory-header select {
    width: 100%; height: 44px; padding: 0 34px 0 12px;
    border: 1px solid var(--team-line); border-radius: 0;
    background: #fff; color: var(--team-ink); font-family: inherit; font-size: 14px;
    appearance: none; -webkit-appearance: none;
  }
  #team-directory-header .team-stitch-select-wrap svg {
    position: absolute; top: 15px; right: 12px; width: 14px; height: 14px;
    color: var(--team-muted); pointer-events: none;
  }
  #team-directory-header .team-stitch-footer { min-height: 56px; padding: 6px 0; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #main-content #team-directory-header * { transition: none !important; }
}
