/* ============================================================
   M3U-EDIT.COM v2 — Tools Hub Page
   Location: assets/css/tools.css

   Loaded only by tools.php (via $extra_css). All page selectors
   are prefixed `.tlx-` (Tools Listing eXtended) to avoid any
   collision with .tool-tile / .tools-tab from tool-cards.css
   which still styles individual tool cards via ToolRenderer.

   This file includes a SUBSET of the homepage.css design tokens
   so we don't have to load the whole homepage stylesheet on the
   tools page. Tokens kept in sync manually — if you change them
   in homepage.css, change them here too.
   ============================================================ */

/* ---------- DESIGN TOKEN SUBSET (mirror of homepage.css) ---------- */
.tlx-shell {
  --tlx-gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --tlx-gradient-mesh:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.16) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.13) 0%, transparent 50%),
    radial-gradient(at 50% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  --tlx-shadow-glow: 0 0 30px rgba(99, 102, 241, 0.35);
  --tlx-ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tlx-ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .tlx-shell {
  --tlx-gradient-mesh:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.26) 0%, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.20) 0%, transparent 50%),
    radial-gradient(at 50% 60%, rgba(6, 182, 212, 0.12) 0%, transparent 50%);
  --tlx-shadow-glow: 0 0 32px rgba(139, 92, 246, 0.45);
}

/* ============================================================
   HERO
   ============================================================ */
.tlx-hero {
  position: relative;
  padding: 72px 24px 56px;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.tlx-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--tlx-gradient-mesh);
  z-index: -1;
  pointer-events: none;
}

.tlx-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.tlx-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
[data-theme="dark"] .tlx-hero-badge {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.38);
}
.tlx-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success, #10b981);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: tlx-pulse-dot 2.4s var(--tlx-ease-expo) infinite;
}
@keyframes tlx-pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- HERO TRUST / SCALE STATS ---------- */
.tlx-hero-stats {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
}
.tlx-hero-stats li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.tlx-hero-stats strong {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  background: var(--tlx-gradient-primary);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}
.tlx-hero-stats span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.tlx-hero-stats-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
}
@media (max-width: 480px) {
  .tlx-hero-stats { gap: 6px 14px; }
  .tlx-hero-stats strong { font-size: 19px; }
  .tlx-hero-stats-sep { display: none; }
}

.tlx-hero-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 14px;
}
.tlx-hero-title .tlx-grad {
  background: var(--tlx-gradient-primary);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.tlx-hero-sub {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 auto 22px;
  max-width: 600px;
}

/* ---------- ACCESS STATUS PILL (logged-in vs guest) ---------- */
.tlx-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.tlx-status.is-loggedin {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.32);
  color: var(--success);
  font-weight: 600;
}
.tlx-status a { color: var(--primary); font-weight: 700; text-decoration: none; }
.tlx-status a:hover { text-decoration: underline; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.tlx-search-wrap {
  max-width: 600px;
  margin: 26px auto 0;
  position: relative;
}

.tlx-search-input {
  width: 100%;
  padding: 17px 52px 17px 52px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.14);
  transition:
    border-color 200ms ease,
    box-shadow   240ms var(--tlx-ease-expo),
    transform    240ms var(--tlx-ease-expo);
}
.tlx-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.16),
    0 16px 40px -12px rgba(99, 102, 241, 0.34);
  transform: translateY(-1px);
}
.tlx-search-input::placeholder { color: var(--text-muted); }
[data-theme="dark"] .tlx-search-input {
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
}

.tlx-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 200ms ease;
}
.tlx-search-wrap:focus-within .tlx-search-icon {
  color: var(--primary);
}

