/* PAYATE Tools Hub — scoped under #thub. System font for body (zero webfont CLS),
   Poppins for headings with a metrics-matched fallback so the swap causes no reflow. */
@font-face{font-family:"PoppinsFB";src:local("Segoe UI Semibold"),local("Segoe UI"),local("Roboto Medium"),local("Roboto"),local("Helvetica Neue"),local("Arial");size-adjust:107%;ascent-override:98%;descent-override:32.7%;line-gap-override:0%}

body{margin:0;background:#f4f7fb;color:#14233c;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased}

#thub{max-width:960px;margin:0 auto;padding:22px 16px 40px}
#thub h1,#thub h2,#thub .th-name{font-family:Poppins,"PoppinsFB",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}

/* Hero */
#thub .th-hero{background:#fff;border:1px solid #e6ecf5;border-radius:16px;padding:26px 24px;
  box-shadow:0 1px 2px rgba(15,27,45,.05);margin-bottom:22px}
#thub .th-hero h1{margin:0 0 8px;font-size:26px;line-height:1.2;color:#0f1b2d;font-weight:700}
#thub .th-hero p{margin:0;font-size:14.5px;line-height:1.7;color:#4a5b73;max-width:720px}

/* Live tool search */
#thub .th-search{position:relative;margin:0 0 18px}
#thub .th-search input{width:100%;box-sizing:border-box;font-family:inherit;font-size:15px;color:#14233c;
  background:#fff;border:1px solid #e6ecf5;border-radius:12px;padding:13px 16px 13px 44px;
  box-shadow:0 1px 2px rgba(15,27,45,.05);outline:none;-webkit-appearance:none}
#thub .th-search input::placeholder{color:#9aa8bd}
#thub .th-search input:focus{border-color:#1d64d8;box-shadow:0 0 0 3px rgba(29,100,216,.12)}
#thub .th-search svg{position:absolute;left:15px;top:50%;transform:translateY(-50%);
  width:18px;height:18px;fill:none;stroke:#8795a9;stroke-width:2;stroke-linecap:round}
#thub .th-empty{display:none;background:#fff;border:1px solid #e6ecf5;border-radius:14px;
  padding:22px;text-align:center;color:#5a6b83;font-size:14px;margin-bottom:22px}

/* Category filter chips */
#thub .th-chips{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}
#thub .th-chip{border:1px solid #e6ecf5;background:#fff;color:#4a5b73;font-family:inherit;font-weight:600;font-size:13px;
  padding:9px 14px;border-radius:999px;cursor:pointer;white-space:nowrap;box-shadow:0 1px 2px rgba(15,27,45,.05);
  transition:border-color .15s ease,color .15s ease,background .15s ease}
#thub .th-chip:hover{border-color:#1d64d8;color:#1d64d8}
#thub .th-chip.on{background:#1d64d8;border-color:#1d64d8;color:#fff}

/* Category sections */
#thub .th-cat{margin:0 0 26px}
#thub .th-cat[hidden]{display:none}
#thub .th-cat-h{display:flex;align-items:center;gap:9px;margin:0 0 12px}
#thub .th-cat-h h2{margin:0;font-size:17px;line-height:1.2;color:#0f1b2d;font-weight:700}
#thub .th-cat-h .n{font-size:12px;font-weight:600;color:#8795a9;background:#eef2f8;border-radius:999px;padding:3px 9px}

/* Favorites */
#thub .th-fav{margin:0 0 20px}
#thub .th-fav h2{margin:0 0 12px;font-size:15px;font-weight:700;color:#0f1b2d}
#thub .th-fav h2 span{color:#f59e0b}

/* Tool grid */
#thub .th-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin-bottom:22px}
#thub .th-card[hidden]{display:none}

/* Favorite star on each card */
#thub .th-card{position:relative}
#thub .th-name{padding-right:26px}
#thub .th-star{position:absolute;top:9px;right:9px;z-index:2;border:0;background:transparent;cursor:pointer;
  font-size:19px;line-height:1;color:#d4dce7;padding:4px;border-radius:9px;
  transition:color .15s ease,transform .12s ease}
