.directory-page {
  --page-ink: #222222;
  --page-muted: #6a6a6a;
  --page-line: #dddddd;
  --page-accent: #ef5b38;
  --page-action: #bd563c;
  color: var(--page-ink);
  background: #ffffff;
}

.directory-page main { overflow: visible; }
.directory-page .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.discovery-header {
  padding: 14px 36px 32px;
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
}

.header-row {
  width: min(1600px, 100%);
  min-height: 70px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}

.directory-page .brand { justify-self: start; gap: 0; }
.directory-page .brand-mark {
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: var(--page-accent);
  font-size: 19px;
  transform: none;
}
.directory-page .brand strong { font-size: 24px; }
.directory-page .brand small { margin-top: 6px; font-size: 8px; }

.category-tabs {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 24px;
}

.category-tab {
  min-width: 78px;
  padding: 7px 8px 10px;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--page-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.category-tab::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 2px;
  background: transparent;
}

.category-tab:hover,
.category-tab.is-active { color: var(--page-ink); }
.category-tab.is-active::after { background: var(--page-ink); }
.category-icon { width: 28px; height: 28px; display: block; }
.category-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions > a { text-decoration: none; font-size: 13px; font-weight: 700; }
.round-link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #f3f3f3;
  border-radius: 50%;
}

.search-pill {
  width: min(980px, calc(100% - 80px));
  min-height: 76px;
  margin: 10px auto 0;
  padding: 8px;
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 1fr 60px;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--page-line);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
}

