/* ==========================================================================
   WebUtilities Main Stylesheet
   Modern, responsive, accessible, zero horizontal overflow.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Reset & Base Rules
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

a {
  color: var(--color-brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-primary-hover);
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.text-gradient {
  background: var(--color-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Category Pills Styling */
.category-pills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.pill-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  border-color: var(--color-brand-primary);
  color: var(--color-brand-primary);
}

.pill-btn.active {
  background: var(--color-brand-primary);
  color: white;
  border-color: var(--color-brand-primary);
}

/* --------------------------------------------------------------------------
   Containers & Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-sm {
  max-width: 860px;
}

.container-lg {
  max-width: 1400px;
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.section-title-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem auto;
}

.section-title-wrap h2 {
  margin-bottom: 0.75rem;
}

.section-title-wrap p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg-canvas);
  border-left: 1px solid var(--nav-border);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.mobile-nav-header .brand-logo {
  height: 48px;
}

.mobile-nav-header .btn-mobile-toggle {
  color: var(--text-muted);
}

.mobile-nav-header .btn-mobile-toggle:hover {
  color: var(--text-primary);
}

.mobile-nav-drawer .mobile-theme-row {
  margin-bottom: 1.5rem;
}

.mobile-nav-drawer .mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mobile-nav-drawer .mobile-nav-link:hover,
.mobile-nav-drawer .mobile-nav-link.active {
  background: var(--bg-surface-subtle);
  color: var(--color-brand-primary);
}

.mobile-nav-drawer .mobile-nav-link-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.mobile-nav-drawer .mobile-nav-link:hover .mobile-nav-link-icon,
.mobile-nav-drawer .mobile-nav-link.active .mobile-nav-link-icon {
  color: var(--color-brand-primary);
}

/* Overlay for mobile menu */
.mobile-nav-drawer::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.mobile-nav-drawer.open::before {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .mobile-nav-drawer {
    display: none;
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-icon-svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: url(#brandGrad);
  stroke-width: 2;
  flex-shrink: 0;
}

/* Light / Dark Logo Switching */
.logo-dark {
  display: none !important;
}
.logo-light {
  display: block !important;
}

[data-theme="dark"] .logo-light {
  display: none !important;
}
[data-theme="dark"] .logo-dark {
  display: block !important;
}

[data-theme="light"] .logo-dark {
  display: none !important;
}
[data-theme="light"] .logo-light {
  display: block !important;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  padding: 0.5rem 0.35rem;
  position: relative;
}

.nav-link-icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover .nav-link-icon {
  color: var(--text-secondary);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link.active .nav-link-icon {
  color: var(--color-brand-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand-primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  height: 2.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-brand-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.theme-icon-sun,
.theme-icon-moon {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* Toggle visibility and vivid icon styling depending on theme */
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; stroke: #f59e0b; color: #f59e0b; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; stroke: #6366f1; color: #6366f1; }

.theme-label-text {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Mobile Menu Toggle Button */
.btn-mobile-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
}

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 4.25rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  display: flex;
}

/* Mobile Drawer Theme Row & Segmented Control */
.mobile-theme-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem 1.25rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.25rem;
}

.mobile-theme-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.theme-segmented-control {
  display: inline-flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
}

.theme-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-segment-btn .segment-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  flex-shrink: 0;
}

.theme-segment-btn:hover {
  color: var(--text-primary);
}

.theme-segment-btn.active,
.theme-segment-btn[aria-pressed="true"] {
  background: var(--color-brand-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.theme-segment-btn.active .segment-icon,
.theme-segment-btn[aria-pressed="true"] .segment-icon {
  stroke: #ffffff;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.mobile-nav-link .nav-link-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--color-brand-primary);
}

.mobile-nav-link.active .nav-link-icon {
  color: var(--color-brand-primary);
}

/* --------------------------------------------------------------------------
   Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px; /* Accessible touch target */
}

.btn-sm {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover) !important;
  border-color: #cbd5e1;
  color: var(--color-brand-primary) !important;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-brand-primary) !important;
  border: 1.5px solid var(--color-brand-primary);
}

.btn-outline:hover {
  background: var(--color-brand-primary-light);
}

.btn-danger {
  background: var(--color-danger);
  color: #ffffff !important;
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--badge-text);
}

.badge-privacy {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid var(--color-success);
}

.badge svg {
  width: 0.9rem !important;
  height: 0.9rem !important;
  min-width: 0.9rem !important;
  min-height: 0.9rem !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  fill: none !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.tool-title-icon,
.tool-panel-title svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  min-height: 1.25rem !important;
  stroke: var(--color-brand-primary) !important;
  stroke-width: 2.2 !important;
  fill: none !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-brand-primary);
}

.breadcrumbs-sep {
  opacity: 0.5;
}

.breadcrumbs-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Search Component
   -------------------------------------------------------------------------- */
.search-box-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 4px var(--color-brand-primary-light);
  outline: none;
}

.search-icon-pos {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: none;
  padding: 0.25rem;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Cards & Tool Grid
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Symmetrical 3x3 Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 980px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* Browse All 180 Tools CTA Banner on Homepage */
.all-tools-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.all-tools-cta-banner:hover {
  border-color: var(--color-brand-primary);
  box-shadow: var(--shadow-md);
}

.cta-banner-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cta-banner-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.cta-banner-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.cta-banner-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
}

.cta-banner-btn {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .all-tools-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }
  .cta-banner-content {
    flex-direction: column;
    gap: 0.75rem;
  }
  .cta-banner-btn {
    width: 100%;
  }
}

/* Category Sections on All Tools Page */
.category-tool-section {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.category-tool-section:last-child {
  border-bottom: none;
  margin-bottom: 1.5rem;
}

.category-tool-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.cat-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cat-section-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-section-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke: currentColor;
  stroke-width: 2.2;
}

