/* Mobile refinement only; desktop identity retains the existing layout.
   Page scope beats the shared component rules loaded later by the header. */
body.fd-page main.fd-directory .fd-card-main{display:contents}
body.fd-page main.fd-directory :is(.fd-service-count-mobile,.fd-service-more-mobile-only){display:none}
body.fd-page main.fd-directory .fd-description-mobile{display:none}
body.fd-page main.fd-directory :is(.fd-filter-label-desktop,.fd-filter-label-short){display:none}
body.fd-page main.fd-directory.fd-desktop-controls .fd-filter-label-desktop{display:inline}
body.fd-page main.fd-directory.fd-desktop-controls .fd-filter-label-combined{display:none}
body.fd-page main.fd-directory .fd-sort-slot{grid-column:1/-1}
body.fd-page main.fd-directory .fd-sort-slot:empty{display:none}
body.fd-page main.fd-directory .fd-sort-slot .fd-sort{display:grid;gap:8px;color:var(--fd-ink)}
body.fd-page main.fd-directory .fd-sort-slot .fd-sort label{display:block;font-size:14px;font-weight:600}
body.fd-page main.fd-directory .fd-sort-slot .fd-sort select{width:100%;max-width:none;height:48px;padding:8px 12px;border:1px solid var(--fd-line);border-radius:11px;background:#f9fbfe;font-size:16px;font-weight:500;color:#465d79}

@media(max-width:800px){
  body.fd-page main.fd-directory{
    --med-ui-control-height:44px;
    --med-ui-send-size:44px;
  }
  body.fd-page main.fd-directory .fd-results-top{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:10px;
    min-height:0;
  }
  body.fd-page main.fd-directory .fd-results-copy{min-width:0}
  body.fd-page main.fd-directory .fd-result-tools{
    display:block;
    width:auto;
    gap:8px;
    padding-top:0;
  }
  body.fd-page main.fd-directory .fd-sort{min-width:0}
  body.fd-page main.fd-directory .fd-sort select{
    width:100%;
    max-width:none;
    min-width:0;
    min-height:44px;
    padding:8px 10px;
    border:1px solid var(--fd-line);
    border-radius:12px;
    background:#fff;
    font-size:16px;
    font-weight:500;
  }
  body.fd-page main.fd-directory .fd-filter-toggle{min-height:44px;padding:8px 10px;gap:6px;white-space:nowrap}
  body.fd-page main.fd-directory .fd-toggle-chevron{display:none}
  body.fd-page main.fd-directory .fd-filter-panel{
    max-height:calc(100dvh - 180px);
    overflow-y:auto;
    overscroll-behavior:contain;
    scroll-padding-block:16px;
  }
}

@media(max-width:600px){
  body.fd-page main.fd-directory{padding-bottom:32px;background:#fff}
  body.fd-page main.fd-directory .fd-container{width:calc(100% - 24px)}
  body.fd-page main.fd-directory .fd-breadcrumb{padding:14px 0;font-size:12px}
  body.fd-page main.fd-directory .fd-hero{padding:18px 16px 20px;margin-bottom:12px}
  body.fd-page main.fd-directory .fd-hero::before{inset:0;border-radius:20px}
  body.fd-page main.fd-directory .fd-hero::after{right:8px;top:12px;width:116px;height:116px;opacity:.25}
  body.fd-page main.fd-directory .fd-hero-art{right:12px;top:15px;opacity:.28}
  body.fd-page main.fd-directory .fd-kicker{font-size:10px;letter-spacing:.08em;gap:9px;margin-left:4px}
  body.fd-page main.fd-directory .fd-hero h1{font-size:30px;line-height:1.24;margin:12px 0 10px;letter-spacing:-.04em}
  body.fd-page main.fd-directory .fd-hero-copy>p{font-size:14px;line-height:1.65;max-width:34ch}
  body.fd-page main.fd-directory .fd-description-desktop{display:none}
  body.fd-page main.fd-directory .fd-description-mobile{display:inline}
  body.fd-page main.fd-directory .fd-search-area{padding-bottom:18px}
  body.fd-page main.fd-directory .fd-search{height:58px;gap:9px;padding:6px 6px 6px 13px;border-radius:17px}
  body.fd-page main.fd-directory .fd-search-label{font-size:21px}
  body.fd-page main.fd-directory .fd-search input{font-size:16px}
  body.fd-page main.fd-directory .fd-search input::placeholder{font-size:14px}
  body.fd-page main.fd-directory .fd-search button{flex-basis:44px;width:44px;height:44px;border-radius:12px}
  body.fd-page main.fd-directory .fd-quick-links{margin-top:8px;padding:2px 0;gap:8px}
  body.fd-page main.fd-directory .fd-quick-links>span{display:none}
  body.fd-page main.fd-directory .fd-quick-links>a{min-height:44px;padding:8px 12px;border-radius:12px;font-size:13px}
  body.fd-page main.fd-directory .fd-results-top{gap:8px;margin-bottom:12px}
  body.fd-page main.fd-directory .fd-results-copy h2{font-size:18px;line-height:1.4;margin:0 0 2px;letter-spacing:-.035em}
  body.fd-page main.fd-directory .fd-results-copy h2::before{width:4px;height:15px;margin-right:7px;vertical-align:-1px}
  body.fd-page main.fd-directory .fd-results-copy p{font-size:12px;line-height:1.6}
  body.fd-page main.fd-directory .fd-filter-toggle{font-size:13px;border-radius:12px;background:#f5f8ff;border-color:#dbe5f8}
  body.fd-page main.fd-directory .fd-filter-toggle>i:first-child{font-size:18px}
  body.fd-page main.fd-directory .fd-filter-disclosure[open] .fd-filter-toggle{background:#eaf1ff;border-color:#b5cef7}
  body.fd-page main.fd-directory .fd-filter-panel{gap:14px;padding:14px;border-radius:16px}
  body.fd-page main.fd-directory .fd-filter-heading>div{gap:8px}
  body.fd-page main.fd-directory .fd-filter-heading h2{font-size:15px}
  body.fd-page main.fd-directory .fd-active-filters{gap:8px;margin-bottom:12px}
  body.fd-page main.fd-directory .fd-active-filter-key{display:none}
  body.fd-page main.fd-directory .fd-active-filters button{background:#f3f7ff;border-color:#dce6f7;border-radius:12px}
  body.fd-page main.fd-directory .fd-active-filters .fd-clear-all{background:transparent}
  body.fd-page main.fd-directory .fd-list{gap:12px}
  body.fd-page main.fd-directory .fd-card{
    grid-template-columns:104px minmax(0,1fr);
    align-items:start;
    gap:10px 12px;
    padding:12px;
    border-color:#e1e8f2;
    border-radius:18px;
    background:#fff;
    box-shadow:0 4px 16px #142b4905;
  }
  /* One shared grid row keeps the portrait and complete identity equal in
     height, including wrapped names/addresses and missing-field fallbacks. */
  body.fd-page main.fd-directory .fd-media{grid-column:1;grid-row:1;height:auto;min-height:132px;align-self:stretch;border-radius:12px}
  body.fd-page main.fd-directory .fd-card-main{display:flex;flex-direction:column;justify-content:flex-start;align-self:stretch;min-width:0;min-height:132px;grid-column:2;grid-row:1;gap:4px}
  body.fd-page main.fd-directory .fd-card-category{font-size:12px;line-height:1.4;margin:0;gap:4px;overflow-wrap:anywhere}
  body.fd-page main.fd-directory .fd-card h2{position:relative;font-size:16px;line-height:1.35;margin:0;letter-spacing:-.025em;overflow-wrap:anywhere}
  body.fd-page main.fd-directory .fd-card h2:has(>.fd-verified){padding-right:38px}
  body.fd-page main.fd-directory .fd-verified{position:absolute;right:-7px;top:50%;width:44px;height:44px;transform:translateY(-50%);font-size:17px;margin:0}
  body.fd-page main.fd-directory .fd-address{gap:5px;margin:0;font-size:12px;line-height:1.45}
  body.fd-page main.fd-directory .fd-address>i{flex-shrink:0;font-size:14px;margin-top:2px}
  body.fd-page main.fd-directory .fd-address>span{min-width:0;overflow-wrap:anywhere}
  body.fd-page main.fd-directory .fd-summary{display:none}
  body.fd-page main.fd-directory .fd-services{order:2;margin:2px 0 0;gap:6px;min-width:0;max-width:100%}
  body.fd-page main.fd-directory .fd-services:not(.is-expanded){flex-wrap:nowrap}
  body.fd-page main.fd-directory .fd-services:not(.is-expanded)>.fd-service:nth-child(n+2){display:none}
  body.fd-page main.fd-directory .fd-service{flex:1 1 auto;max-width:none;padding-right:8px}
  body.fd-page main.fd-directory .fd-service>span{max-width:none}
  body.fd-page main.fd-directory .fd-service-count-desktop{display:none}
  body.fd-page main.fd-directory .fd-service-count-mobile{display:inline}
  body.fd-page main.fd-directory .fd-service-more-mobile-only{display:inline-flex}
  body.fd-page main.fd-directory .fd-services.is-expanded .fd-service{flex-basis:100%;max-width:100%}
  body.fd-page main.fd-directory .fd-services.is-expanded .fd-service>span{max-width:none}
  /* Rating belongs to the identity, not a second footer row. Photo and name
     remain the profile links, so a duplicate mobile CTA is unnecessary. */
  body.fd-page main.fd-directory .fd-card-footer{display:block;order:1;min-height:0;margin:2px 0 0;padding:0;border:0}
  body.fd-page main.fd-directory .fd-rating{display:flex;flex-wrap:wrap;align-items:center;gap:3px 5px;min-width:0;line-height:1.4}
  body.fd-page main.fd-directory .fd-rating>i{font-size:14px}
  body.fd-page main.fd-directory .fd-rating strong{font-size:14px;line-height:1.4}
  body.fd-page main.fd-directory .fd-review-count{color:var(--fd-muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
  body.fd-page main.fd-directory :is(.fd-rating-source,.fd-profile-link){display:none}
  body.fd-page main.fd-directory .fd-unrated{grid-column:1/-1;font-size:12px;line-height:1.5}
  body.fd-page main.fd-directory .fd-price{margin:0;font-size:12px;line-height:1.6}
  body.fd-page main.fd-directory .fd-page-note{max-width:none;font-size:12px;line-height:1.65}
  body.fd-page main.fd-directory .fd-pagination{gap:8px;margin:22px 0 16px}
  body.fd-page main.fd-directory .fd-pagination a{width:44px;height:44px}
}

@media(max-width:360px){
  body.fd-page main.fd-directory .fd-hero{padding:18px 14px 20px}
  body.fd-page main.fd-directory .fd-hero h1{font-size:27px}
  body.fd-page main.fd-directory .fd-card{grid-template-columns:90px minmax(0,1fr);gap:10px}
  body.fd-page main.fd-directory :is(.fd-media,.fd-card-main){min-height:128px}
  body.fd-page main.fd-directory .fd-card h2{font-size:16px}
  body.fd-page main.fd-directory .fd-results-top{gap:6px}
  body.fd-page main.fd-directory .fd-results-copy h2{font-size:16px}
  body.fd-page main.fd-directory .fd-filter-toggle{padding-inline:8px;gap:5px}
  body.fd-page main.fd-directory .fd-filter-label-full{display:none}
  body.fd-page main.fd-directory .fd-filter-label-short{display:inline}
}
