/* Approved desktop search refinement. Existing filtering, sticky behavior and
   mobile dialog remain owned by browse-desktop/discovery-search. */
/* White catalogue with the reference's subtle white-to-gray search surface. */
/* The fixed header can expose the document canvas during elastic scrolling. */
html:has(body #cd-root){background:#fff!important}
html body.browse-page,html body.browse-page .main-content-container,
html body:has(#cd-root),html body:has(#cd-root) .main-content-container,
html #cd-root,html #cd-root .cd-main,html body:has(#cd-root) .hp-about{background:#fff!important}
html #cd-root #ds-search::before{background:linear-gradient(180deg,#fff 0%,#f8f8f8 100%)!important;border-bottom:2px solid #ebebeb!important}
@media (min-width:769px){
 html body:has(#cdb-desktop) header,html body:has(#cdb-desktop) header>div,
 html body.cdb-voices-header header,html body.cdb-voices-header header>div{background:#fff!important}
 html #cd-root #ds-search:has(#cdb-desktop):not(.cdb-entry-compact){padding-top:25px;padding-bottom:10px}
 html body:has(#cd-root):not(.cdb-header-compact) header{border-bottom-color:#fff!important}
 html body:has(#cd-root).cdb-header-compact header{border-bottom:2px solid #ebebeb!important}
 #cdb-desktop .cdb-searchbar{background:#fff;border-color:#ddd}
 #cdb-desktop .cdb-segment+.cdb-segment::before{border-inline-start-color:#ddd}

 /* The second row keeps advanced filters available without competing with search. */
 #cdb-desktop:not(.cdb-compact) .cdb-search-row{display:grid;grid-template-columns:minmax(0,850px);justify-content:center;gap:8px;padding-top:0}
 #cdb-desktop:not(.cdb-compact) .cdb-searchbar{width:100%;max-width:850px;height:64px;min-height:64px;padding:7px;border-color:#ddd;box-shadow:0 8px 24px rgb(0 0 0 / 12%),0 1px 2px rgb(0 0 0 / 5%)}
 #cdb-desktop:not(.cdb-compact) .cdb-segment{height:48px;justify-content:center;gap:2px;padding:5px 23px;background:transparent}
 #cdb-desktop:not(.cdb-compact) .cdb-segment:first-child{flex:1.25}
 #cdb-desktop:not(.cdb-compact) .cdb-segment strong{font-size:12px;font-weight:500;line-height:18px}
 #cdb-desktop:not(.cdb-compact) .cdb-segment>span{font-size:14px;font-weight:400;line-height:20px;color:#717171}
 #cdb-desktop:not(.cdb-compact) .cdb-segment+.cdb-segment::before{top:50%;transform:translateY(-50%);height:29px;border-color:#ddd}
 #cdb-desktop:not(.cdb-compact) .cdb-segment[aria-expanded=true]{background:#f4f4f4;box-shadow:none}
 #cdb-desktop:not(.cdb-compact) .cdb-search{width:48px;height:48px;min-height:48px;flex:0 0 48px;padding:0;margin-inline-start:5px;border-radius:50%}
 #cdb-desktop:not(.cdb-compact) .cdb-search>svg{width:21px;height:21px;stroke-width:2}
 /* browse-desktop.js supplies localized aria-labels on both icon controls. */
 #cdb-desktop .cdb-search>span{display:none}
 #cdb-desktop:not(.cdb-compact) .cdb-filters{justify-self:end;gap:7px;min-height:36px;padding:5px 6px;border:0;border-radius:8px;background:transparent;font-size:12px;font-weight:400;color:#717171;box-shadow:none}
 #cdb-desktop:not(.cdb-compact) .cdb-filters>svg{width:15px;height:15px;stroke-width:1.6}
 #cdb-desktop:not(.cdb-compact) .cdb-filters>span{display:inline}
 #cdb-desktop:not(.cdb-compact) .cdb-filters .cdb-badge{position:static;min-width:18px;height:18px;font-size:10px}
 #cdb-desktop .cdb-search:focus-visible,#cdb-desktop .cdb-filters:focus-visible{outline:2px solid #7c3aed;outline-offset:3px}

 /* Desktop category navigation shares the approved optical size and rhythm. */
 #cdb-header-tabs.cdb-service-tabs,
 #cdb-desktop .cdb-service-tabs,
 body.cdb-voices-header .cdb-voices-inline,
 .svc-tabs:has(.cm-category-art){gap:36px}
 #cdb-header-tabs.cdb-service-tabs a.cm-category-link,
 #cdb-desktop .cdb-service-tabs a.cm-category-link,
 body.cdb-voices-header .cdb-voices-inline a.cm-category-link,
 .svc-tabs .svc-tab.cm-category-link{position:relative;gap:9px;padding-inline:4px;border-bottom:0;font-size:14px;font-weight:400;color:#717171}
 #cdb-header-tabs.cdb-service-tabs a.cm-category-link[aria-current=page],
 #cdb-desktop .cdb-service-tabs a.cm-category-link[aria-current=page],
 body.cdb-voices-header .cdb-voices-inline a.cm-category-link[aria-current=page],
 .svc-tabs.svc-tabs--light .svc-tab.cm-category-link.is-active{color:#222;font-weight:500}
 #cdb-header-tabs.cdb-service-tabs a.cm-category-link::after,
 #cdb-desktop .cdb-service-tabs a.cm-category-link::after,
 body.cdb-voices-header .cdb-voices-inline a.cm-category-link::after,
 .svc-tabs .svc-tab.cm-category-link::after{content:'';position:absolute;inset-inline:9px;bottom:0;height:3px;border-radius:10px;background:#7c3aed;opacity:0;transform:scaleX(.75);transition:opacity 180ms ease,transform 240ms ease}
 #cdb-header-tabs.cdb-service-tabs a.cm-category-link[aria-current=page]::after,
 #cdb-desktop .cdb-service-tabs a.cm-category-link[aria-current=page]::after,
 body.cdb-voices-header .cdb-voices-inline a.cm-category-link[aria-current=page]::after,
 .svc-tabs .svc-tab.cm-category-link.is-active::after{opacity:1;transform:scaleX(1)}
 .svc-tabs.svc-tabs--dark .svc-tab.cm-category-link{color:#bbb}
 .svc-tabs.svc-tabs--dark .svc-tab.cm-category-link.is-active{color:#fff;font-weight:500}
 .svc-tabs.svc-tabs--dark .svc-tab.cm-category-link::after{background:#a78bfa}
 .cdb-service-tabs .cm-category-art,.svc-tabs .cm-category-art{width:56px;height:60px;flex-basis:56px}
 .cdb-service-tabs .cm-category-art>img,.cdb-service-tabs .cm-category-art>canvas,
 .svc-tabs .cm-category-art>img,.svc-tabs .cm-category-art>canvas{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:56px;height:56px}
 .cdb-service-tabs .cm-category-art[data-kind=voice]>img,.cdb-service-tabs .cm-category-art[data-kind=voice]>canvas,
 .svc-tabs .cm-category-art[data-kind=voice]>img,.svc-tabs .cm-category-art[data-kind=voice]>canvas{width:60px;height:60px}
 @media(max-width:1050px){
  html #cd-root #ds-search:has(#cdb-desktop):not(.cdb-entry-compact){padding-top:0}
  #cdb-desktop:not(.cdb-compact) .cdb-service-tabs{margin-bottom:25px}
  #cdb-desktop:not(.cdb-compact) .cdb-segment{padding-inline:18px}
 }
 @media(hover:hover) and (pointer:fine){
  #cdb-desktop:not(.cdb-compact) .cdb-segment:hover{background:#f4f4f4}
  #cdb-desktop:not(.cdb-compact) .cdb-filters:hover{color:#222;text-decoration:underline}
 }
}
@media(max-width:768px){
 html #cd-root #ds-search{background:linear-gradient(180deg,#fff 0%,#f8f8f8 100%);border-bottom:2px solid #ebebeb}
 html #cd-root #ds-search>.ds-open{background:#fff;border-color:#ddd}
}
@media(prefers-reduced-motion:reduce){
 #cdb-header-tabs.cdb-service-tabs a.cm-category-link::after,
 #cdb-desktop .cdb-service-tabs a.cm-category-link::after,
 body.cdb-voices-header .cdb-voices-inline a.cm-category-link::after,
 .svc-tabs .svc-tab.cm-category-link::after{transition:none}
}