/* ---------- QUICK-SEARCH CHIPS ---------- */
.tlx-search-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 600px;
  margin: 16px auto 0;
}
.tlx-search-chips-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
}
.tlx-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 160ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms var(--tlx-ease-back);
}
.tlx-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.tlx-chip.is-active {
  color: #fff;
  background: var(--tlx-gradient-primary);
  border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.5);
}
.tlx-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tlx-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms, color 160ms ease, border-color 160ms ease;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.tlx-search-wrap.has-query .tlx-search-clear {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 0s linear 0s, color 160ms ease, border-color 160ms ease;
}
.tlx-search-clear:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* "/" shortcut hint — shown at rest, hidden while typing or on small screens */
.tlx-search-kbd {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: var(--bg-secondary, var(--bg));
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.tlx-search-wrap.has-query .tlx-search-kbd,
.tlx-search-wrap:focus-within .tlx-search-kbd {
  opacity: 0;
}
@media (max-width: 600px) {
  .tlx-search-kbd { display: none; }
}

.tlx-result-count {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0 0;
  min-height: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.tlx-result-count strong {
  color: var(--text);
  font-weight: 700;
}

/* ============================================================
   CATEGORY TAB FILTER
   ============================================================ */
.tlx-tabs-wrap {
  display: flex;
  justify-content: center;
  margin: 28px auto 32px;
  padding: 0 16px;
}

.tlx-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 16px -8px rgba(15, 23, 42, 0.10);
  max-width: 100%;
}

.tlx-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 220ms var(--tlx-ease-expo),
    box-shadow 240ms var(--tlx-ease-expo),
    transform 200ms var(--tlx-ease-back);
  white-space: nowrap;
}
.tlx-tab:hover {
  color: var(--text);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}
.tlx-tab.is-active {
  background: var(--tlx-gradient-primary);
  color: #fff;
  box-shadow:
    0 8px 22px -6px rgba(99, 102, 241, 0.50),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
  transform: translateY(-1px) scale(1.02);
}
.tlx-tab.is-active:hover {
  transform: translateY(-1px) scale(1.02);
}
.tlx-tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.tlx-tab-count {
  display: inline-flex;
  min-width: 22px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tlx-tab.is-active .tlx-tab-count {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
}
[data-theme="dark"] .tlx-tab-count {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 600px) {
  /* Horizontal scroll-snap row instead of wrapping — better thumb reach */
  .tlx-tabs-wrap {
    justify-content: flex-start;
    padding: 0;
    margin: 24px 0 28px;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  }
  .tlx-tabs-wrap::-webkit-scrollbar { display: none; }
  .tlx-tabs {
    flex-wrap: nowrap;
    border-radius: 16px;
    margin: 0 16px;
    scroll-snap-type: x proximity;
  }
  .tlx-tab {
    padding: 9px 15px;
    font-size: 12.5px;
    scroll-snap-align: center;
  }
}

/* ============================================================
   SECTIONS + GRID
   ============================================================ */
.tlx-sections {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.tlx-section {
  margin-bottom: 56px;
}
.tlx-section:last-child { margin-bottom: 0; }
.tlx-section.is-hidden { display: none; }

.tlx-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tlx-section-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.10));
  border-radius: 12px;
  font-size: 22px;
  flex-shrink: 0;
}
.tlx-section-info {
  flex: 1;
  min-width: 0;
}
.tlx-section-info h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 2px;
  color: var(--text);
}
.tlx-section-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.tlx-section-count {
  flex-shrink: 0;
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Tool card grid — each card-wrap holds one ToolRenderer card */
.tlx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
@media (max-width: 540px) {
  .tlx-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
}

.tlx-card-wrap {
  position: relative;
  display: contents;             /* let the inner .tool-tile drive layout */
}
.tlx-card-wrap.is-hidden > .tool-tile,
.tlx-card-wrap.is-hidden > a,
.tlx-card-wrap.is-hidden { display: none; }

/* ============================================================
   EMPTY STATE — shown when no tools match search/filter
   ============================================================ */
.tlx-empty {
  display: none;
  padding: 56px 24px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 20px;
  max-width: 600px;
  margin: 20px auto 0;
}
.tlx-empty.is-visible { display: block; }

.tlx-empty-icon {
  font-size: 44px;
  margin-bottom: 10px;
  opacity: 0.7;
}
.tlx-empty h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.tlx-empty p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
.tlx-empty button {
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   BOTTOM CTA — gradient banner consistent with homepage CTA
   ============================================================ */
.tlx-cta {
  margin: 24px auto 80px;
  padding: 56px 28px;
  max-width: 980px;
  background: var(--tlx-gradient-primary);
  border-radius: 28px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(99, 102, 241, 0.40);
}
.tlx-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(15, 23, 42, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.tlx-cta-content {
  position: relative;
  z-index: 1;
}
.tlx-cta h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  margin: 0 0 10px;
  color: #fff;
  text-shadow:
    0 2px 10px rgba(76, 29, 149, 0.55),
    0 1px 3px rgba(15, 23, 42, 0.35);
}
.tlx-cta p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 22px;
  text-shadow: 0 1px 4px rgba(15, 23, 42, 0.20);
}
.tlx-cta-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.tlx-cta .btn {
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 220ms var(--tlx-ease-back), box-shadow 240ms var(--tlx-ease-expo), background 200ms ease;
}
.tlx-cta .btn-primary {
  background: #fff;
  color: var(--primary, #6d28d9);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.30);
}
.tlx-cta .btn-primary:hover {
  background: #fff;
  color: #4c1d95;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.45);
}
.tlx-cta .btn-ghost {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.55);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tlx-cta .btn-ghost:hover {
  background: rgba(255,255,255,0.22);
  border-color: #fff;
  transform: translateY(-3px) scale(1.02);
}

@media (max-width: 640px) {
  .tlx-cta { padding: 44px 20px; margin: 16px 16px 60px; border-radius: 22px; }
  .tlx-cta-actions { flex-direction: column; width: 100%; }
  .tlx-cta-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   PREMIUM TOOLS HUB UPGRADE — card depth, spotlight ribbon,
   section rhythm, FAQ polish. All page-scoped (.tlx-*) so the
   shared tool-cards.css / seo-content.css stay untouched.
   ============================================================ */

/* ---------- Resting card depth (page-scoped) ---------- */
.tlx-grid .tool-tile {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px -14px rgba(15, 23, 42, 0.14);
}
[data-theme="dark"] .tlx-grid .tool-tile {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.40), 0 10px 24px -16px rgba(0, 0, 0, 0.6);
}

/* ---------- "Popular" spotlight ribbon ---------- */
.tool-tile-spotlight {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--tlx-gradient-primary, linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899));
  border-radius: 999px;
  box-shadow: 0 4px 12px -3px rgba(99, 102, 241, 0.5);
  white-space: nowrap;
}
.tool-tile-spotlight::before {
  content: '★';
  font-size: 9px;
  line-height: 1;
}
/* Push the icon below the ribbon row so they never collide */
.tlx-grid .tool-tile.is-spotlight .tool-tile-icon {
  margin-top: 20px;
}
/* Emphasis ring on spotlighted cards (combines depth + brand ring) */
.tlx-grid .tool-tile.is-spotlight {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12),
    0 10px 30px -16px rgba(99, 102, 241, 0.45);
}
[data-theme="dark"] .tlx-grid .tool-tile.is-spotlight {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.18),
    0 12px 30px -16px rgba(0, 0, 0, 0.6);
}

