/* Tools4U Fix 3: compact search-first homepage. Public homepage only.
   Preserves ad-free home, product links, pricing behavior and existing routes. */
body:has(.homepage-directory) .hero{padding:clamp(28px,4.2vw,56px) 0 clamp(24px,3vw,38px);min-height:0}
body:has(.homepage-directory) .hero .hero-copy{width:100%;max-width:950px;margin:auto;text-align:center}
body:has(.homepage-directory) .hero .hero-copy h1{font-size:clamp(29px,4.1vw,54px);line-height:1.14;letter-spacing:-.035em;margin:0 auto 15px;text-wrap:balance}
body:has(.homepage-directory) .hero .hero-copy>p{font-size:clamp(14px,1.4vw,17px);color:var(--muted,#5b5971);line-height:1.5;margin:0 auto 24px;max-width:650px}
body:has(.homepage-directory) .hero .searchbox{max-width:860px;width:100%;min-width:0;margin:0 auto 14px;border:2px solid #8060ed;border-radius:18px;box-shadow:0 12px 32px rgba(92,56,174,.16);transition:border-color .15s,box-shadow .15s;box-sizing:border-box}
body:has(.homepage-directory) .hero .searchbox:focus-within{border-color:#6028e8;box-shadow:0 0 0 4px rgba(117,65,223,.16),0 12px 32px rgba(92,56,174,.15)}
body:has(.homepage-directory) .hero .searchbox input{min-width:0;flex:1}
body:has(.homepage-directory) .hero .searchbox button{flex-shrink:0}
.home-quick-categories{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:860px;margin:0 auto}
.home-quick-categories a{display:inline-flex;align-items:center;justify-content:center;padding:8px 13px;border-radius:999px;border:1px solid rgba(122,84,229,.25);background:rgba(122,84,229,.06);color:inherit;font-size:13px;font-weight:650;line-height:1.2;text-decoration:none;min-height:34px}
.home-quick-categories a:hover,.home-quick-categories a:focus-visible{border-color:#8054ed;background:rgba(122,84,229,.14);outline-offset:3px}
body:has(.homepage-directory) .hero .eyebrow,body:has(.homepage-directory) .hero .popular,body:has(.homepage-directory) .hero .home-pdf-shortcut{display:none!important}
body:has(.homepage-directory) .home-pricing-section{margin:32px auto 40px}
body:has(.homepage-directory) .homepage-directory{margin:30px auto 34px}
.home-umbrella-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;align-items:start;margin:22px 0 0;min-width:0}
.home-umbrella{min-width:0;overflow:hidden;border:1px solid rgba(118,71,229,.21);border-radius:17px;background:rgba(124,84,220,.05);box-shadow:0 3px 10px rgba(35,22,80,.03)}
.home-umbrella summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:18px;min-height:85px;box-sizing:border-box;outline-offset:2px}
.home-umbrella summary::-webkit-details-marker{display:none}
.home-umbrella summary:hover,.home-umbrella summary:focus-visible{background:rgba(122,84,229,.1)}
.home-umbrella summary:focus-visible{outline:3px solid #8054ed;outline-offset:-3px}
.home-umbrella-icon{font-size:25px;display:grid;place-items:center;width:46px;height:46px;flex:none;border-radius:12px;background:rgba(122,84,229,.13)}
.home-umbrella-heading{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.home-umbrella-heading strong{font-size:15px;line-height:1.28;overflow-wrap:anywhere}
.home-umbrella-heading small{font-size:12px;color:var(--muted,#77718b)}
.home-umbrella-chevron{font-size:22px;flex:none;color:#7946dc;transition:transform .18s}
.home-umbrella[open] .home-umbrella-chevron{transform:rotate(180deg)}
.home-umbrella-links{padding:0 14px 15px;display:flex;flex-direction:column;gap:7px;border-top:1px solid rgba(122,84,229,.13)}
.home-umbrella-links a{padding:10px 9px;display:flex;justify-content:space-between;align-items:center;gap:10px;color:inherit;text-decoration:none;border-radius:9px;font-size:13px;line-height:1.3}
.home-umbrella-links a:hover,.home-umbrella-links a:focus-visible{background:rgba(122,84,229,.11);text-decoration:underline;outline-offset:2px}
.home-umbrella-links a span{color:#8054ed;flex:none}
/* Sun/moon control: icon-only visual, readable accessible name via existing aria-label. */
#t4u-theme-switch{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-width:68px!important;width:70px!important;height:36px!important;padding:5px 8px!important;font-size:0!important;white-space:nowrap;overflow:hidden}
#t4u-theme-switch::before,#t4u-theme-switch::after{font-size:17px;line-height:1;display:inline-block;opacity:.45;transition:opacity .15s,transform .15s}
#t4u-theme-switch::before{content:'☀';}
#t4u-theme-switch::after{content:'☾';}
html[data-t4u-theme='light'] #t4u-theme-switch::before{opacity:1;transform:scale(1.2);color:#e3a125}
html[data-t4u-theme='dark'] #t4u-theme-switch::after{opacity:1;transform:scale(1.2);color:#b8a1ff}
@media(max-width:900px){.home-umbrella-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 body:has(.homepage-directory) .hero{padding:28px 12px 26px}
 body:has(.homepage-directory) .hero .hero-copy h1{font-size:clamp(29px,7.8vw,39px);margin:0 auto 12px}
 body:has(.homepage-directory) .hero .searchbox{margin-bottom:12px}
 body:has(.homepage-directory) .hero .searchbox button{font-size:13px;padding:10px 12px}
 .home-quick-categories{gap:6px}
 .home-quick-categories a{font-size:12px;padding:8px 11px;min-height:32px}
 .home-umbrella-grid{grid-template-columns:minmax(0,1fr)}
 .home-umbrella summary{min-height:72px;padding:14px}
 body:has(.homepage-directory) .home-pricing-section{margin:22px auto 32px}
}
@media(prefers-reduced-motion:reduce){.home-umbrella-chevron,#t4u-theme-switch::before,#t4u-theme-switch::after{transition:none}}
