/* =========================================================
   PARSYU — CATEGORY PAGES
   Shared chrome for /tools/<category>/ and /tools/.
========================================================= */

/* ─────────────────────────────────────────────────────────
   CURSOR SAFETY NET
   Category pages don't load the custom cursor script, so
   we must restore the native cursor over main.css's
   `cursor: none`. The `html body` prefix beats every
   body-level rule in main.css regardless of cache/order.
───────────────────────────────────────────────────────── */
html body,
html body *{ cursor: auto !important }

html body a,
html body button,
html body [role="button"],
html body label,
html body summary,
html body select,
html body input[type="checkbox"],
html body input[type="radio"],
html body input[type="file"],
html body input[type="range"],
html body .filter-btn,
html body .cat-card{ cursor: pointer !important }

html body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
html body textarea{ cursor: text !important }

html body .cursor{ display: none !important }

/* ─────────────────────────────────────────────────────────
   PAGE SHELL
───────────────────────────────────────────────────────── */
.cat-page{
  position:relative;
  z-index:1;
  padding:60px 0 90px;
}

/* ─────────────────────────────────────────────────────────
   BREADCRUMB
───────────────────────────────────────────────────────── */
.cat-breadcrumb{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:22px;
  color:var(--text-3);
  font-size:12px;
  flex-wrap:wrap;
}
.cat-breadcrumb a{
  color:var(--text-3);
  transition:color .2s ease;
}
.cat-breadcrumb a:hover{ color:#A5B4FC }
.cat-breadcrumb .sep{ opacity:.55 }
.cat-breadcrumb .current{ color:var(--text-2); font-weight:600 }

/* ─────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────── */
.cat-hero{
  position:relative;
  display:flex;
  gap:24px;
  align-items:center;
  padding:30px;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(150deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  margin-bottom:36px;
  flex-wrap:wrap;
  isolation:isolate;
  overflow:hidden;
}
.cat-hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:radial-gradient(600px circle at 0% 0%, rgba(99,102,241,.16), transparent 55%);
  pointer-events:none;
}

.cat-hero-icon{
  flex-shrink:0;
  width:80px;
  height:80px;
  display:grid;
  place-items:center;
  border-radius:22px;
  font:800 28px var(--mono);
}
.cat-hero-icon.ic-indigo{ background:rgba(99,102,241,.14); color:#A5B4FC; border:1px solid rgba(99,102,241,.24) }
.cat-hero-icon.ic-violet{ background:rgba(168,85,247,.13); color:#D8B4FE; border:1px solid rgba(168,85,247,.22) }
.cat-hero-icon.ic-cyan  { background:rgba(34,211,238,.12); color:#A5F3FC; border:1px solid rgba(34,211,238,.22) }
.cat-hero-icon.ic-gold  { background:rgba(252,211,77,.11); color:#FDE68A; border:1px solid rgba(252,211,77,.22) }
.cat-hero-icon.ic-green { background:rgba(52,211,153,.11); color:#6EE7B7; border:1px solid rgba(52,211,153,.22) }
.cat-hero-icon.ic-rose  { background:rgba(251,113,133,.11); color:#FDA4AF; border:1px solid rgba(251,113,133,.22) }

.cat-hero-copy{
  flex:1;
  min-width:240px;
}
.cat-hero-copy h1{
  font-size:clamp(26px, 3.4vw, 40px);
  line-height:1.15;
  font-weight:900;
  letter-spacing:-.03em;
}
.cat-hero-copy p{
  margin-top:8px;
  color:var(--text-2);
  font-size:14.5px;
  line-height:1.8;
  max-width:560px;
}

.cat-stats{
  display:flex;
  gap:22px;
  flex-wrap:wrap;
  margin-top:20px;
}
.cat-stat{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.cat-stat b{
  font:800 20px/1.2 var(--mono);
  background:var(--grad-text);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.cat-stat span{
  color:var(--text-3);
  font-size:11px;
}

/* ─────────────────────────────────────────────────────────
   SECTION HEADING (inside category body)
───────────────────────────────────────────────────────── */
.cat-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:22px;
  flex-wrap:wrap;
}
.cat-section-head h2{
  font-size:clamp(20px, 2.4vw, 26px);
  font-weight:850;
  letter-spacing:-.025em;
}
.cat-section-count{
  color:var(--text-3);
  font:600 11px var(--mono);
  letter-spacing:.1em;
  text-transform:uppercase;
}

/* ─────────────────────────────────────────────────────────
   FILTER ROW (used by /tools/ archive page only)
───────────────────────────────────────────────────────── */
.cat-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:24px;
}
.cat-filter-row .filter-btn{
  padding:8px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.022);
  color:var(--text-2);
  font-size:12px;
  font-weight:600;
  transition:all .28s var(--ease);
}
.cat-filter-row .filter-btn:hover{
  color:var(--text);
  transform:translateY(-2px);
  border-color:var(--line-2);
}
.cat-filter-row .filter-btn.active{
  color:#E0E7FF;
  border-color:rgba(99,102,241,.55);
  background:linear-gradient(110deg, rgba(99,102,241,.22), rgba(34,211,238,.09));
  box-shadow:0 12px 34px -18px rgba(99,102,241,.9);
}

/* ─────────────────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────────────────── */
.cat-empty{
  padding:60px 24px;
  text-align:center;
  border:1px dashed var(--line-2);
  border-radius:20px;
  background:rgba(255,255,255,.01);
}
.cat-empty-icon{
  width:64px;
  height:64px;
  margin:0 auto 18px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:rgba(99,102,241,.1);
  border:1px solid rgba(99,102,241,.22);
  color:#A5B4FC;
  font:800 24px var(--mono);
}
.cat-empty h3{
  font-size:17px;
  font-weight:800;
}
.cat-empty p{
  margin:8px auto 0;
  color:var(--text-2);
  font-size:13px;
  max-width:400px;
  line-height:1.85;
}
.cat-empty-cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:20px;
  padding:10px 18px;
  border:1px solid var(--line-2);
  border-radius:11px;
  background:rgba(255,255,255,.03);
  color:var(--text-2);
  font-size:13px;
  font-weight:600;
  transition:all .3s var(--ease);
}
.cat-empty-cta:hover{
  color:var(--text);
  border-color:rgba(99,102,241,.5);
  background:rgba(99,102,241,.1);
}

/* ─────────────────────────────────────────────────────────
   RELATED SECTION
───────────────────────────────────────────────────────── */
.cat-related{
  margin-top:70px;
  padding-top:44px;
  border-top:1px solid var(--line);
}

/* ─────────────────────────────────────────────────────────
   INFO SECTION
───────────────────────────────────────────────────────── */
.cat-info{
  margin-top:60px;
  padding-top:40px;
  border-top:1px solid var(--line);
}
.cat-info h2{
  font-size:18px;
  font-weight:850;
  letter-spacing:-.02em;
  margin-bottom:12px;
}
.cat-info p{
  color:var(--text-2);
  font-size:13.5px;
  line-height:1.95;
  max-width:720px;
}
.cat-info p + p{ margin-top:12px }
.cat-info strong{ color:var(--text); font-weight:700 }
.cat-info a{
  color:#A5B4FC;
  border-bottom:1px dashed rgba(165,180,252,.4);
  padding-bottom:1px;
}
.cat-info a:hover{ color:#DCE4FF }

/* ─────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE
   body already has padding-top: var(--header-h-m) from
   effects.css, so we only add a little breathing room.
───────────────────────────────────────────────────────── */
@media (max-width:900px){
  .cat-page{ padding:24px 0 70px }

  .cat-hero{
    padding:24px;
    gap:18px;
    border-radius:18px;
  }
  .cat-hero-icon{
    width:60px;
    height:60px;
    border-radius:16px;
    font-size:22px;
  }
  .cat-hero-copy h1{ font-size:24px }
  .cat-hero-copy p{ font-size:13.5px }

  .cat-stats{ gap:18px; margin-top:16px }
  .cat-stat b{ font-size:17px }

  .cat-section-head{ margin-bottom:16px }

  .cat-related{ margin-top:50px; padding-top:32px }
  .cat-info{ margin-top:44px; padding-top:30px }
}

@media (max-width:470px){
  .cat-hero{ padding:20px }
  .cat-hero-icon{
    width:52px;
    height:52px;
    border-radius:14px;
    font-size:20px;
  }
  .cat-hero-copy h1{ font-size:22px }
}