/* ---------- Spotlight variants — distinct from "Popular" ---------- */
/* Recommended = beginner-friendly, free starters (emerald + check) */
.tool-tile-spotlight--recommended {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px -3px rgba(16, 185, 129, 0.5);
}
.tool-tile-spotlight--recommended::before {
  content: '✓';
  font-weight: 900;
}
.tlx-grid .tool-tile.is-spotlight-recommended {
  border-color: rgba(16, 185, 129, 0.40);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.14),
    0 10px 30px -16px rgba(16, 185, 129, 0.45);
}
[data-theme="dark"] .tlx-grid .tool-tile.is-spotlight-recommended {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.20),
    0 12px 30px -16px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   FINAL POLISH PASS — premium marketplace refinement
   (page-scoped; shared tool-cards.css / seo-content.css untouched)
   ============================================================ */

/* ---------- Card: title hierarchy ---------- */
.tlx-grid .tool-tile-name {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.28;
  color: var(--text);
}

/* ---------- Card: description readability + even scanning ---------- */
.tlx-grid .tool-tile-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  /* Clamp to 3 lines so the grid scans evenly like a product directory */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Card: tier badge visibility (Free / Account / Premium) ---------- */
.tlx-grid .tool-tile-badge {
  font-size: 10px;
  padding: 4px 10px;
  letter-spacing: 0.4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.tlx-grid .tool-tile-badge.badge-free    { background: rgba(16, 185, 129, 0.18); }
.tlx-grid .tool-tile-badge.badge-account { background: rgba(99, 102, 241, 0.18); }
[data-theme="dark"] .tlx-grid .tool-tile-badge { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }

/* ---------- Card: free / credit pricing pill legibility ---------- */
.tlx-grid .tool-pricing-note {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.005em;
}

/* ---------- Card: richer hover (depth + icon ring) ---------- */
.tlx-grid .tool-tile:not(.is-locked):hover {
  box-shadow:
    0 20px 42px -18px rgba(99, 102, 241, 0.40),
    0 6px 14px -8px rgba(15, 23, 42, 0.14);
}
[data-theme="dark"] .tlx-grid .tool-tile:not(.is-locked):hover {
  box-shadow: 0 22px 46px -18px rgba(0, 0, 0, 0.72);
}
.tlx-grid .tool-tile:not(.is-locked):hover .tool-tile-icon {
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.28),
    0 6px 16px -6px rgba(99, 102, 241, 0.45);
}

