/* Toolinium 2026 production polish layer
   Conservative overrides shared across homepage, tool, blog and legal pages. */
:root{
  --tl-focus:#4f80ff;
  --tl-radius:16px;
  --tl-shadow:0 18px 50px rgba(15,23,42,.08);
  --tl-shadow-dark:0 18px 50px rgba(0,0,0,.28);
}
html{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-text-size-adjust:100%;}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
img{height:auto;}
button,input,select,textarea{font:inherit;}
button,a,[role="button"],input,select,textarea{-webkit-tap-highlight-color:transparent;}
:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid color-mix(in srgb,var(--tl-focus) 70%,transparent);
  outline-offset:3px;
}
:where(button,.btn,.tool-btn,.home-btn,.theme-btn,.cat-tab,.nav-item){touch-action:manipulation;}

/* Subtle depth rather than heavy template-like glass effects. */
:where(.tool-container,.container,.main-card,.panel,.card,.sec-card,.feature,.tool-card,.category-card,.flagship-card,.about-card){
  box-shadow:0 1px 0 rgba(255,255,255,.025),0 10px 30px rgba(0,0,0,.08);
}
:where(.tool-card,.category-card,.flagship-card,.feature,.about-card,.card){
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
@media (hover:hover){
  :where(.tool-card,.category-card,.flagship-card,.feature,.about-card):hover{
    transform:translateY(-3px);
    box-shadow:0 18px 46px rgba(15,23,42,.12);
  }
}

/* Inputs: consistent accessible focus without changing individual tool layouts. */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select){
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select):focus{
  border-color:color-mix(in srgb,var(--tl-focus) 72%,transparent)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--tl-focus) 15%,transparent)!important;
}

/* Better long-content readability. */
:where(.sec-text,.faq p,.article-content,.legal-content,.blog-content){max-width:78ch;}
:where(.desc,.subtitle,.tool-subtitle){line-height:1.7;}

/* Mobile/tablet guard rails for older tool pages. */
@media (max-width:900px){
  :where(.tool-container,.container,.main-card,.main){max-width:100%!important;}
  :where(.grid,.main-grid,.content-grid,.analysis-grid,.workspace,.editor-grid){min-width:0!important;}
}
@media (max-width:720px){
  body{overflow-x:hidden!important;}
  :where(.tool-container,.container,.main-card,.main){border-radius:18px!important;}
  :where(.btn,.button,button:not(.fav-btn):not(.faq-q)){min-height:44px;}
  :where(input,select,textarea){font-size:16px;}
  :where(.topbar,.header){row-gap:12px;}
}
@media (max-width:430px){
  :where(.tool-container,.container,.main-card,.main){padding-left:14px!important;padding-right:14px!important;}
  :where(.card,.panel,.sec-card,.feature){border-radius:16px!important;}
}

/* Respect user motion settings and reduce unnecessary work on low-power devices. */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important;}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
}

@media (prefers-color-scheme:dark){
  :root{--tl-shadow:var(--tl-shadow-dark);}
}
