/* SAM1337 TOOLS v53 — unified responsive polish + smooth motion */
:root{--sam-green:#18a957;--sam-green-soft:#eef9f2;--sam-ink:#17221c;--sam-muted:#6e7b73;--sam-line:#e1ebe4}
html{scroll-behavior:smooth}
body{overflow-x:hidden;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
/* consistent touch behavior */
a,button,input,select{touch-action:manipulation}
button,a{-webkit-tap-highlight-color:transparent}
/* subtle, lightweight entrance motion across all pages */
.site-header{animation:sgHeader .45s cubic-bezier(.22,1,.36,1) both!important}
main>*{animation:sgUp .48s cubic-bezier(.22,1,.36,1) both}
main>*:nth-child(2){animation-delay:.04s}main>*:nth-child(3){animation-delay:.08s}main>*:nth-child(4){animation-delay:.12s}
.tool-card{transition:transform .22s cubic-bezier(.22,1,.36,1),box-shadow .22s ease,border-color .22s ease!important}
.tool-card:hover{transform:translateY(-4px)!important}
.tool-card:active{transform:translateY(-1px)!important}
.filter-btn,.primary-action,.secondary-action,.tool-card-footer a,.nav-toggle{transition:transform .18s ease,background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease!important}
.filter-btn:active,.primary-action:active,.secondary-action:active,.tool-card-footer a:active{transform:scale(.97)!important}
.tool-search{transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease!important}
/* directory search is always allowed to control card visibility */
.tool-grid .tool-card[data-hidden="1"]{display:none!important}
.tool-grid .tool-card[data-hidden="0"]{display:flex!important}
.directory-empty{display:none!important;opacity:0;transform:translateY(5px);transition:opacity .2s ease,transform .2s ease!important}
.directory-empty.show{display:block!important;opacity:1;transform:none}
/* mobile: cards use the full available width, comfortable reading size */
@media(max-width:760px){
  main{width:min(100% - 24px,1080px)!important;margin-left:auto!important;margin-right:auto!important}
  .tool-directory{padding-top:28px!important;padding-bottom:48px!important}
  .directory-controls{gap:9px!important}
  .tool-search{width:100%!important;height:46px!important;font-size:13px!important;padding:0 14px!important}
  .filter-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;gap:7px!important}
  .filter-btn{width:100%!important;height:38px!important;padding:0 8px!important;font-size:10px!important}
  .tool-grid{grid-template-columns:1fr!important;gap:12px!important;width:100%!important}
  .tool-card{width:100%!important;min-height:0!important;padding:18px!important;border-radius:14px!important}
  .tool-card-body{padding:15px 0!important}
  .tool-card-body h3{font-size:18px!important;line-height:1.25!important;margin:8px 0 7px!important}
  .tool-card-body>span{font-size:11px!important;line-height:1.7!important}
  .tool-card-footer{padding-top:12px!important;font-size:9px!important}
  .tool-card-footer a{width:34px!important;height:34px!important;min-width:34px!important}
  .mini-icon{width:34px!important;height:34px!important;min-width:34px!important}
  .available{font-size:9px!important}
  .about-panel{padding:24px!important;margin-bottom:10px!important}
}
@media(max-width:420px){
  main{width:calc(100% - 18px)!important}
  .home-copy h1{font-size:clamp(34px,12vw,44px)!important}
  .home-copy p{font-size:11px!important;line-height:1.75!important}
  .filter-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tool-card{padding:16px!important}
  .tool-card-body h3{font-size:17px!important}
  .tool-card-body>span{font-size:10.5px!important}
}
@keyframes sgHeader{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}
@keyframes sgUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.site-header,main>*{animation:none!important}.tool-card,.filter-btn,.primary-action,.secondary-action,.tool-card-footer a,.nav-toggle{transition:none!important}}
