/* Scoped card rules: hero, category cards, header and footer are unaffected. */
body.home-modern #experts #expert-grid,body #directory-results #find-grid,body.saved-page #favorite-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%;overflow:visible}
body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-card{display:grid;grid-template-columns:76px minmax(0,1fr);align-content:start;gap:10px;padding:14px;background:white;border:1px solid #dce6e8;border-radius:10px;min-width:0;color:var(--ys-ink,#19334e)}
.ys-expert-photo{position:relative;display:block;width:76px;height:76px;border-radius:7px;overflow:hidden;background:#edf4f3}.ys-expert-photo img{position:absolute;inset:0;width:100%;height:100%}.ys-photo-fallback{display:grid;place-items:center;height:100%;color:#00767e;font-size:28px;font-weight:700}.ys-example-label{position:absolute;bottom:3px;left:3px;background:#19334ee6;color:white;padding:1px 4px;border-radius:3px;font-size:.6875rem;line-height:1.4}.ys-expert-summary{min-width:0;align-self:center}html[data-type-system] body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-summary h3{font-size:1rem;line-height:1.4;margin:0 0 4px;letter-spacing:0;overflow-wrap:anywhere}html[data-type-system] body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-summary p{font-size:.875rem;line-height:1.6;margin:2px 0;color:#52657a;overflow-wrap:anywhere}html[data-type-system] body :is(#expert-grid,#find-grid,#favorite-grid) p.ys-expert-fields{color:#006770}.ys-expert-summary a{color:inherit;text-decoration:none}.ys-expert-summary a:hover{text-decoration:underline}.ys-expert-actions{grid-column:1/-1;display:flex;align-items:center;gap:8px;padding-top:8px;border-top:1px solid #edf1f2}.ys-expert-actions .ys-expert-favorite{position:static;display:block;flex:none;width:44px;height:auto;min-height:44px;padding:4px;border:1px solid #d2e5e4;border-radius:50%;background:white;color:#00767e;font-size:24px;line-height:1.3;box-shadow:none}.ys-expert-profile{display:flex;align-items:center;justify-content:center;flex:1;min-height:44px;padding:7px 10px;background:#edf7f5;color:#006770;border-radius:7px;font-size:.9375rem;line-height:1.5;font-weight:600;text-align:center;text-decoration:none}.ys-expert-profile:hover{background:#d7efea}.ys-expert-compare{grid-column:1/-1;justify-self:end;font-size:.875rem;min-height:44px;background:none;border:0;color:#52657a;text-decoration:underline}.ys-expert-card:focus-within{border-color:#00767e}.ys-expert-card :focus-visible{outline:3px solid #00767e;outline-offset:3px}body #search-pagination{display:flex;justify-content:center;gap:8px;align-items:center;flex-wrap:wrap;margin:24px 0}#search-pagination a,#search-pagination .page-disabled{min-width:44px;min-height:44px;display:grid;place-items:center;padding:8px 12px;border:1px solid #cbdedb;border-radius:6px;font-size:.9375rem}#search-pagination a[aria-current=page]{background:#00767e;color:white}#search-pagination .page-disabled{color:#52657a;background:#f3f6f7}.page-mobile{display:none}body #search-pagination[hidden]{display:none}
@media(min-width:901px) and (max-width:1150px){body #directory-results #find-grid,body.saved-page #favorite-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:601px) and (max-width:900px){body.home-modern #experts #expert-grid,body #directory-results #find-grid,body.saved-page #favorite-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){body.home-modern #experts #expert-grid,body #directory-results #find-grid,body.saved-page #favorite-grid{grid-template-columns:1fr}body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-card{padding:12px;grid-template-columns:72px minmax(0,1fr)}.ys-expert-photo{width:72px;height:72px}#search-pagination .page-number,#search-pagination .page-gap{display:none}#search-pagination .page-mobile{display:block}body #search-pagination{justify-content:space-between}}

#home-expert-pages{display:flex;justify-content:center;align-items:center;gap:8px;margin:22px 0 0;flex-wrap:wrap}#home-expert-pages[hidden]{display:none}#home-expert-pages button,#home-expert-pages .page-disabled{display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid #cbdedb;border-radius:6px;padding:8px 12px;background:white;color:#19334e;font:500 .9375rem/1.5 var(--ys-font)}#home-expert-pages button{cursor:pointer}#home-expert-pages button[aria-current=page]{background:#00767e;color:white;border-color:#00767e}#home-expert-pages .page-disabled{background:#f3f6f7;color:#7b8d9b}#home-expert-pages button:hover{border-color:#00767e}#home-expert-pages button:focus-visible{outline:3px solid #00767e;outline-offset:3px}body.home-modern #experts .featured-directory-link{margin-top:14px}body.home-modern #experts .featured-directory-link a{border:0;background:transparent;padding:4px;font-size:.875rem;box-shadow:none}@media(max-width:600px){#home-expert-pages{gap:5px}#home-expert-pages button,#home-expert-pages .page-disabled{padding:7px;min-width:38px}}

/* Keep search page numbers available on narrow screens as well as desktop. */
@media(max-width:600px){
 body #search-pagination{display:flex;position:static;top:auto;left:auto;right:auto;width:100%;max-height:none;flex-direction:row;justify-content:center;gap:6px;flex-wrap:wrap;overflow:visible;margin:20px 0 28px;padding:0;background:transparent;border:0;box-shadow:none}
 body #search-pagination .page-number{display:grid}
 body #search-pagination .page-gap{display:inline-flex;min-width:20px;padding:0}
 body #search-pagination :is(a,.page-disabled){box-sizing:border-box;min-width:44px;min-height:44px;padding:8px}
 body #search-pagination .page-mobile{display:block;flex-basis:100%;order:2;text-align:center;padding:0;min-height:24px}
 body #search-pagination[hidden]{display:none}
}

/* Shared compact listing cards. Keep controls on one row and allow text to grow at zoom. */
html[data-type-system] body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-summary h3{min-height:2.8em}
body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-actions{flex-wrap:wrap}
body :is(#expert-grid,#find-grid,#favorite-grid) .ys-expert-profile{min-width:0;flex:1 1 90px;padding-inline:6px}
html body :is(#find-grid,#favorite-grid) .ys-expert-actions .ys-expert-compare{display:flex;align-items:center;gap:4px;flex:0 1 auto;width:auto;min-width:44px;min-height:44px;margin:0;padding:0;font-size:.875rem;line-height:1.5;white-space:normal}