.cat-section-title {
  font-size: 1.6rem;
  font-weight: 750;
  color: var(--text-primary);
  margin: 0;
}

.cat-section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
}

@media (max-width: 640px) {
  .category-tool-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.75rem;
  }
  .cat-section-title-wrap {
    gap: 0.85rem;
  }
  .cat-section-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  .cat-section-icon svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  .cat-section-title {
    font-size: 1.3rem;
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-decoration: none;
}

.tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tool-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--color-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none !important;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tool-card:hover .tool-card-icon {
  transform: translateY(-2px);
  box-shadow: none !important;
}

.tool-card-icon svg,
.tool-header-icon svg,
.front-quicknav-chip svg,
.duotone-icon {
  width: 1.5rem !important;
  height: 1.5rem !important;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none !important;
  box-shadow: none !important;
  transition: transform var(--transition-fast);
}

.tool-card:hover .duotone-icon {
  transform: scale(1.08);
}


/* Category-Specific Vibrant Colors (High Contrast & Clear) */
.cat-icon-image,
.cat-badge-image,
[data-category="image"] .tool-card-icon,
[data-category="image"] .tool-header-icon {
  background: rgba(225, 29, 72, 0.14) !important;
  color: #be123c !important;
  border: 1px solid rgba(225, 29, 72, 0.35) !important;
}
.cat-icon-image svg,
.cat-badge-image svg,
[data-category="image"] .tool-card-icon svg,
[data-category="image"] .tool-header-icon svg {
  stroke: #be123c !important;
}
[data-theme="dark"] .cat-icon-image,
[data-theme="dark"] .cat-badge-image,
[data-theme="dark"] [data-category="image"] .tool-card-icon,
[data-theme="dark"] [data-category="image"] .tool-header-icon {
  color: #fb7185 !important;
  background: rgba(244, 63, 94, 0.2) !important;
  border-color: rgba(251, 113, 133, 0.4) !important;
}
[data-theme="dark"] .cat-icon-image svg,
[data-theme="dark"] .cat-badge-image svg,
[data-theme="dark"] [data-category="image"] .tool-card-icon svg,
[data-theme="dark"] [data-category="image"] .tool-header-icon svg {
  stroke: #fb7185 !important;
}

.cat-icon-pdf,
.cat-badge-pdf,
[data-category="pdf"] .tool-card-icon,
[data-category="pdf"] .tool-header-icon {
  background: rgba(220, 38, 38, 0.14) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(220, 38, 38, 0.35) !important;
}
.cat-icon-pdf svg,
.cat-badge-pdf svg,
[data-category="pdf"] .tool-card-icon svg,
[data-category="pdf"] .tool-header-icon svg {
  stroke: #b91c1c !important;
}
[data-theme="dark"] .cat-icon-pdf,
[data-theme="dark"] .cat-badge-pdf,
[data-theme="dark"] [data-category="pdf"] .tool-card-icon,
[data-theme="dark"] [data-category="pdf"] .tool-header-icon {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}
[data-theme="dark"] .cat-icon-pdf svg,
[data-theme="dark"] .cat-badge-pdf svg,
[data-theme="dark"] [data-category="pdf"] .tool-card-icon svg,
[data-theme="dark"] [data-category="pdf"] .tool-header-icon svg {
  stroke: #f87171 !important;
}

.cat-icon-text,
.cat-badge-text,
[data-category="text"] .tool-card-icon,
[data-category="text"] .tool-header-icon {
  background: rgba(4, 120, 87, 0.14) !important;
  color: #047857 !important;
  border: 1px solid rgba(4, 120, 87, 0.35) !important;
}
.cat-icon-text svg,
.cat-badge-text svg,
[data-category="text"] .tool-card-icon svg,
[data-category="text"] .tool-header-icon svg {
  stroke: #047857 !important;
}
[data-theme="dark"] .cat-icon-text,
[data-theme="dark"] .cat-badge-text,
[data-theme="dark"] [data-category="text"] .tool-card-icon,
[data-theme="dark"] [data-category="text"] .tool-header-icon {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}
[data-theme="dark"] .cat-icon-text svg,
[data-theme="dark"] .cat-badge-text svg,
[data-theme="dark"] [data-category="text"] .tool-card-icon svg,
[data-theme="dark"] [data-category="text"] .tool-header-icon svg {
  stroke: #34d399 !important;
}