/* ---------- Category section headers ---------- */
.tlx-section {
  margin-bottom: 64px;
}
.tlx-section-header {
  align-items: flex-start;
  border-bottom: none;
  position: relative;
}
/* Gradient accent underline — colored where the category starts, fading to neutral */
.tlx-section-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--primary) 0%,
    rgba(139, 92, 246, 0.45) 10%,
    var(--border) 30%,
    var(--border) 100%);
}
/* Larger, more substantial category icon tile */
.tlx-section-icon {
  width: 52px;
  height: 52px;
  font-size: 26px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.14));
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.18);
}
[data-theme="dark"] .tlx-section-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.18));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.28);
}
/* Title + count on one line so "Editing · 8 tools" reads as a single unit */
.tlx-section-titlerow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.tlx-section-info h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.tlx-section-info p {
  font-size: 13.5px;
  color: var(--text-secondary);
}
/* Tool-count pill — brand-tinted, sits beside the title for instant scale */
.tlx-section-count {
  padding: 3px 11px;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.22);
  color: var(--primary);
}
[data-theme="dark"] .tlx-section-count {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.32);
  color: var(--primary-light, #a5b4fc);
}

/* ---------- Related pages — minor polish only ---------- */
.tlx-seo-blocks .seo-related__card {
  border-radius: 14px;
}
.tlx-seo-blocks .seo-related__card strong {
  font-size: 0.97rem;
}

/* ============================================================
   SEO BLOCKS — page-scoped FAQ accordion chevron + hover
   (shared seo-content.css markup, enhanced only on /tools.php)
   ============================================================ */
.tlx-seo-blocks .seo-faq__item {
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.tlx-seo-blocks .seo-faq__item:hover {
  border-color: var(--primary);
}
.tlx-seo-blocks .seo-faq__item summary {
  position: relative;
  padding-right: 2.75rem;
  transition: color 0.18s ease;
}
.tlx-seo-blocks .seo-faq__item summary::after {
  content: '';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.22s var(--tlx-ease-expo), border-color 0.18s ease;
}
.tlx-seo-blocks .seo-faq__item[open] summary {
  color: var(--primary);
}
.tlx-seo-blocks .seo-faq__item[open] summary::after {
  transform: translateY(-35%) rotate(-135deg);
  border-color: var(--primary);
}

/* ============================================================
   ENTRANCE ANIMATIONS — minimal, stagger reveal on scroll
   ============================================================ */
.tlx-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 600ms var(--tlx-ease-expo),
    transform 600ms var(--tlx-ease-expo);
  will-change: opacity, transform;
}
.tlx-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.tlx-reveal-stagger > .tlx-reveal:nth-child(1) { transition-delay: 60ms;  }
.tlx-reveal-stagger > .tlx-reveal:nth-child(2) { transition-delay: 120ms; }
.tlx-reveal-stagger > .tlx-reveal:nth-child(3) { transition-delay: 180ms; }
.tlx-reveal-stagger > .tlx-reveal:nth-child(4) { transition-delay: 240ms; }
.tlx-reveal-stagger > .tlx-reveal:nth-child(5) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .tlx-reveal,
  .tlx-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .tlx-search-input,
  .tlx-tab,
  .tlx-chip,
  .tlx-cta .btn {
    transition: none !important;
  }
  .tlx-hero-badge-dot {
    animation: none !important;
  }
}

/* ============================================================
   MICRO-POLISH AUDIT — typography, focus, mobile spacing harmony
   (page-scoped; no layout or structural changes)
   ============================================================ */

/* Typography: SEO block titles share the display font used by the
   hero and in-page section headers — one consistent heading voice. */
.tlx-seo-blocks .seo-block__title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Accessibility: consistent focus-visible rings on every interactive
   control (to match .tlx-tab / .tlx-chip which already have them). */
.tlx-search-clear:focus-visible,
.tlx-empty button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.tlx-seo-blocks .seo-faq__item summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: 12px;
}

/* Mobile spacing harmony: trim the heavy hero top padding on phones. */
@media (max-width: 600px) {
  .tlx-hero { padding: 44px 20px 40px; }
}