.search-segment {
  min-width: 0;
  padding: 10px 28px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-left: 1px solid #e3e3e3;
  cursor: pointer;
}
.search-segment:first-child { border-left: 0; }
.service-field,
.discipline-field { padding-left: 34px; }
.search-segment > span {
  color: var(--page-ink);
  font-size: 12px;
  font-weight: 750;
}
.search-segment input,
.search-segment select {
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  color: var(--page-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  font-size: 14px;
}
.search-segment select { appearance: none; }
.search-segment:focus-within { background: #f7f7f7; border-radius: 999px; }

.directory-page .search-action {
  width: 54px;
  min-width: 54px;
  height: 54px;
  margin: auto;
  padding: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--page-accent);
  border: 0;
  border-radius: 50%;
}
.directory-page .search-action:hover { background: #d94e2d; }
.search-action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.directory-page .finder {
  width: min(1600px, calc(100% - 72px));
  margin: 0 auto;
  padding: 46px 0 80px;
  background: #ffffff;
  border: 0;
}

.directory-page .results-toolbar {
  min-height: auto;
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  border: 0;
}
.results-toolbar h1 {
  margin: 0 0 5px;
  font-family: inherit;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.directory-page .results-toolbar p { margin: 0; color: var(--page-muted); font-size: 13px; font-weight: 450; }
.directory-page .results-toolbar > div:last-child { gap: 14px; }
.directory-page .text-button { color: var(--page-muted); border: 0; font-size: 12px; }
.directory-page .sort-label select {
  padding: 9px 30px 9px 12px;
  color: var(--page-ink);
  background: #ffffff;
  border: 1px solid var(--page-line);
  border-radius: 999px;
  font-size: 12px;
}

.directory-page .provider-grid {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 38px 20px;
}

.directory-page .provider-card {
  min-width: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(34, 34, 34, .08);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(34, 34, 34, .04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.directory-page .provider-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(34, 34, 34, .11);
}
.directory-page .provider-card:has(.provider-actions a:hover),
.directory-page .provider-card:has(.provider-actions a:focus-visible) {
  transform: none;
  box-shadow: 0 1px 3px rgba(34, 34, 34, .04);
}

.provider-visual {
  --tile: #eeeae2;
  --tile-ink: #5d594f;
  aspect-ratio: 1.08 / 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--tile);
  border: 0;
  border-bottom: 1px solid rgba(34, 34, 34, 0.045);
  border-radius: 17px 17px 0 0;
}

.provider-card[data-kind="fit"] .provider-visual { --tile: #e6f0eb; --tile-ink: #39705e; }
.provider-card[data-kind="performance"] .provider-visual { --tile: #f7e9e4; --tile-ink: #9d4f3c; }
.provider-card[data-kind="aero"] .provider-visual { --tile: #e8edf4; --tile-ink: #4e6688; }

.provider-art {
  width: 46%;
  max-width: 112px;
  position: relative;
  z-index: 1;
  color: var(--tile-ink);
}
.provider-art svg {
  width: 100%;
  height: auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.provider-art .accent { stroke: var(--page-accent); }

.provider-photo {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  object-fit: cover;
}

.visual-category {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: var(--page-ink);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  backdrop-filter: blur(6px);
}

.directory-page .compare-check {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: block;
}
.directory-page .compare-check input { position: absolute; opacity: 0; pointer-events: none; }
.compare-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--page-ink);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.compare-check input:checked + .compare-icon { color: #ffffff; background: var(--page-accent); }
.compare-check input:focus-visible + .compare-icon { outline: 3px solid rgba(239, 91, 56, .35); }

.provider-card-copy {
  flex: 1;
  padding: 12px 14px 15px;
}
.directory-page .provider-name {
  margin: 0;
  min-height: 39px;
  overflow: hidden;
  color: var(--page-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.directory-page .provider-place {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--page-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.directory-page .provider-summary {
  min-height: 35px;
  margin: 6px 0 0;
  overflow: hidden;
  display: -webkit-box;
  color: var(--page-ink);
  font-size: 12.5px;
  font-weight: 560;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.provider-facts {
  min-height: 54px;
  margin-top: 7px;
  display: grid;
  align-content: start;
  gap: 3px;
}
.directory-page .provider-fact {
  margin: 0;
  overflow: hidden;
  color: var(--page-muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-page .provider-price {
  margin: 5px 0 0;
  color: var(--page-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.directory-page .provider-actions {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.directory-page .provider-actions a {
  color: var(--page-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  font-weight: 700;
}
.directory-page .provider-actions .provider-booking {
  padding: 7px 11px;
  color: var(--page-action);
  background: #fff4f0;
  border: 1px solid rgba(189, 86, 60, .32);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.directory-page .provider-actions .provider-website { color: var(--page-muted); }
.directory-page .provider-actions .provider-booking:hover {
  color: #ffffff;
  background: var(--page-action);
  border-color: var(--page-action);
}
.directory-page .provider-actions .provider-booking:focus-visible {
  outline: 3px solid rgba(239, 91, 56, .28);
  outline-offset: 2px;
}
.directory-page .provider-booking[hidden] { display: none; }

.semipro-sponsor {
  min-height: 126px;
  padding: 24px 28px;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #ffffff;
  background: #1f2422;
  border: 1px solid #303633;
  border-radius: 18px;
}
.sponsor-copy { max-width: 720px; }
.sponsor-label {
  margin: 0 0 7px;
  color: #f2a28f;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sponsor-label strong { color: #ffffff; }
.semipro-sponsor h2 {
  margin: 0;
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -.025em;
}
.sponsor-copy > p:last-child {
  margin: 8px 0 0;
  color: #c7cfcb;
  font-size: 12px;
  line-height: 1.4;
}
.sponsor-action {
  flex: 0 0 auto;
  padding: 11px 16px;
  color: #1f2422;
  background: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
}
.sponsor-action:hover { color: #ffffff; background: var(--page-action); }
.sponsor-action:focus-visible { outline: 3px solid rgba(255, 255, 255, .55); outline-offset: 3px; }

.directory-page .evidence-panel { margin: 8px 0 0; border: 0; }
.directory-page .evidence-panel summary {
  padding: 0;
  list-style: none;
  color: var(--page-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
}
.directory-page .evidence-panel summary::-webkit-details-marker { display: none; }
.directory-page .source-summary::after { content: " · Details"; }
.directory-page .evidence-panel[open] summary { margin-bottom: 8px; color: var(--page-ink); }
.directory-page .status-row {
  margin: 0 0 8px;
  padding: 9px;
  gap: 5px;
  background: #f7f7f7;
  border: 0;
  border-radius: 9px;
  font-size: 10px;
}
.directory-page .evidence-list { max-height: 230px; padding: 0; gap: 7px; }
.directory-page .evidence-item { padding: 9px; background: #f7f7f7; }
.directory-page .evidence-item p { display: none; }
.directory-page .evidence-item strong { margin-bottom: 5px; font-size: 10px; }
.directory-page .evidence-item a { color: var(--page-accent); font-size: 10px; }

.directory-page .load-more {
  margin-top: 48px;
  padding: 12px 20px;
  color: var(--page-ink);
  background: #ffffff;
  border: 1px solid var(--page-ink);
  border-radius: 999px;
  font-size: 13px;
}

.directory-footer {
  width: min(1600px, calc(100% - 72px));
  margin: 0 auto;
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--page-ink);
  background: #ffffff;
  border-top: 1px solid var(--page-line);
}
.directory-footer > div:last-child { display: flex; gap: 20px; }
.directory-footer a { color: var(--page-muted); font-size: 11px; }

.directory-page .compare-tray { background: var(--page-ink); border-radius: 999px; }
.directory-page .compare-dialog { color: var(--page-ink); }
.directory-page .dialog-header h2 { font-family: inherit; font-size: 30px; font-weight: 750; letter-spacing: -0.02em; }

@media (max-width: 980px) {
  .header-row { grid-template-columns: 1fr 1fr; }
  .category-tabs { grid-column: 1 / -1; grid-row: 2; justify-content: center; min-height: 62px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .search-pill { width: min(760px, calc(100% - 24px)); }
  .directory-page .provider-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

@media (max-width: 680px) {
  .discovery-header { padding: 10px 16px 20px; }
  .header-row { gap: 8px; }
  .header-actions > a:first-child { display: none; }
  .category-tabs { justify-content: flex-start; gap: 4px; overflow-x: auto; }
  .category-tabs { scrollbar-width: none; }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tab { min-width: 74px; }
  .search-pill {
    width: 100%;
    min-height: 0;
    margin-top: 12px;
    padding: 6px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) 50px;
    grid-template-rows: repeat(2, minmax(58px, auto));
    border-radius: 24px;
  }
  .service-field { grid-column: 1 / -1; grid-row: 1; border: 0; border-bottom: 1px solid #e3e3e3; }
  .search-field { grid-column: 1; grid-row: 2; border-left: 0; }
  .discipline-field { grid-column: 2; grid-row: 2; border-left: 1px solid #e3e3e3; }
  .search-segment,
  .service-field,
  .discipline-field { padding: 8px 14px; }
  .search-segment input,
  .search-segment select { font-size: 16px; }
  .directory-page .search-action {
    width: 46px;
    min-width: 46px;
    height: 46px;
    grid-column: 3;
    grid-row: 2;
  }
  .directory-page .finder { width: calc(100% - 32px); padding-top: 34px; }
  .directory-page .results-toolbar { align-items: center; padding: 0; }
  .results-toolbar h1 { font-size: 22px; }
  .directory-page .results-toolbar > div:first-child { align-items: flex-start; flex-direction: column; gap: 4px; }
  .directory-page .results-toolbar > div:last-child { align-items: center; flex-direction: row; }
  .directory-page .provider-actions a { min-height: 40px; display: inline-flex; align-items: center; }
  .directory-page .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
  .semipro-sponsor { padding: 22px; align-items: flex-start; flex-direction: column; gap: 18px; }
  .directory-footer { width: calc(100% - 32px); }
}

@media (max-width: 500px) {
  .directory-page .provider-grid { grid-template-columns: 1fr; }
  .provider-visual { aspect-ratio: 1.2 / 1; }
  .directory-page .sort-label { display: none; }
}

@media (max-width: 360px) {
  .category-tabs { gap: 3px; }
  .category-tab { min-width: 64px; padding-right: 2px; padding-left: 2px; font-size: 11px; }
  .category-icon { width: 24px; height: 24px; }
  .search-pill { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) 50px; }
  .search-segment,
  .service-field,
  .discipline-field { padding-right: 10px; padding-left: 10px; }
}
