/* fx-ui.css — post-build layer for tools.faxianai.com
   Loaded after tools-refresh-v4.css so it wins without !important spam.
   Owns: brand lockup, hero first screen, live search results, task accordion,
   tool-page alias chips. Bump the ?v= in the <link> whenever this changes. */

/* the base theme sets .tool-card{display:grid}, which beat the UA [hidden] rule
   and made the old search filter look like it did nothing */
[hidden] { display: none !important; }

/* ---------- 1. brand ---------- */
.fx-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.fx-brand img { height: 27px; width: auto; display: block; }
.fx-brand .fx-name { font-size: 16.5px; color: #16171f; }
.fx-brand .fx-name b { font-weight: 700; }
.fx-brand .fx-name i { font-style: normal; font-weight: 500; color: #6c6e7c; }
[data-theme="dark"] .fx-brand .fx-name { color: #f2f2f6; }
[data-theme="dark"] .fx-brand .fx-name i { color: #9a9cab; }
[data-theme="dark"] .fx-brand img { filter: brightness(1.12); }
@media (max-width: 900px) { .fx-brand .fx-name i { display: none; } }
@media (max-width: 620px) {
  /* the nav is brand + theme button + language select on one row; the select is
     the only elastic part, so cap it and the brand stops being clipped */
  .fx-brand { gap: 7px; flex: none; }
  .fx-brand img { height: 22px; }
  .fx-brand .fx-name { font-size: 13.5px; letter-spacing: -.02em; }
  header.site .nav .langsw { max-width: 118px; min-width: 0; }
}
@media (max-width: 370px) {
  .fx-brand .fx-name { font-size: 12.5px; }
  header.site .nav .langsw { max-width: 100px; }
}

/* ---------- 2. hero first screen ---------- */
body.refresh-home .v3-hero {
  align-items: center;
  grid-template-columns: minmax(440px, 1fr) minmax(500px, 1.02fr);
  gap: 44px;
}
body.refresh-home .v3-hero .hero-copy { max-width: 620px; }
body.refresh-home .v3-hero h1 {
  display: block;
  max-width: 100%;
  margin: 0 0 18px;
  font-size: clamp(29px, 3.3vw, 44px) !important;
  line-height: 1.22 !important;
  letter-spacing: -.02em !important;
}
body.refresh-home .v3-hero h1 span,
body.refresh-home .v3-hero h1 em { display: block; text-wrap: balance; }
body.refresh-home .v3-hero h1 em { margin-top: 2px; }
body.refresh-home .v3-hero .lead {
  margin: 0 0 26px;
  max-width: 30em;
  font-size: 17.5px;
  line-height: 1.7;
  color: #4a4c58;
}
body.refresh-home .v3-hero .badges {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
body.refresh-home .v3-hero .badges span {
  min-height: 42px;
  padding: 0 14px;
  gap: 7px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
body.refresh-home .v3-hero .badges svg { width: 18px; height: 18px; flex: none; }
[data-theme="dark"] body.refresh-home .v3-hero .lead { color: #b4b6c4; }
[data-theme="dark"] body.refresh-home .v3-hero h1 span { color: #f3f3f7; }

@media (max-width: 1180px) {
  body.refresh-home .v3-hero { grid-template-columns: minmax(340px, 1fr) minmax(420px, 1fr); gap: 32px; }
  body.refresh-home .v3-hero h1 { font-size: clamp(27px, 3.1vw, 36px) !important; }
}
@media (max-width: 1050px) {
  body.refresh-home .v3-hero { grid-template-columns: 1fr; }
  body.refresh-home .v3-hero .hero-copy { max-width: 640px; }
}
@media (max-width: 720px) {
  body.refresh-home .v3-hero h1 { font-size: 30px !important; margin-bottom: 14px; }
  body.refresh-home .v3-hero .lead { font-size: 16px; margin-bottom: 20px; }
  body.refresh-home .v3-hero .badges { gap: 7px; }
  body.refresh-home .v3-hero .badges span { min-height: 36px; padding: 0 9px; gap: 5px; font-size: 12.5px; }
  body.refresh-home .v3-hero .badges svg { width: 15px; height: 15px; }
}

/* ---------- 3. live search ---------- */
.refresh-search-shell { position: relative; }
.fx-sresults {
  position: absolute;
  z-index: 60;
  left: 45px;
  right: 45px;
  top: calc(100% + 8px);
  max-height: min(62vh, 470px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #e4e3ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(30, 24, 62, .17);
}
.fx-sresults a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 11px;
  color: #1b1c23;
}
.fx-sresults a strong { display: block; font-size: 15.5px; font-weight: 650; }
.fx-sresults a small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #747682;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-sresults a em { font-style: normal; background: #efe9ff; border-radius: 3px; }
.fx-sresults a .fx-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f1fb;
  color: #5b4bd8;
  font-size: 12px;
  white-space: nowrap;
}
.fx-sresults a:hover, .fx-sresults a.on { background: #f5f2ff; }
.fx-sresults a.on .fx-tag { background: #e6e0ff; }
.fx-snone { padding: 16px 14px; color: #74768c; font-size: 14.5px; }
.fx-snone b { color: #1b1c23; }
.fx-smore { display: block; padding: 9px 13px 5px; color: #5b4bd8; font-size: 13px; }
[data-theme="dark"] .fx-sresults { background: #1b1d2b; border-color: #2c2f42; }
[data-theme="dark"] .fx-sresults a { color: #eceef6; }
[data-theme="dark"] .fx-sresults a:hover, [data-theme="dark"] .fx-sresults a.on { background: #262a3d; }
[data-theme="dark"] .fx-sresults a em { background: #3a2f6b; }
[data-theme="dark"] .fx-sresults a .fx-tag { background: #2b2f45; color: #a99bff; }
[dir="rtl"] .fx-sresults a { grid-template-columns: auto 1fr; }
@media (max-width: 720px) {
  .fx-sresults { left: 14px; right: 14px; top: calc(100% + 6px); }
}

/* ---------- 4. browse by task (accordion) ---------- */
.fx-cat { border-bottom: 1px solid #e8e7eb; }
.fx-cat:last-child { border-bottom: 0; }
.fx-cat-head {
  display: grid;
  grid-template-columns: 54px 1fr auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 84px;
  padding: 13px 22px;
  border: 0;
  background: none;
  color: #1b1c23;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.fx-cat-head:hover { background: #faf9ff; }
.fx-cat-head .v3-count { color: #245dff; font-size: 15px; white-space: nowrap; }
.fx-chev {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f2f1f7;
  color: #4a4b58;
  font-size: 13px;
  line-height: 1;
  transition: transform .18s ease;
}
.fx-cat[open] .fx-chev { transform: rotate(180deg); }
.fx-cat-body { padding: 0 22px 16px; }
.fx-cat-body ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.fx-cat-body li { margin: 0; }
.fx-cat-body a {
  display: block;
  padding: 8px 11px;
  border-radius: 10px;
  color: #33353f;
  font-size: 14.5px;
}
.fx-cat-body a:hover { background: #f3f0ff; color: #4a3fd0; }
.fx-cat-body a::before { content: "→"; margin-inline-end: 8px; color: #a9a6bd; font-size: 13px; }
[data-theme="dark"] .fx-cat { border-color: #2b2e3f; }
[data-theme="dark"] .fx-cat-head { color: #eceef6; }
[data-theme="dark"] .fx-cat-head:hover { background: #222536; }
[data-theme="dark"] .fx-chev { background: #2a2d3f; color: #c9cbd8; }
[data-theme="dark"] .fx-cat-body a { color: #c3c5d2; }
[data-theme="dark"] .fx-cat-body a:hover { background: #272b3e; color: #b0a4ff; }
@media (max-width: 620px) {
  .fx-cat-body ul { grid-template-columns: 1fr; }
  .fx-cat-head { grid-template-columns: 46px 1fr auto; padding: 12px 16px; min-height: 72px; }
  .fx-cat-head .v3-count { display: none; }
}

/* ---------- 5. tool-page alias chips ---------- */
.fx-aka { margin: 26px 0 6px; }
.fx-aka h2 { margin: 0 0 10px; font-size: 16px; font-weight: 650; color: #4c4e5c; }
.fx-aka-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-aka-list a {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid #e5e3ec;
  border-radius: 999px;
  background: #fbfaff;
  color: #4b4d5b;
  font-size: 13.5px;
}
.fx-aka-list a:hover { border-color: #c7bcff; background: #f4f0ff; color: #4a3fd0; }
[data-theme="dark"] .fx-aka h2 { color: #a5a7b6; }
[data-theme="dark"] .fx-aka-list a { border-color: #303346; background: #1e2130; color: #b9bbca; }
[data-theme="dark"] .fx-aka-list a:hover { border-color: #514a8c; background: #262a3d; color: #b0a4ff; }

/* ---------- 6. dark mode gaps left by tools-refresh-v4.css ----------
   These panels were hard-coded white, so on a dark page they came out as white
   boxes with near-white text. Same specificity path as the v4 rules. */
[data-theme="dark"] .v3-finder-list { background: #16181f; border-color: #2b2e3f; }
[data-theme="dark"] .v3-finder-row { color: #eceef6; border-color: #2b2e3f; }
[data-theme="dark"] .v3-finder-row:hover { background: #222536; }
[data-theme="dark"] .v3-row-copy small { color: #9799a8; }
[data-theme="dark"] .v3-arrow { color: #8d8fa0; }
[data-theme="dark"] .v3-count { color: #7fa2ff; }
[data-theme="dark"] .v3-trust-strip { background: linear-gradient(105deg, #1c1a2b, #191925); border-color: #35305a; }
[data-theme="dark"] .v3-trust-main h2 { color: #ece9ff; }
[data-theme="dark"] .v3-trust-main p { color: #a5a7b6; }
[data-theme="dark"] .v3-trust-points { color: #a99bff; }
[data-theme="dark"] .v3-tutorial { background: #16181f; border-color: #2b2e3f; color: #eceef6; }
[data-theme="dark"] .v3-tutorial small { color: #9799a8; }
[data-theme="dark"] .v3-tutorial b { border-color: #35384a; }
[data-theme="dark"] body.refresh-home .refresh-search-shell { background: #16181f; box-shadow: 0 24px 56px rgba(0, 0, 0, .45); }
[data-theme="dark"] .refresh-search-chips button { background: #1e2130; border-color: #303346; color: #c3c5d2; }
[data-theme="dark"] .refresh-search-chips button:hover { background: #262a3d; color: #eceef6; }
[data-theme="dark"] .refresh-search svg { color: #b9bbca; }