#thub .th-star:hover{color:#f59e0b;transform:scale(1.18)}
#thub .th-star:focus-visible{outline:2px solid #1d64d8;outline-offset:1px}
#thub .th-star.on{color:#f59e0b}
#thub .th-card{display:flex;flex-direction:column;text-decoration:none;background:#fff;
  border:1px solid #e6ecf5;border-radius:14px;padding:18px 18px 16px;
  box-shadow:inset 4px 0 0 var(--acc,#1d64d8),0 1px 2px rgba(15,27,45,.05);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
#thub .th-card:hover{transform:translateY(-2px);border-color:var(--acc,#1d64d8);
  box-shadow:inset 4px 0 0 var(--acc,#1d64d8),0 8px 20px rgba(15,27,45,.10)}
#thub .th-name{font-size:16px;font-weight:700;color:#0f1b2d;margin-bottom:6px}
#thub .th-desc{font-size:13px;line-height:1.55;color:#5a6b83;flex:1}
#thub .th-go{margin-top:12px;font-size:12.5px;font-weight:600;color:#1d64d8}

/* FAQ */
#thub .th-faq{background:#fff;border:1px solid #e6ecf5;border-radius:16px;padding:20px 22px;
  box-shadow:0 1px 2px rgba(15,27,45,.05)}
#thub .th-faq h2{margin:0 0 10px;font-size:19px;color:#0f1b2d}
#thub .th-faq details{border-top:1px solid #eef2f8;padding:2px 0}
#thub .th-faq details:first-of-type{border-top:0}
#thub .th-faq summary{cursor:pointer;list-style:none;padding:12px 26px 12px 2px;position:relative;
  font-weight:600;font-size:14.5px;color:#14233c}
#thub .th-faq summary::-webkit-details-marker{display:none}
#thub .th-faq summary::after{content:"+";position:absolute;right:4px;top:50%;transform:translateY(-50%);
  font-size:18px;color:#5a6782}
#thub .th-faq details[open] summary::after{content:"\2212"}
#thub .th-faq details p{margin:0 2px 12px;font-size:13.5px;line-height:1.7;color:#4a5b73}
#thub .th-faq a{color:#1d64d8;text-decoration:none}
#thub .th-faq a:hover{text-decoration:underline}

@media (max-width:560px){
  #thub .th-hero{padding:20px 18px}
  #thub .th-hero h1{font-size:22px}
}

#thub .th-crumb{font-size:12px;color:#5a6b83;margin:4px 2px 14px}
#thub .th-crumb a{color:#1550b4;text-decoration:none}
#thub .th-crumb a:hover{text-decoration:underline}
#thub .th-crumb span{margin:0 4px;color:#9aa8bd}

/* Dark mode — the chrome toggle sets data-theme="dark" on <html>.
   The cards are already darkened by the chrome engine; these cover the hub's
   own new bits (category headings, chips, counts, search, favorites, empty). */
html[data-theme="dark"] #thub .th-cat-h h2,
html[data-theme="dark"] #thub .th-fav h2{color:#eaf1fb}
html[data-theme="dark"] #thub .th-cat-h .n{color:#a9bcd6;background:#1d2b40}
html[data-theme="dark"] #thub .th-chip{background:#172231;border-color:#26344a;color:#a9bcd6}
html[data-theme="dark"] #thub .th-chip:hover{border-color:#3f7fe0;color:#dce8fb}
html[data-theme="dark"] #thub .th-chip.on{background:#1d64d8;border-color:#1d64d8;color:#fff}
html[data-theme="dark"] #thub .th-search input{background:#172231;border-color:#26344a;color:#eaf1fb}
html[data-theme="dark"] #thub .th-search input::placeholder{color:#7f90a8}
html[data-theme="dark"] #thub .th-search svg{stroke:#7f90a8}
html[data-theme="dark"] #thub .th-empty{background:#172231;border-color:#26344a;color:#a9bcd6}
html[data-theme="dark"] #thub .th-star{color:#3a4a63}
html[data-theme="dark"] #thub .th-star.on{color:#f59e0b}