.cat-icon-developer,
.cat-badge-developer,
[data-category="developer"] .tool-card-icon,
[data-category="developer"] .tool-header-icon {
  background: rgba(3, 105, 161, 0.14) !important;
  color: #0369a1 !important;
  border: 1px solid rgba(3, 105, 161, 0.35) !important;
}
.cat-icon-developer svg,
.cat-badge-developer svg,
[data-category="developer"] .tool-card-icon svg,
[data-category="developer"] .tool-header-icon svg {
  stroke: #0369a1 !important;
}
[data-theme="dark"] .cat-icon-developer,
[data-theme="dark"] .cat-badge-developer,
[data-theme="dark"] [data-category="developer"] .tool-card-icon,
[data-theme="dark"] [data-category="developer"] .tool-header-icon {
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
[data-theme="dark"] .cat-icon-developer svg,
[data-theme="dark"] .cat-badge-developer svg,
[data-theme="dark"] [data-category="developer"] .tool-card-icon svg,
[data-theme="dark"] [data-category="developer"] .tool-header-icon svg {
  stroke: #38bdf8 !important;
}

.cat-icon-everyday,
.cat-badge-everyday,
[data-category="everyday"] .tool-card-icon,
[data-category="everyday"] .tool-header-icon {
  background: rgba(180, 83, 9, 0.14) !important;
  color: #b45309 !important;
  border: 1px solid rgba(180, 83, 9, 0.35) !important;
}
.cat-icon-everyday svg,
.cat-badge-everyday svg,
[data-category="everyday"] .tool-card-icon svg,
[data-category="everyday"] .tool-header-icon svg {
  stroke: #b45309 !important;
}
[data-theme="dark"] .cat-icon-everyday,
[data-theme="dark"] .cat-badge-everyday,
[data-theme="dark"] [data-category="everyday"] .tool-card-icon,
[data-theme="dark"] [data-category="everyday"] .tool-header-icon {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}
[data-theme="dark"] .cat-icon-everyday svg,
[data-theme="dark"] .cat-badge-everyday svg,
[data-theme="dark"] [data-category="everyday"] .tool-card-icon svg,
[data-theme="dark"] [data-category="everyday"] .tool-header-icon svg {
  stroke: #fbbf24 !important;
}

.cat-icon-design,
.cat-badge-design,
[data-category="design"] .tool-card-icon,
[data-category="design"] .tool-header-icon {
  background: rgba(109, 40, 217, 0.14) !important;
  color: #6d28d9 !important;
  border: 1px solid rgba(109, 40, 217, 0.35) !important;
}
.cat-icon-design svg,
.cat-badge-design svg,
[data-category="design"] .tool-card-icon svg,
[data-category="design"] .tool-header-icon svg {
  stroke: #6d28d9 !important;
}
[data-theme="dark"] .cat-icon-design,
[data-theme="dark"] .cat-badge-design,
[data-theme="dark"] [data-category="design"] .tool-card-icon,
[data-theme="dark"] [data-category="design"] .tool-header-icon {
  color: #c084fc !important;
  background: rgba(139, 92, 246, 0.2) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
[data-theme="dark"] .cat-icon-design svg,
[data-theme="dark"] .cat-badge-design svg,
[data-theme="dark"] [data-category="design"] .tool-card-icon svg,
[data-theme="dark"] [data-category="design"] .tool-header-icon svg {
  stroke: #c084fc !important;
}

.cat-icon-finance,
.cat-badge-finance,
[data-category="finance"] .tool-card-icon,
[data-category="finance"] .tool-header-icon {
  background: rgba(14, 116, 144, 0.14) !important;
  color: #0e7490 !important;
  border: 1px solid rgba(14, 116, 144, 0.35) !important;
}
.cat-icon-finance svg,
.cat-badge-finance svg,
[data-category="finance"] .tool-card-icon svg,
[data-category="finance"] .tool-header-icon svg {
  stroke: #0e7490 !important;
}
[data-theme="dark"] .cat-icon-finance,
[data-theme="dark"] .cat-badge-finance,
[data-theme="dark"] [data-category="finance"] .tool-card-icon,
[data-theme="dark"] [data-category="finance"] .tool-header-icon {
  color: #22d3ee !important;
  background: rgba(6, 182, 212, 0.2) !important;
  border-color: rgba(34, 211, 238, 0.4) !important;
}
[data-theme="dark"] .cat-icon-finance svg,
[data-theme="dark"] .cat-badge-finance svg,
[data-theme="dark"] [data-category="finance"] .tool-card-icon svg,
[data-theme="dark"] [data-category="finance"] .tool-header-icon svg {
  stroke: #22d3ee !important;
}

.cat-icon-security,
.cat-badge-security,
[data-category="security"] .tool-card-icon,
[data-category="security"] .tool-header-icon {
  background: rgba(67, 56, 202, 0.14) !important;
  color: #4338ca !important;
  border: 1px solid rgba(67, 56, 202, 0.35) !important;
}
.cat-icon-security svg,
.cat-badge-security svg,
[data-category="security"] .tool-card-icon svg,
[data-category="security"] .tool-header-icon svg {
  stroke: #4338ca !important;
}
[data-theme="dark"] .cat-icon-security,
[data-theme="dark"] .cat-badge-security,
[data-theme="dark"] [data-category="security"] .tool-card-icon,
[data-theme="dark"] [data-category="security"] .tool-header-icon {
  color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(129, 140, 248, 0.4) !important;
}
[data-theme="dark"] .cat-icon-security svg,
[data-theme="dark"] .cat-badge-security svg,
[data-theme="dark"] [data-category="security"] .tool-card-icon svg,
[data-theme="dark"] [data-category="security"] .tool-header-icon svg {
  stroke: #818cf8 !important;
}

.cat-icon-productivity,
.cat-badge-productivity,
[data-category="productivity"] .tool-card-icon,
[data-category="productivity"] .tool-header-icon {
  background: rgba(190, 24, 93, 0.14) !important;
  color: #be185d !important;
  border: 1px solid rgba(190, 24, 93, 0.35) !important;
}
.cat-icon-productivity svg,
.cat-badge-productivity svg,
[data-category="productivity"] .tool-card-icon svg,
[data-category="productivity"] .tool-header-icon svg {
  stroke: #be185d !important;
}
[data-theme="dark"] .cat-icon-productivity,
[data-theme="dark"] .cat-badge-productivity,
[data-theme="dark"] [data-category="productivity"] .tool-card-icon,
[data-theme="dark"] [data-category="productivity"] .tool-header-icon {
  color: #f472b6 !important;
  background: rgba(236, 72, 153, 0.2) !important;
  border-color: rgba(244, 114, 182, 0.4) !important;
}
[data-theme="dark"] .cat-icon-productivity svg,
[data-theme="dark"] .cat-badge-productivity svg,
[data-theme="dark"] [data-category="productivity"] .tool-card-icon svg,
[data-theme="dark"] [data-category="productivity"] .tool-header-icon svg {
  stroke: #f472b6 !important;
}

.cat-icon-audio,
.cat-badge-audio,
[data-category="audio"] .tool-card-icon,
[data-category="audio"] .tool-header-icon {
  background: rgba(13, 148, 136, 0.14) !important;
  color: #0f766e !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
}
.cat-icon-audio svg,
.cat-badge-audio svg,
[data-category="audio"] .tool-card-icon svg,
[data-category="audio"] .tool-header-icon svg {
  stroke: #0f766e !important;
}
[data-theme="dark"] .cat-icon-audio,
[data-theme="dark"] .cat-badge-audio,
[data-theme="dark"] [data-category="audio"] .tool-card-icon,
[data-theme="dark"] [data-category="audio"] .tool-header-icon {
  color: #2dd4bf !important;
  background: rgba(20, 184, 166, 0.2) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
}
[data-theme="dark"] .cat-icon-audio svg,
[data-theme="dark"] .cat-badge-audio svg,
[data-theme="dark"] [data-category="audio"] .tool-card-icon svg,
[data-theme="dark"] [data-category="audio"] .tool-header-icon svg {
  stroke: #2dd4bf !important;
}

.cat-icon-network,
.cat-badge-network,
[data-category="network"] .tool-card-icon,
[data-category="network"] .tool-header-icon {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, 0.35) !important;
}
.cat-icon-network svg,
.cat-badge-network svg,
[data-category="network"] .tool-card-icon svg,
[data-category="network"] .tool-header-icon svg {
  stroke: #1d4ed8 !important;
}
[data-theme="dark"] .cat-icon-network,
[data-theme="dark"] .cat-badge-network,
[data-theme="dark"] [data-category="network"] .tool-card-icon,
[data-theme="dark"] [data-category="network"] .tool-header-icon {
  color: #60a5fa !important;
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
}
[data-theme="dark"] .cat-icon-network svg,
[data-theme="dark"] .cat-badge-network svg,
[data-theme="dark"] [data-category="network"] .tool-card-icon svg,
[data-theme="dark"] [data-category="network"] .tool-header-icon svg {
  stroke: #60a5fa !important;
}

.cat-icon-health,
.cat-badge-health,
[data-category="health"] .tool-card-icon,
[data-category="health"] .tool-header-icon {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
.cat-icon-health svg,
.cat-badge-health svg,
[data-category="health"] .tool-card-icon svg,
[data-category="health"] .tool-header-icon svg {
  stroke: #059669 !important;
}
[data-theme="dark"] .cat-icon-health,
[data-theme="dark"] .cat-badge-health,
[data-theme="dark"] [data-category="health"] .tool-card-icon,
[data-theme="dark"] [data-category="health"] .tool-header-icon {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}
[data-theme="dark"] .cat-icon-health svg,
[data-theme="dark"] .cat-badge-health svg,
[data-theme="dark"] [data-category="health"] .tool-card-icon svg,
[data-theme="dark"] [data-category="health"] .tool-header-icon svg {
  stroke: #34d399 !important;
}

.cat-icon-marketing,
.cat-badge-marketing,
[data-category="marketing"] .tool-card-icon,
[data-category="marketing"] .tool-header-icon {
  background: rgba(139, 92, 246, 0.12) !important;
  color: #7c3aed !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
}
.cat-icon-marketing svg,
.cat-badge-marketing svg,
[data-category="marketing"] .tool-card-icon svg,
[data-category="marketing"] .tool-header-icon svg {
  stroke: #7c3aed !important;
}
[data-theme="dark"] .cat-icon-marketing,
[data-theme="dark"] .cat-badge-marketing,
[data-theme="dark"] [data-category="marketing"] .tool-card-icon,
[data-theme="dark"] [data-category="marketing"] .tool-header-icon {
  color: #c084fc !important;
  background: rgba(168, 85, 247, 0.2) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
[data-theme="dark"] .cat-icon-marketing svg,
[data-theme="dark"] .cat-badge-marketing svg,
[data-theme="dark"] [data-category="marketing"] .tool-card-icon svg,
[data-theme="dark"] [data-category="marketing"] .tool-header-icon svg {
  stroke: #c084fc !important;
}

.cat-icon-math,
.cat-badge-math,
[data-category="math"] .tool-card-icon,
[data-category="math"] .tool-header-icon {
  background: rgba(37, 99, 235, 0.12) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.35) !important;
}
.cat-icon-math svg,
.cat-badge-math svg,
[data-category="math"] .tool-card-icon svg,
[data-category="math"] .tool-header-icon svg {
  stroke: #2563eb !important;
}
[data-theme="dark"] .cat-icon-math,
[data-theme="dark"] .cat-badge-math,
[data-theme="dark"] [data-category="math"] .tool-card-icon,
[data-theme="dark"] [data-category="math"] .tool-header-icon {
  color: #60a5fa !important;
  background: rgba(37, 99, 235, 0.22) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
}
[data-theme="dark"] .cat-icon-math svg,
[data-theme="dark"] .cat-badge-math svg,
[data-theme="dark"] [data-category="math"] .tool-card-icon svg,
[data-theme="dark"] [data-category="math"] .tool-header-icon svg {
  stroke: #60a5fa !important;
}

.cat-icon-color,
.cat-badge-color,
[data-category="color"] .tool-card-icon,
[data-category="color"] .tool-header-icon {
  background: rgba(236, 72, 153, 0.12) !important;
  color: #db2777 !important;
  border: 1px solid rgba(236, 72, 153, 0.35) !important;
}
.cat-icon-color svg,
.cat-badge-color svg,
[data-category="color"] .tool-card-icon svg,
[data-category="color"] .tool-header-icon svg {
  stroke: #db2777 !important;
}
[data-theme="dark"] .cat-icon-color,
[data-theme="dark"] .cat-badge-color,
[data-theme="dark"] [data-category="color"] .tool-card-icon,
[data-theme="dark"] [data-category="color"] .tool-header-icon {
  color: #f472b6 !important;
  background: rgba(236, 72, 153, 0.22) !important;
  border-color: rgba(244, 114, 182, 0.4) !important;
}
[data-theme="dark"] .cat-icon-color svg,
[data-theme="dark"] .cat-badge-color svg,
[data-theme="dark"] [data-category="color"] .tool-card-icon svg,
[data-theme="dark"] [data-category="color"] .tool-header-icon svg {
  stroke: #f472b6 !important;
}

.cat-icon-ai,
.cat-badge-ai,
[data-category="ai"] .tool-card-icon,
[data-category="ai"] .tool-header-icon {
  background: rgba(139, 92, 246, 0.12) !important;
  color: #7c3aed !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
}
.cat-icon-ai svg,
.cat-badge-ai svg,
[data-category="ai"] .tool-card-icon svg,
[data-category="ai"] .tool-header-icon svg {
  stroke: #7c3aed !important;
}
[data-theme="dark"] .cat-icon-ai,
[data-theme="dark"] .cat-badge-ai,
[data-theme="dark"] [data-category="ai"] .tool-card-icon,
[data-theme="dark"] [data-category="ai"] .tool-header-icon {
  color: #c084fc !important;
  background: rgba(139, 92, 246, 0.22) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
[data-theme="dark"] .cat-icon-ai svg,
[data-theme="dark"] .cat-badge-ai svg,
[data-theme="dark"] [data-category="ai"] .tool-card-icon svg,
[data-theme="dark"] [data-category="ai"] .tool-header-icon svg {
  stroke: #c084fc !important;
}

.cat-icon-video,
.cat-badge-video,
[data-category="video"] .tool-card-icon,
[data-category="video"] .tool-header-icon {
  background: rgba(225, 29, 72, 0.12) !important;
  color: #e11d48 !important;
  border: 1px solid rgba(225, 29, 72, 0.35) !important;
}
.cat-icon-video svg,
.cat-badge-video svg,
[data-category="video"] .tool-card-icon svg,
[data-category="video"] .tool-header-icon svg {
  stroke: #e11d48 !important;
}
[data-theme="dark"] .cat-icon-video,
[data-theme="dark"] .cat-badge-video,
[data-theme="dark"] [data-category="video"] .tool-card-icon,
[data-theme="dark"] [data-category="video"] .tool-header-icon {
  color: #fb7185 !important;
  background: rgba(225, 29, 72, 0.22) !important;
  border-color: rgba(251, 113, 133, 0.4) !important;
}
[data-theme="dark"] .cat-icon-video svg,
[data-theme="dark"] .cat-badge-video svg,
[data-theme="dark"] [data-category="video"] .tool-card-icon svg,
[data-theme="dark"] [data-category="video"] .tool-header-icon svg {
  stroke: #fb7185 !important;
}

.cat-icon-gaming,
.cat-badge-gaming,
[data-category="gaming"] .tool-card-icon,
[data-category="gaming"] .tool-header-icon {
  background: rgba(147, 51, 234, 0.12) !important;
  color: #9333ea !important;
  border: 1px solid rgba(147, 51, 234, 0.35) !important;
}
.cat-icon-gaming svg,
.cat-badge-gaming svg,
[data-category="gaming"] .tool-card-icon svg,
[data-category="gaming"] .tool-header-icon svg {
  stroke: #9333ea !important;
}
[data-theme="dark"] .cat-icon-gaming,
[data-theme="dark"] .cat-badge-gaming,
[data-theme="dark"] [data-category="gaming"] .tool-card-icon,
[data-theme="dark"] [data-category="gaming"] .tool-header-icon {
  color: #c084fc !important;
  background: rgba(147, 51, 234, 0.22) !important;
  border-color: rgba(192, 132, 252, 0.4) !important;
}
[data-theme="dark"] .cat-icon-gaming svg,
[data-theme="dark"] .cat-badge-gaming svg,
[data-theme="dark"] [data-category="gaming"] .tool-card-icon svg,
[data-theme="dark"] [data-category="gaming"] .tool-header-icon svg {
  stroke: #c084fc !important;
}

/* Education Category */
.cat-icon-education,
.cat-badge-education,
[data-category="education"] .tool-card-icon,
[data-category="education"] .tool-header-icon {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
.cat-icon-education svg,
.cat-badge-education svg,
[data-category="education"] .tool-card-icon svg,
[data-category="education"] .tool-header-icon svg {
  stroke: #059669 !important;
}
[data-theme="dark"] .cat-icon-education,
[data-theme="dark"] .cat-badge-education,
[data-theme="dark"] [data-category="education"] .tool-card-icon,
[data-theme="dark"] [data-category="education"] .tool-header-icon {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}
[data-theme="dark"] .cat-icon-education svg,
[data-theme="dark"] .cat-badge-education svg,
[data-theme="dark"] [data-category="education"] .tool-card-icon svg,
[data-theme="dark"] [data-category="education"] .tool-header-icon svg {
  stroke: #34d399 !important;
}

/* Legal Category */
.cat-icon-legal,
.cat-badge-legal,
[data-category="legal"] .tool-card-icon,
[data-category="legal"] .tool-header-icon {
  background: rgba(217, 119, 6, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
}
.cat-icon-legal svg,
.cat-badge-legal svg,
[data-category="legal"] .tool-card-icon svg,
[data-category="legal"] .tool-header-icon svg {
  stroke: #d97706 !important;
}
[data-theme="dark"] .cat-icon-legal,
[data-theme="dark"] .cat-badge-legal,
[data-theme="dark"] [data-category="legal"] .tool-card-icon,
[data-theme="dark"] [data-category="legal"] .tool-header-icon {
  color: #fbbf24 !important;
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}
[data-theme="dark"] .cat-icon-legal svg,
[data-theme="dark"] .cat-badge-legal svg,
[data-theme="dark"] [data-category="legal"] .tool-card-icon svg,
[data-theme="dark"] [data-category="legal"] .tool-header-icon svg {
  stroke: #fbbf24 !important;
}

/* Data Category */
.cat-icon-data,
.cat-badge-data,
[data-category="data"] .tool-card-icon,
[data-category="data"] .tool-header-icon {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0284c7 !important;
  border: 1px solid rgba(14, 165, 233, 0.35) !important;
}
.cat-icon-data svg,
.cat-badge-data svg,
[data-category="data"] .tool-card-icon svg,
[data-category="data"] .tool-header-icon svg {
  stroke: #0284c7 !important;
}
[data-theme="dark"] .cat-icon-data,
[data-theme="dark"] .cat-badge-data,
[data-theme="dark"] [data-category="data"] .tool-card-icon,
[data-theme="dark"] [data-category="data"] .tool-header-icon {
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
[data-theme="dark"] .cat-icon-data svg,
[data-theme="dark"] .cat-badge-data svg,
[data-theme="dark"] [data-category="data"] .tool-card-icon svg,
[data-theme="dark"] [data-category="data"] .tool-header-icon svg {
  stroke: #38bdf8 !important;
}

/* Category Badge Component */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.cat-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.cat-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Tool Page Title with Icon */
.tool-title-wrapper {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 0.75rem;
}

.tool-header-icon {
  width: 3.5rem;
  height: 3.5rem;
  min-width: 3.5rem;
  min-height: 3.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.tool-header-icon svg {
  width: 1.85rem !important;
  height: 1.85rem !important;
  min-width: 1.85rem !important;
  min-height: 1.85rem !important;
  max-width: 1.85rem !important;
  max-height: 1.85rem !important;
  stroke-width: 2.2 !important;
  fill: none !important;
}

@media (max-width: 640px) {
  .tool-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .tool-header-icon {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
  }
  .tool-header-icon svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    min-width: 1.5rem !important;
    min-height: 1.5rem !important;
  }
}

/* Category Filter Pill Dots & Badges */
.pill-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  display: inline-block;
  flex-shrink: 0;
}

.footer-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.footer-cat-link:hover {
  color: var(--color-brand-primary);
}
.footer-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.footer-cat-link:hover .footer-cat-icon {
  color: var(--color-brand-primary);
  transform: scale(1.1);
}

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tool-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-brand-primary);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* Category Filter Pills */
.filter-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.pill-icon svg {
  width: 0.95rem !important;
  height: 0.95rem !important;
  min-width: 0.95rem !important;
  min-height: 0.95rem !important;
  max-width: 0.95rem !important;
  max-height: 0.95rem !important;
  stroke-width: 2.2 !important;
  fill: none !important;
  display: block;
}

.pill-badge {
  font-size: 0.76rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  font-weight: 800;
  border: 1px solid var(--border-color);
}

.pill-btn:hover {
  border-color: var(--color-brand-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.pill-btn.active {
  background: var(--color-brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--color-brand-primary) !important;
}

.pill-btn.active .pill-icon {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.pill-btn.active .pill-icon svg {
  stroke: #ffffff !important;
}

.pill-btn.active .pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: transparent;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 5rem 0 4rem 0;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
  margin: 0 auto;
}

.hero-badge {
  margin-bottom: 1.5rem;
}

.hero-title {
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.25rem auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

/* --------------------------------------------------------------------------
   Information & FAQ Accordion
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.faq-item[open] {
  border-color: var(--color-brand-primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

.faq-summary {
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  gap: 1rem;
  color: var(--text-primary);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.faq-summary:hover {
  color: var(--color-brand-primary);
}

.faq-item[open] .faq-summary {
  background-color: var(--bg-surface-subtle);
  color: var(--color-brand-primary);
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  margin-right: 0.25rem;
  opacity: 0.7;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(-135deg);
  opacity: 1;
}

.faq-content {
  padding: 1.1rem 1.4rem 1.35rem 1.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2.5rem 0;
  color: var(--text-secondary);
  position: relative;
  z-index: 10;
  display: block !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-col p {
  margin: 1rem 0 1.5rem 0;
  max-width: 340px;
  font-size: 0.925rem;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-brand-primary);
}

.footer-link-icon,
.footer-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-links a:hover .footer-link-icon,
.footer-links a:hover .footer-cat-icon,
.footer-cat-link:hover .footer-cat-icon {
  color: var(--color-brand-primary);
  transform: scale(1.1);
}

.social-icons-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

/* Unavailable social state per requirements */
.social-icon-btn.unavailable {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   Advertising Slots (Unobtrusive & Disabled by Default)
   -------------------------------------------------------------------------- */
.ad-slot-placeholder {
  display: none; /* Hidden unless configured */
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 2rem auto;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-menu { display: none; }
  .btn-mobile-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  /* Mobile container & section spacing */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Header compact mobile ergonomics */
  .nav-inner {
    height: 3.75rem;
  }
  .brand-logo img {
    height: 32px !important;
    max-width: 145px;
  }
  .nav-actions {
    gap: 0.45rem;
  }
  .btn-theme-toggle {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-full);
  }
  .btn-theme-toggle .theme-label-text {
    display: none !important;
  }
  .btn-mobile-toggle {
    width: 2.35rem;
    height: 2.35rem;
  }
  .mobile-nav-drawer {
    top: 3.75rem;
    padding: 1.25rem 1rem;
  }

  /* Tool workbench & content responsiveness */
  .tool-workbench {
    padding: 1rem !important;
    border-radius: var(--radius-lg) !important;
  }
  .tool-info-section {
    padding: 1.25rem 1rem !important;
  }
  .tool-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-group .btn {
    width: 100%;
  }

  /* Pre, code & table horizontal scroll containment */
  pre, code, .code-block, table, .table-wrap, .data-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Footer & Hero */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 0.5rem; }
  .hero { padding: 3rem 0.5rem 2rem 0.5rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Accessibility: prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Command Palette (Ctrl+K) & Quick Search Styles
   ========================================================================== */
.btn-quick-search {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  height: 2.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-quick-search:hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-brand-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.quick-search-kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 768px) {
  .quick-search-placeholder {
    display: none;
  }
  .quick-search-kbd {
    display: none;
  }
  .btn-quick-search {
    padding: 0.4rem 0.6rem;
  }
}

/* Palette Modal & Backdrop */
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 1rem 2rem 1rem;
  animation: paletteFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paletteFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.palette-container {
  width: 100%;
  max-width: 650px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 80vh;
}

.palette-search-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.palette-search-icon {
  stroke: var(--color-brand-primary);
  flex-shrink: 0;
}

.palette-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 500;
  outline: none;
  font-family: inherit;
}

.palette-input::placeholder {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.palette-esc-badge {
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}

.palette-categories {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.palette-categories::-webkit-scrollbar {
  display: none;
}

.palette-cat-btn {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.palette-cat-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.palette-cat-btn.active {
  background: var(--color-brand-primary);
  color: #ffffff;
  border-color: var(--color-brand-primary);
}

.palette-results-wrap {
  overflow-y: auto;
  max-height: 52vh;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  background: transparent;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.palette-item:hover,
.palette-item.selected {
  background: var(--bg-surface-hover);
  border-color: var(--border-color);
  transform: translateX(2px);
}

.palette-item-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.palette-item-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.palette-item-info {
  overflow: hidden;
}

.palette-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.palette-item-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-left: 0.5rem;
  transition: transform var(--transition-fast);
}

.palette-item:hover .palette-item-arrow,
.palette-item.selected .palette-item-arrow {
  color: var(--color-brand-primary);
  transform: translateX(3px);
}

.palette-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.palette-empty-state p {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.palette-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.palette-footer-hint {
  display: flex;
  gap: 0.85rem;
}

.palette-footer-hint kbd {
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  margin-right: 0.25rem;
}

.palette-privacy-tag {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--color-success, #10b981);
  font-weight: 600;
}

/* Favorite Star Badge & Shelf Chips */
.badge-favorite {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.badge-favorite:hover {
  background: var(--bg-surface-hover);
  border-color: #f59e0b;
  color: var(--text-primary);
}

.badge-favorite.is-fav {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
}

.fav-star-icon {
  font-size: 0.95rem;
}

.shelf-chip:hover {
  border-color: var(--color-brand-primary) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Frontpage Category Blocks (3 rows x 4 columns = 12 tools)
   -------------------------------------------------------------------------- */
.front-cat-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-color);
}
.front-cat-section:nth-child(even) {
  background: var(--bg-surface-subtle);
}

.front-cat-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.front-cat-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.front-cat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.front-cat-icon svg {
  width: 26px;
  height: 26px;
}

.front-cat-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.front-cat-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.front-cat-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 650px;
}

.front-cat-viewall-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.front-cat-viewall-btn:hover {
  background: var(--color-brand-primary);
  color: #ffffff;
  border-color: var(--color-brand-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.tool-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .tool-grid-4col {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 860px) {
  .tool-grid-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .tool-grid-4col {
    grid-template-columns: 1fr;
  }
}

.front-cat-footer {
  margin-top: 1.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.front-cat-footer-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.front-cat-footer-text strong {
  color: var(--text-primary);
}

/* Quick Jump Category Bar on Frontpage */
.front-category-quicknav {
  position: sticky;
  top: 4.25rem;
  z-index: 99;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  padding: 0.75rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.front-quicknav-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.front-quicknav-scroll::-webkit-scrollbar {
  display: none;
}

.front-quicknav-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.front-quicknav-chip:hover {
  background: var(--bg-surface-hover);
  border-color: var(--color-brand-primary);
  color: var(--color-brand-primary);
  transform: translateY(-1px);
}
.front-quicknav-chip svg {
  width: 14px;
  height: 14px;
}

/* Dedicated Category Page Styles - Modern & Sleek */
.category-hero {
  padding: 3.5rem 1rem 2.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.category-hero > .container {
  position: relative;
  z-index: 1;
}

.category-breadcrumbs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.category-breadcrumbs-wrap .breadcrumbs {
  margin-bottom: 0;
  padding: 0.35rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
}

.category-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform var(--transition-fast);
}

.category-hero-icon:hover {
  transform: translateY(-2px) scale(1.04);
}

.category-hero-icon svg {
  width: 32px;
  height: 32px;
}

.category-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.category-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
  line-height: 1.15;
}

.category-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.category-search-wrap {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.category-search-wrap .search-input {
  width: 100%;
  height: 48px;
  padding: 0 2.5rem 0 2.85rem;
  font-size: 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.category-search-wrap .search-input:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px var(--color-brand-primary-light), var(--shadow-md);
  outline: none;
}

.cat-search-clear-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.85rem;
  border-radius: 50%;
  line-height: 1;
}

.cat-search-clear-btn:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .category-hero {
    padding: 2.25rem 1rem 2rem;
  }
  .category-hero-title {
    font-size: 2rem;
  }
  .category-hero-desc {
    font-size: 0.95rem;
  }
}

/* Category Tools Grid Header (Centered with Icon) */
.category-section-heading-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.25rem;
  padding-top: 0.5rem;
}

.category-section-title-centered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.category-section-icon-inline {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.category-section-icon-inline svg {
  width: 20px;
  height: 20px;
}

.category-section-h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.category-section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

.cat-live-filter-badge {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.85rem;
  background: var(--color-brand-primary-light);
  color: var(--color-brand-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
}

@media (max-width: 640px) {
  .category-section-h2 {
    font-size: 1.45rem;
  }
  .category-section-icon-inline {
    width: 32px;
    height: 32px;
  }
  .category-section-icon-inline svg {
    width: 17px;
    height: 17px;
  }
  .category-section-subtitle {
    font-size: 0.9rem;
  }
}

/* Homepage Category Directory Browser Grid */
.front-category-browser {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.front-cat-browser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (max-width: 1080px) {
  .front-cat-browser-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .front-cat-browser-grid {
    grid-template-columns: 1fr;
  }
}

.front-cat-browser-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  text-decoration: none;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.front-cat-browser-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-brand-primary);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .front-cat-browser-card:hover {
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.45);
}

.front-cat-browser-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.front-cat-browser-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.front-cat-browser-icon svg {
  width: 22px;
  height: 22px;
}

.front-cat-browser-title {
  font-size: 1.12rem;
  font-weight: 750;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.front-cat-browser-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 1.15rem 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.front-cat-browser-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--color-brand-primary);
  transition: gap var(--transition-fast);
}

.front-cat-browser-card:hover .front-cat-browser-link {
  gap: 0.65rem;
}

/* ==========================================================================
   HOMEPAGE TRENDING & ESSENTIAL STRIP
   ========================================================================== */
.trending-strip-section {
  padding: 2.25rem 0 1rem;
}

.trending-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trending-title-area h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trending-title-area p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 580px) {
  .trending-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   COMPACT MICRO-CARD STYLES
   ========================================================================== */
.tool-card-compact {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card-compact:hover {
  transform: translateY(-2px);
  border-color: var(--color-brand-primary);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .tool-card-compact:hover {
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.45);
}

.tool-compact-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.tool-compact-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-compact-icon svg {
  width: 20px;
  height: 20px;
}

.tool-compact-meta {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-compact-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-mini {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-mini-popular {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--color-brand-primary);
}

.tool-compact-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
  margin-left: auto;
}

.tool-card-compact:hover .tool-compact-arrow {
  color: var(--color-brand-primary);
  transform: translateX(3px);
}

.tool-compact-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   HOMEPAGE INTERACTIVE WORKSPACE (SIDEBAR + CONTENT)
   ========================================================================== */
.tools-workspace-section {
  padding: 2.5rem 0 4rem;
}

.tools-workspace-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* Left Sticky Sidebar */
.workspace-sidebar {
  position: sticky;
  top: 5.25rem;
  max-height: calc(100vh - 6.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 1.15rem 0.85rem;
  overflow-y: auto;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
}

.workspace-sidebar::-webkit-scrollbar {
  width: 5px;
}
.workspace-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.workspace-sidebar-filter {
  position: relative;
  margin-bottom: 0.25rem;
}

.workspace-sidebar-filter input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.2rem;
  font-size: 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.workspace-sidebar-filter input:focus {
  border-color: var(--color-brand-primary);
}

.workspace-sidebar-filter svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.workspace-cluster-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.workspace-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.workspace-cluster-title {
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem 0.35rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.workspace-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.workspace-cat-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.workspace-cat-btn.active {
  background: var(--color-brand-primary-light);
  color: var(--color-brand-primary);
  border-color: rgba(99, 102, 241, 0.2);
  font-weight: 700;
}

.ws-cat-btn-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.ws-cat-btn-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ws-cat-btn-icon svg {
  width: 16px;
  height: 16px;
}

.ws-cat-btn-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-cat-btn-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.workspace-cat-btn.active .ws-cat-btn-badge {
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-brand-primary);
}

/* Workspace Main Area */
.workspace-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.workspace-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
  gap: 1rem;
}

.ws-current-cat-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex-grow: 1;
}

.ws-cat-icon-lg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ws-cat-icon-lg svg {
  width: 24px;
  height: 24px;
}

.ws-active-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.2rem 0;
}

.ws-active-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.ws-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ws-tool-search-wrap {
  position: relative;
  min-width: 180px;
}

.ws-tool-search-wrap input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2rem;
  font-size: 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.ws-tool-search-wrap input:focus {
  border-color: var(--color-brand-primary);
}

.ws-tool-search-wrap svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.ws-view-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2px;
}

.ws-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ws-toggle-btn:hover {
  color: var(--text-primary);
}

.ws-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--color-brand-primary);
  box-shadow: var(--shadow-xs);
}

.ws-cat-hub-btn {
  font-size: 0.84rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Category Panels & Dynamic Grid */
.ws-category-panel {
  display: none;
  animation: wsFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ws-category-panel.active {
  display: block;
}

@keyframes wsFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1200px) {
  .tool-grid-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tool-grid-compact {
    grid-template-columns: 1fr;
  }
}

/* List View variant */
.workspace-main.is-list-view .tool-grid-compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.workspace-main.is-list-view .tool-card-compact {
  padding: 0.75rem 1rem;
}

.workspace-main.is-list-view .tool-compact-desc {
  display: none;
}

.workspace-main.is-list-view .tool-compact-top {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .workspace-main.is-list-view .tool-grid-compact {
    grid-template-columns: 1fr;
  }
}

/* Mobile Category Filter Bar (< 1024px) */
.workspace-mobile-cats {
  display: none;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}

.workspace-mobile-cats::-webkit-scrollbar {
  display: none;
}

.ws-mobile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.ws-mobile-chip.active {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: #ffffff;
}

@media (max-width: 1024px) {
  .tools-workspace-layout {
    grid-template-columns: 1fr;
  }
  .workspace-sidebar {
    display: none;
  }
  .workspace-mobile-cats {
    display: flex;
  }
}
