/*
 * KitoTool directory UI
 * Shared visual system for the tools hub, categories hub and category pages.
 */

.directory-page {
  --container-max: 1320px;
  --directory-accent: #6366f1;
  --directory-purple: #7c3aed;
  --directory-blue: #2583f8;
  --directory-ink: #111827;
  --directory-border: #dce4ef;
  --directory-soft: #f6f8fc;
  --directory-surface: #ffffff;
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 2%, rgba(99, 102, 241, 0.028), transparent 25rem),
    radial-gradient(circle at 92% 12%, rgba(37, 131, 248, 0.025), transparent 26rem),
    var(--color-bg);
}

.directory-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 48rem);
  mask-image: linear-gradient(to bottom, #000 0, transparent 48rem);
  pointer-events: none;
}

.directory-page > * {
  position: relative;
  z-index: 1;
}

.directory-page:not(.directory-page--tools) {
  padding-top: clamp(1.25rem, 3vw, 2.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 7rem);
}

.directory-page .breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: max-content;
  max-width: 100%;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #65738a;
  font-size: 0.78rem;
}

.directory-page .breadcrumb a {
  color: #526078;
  font-weight: 600;
}

.directory-page .breadcrumb a:hover {
  color: var(--directory-accent);
}

.directory-page .breadcrumb-separator {
  color: #b0bac9;
}

.directory-page .breadcrumb-current {
  color: #172033;
  font-weight: 650;
}

.directory-page--categories .breadcrumb {
  width: auto;
  margin-bottom: 0.7rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.directory-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: max-content;
  max-width: 100%;
  margin-bottom: 1.15rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 999px;
  background: #f7f7ff;
  color: #5357d9;
  font-size: 0.75rem;
  font-weight: var(--font-semibold);
  line-height: 1.25;
  letter-spacing: 0.025em;
}

.directory-hero__eyebrow-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, var(--directory-purple), var(--directory-blue));
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(79, 70, 229, 0.8);
}

.directory-hero__eyebrow-icon svg {
  width: 0.8rem;
  height: 0.8rem;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.65rem;
}

.directory-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.72rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 13px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease, border-color 180ms ease;
}

.directory-btn svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-btn--primary {
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(118deg, var(--directory-purple), var(--directory-blue));
  color: #fff;
  box-shadow: 0 14px 28px -16px rgba(79, 70, 229, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.directory-btn--primary:hover {
  color: #fff;
  box-shadow: 0 18px 34px -17px rgba(79, 70, 229, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.directory-btn--secondary {
  border-color: rgba(99, 102, 241, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #354159;
  box-shadow: 0 8px 24px -22px rgba(15, 23, 42, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.directory-btn--secondary:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--directory-accent);
  transform: translateY(-2px);
}

/* Categories hub hero */
.directory-page--categories .category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.86fr);
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  min-height: 0;
  margin: 0 0 0.5rem;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.directory-page--categories .category-hero::before {
  content: none;
}

.category-hero__content {
  position: relative;
  z-index: 1;
}

.directory-page--categories .category-hero h1 {
  max-width: 720px;
  margin-bottom: 1.1rem;
  color: var(--directory-ink);
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.directory-page--categories .category-hero-desc {
  max-width: 62ch;
  color: #53627a;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.75;
}

.directory-page--categories .category-hero__visual {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 290px;
}

.directory-page--categories .category-hero__visual::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 3% 0 3% 4%;
  border-radius: 46% 54% 60% 40% / 55% 42% 58% 45%;
  background:
    radial-gradient(circle at 12% 27%, #a5b4fc 0 3px, transparent 4px),
    radial-gradient(circle at 85% 16%, #7dd3fc 0 4px, transparent 5px),
    radial-gradient(circle at 91% 78%, #c4b5fd 0 3px, transparent 4px),
    radial-gradient(ellipse at 50% 52%, rgba(129,140,248,.15), rgba(125,211,252,.07) 55%, transparent 73%);
  pointer-events: none;
}

.directory-page--categories .category-hero__visual::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 9% 3% 9% 4%;
  border: 1px solid rgba(129,140,248,.2);
  border-radius: 50%;
  transform: rotate(-12deg);
  pointer-events: none;
}

.directory-page--categories .category-hero__art {
  position: relative;
  width: min(100%, 510px);
}

.directory-page--categories .category-hero__art::before,
.directory-page--categories .category-hero__art::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #a78bfa;
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
  pointer-events: none;
}

.directory-page--categories .category-hero__art::before {
  top: 9%;
  left: 8%;
  transform: rotate(12deg);
}

.directory-page--categories .category-hero__art::after {
  top: 27%;
  right: 0;
  width: 13px;
  height: 13px;
  background: #38bdf8;
  transform: rotate(-8deg);
}

.directory-page--categories .category-hero__image {
  display: block;
  width: 100%;
  max-height: 340px;
  height: auto;
  object-fit: contain;
  filter: none;
}

.directory-hero__visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(100%, 310px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.directory-hero__visual-ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06), rgba(37, 131, 248, 0.02) 58%, transparent 60%);
  box-shadow: 0 0 0 24px rgba(99, 102, 241, 0.018), 0 0 0 48px rgba(99, 102, 241, 0.012);
}

.directory-hero__visual-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 27px;
  background: linear-gradient(135deg, #7c3aed, #2583f8);
  color: #fff;
  box-shadow: 0 24px 45px -20px rgba(79, 70, 229, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: rotate(-7deg);
}

.directory-hero__visual-core svg {
  width: 42px;
  height: 42px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-hero__visual-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  color: #4f46e5;
  box-shadow: 0 18px 30px -20px rgba(79, 70, 229, 0.55), inset 0 1px 0 #fff;
  font-size: 0.68rem;
  font-weight: 800;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.directory-hero__visual-card--one { top: 8%; left: 17%; transform: rotate(-8deg); }
.directory-hero__visual-card--two { top: 30%; right: 1%; transform: rotate(8deg); }
.directory-hero__visual-card--three { bottom: 8%; left: 11%; transform: rotate(5deg); }

.directory-page--categories .category-stats-bar,
.directory-page--category .cat-stats {
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  padding: 1rem 1.2rem;
  border: 1px solid var(--directory-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px -34px rgba(15, 23, 42, 0.4), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.directory-page--categories .category-stats-bar {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: 0.5rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.directory-page--categories .category-stats-bar__num,
.directory-page--category .cat-stats__num {
  color: var(--directory-ink);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.directory-page--categories .category-stats-bar__label,
.directory-page--category .cat-stats__label {
  color: #718097;
  font-size: 0.64rem;
  font-weight: var(--font-semibold);
}

.directory-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 1.35rem;
}

.directory-section-heading__kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #4f46e5;
  font-size: 0.75rem;
  font-weight: var(--font-semibold);
  line-height: 1.5;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.directory-section-heading h2 {
  margin: 0;
  color: var(--directory-ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.directory-section-heading__count {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #68778e;
  font-size: 0.73rem;
  font-weight: var(--font-semibold);
}

/* Shared premium cards */
.directory-page--categories .cat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.directory-page--categories .cat-card,
.directory-page--category .cat-tool-card,
.directory-page--tools .tool-card {
  overflow: visible;
  border: 1px solid var(--directory-border);
  border-radius: 21px;
  background: var(--directory-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035), 0 16px 34px -32px rgba(15, 23, 42, 0.42), inset 0 1px 0 #fff;
  transform: translate3d(0, 0, 0);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 190ms ease, box-shadow 220ms ease;
}

.directory-page--categories .cat-card {
  min-height: 255px;
  padding: 1.2rem;
}

.directory-page--categories .cat-card::before,
.directory-page--category .cat-tool-card::before,
.directory-page--tools .tool-card::before {
  content: none;
}

.directory-page--categories .cat-card:hover,
.directory-page--category .cat-tool-card:hover,
.directory-page--tools .tool-card:hover {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.42), inset 0 1px 0 #fff;
  transform: translate3d(0, -2px, 0);
}

.directory-page--categories .cat-card__icon,
.directory-page--tools .tool-card__icon {
  border: 1px solid #e4e8f2;
  background: var(--directory-soft);
  box-shadow: inset 0 1px 0 #fff;
}

.directory-page--categories .cat-card:hover .cat-card__icon,
.directory-page--tools .tool-card:hover .tool-card__icon {
  background: #f2f5fb;
  transform: translateY(-2px) scale(1.035);
}

.directory-page--categories .cat-card__title,
.directory-page--category .cat-tool-card__name,
.directory-page--tools .tool-card__name {
  color: var(--directory-ink);
  font-size: 0.98rem;
  font-weight: var(--font-semibold);
  letter-spacing: -0.018em;
}

.directory-page--categories .cat-card__sub {
  min-height: 2.8em;
  color: #44536a;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
}

/* Compact categories hub: shared navigation icons, one summary per category. */
.category-types-heading > div { min-width: 0; max-width: 100%; }
.directory-section-heading__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.directory-section-heading__meta .directory-section-heading__kicker { min-width: 0; margin-bottom: 0; }
.directory-section-heading__meta .directory-section-heading__count {
  padding: 3px 8px;
  font-size: .6875rem;
  line-height: 1.5;
  white-space: nowrap;
}

.category-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.category-type-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--directory-border);
  border-radius: 16px;
  background: var(--directory-surface);
  color: var(--directory-ink);
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .025);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.category-type-card:hover {
  border-color: var(--cat-icon-ink);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

.category-type-card:focus-visible {
  outline: 3px solid var(--directory-accent);
  outline-offset: 3px;
}

.category-type-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.category-type-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--cat-icon-bg);
  color: var(--cat-icon-ink);
}

.category-type-card__icon svg { width: 23px; height: 23px; }

.category-type-card h3 {
  margin: 0;
  color: inherit;
  font-size: .875rem;
  font-weight: var(--font-semibold);
  line-height: 1.4;
  letter-spacing: -.015em;
}

.category-type-card p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: .8125rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.category-type-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.category-type-card__count {
  color: var(--color-text-secondary);
  font-size: .75rem;
  font-weight: var(--font-semibold);
}

.category-type-card__arrow {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--directory-soft);
  color: var(--color-text-secondary);
}

.category-type-card:hover .category-type-card__arrow {
  background: var(--cat-icon-bg);
  color: var(--cat-icon-ink);
}

[data-theme="dark"] .category-type-card {
  --directory-soft: #253148;
  border-color: rgba(165, 180, 252, .16);
  background: #172134;
  box-shadow: none;
}

[data-theme="dark"] .category-type-card__icon {
  color: var(--cat-icon-dark);
  background: rgba(148, 163, 184, .1);
}

[data-theme="dark"] .category-type-card:hover { border-color: var(--cat-icon-dark); }
[data-theme="dark"] .category-type-card:hover .category-type-card__arrow { background: rgba(148, 163, 184, .1); color: var(--cat-icon-dark); }

@media (max-width: 1279px) {
  .category-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

@media (max-width: 559px) {
  .category-type-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .category-type-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px; }
  .category-type-card__head { min-height: 40px; }
  .category-type-card__foot { grid-column: 2; grid-row: 1; gap: 8px; margin-top: 0; }
  .category-type-card__count { white-space: nowrap; font-size: .6875rem; }
  .category-type-card__arrow { width: 22px; height: 22px; }
  .category-type-card p { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .category-type-card { transition: none; }
}

/* Categories hub editorial sections */
.directory-page--categories .ad-slot.is-active {
  margin: clamp(0.75rem, 2vw, 1.25rem) 0 0;
}

.directory-page--categories .category-guide,
.directory-page--categories .category-audience {
  margin-top: clamp(1.25rem, 3vw, 2.25rem);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid var(--directory-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px -38px rgba(15, 23, 42, 0.42), inset 0 1px 0 #fff;
}

.directory-page--categories .category-guide {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.25rem);
}

.category-guide__intro h2,
.category-audience__copy h2 {
  margin: 0 0 0.75rem;
  color: var(--directory-ink);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.category-guide__intro p,
.category-audience__copy p {
  margin: 0;
  color: #5d6b81;
  font-size: 0.92rem;
  line-height: 1.75;
}

.category-guide__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.category-guide__item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e6eaf2;
  border-radius: 16px;
  background: #f8fafc;
}

.category-guide__item > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #eeefff;
  color: #5b5fe3;
  font-size: 0.69rem;
  font-weight: 800;
}

.category-guide__item h3 {
  margin: 0 0 0.3rem;
  color: var(--directory-ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.category-guide__item p {
  margin: 0;
  color: #65738a;
  font-size: 0.78rem;
  line-height: 1.55;
}

.directory-page--categories .category-audience {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  background:
    radial-gradient(circle at 92% 12%, rgba(99, 102, 241, 0.06), transparent 18rem),
    rgba(255, 255, 255, 0.9);
}

.category-audience__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-audience__list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e6eaf2;
  border-radius: 14px;
  background: #fff;
  color: #263248;
  font-size: 0.82rem;
  font-weight: 650;
}

.category-audience__list svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  padding: 4px;
  border-radius: 7px;
  background: #eeefff;
  stroke: #5b5fe3;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-page--categories .how-it-works {
  position: relative;
  margin-top: clamp(1.25rem, 3vw, 2.25rem);
  padding: clamp(2.25rem, 5vw, 4rem) clamp(1rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  overflow: visible;
  border: 1px solid rgba(99, 102, 241, 0.13);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 22%, rgba(14, 165, 233, 0.08), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.08), transparent 28%),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 24px 58px -42px rgba(30, 41, 59, 0.32);
}

.directory-page--categories .how-it-works__head {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.directory-page--categories .how-it-works__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 34px;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 999px;
  color: #4f46e5;
  background: rgba(238, 242, 255, 0.82);
  font-size: 0.72rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.directory-page--categories .how-it-works__badge svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-page--categories .how-it-works__title {
  margin: 1rem 0 0;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.directory-page--categories .how-it-works__title span {
  color: transparent;
  background: linear-gradient(100deg, #4f46e5, #7c3aed 55%, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
}

.directory-page--categories .how-it-works__lead {
  max-width: 620px;
  margin: 0.9rem auto 0;
  color: #5d6b81;
  font-size: 0.94rem;
  line-height: 1.7;
}

.directory-page--categories .how-it-works__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.7rem);
  margin-top: clamp(4.75rem, 8vw, 6rem);
}

.directory-page--categories .how-it-works__step {
  --step-rgb: 59, 130, 246;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 342px;
  padding: 3.4rem 1.25rem 1.25rem;
  align-items: stretch;
  gap: 0;
  text-align: left;
  border: 1px solid rgba(var(--step-rgb), 0.24);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(var(--step-rgb), 0.055), rgba(255, 255, 255, 0.95) 42%);
  box-shadow: 0 18px 38px -32px rgba(var(--step-rgb), 0.72);
}

.directory-page--categories .how-it-works__step--violet { --step-rgb: 124, 58, 237; }
.directory-page--categories .how-it-works__step--cyan { --step-rgb: 8, 145, 178; }

.directory-page--categories .how-it-works__step:not(:last-child)::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: 52%;
  right: calc(clamp(1rem, 2.2vw, 1.7rem) * -1);
  width: clamp(1rem, 2.2vw, 1.7rem);
  height: 9px;
  background:
    linear-gradient(90deg, rgba(var(--step-rgb), 0.58) 58%, transparent 58%) 0 50% / 8px 2px repeat-x;
  clip-path: polygon(0 38%, 72% 38%, 72% 0, 100% 50%, 72% 100%, 72% 62%, 0 62%);
}

.directory-page--categories .how-it-works__mascot {
  position: absolute;
  z-index: 2;
  top: -62px;
  left: 50%;
  width: 116px;
  height: 100px;
  transform: translateX(-50%);
  filter: drop-shadow(0 14px 14px rgba(var(--step-rgb), 0.14));
}

.directory-page--categories .how-it-works__mascot svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.directory-page--categories .mascot-glow { fill: rgba(var(--step-rgb), 0.1); }
.directory-page--categories .mascot-body { fill: #fff; stroke: rgba(var(--step-rgb), 0.82); stroke-width: 2; }
.directory-page--categories .mascot-face { fill: rgb(var(--step-rgb)); }
.directory-page--categories .mascot-eye { fill: #fff; }
.directory-page--categories .mascot-eye--happy,
.directory-page--categories .mascot-antenna,
.directory-page--categories .mascot-line,
.directory-page--categories .mascot-arm { stroke: rgb(var(--step-rgb)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.directory-page--categories .mascot-dot { fill: rgb(var(--step-rgb)); }
.directory-page--categories .mascot-tool { fill: #fff; stroke: rgba(var(--step-rgb), 0.72); stroke-width: 2; }
.directory-page--categories .mascot-tool-line { fill: none; stroke: rgb(var(--step-rgb)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.directory-page--categories .mascot-paper { fill: #fff; stroke: rgba(var(--step-rgb), 0.65); stroke-width: 2; }
.directory-page--categories .mascot-paper-line { stroke: rgb(var(--step-rgb)); stroke-width: 2; stroke-linecap: round; }

.directory-page--categories .how-it-works__num {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  display: block;
  width: auto;
  height: auto;
  color: rgba(var(--step-rgb), 0.17);
  background: transparent;
  font-size: clamp(2.15rem, 3.4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
  box-shadow: none;
}

.directory-page--categories .how-it-works__step h3 {
  margin: 0;
  color: rgb(var(--step-rgb));
  font-size: 1.08rem;
  font-weight: var(--font-semibold);
  line-height: 1.35;
  text-align: center;
}

.directory-page--categories .how-it-works__step > p {
  min-height: 68px;
  margin: 0.65rem 0 1rem;
  color: #526077;
  font-size: 0.82rem;
  line-height: 1.62;
  text-align: center;
}

.directory-page--categories .how-it-works__mock {
  display: flex;
  min-height: 108px;
  margin-top: auto;
  padding: 0.9rem;
  align-items: center;
  border: 1px solid rgba(var(--step-rgb), 0.17);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 #fff;
}

.directory-page--categories .how-it-works__mock--search {
  position: relative;
  display: block;
  padding-top: 1.6rem;
}

.directory-page--categories .how-it-works__mock-dots {
  position: absolute;
  top: 0.65rem;
  left: 0.8rem;
  display: flex;
  gap: 4px;
}

.directory-page--categories .how-it-works__mock-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(var(--step-rgb), 0.38);
}

.directory-page--categories .how-it-works__search {
  display: flex;
  height: 35px;
  padding: 0 0.65rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(var(--step-rgb), 0.2);
  border-radius: 10px;
  color: #8a98ad;
  font-size: 0.72rem;
}

.directory-page--categories .how-it-works__search svg {
  width: 16px;
  height: 16px;
  stroke: rgb(var(--step-rgb));
  stroke-width: 2;
  stroke-linecap: round;
}

.directory-page--categories .how-it-works__chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.directory-page--categories .how-it-works__chips span {
  overflow: hidden;
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
  color: rgb(var(--step-rgb));
  background: rgba(var(--step-rgb), 0.07);
  font-size: 0.64rem;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-page--categories .how-it-works__mock--upload,
.directory-page--categories .how-it-works__mock--result {
  gap: 0.7rem;
}

.directory-page--categories .how-it-works__upload-icon,
.directory-page--categories .how-it-works__result-check,
.directory-page--categories .how-it-works__download {
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: rgb(var(--step-rgb));
  background: rgba(var(--step-rgb), 0.1);
}

.directory-page--categories .how-it-works__upload-icon svg,
.directory-page--categories .how-it-works__result-check svg,
.directory-page--categories .how-it-works__download svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-page--categories .how-it-works__mock strong,
.directory-page--categories .how-it-works__mock small {
  display: block;
}

.directory-page--categories .how-it-works__mock strong {
  color: #1f2a3d;
  font-size: 0.75rem;
  line-height: 1.35;
}

.directory-page--categories .how-it-works__mock small {
  margin-top: 0.2rem;
  color: #8794a7;
  font-size: 0.63rem;
}

.directory-page--categories .how-it-works__ready {
  margin-left: auto;
  color: rgb(var(--step-rgb));
  font-size: 0.7rem;
  font-weight: 800;
}

.directory-page--categories .how-it-works__download {
  margin-left: auto;
}

.directory-page--categories .how-it-works__foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.11);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.76);
}

.directory-page--categories .how-it-works__foot span {
  display: flex;
  min-height: 28px;
  padding: 0 0.7rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #45536a;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.directory-page--categories .how-it-works__foot span + span {
  border-left: 1px solid rgba(99, 102, 241, 0.11);
}

.directory-page--categories .how-it-works__foot svg {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 6px;
  background: #eef2ff;
  stroke: #4f46e5;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-page--categories .faq-section--category {
  margin-top: clamp(1.25rem, 3vw, 2.25rem);
}

.directory-page--categories .faq-section--category > .container {
  max-width: none;
  padding-inline: 0;
}

.directory-page--categories .cat-card__desc,
.directory-page--category .cat-tool-card__desc,
.directory-page--tools .tool-card__desc {
  color: #5d6b81;
  font-size: 0.8rem;
  line-height: 1.58;
}

.directory-page--categories .cat-card__foot {
  border-top-color: rgba(99, 102, 241, 0.09);
}

.directory-page--categories .cat-card__count {
  color: #728096;
  font-size: 0.67rem;
}

.directory-page--categories .cat-card--featured {
  border-color: var(--directory-border);
}

/* Category detail */
.directory-page--category {
  padding-top: clamp(0.85rem, 1.8vw, 1.35rem);
}

.directory-page--category .breadcrumb {
  width: auto;
  margin-bottom: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 0.79rem;
}

.directory-page--category .cat-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.62fr);
  align-items: start;
  min-height: 0;
  column-gap: clamp(1.25rem, 3vw, 2.75rem);
  margin: 0 0 clamp(0.45rem, 0.8vw, 0.75rem);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.directory-page--category .cat-hero__text {
  width: 100%;
  max-width: 760px;
}

.directory-page--category .cat-hero__h1 {
  margin: 0;
  color: var(--directory-ink);
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.directory-page--category .cat-hero__desc {
  max-width: 72ch;
  margin: 0.7rem 0 0;
  color: #53627a;
  font-size: clamp(0.95rem, 1.45vw, 1.05rem);
  line-height: 1.6;
}

.directory-page--category .cat-hero__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.directory-page--category .cat-hero__badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.directory-page--category .cat-hero__badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--directory-accent) 18%, #dbe3ef);
  border-radius: 999px;
  background: color-mix(in srgb, var(--directory-accent) 5%, #fff);
  color: #53627a;
  font-size: 0.75rem;
  font-weight: var(--font-semibold);
  line-height: 1;
  white-space: nowrap;
}

.directory-page--category .cat-hero__badge strong {
  margin-right: 0.25rem;
  color: var(--directory-ink);
  font-weight: var(--font-semibold);
}

.directory-page--category .directory-hero__actions {
  display: flex;
  width: auto;
  margin: 0;
}

.directory-page--category .directory-btn {
  position: relative;
  isolation: isolate;
  width: auto;
  min-height: 42px;
  padding: 0.68rem 1rem;
  overflow: hidden;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.directory-page--category .directory-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 42%, rgba(255, 255, 255, 0.1));
  opacity: 0;
  transition: opacity 180ms ease;
}

.directory-page--category .directory-btn:hover::before {
  opacity: 1;
}

.directory-page--category .directory-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 180ms ease;
}

.directory-page--category .directory-btn:hover svg {
  transform: translateY(2px);
}

.directory-page--category .directory-btn--primary {
  border-color: rgba(255, 255, 255, 0.44);
  background: linear-gradient(115deg, #6d3df1 0%, #347ff5 100%);
  box-shadow:
    0 14px 28px -15px rgba(79, 70, 229, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.directory-page--category .directory-btn--primary:hover {
  box-shadow:
    0 18px 34px -16px rgba(79, 70, 229, 0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.directory-page--category .directory-btn--secondary {
  border: 1.5px solid rgba(79, 70, 229, 0.38);
  background: rgba(255, 255, 255, 0.9);
  color: #4f46e5;
  box-shadow:
    0 10px 24px -20px rgba(79, 70, 229, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.directory-page--category .directory-btn--secondary:hover {
  border-color: rgba(79, 70, 229, 0.62);
  background: #f7f7ff;
  color: #4338ca;
  box-shadow: 0 14px 28px -22px rgba(79, 70, 229, 0.72);
}

.directory-page--category .directory-btn:active {
  transform: scale(0.95);
}

.directory-page--category .directory-btn:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.24);
  outline-offset: 3px;
}

.directory-page--category .cat-hero__accent {
  display: none;
}

.directory-page--category .cat-hero__visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: clamp(220px, 19vw, 270px);
  margin: -2rem 0 0;
}

.directory-page--category .cat-hero__visual-glow {
  position: absolute;
  z-index: -1;
  width: min(82%, 390px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 38%, color-mix(in srgb, var(--directory-accent) 20%, transparent), transparent 62%),
    radial-gradient(circle at 68% 62%, rgba(59, 130, 246, 0.16), transparent 58%);
  filter: blur(16px);
  opacity: 0.9;
}

.directory-page--category .cat-hero__visual-image {
  display: block;
  width: min(94%, 430px);
  height: clamp(220px, 19vw, 270px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 24px 30px rgba(71, 85, 140, 0.13));
  transform: translateZ(0);
}

.directory-page--category .cat-hero__accent-blob {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.85;
}

.cat-hero__visual-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 25px;
  background: linear-gradient(135deg, var(--directory-accent), var(--directory-blue));
  color: #fff;
  box-shadow: 0 24px 42px -20px color-mix(in srgb, var(--directory-accent) 78%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: rotate(-6deg);
}

.cat-hero__visual-icon svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cat-hero__visual-tag,
.cat-hero__visual-note {
  position: absolute;
  z-index: 2;
  padding: 0.45rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--directory-accent) 13%, transparent);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #3b4660;
  box-shadow: 0 14px 28px -20px rgba(79, 70, 229, 0.55), inset 0 1px 0 #fff;
  font-size: 0.67rem;
  font-weight: 750;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.cat-hero__visual-tag { top: 14%; left: -2%; }
.cat-hero__visual-note { right: -2%; bottom: 15%; }

.directory-page--category .cat-section-label {
  align-items: center;
  margin-bottom: 1.25rem;
}

.directory-page--category .ad-slot.is-active {
  margin: clamp(0.65rem, 1.5vw, 1rem) 0 clamp(1rem, 2vw, 1.35rem);
}

.directory-page--category .cat-stats {
  display: flex;
  align-items: center;
  margin: 0 0 clamp(1.35rem, 3vw, 2rem);
  padding: 0.55rem 0 0.7rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.directory-page--category .cat-stats__item {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  min-height: 62px;
  padding: 0.3rem clamp(0.75rem, 2vw, 1.5rem);
  gap: 0.28rem;
}

.directory-page--category .cat-stats__num {
  font-size: clamp(1.45rem, 2.3vw, 1.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.directory-page--category .cat-stats__label {
  color: #718097;
  font-size: clamp(0.65rem, 0.85vw, 0.72rem);
  font-weight: var(--font-semibold);
  line-height: 1.3;
  letter-spacing: 0.025em;
  text-transform: none;
}

.directory-page--category .cat-stats__divider {
  width: 1px;
  height: 34px;
  background: rgba(148, 163, 184, 0.25);
}

.directory-page--category .cat-stats__icon {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--directory-accent);
}

.directory-page--category .cat-stats__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-page--category .cat-stats__item--updated .cat-stats__label {
  color: #53627a;
  font-weight: var(--font-semibold);
}

.directory-page--category .cat-section-label__text,
.directory-page--category .cat-benefits__h2,
.directory-page--category .cat-more__h2,
.directory-page--category .cat-audience h2,
.directory-page--category .cat-tool-picker h2 {
  color: var(--directory-ink);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  letter-spacing: -0.035em;
}

.directory-page--category .cat-section-label__count {
  padding: 0.4rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--directory-accent) 14%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--directory-accent) 5%, #fff);
  color: #66758c;
}

.directory-page--category .cat-tools__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.directory-page--category .cat-tools__grid .cat-tool-card {
  --cat-tool-icon-size: 80px;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  min-height: 156px;
  padding: 1.15rem;
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.035);
}

.directory-page--category .cat-tools__grid .cat-tool-card__head {
  flex: 0 0 var(--cat-tool-icon-size);
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.directory-page--category .cat-tools__grid .cat-tool-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.directory-page--category .cat-tool-card::after {
  content: none;
}

.directory-page--category .cat-tools__grid .cat-tool-card .cat-tool-card__head .cat-tool-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--cat-tool-icon-size);
  height: var(--cat-tool-icon-size);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: none;
}

.directory-page--category .cat-tools__grid .cat-tool-card__icon > .alltoll-icon {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  font-size: var(--cat-tool-icon-size);
  transition: transform 220ms ease;
}

.directory-page--category .cat-tools__grid .cat-tool-card:is(:hover, :focus-visible) .cat-tool-card__icon > img {
  transform: scale(1.06);
}

.directory-page--category .cat-tools__grid .cat-tool-card__icon > svg.alltoll-icon {
  width: 65%;
  height: 65%;
}

.directory-page--category .cat-tools__grid .cat-tool-card__name {
  font-size: 0.98rem;
  font-weight: var(--font-semibold);
  line-height: 1.4;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.directory-page--category .cat-tools__grid .cat-tool-card__desc {
  display: -webkit-box;
  flex: none;
  overflow: hidden;
  font-size: .8125rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.directory-page--category .cat-tools__grid .cat-tool-card__cta {
  gap: 0.4rem;
  margin-top: 0.15rem;
  padding-top: 0;
  opacity: 1;
  transform: none;
  color: var(--directory-accent);
  font-size: 0.76rem;
}

.directory-page--category .cat-tools__grid .cat-tool-card__cta svg {
  flex: 0 0 auto;
  transition: transform 200ms ease;
}

[data-theme="dark"] .directory-page--category .cat-tools__grid .cat-tool-card__cta {
  color: #93c5fd;
}

.directory-page--category .cat-tools__grid .cat-tool-card:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--directory-accent) 35%, var(--directory-border));
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.2);
}

.directory-page--category .cat-tools__grid .cat-tool-card:is(:hover, :focus-visible) .cat-tool-card__cta svg {
  transform: translateX(3px);
}

.directory-page--category .cat-tools__grid .cat-tool-card:focus-visible {
  outline: 3px solid var(--directory-accent);
  outline-offset: 3px;
}

@media (min-width: 1600px) {
  .directory-page--category .cat-tools__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .directory-page--category .cat-tools__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.directory-page--category .cat-what__inner,
.directory-page--category .cat-benefit,
.directory-page--category .cat-popular__item,
.directory-page--category .cat-chip {
  border-color: var(--directory-border);
  background: #fff;
  box-shadow: 0 16px 36px -34px rgba(15, 23, 42, 0.4), inset 0 1px 0 #fff;
}

.directory-page--category .cat-what,
.directory-page--category .cat-popular,
.directory-page--category .cat-benefits,
.directory-page--category .cat-audience,
.directory-page--category .cat-tool-picker,
.directory-page--category .cat-more {
  margin: clamp(1.5rem, 3.5vw, 2.5rem) 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--directory-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 38px -34px rgba(15, 23, 42, 0.45), inset 0 1px 0 #fff;
}

.directory-page--category .cat-what__inner {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.directory-page--category .cat-what__inner::before {
  content: none;
}

.directory-page--category .cat-what__label {
  margin-bottom: 0.5rem;
  color: #5b61df;
  font-size: 0.68rem;
}

.directory-page--category .cat-what__h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

.directory-page--category .cat-what__body {
  width: 100%;
  max-width: none;
  color: #53627a;
  font-size: 0.9rem;
  line-height: 1.72;
}

.directory-page--category .cat-popular .cat-section-label {
  margin-bottom: 1rem;
}

.directory-page--category .cat-popular__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.directory-page--category .cat-popular__item {
  min-height: 58px;
  padding: 0.72rem 0.85rem;
  border-color: #e3e8f0;
  border-radius: 15px;
  background: #f8fafc;
  box-shadow: none;
}

.directory-page--category .cat-popular__item:hover {
  border-color: #cbd9ee;
  background: #f5f8fc;
}

.directory-page--category .cat-popular__icon {
  width: 36px;
  height: 36px;
  border: 1px solid #e3e8f0;
  background: #fff;
}

.directory-page--category .cat-benefits__h2,
.directory-page--category .cat-more__h2 {
  margin-bottom: 1rem;
}

.directory-page--category .cat-benefits__grid {
  gap: 0.75rem;
}

.directory-page--category .cat-benefit {
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.8rem;
  min-height: 134px;
  padding: 1rem;
  border-color: #e3e8f0;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: none;
}

.directory-page--category .cat-benefit__icon {
  width: 34px;
  height: 34px;
  border: 1px solid #e3e8f0;
  background: #fff !important;
  color: #5367e8;
}

.directory-page--category .cat-benefit p {
  color: #617087;
  font-size: 0.78rem;
  line-height: 1.55;
}

.directory-page--category .cat-audience {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.directory-page--category .cat-audience__eyebrow {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: #5b61df;
  font-size: 0.68rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.12em;
}

.directory-page--category .cat-audience h2 {
  margin: 0 0 0.75rem;
}

.directory-page--category .cat-audience__copy p {
  margin: 0;
  color: #53627a;
  font-size: 0.9rem;
  line-height: 1.72;
}

.directory-page--category .cat-audience__roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory-page--category .cat-audience__roles li {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 0.55rem;
  padding: 0.68rem 0.75rem;
  border: 1px solid #e3e8f0;
  border-radius: 13px;
  background: #f8fafc;
  color: #26354a;
  font-size: 0.78rem;
  font-weight: 650;
}

.directory-page--category .cat-audience__roles svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 7px;
  background: #eef2ff;
  color: #5865e8;
}

.directory-page--category .cat-tool-picker {
  display: grid;
  gap: 1rem;
}

.directory-page--category .cat-tool-picker__intro {
  max-width: 860px;
}

.directory-page--category .cat-tool-picker__eyebrow {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: #5b61df;
  font-size: 0.68rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.12em;
}

.directory-page--category .cat-tool-picker h2 {
  margin: 0 0 0.75rem;
}

.directory-page--category .cat-tool-picker__intro p {
  margin: 0;
  color: #53627a;
  font-size: 0.9rem;
  line-height: 1.72;
}

.directory-page--category .cat-tool-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.directory-page--category .cat-tool-picker__item {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e3e8f0;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: none;
}

.directory-page--category .cat-tool-picker__item-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.directory-page--category .cat-tool-picker__num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--directory-accent) 16%, #dbe3ef);
  border-radius: 10px;
  background: color-mix(in srgb, var(--directory-accent) 8%, #fff);
  color: var(--directory-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.directory-page--category .cat-tool-picker__item h3 {
  margin: 0;
  color: var(--directory-ink);
  font-size: 0.98rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.directory-page--category .cat-tool-picker__item p {
  margin: 0;
  color: #617087;
  font-size: 0.82rem;
  line-height: 1.58;
}

.directory-page--category .cat-tool-picker__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.directory-page--category .cat-tool-picker__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--directory-accent) 16%, #dbe3ef);
  border-radius: 999px;
  background: #fff;
  color: #4f56d8;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.directory-page--category .cat-tool-picker__links a:hover,
.directory-page--category .cat-tool-picker__links a:focus-visible {
  border-color: var(--directory-accent);
  background: var(--directory-accent);
  color: #fff;
  box-shadow: 0 10px 22px -14px color-mix(in srgb, var(--directory-accent) 65%, transparent);
  outline: none;
}

.directory-page--category .cat-tool-picker__links svg {
  flex: 0 0 14px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directory-page--category .faq-section--category {
  margin: clamp(1.5rem, 3.5vw, 2.5rem) 0;
  padding: 0;
}

.directory-page--category .faq-section--category > .container {
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.directory-page--category .cat-more__chips {
  gap: 0.65rem;
}

.directory-page--category .cat-chip {
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  border-color: #e3e8f0;
  background: #f8fafc;
  box-shadow: none;
  color: #526176;
  font-size: 0.78rem;
}

.directory-page--category .cat-chip:hover {
  border-color: #cbd9ee;
  background: #f3f6fb;
  color: #4f5bd5;
}

/* Tools search hub */
.directory-page--tools {
  --tools-radius: 15px;
}

.directory-page--tools .search-hero {
  position: relative;
  z-index: 20;
  padding: 20px 0 10px;
  overflow: visible;
}

.directory-page--tools .hero-content {
  position: relative;
  z-index: 2;
  max-width: none;
  padding: 22px 26px;
  text-align: center;
}

.directory-page--tools .search-hero__title {
  max-width: 900px;
  margin-inline: auto;
  color: var(--directory-ink);
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.directory-page--tools .search-hero__subtitle {
  max-width: 780px;
  margin: 0 auto 16px;
  color: #53627a;
  font-size: 0.9375rem;
}

.directory-page--tools .title-accent {
  background: linear-gradient(118deg, #5b5ce2, #3182f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.directory-page--tools .hero-orb--1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07), transparent 70%);
}

.directory-page--tools .hero-orb--2 {
  background: radial-gradient(circle, rgba(37, 131, 248, 0.05), transparent 70%);
}

.directory-page--tools .hero-orb--3 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.035), transparent 70%);
}

.directory-page--tools .hero-orb--4 {
  background: none;
}

.directory-page--tools .hero-eyebrow {
  margin: 0 auto 10px;
  border-color: rgba(99, 102, 241, 0.16);
  background: rgba(99, 102, 241, 0.075);
  color: #4f46e5;
}

.directory-page--tools .search-bento-card {
  position: relative;
  z-index: 30;
  overflow: visible;
  max-width: 1040px;
  margin: 0 auto 12px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  box-shadow: none;
}

.directory-page--tools .search-form {
  position: relative;
  overflow: visible;
}

.directory-page--tools .search-input-wrapper {
  position: relative;
  overflow: visible;
  min-height: 52px;
  border-radius: 15px;
}

.directory-page--tools .search-input {
  color: #1e293b;
  font-size: 0.94rem;
}

.directory-page--tools .search-btn {
  min-height: 46px;
  border-radius: 15px;
  background: linear-gradient(118deg, var(--directory-purple), var(--directory-blue));
  box-shadow: 0 12px 24px -14px rgba(79, 70, 229, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.directory-page--tools .search-stats {
  justify-content: center;
}

/* The page search reuses the header autocomplete renderer. Keep its panel
   anchored to the page field instead of the header mega-menu. */
.directory-page--tools .search-page-autocomplete {
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  z-index: 1000;
  width: auto;
  max-height: min(410px, 58vh);
  padding: 0.55rem;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--directory-ink);
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  box-shadow: 0 22px 55px -24px rgba(15, 23, 42, 0.34), 0 8px 22px -18px rgba(79, 70, 229, 0.3);
  text-align: left;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.directory-page--tools .search-page-autocomplete .header-tools-search__label {
  padding: 0.55rem 0.65rem;
  color: #64748b;
  font-size: 0.7rem;
}

.directory-page--tools .search-page-autocomplete .header-tools-search__item {
  min-height: 60px;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 12px;
}

.directory-page--tools .search-page-autocomplete .header-tools-search__item:hover,
.directory-page--tools .search-page-autocomplete .header-tools-search__item.is-selected {
  border-color: rgba(99, 102, 241, 0.14);
  background: #f5f7ff;
}

.directory-page--tools .search-page-autocomplete .header-tools-search__item-text strong {
  color: #172033;
  font-size: 0.9rem;
}

.directory-page--tools .search-page-autocomplete .header-tools-search__item-text small {
  color: #64748b;
  font-size: 0.76rem;
}

.directory-page--tools .search-page-autocomplete .header-tools-search__view-all {
  min-height: 46px;
  margin-top: 0.4rem;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 11px;
}

.directory-page--tools .search-body {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.directory-page--tools .tools-section,
.directory-page--tools .results-section {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.directory-page--tools .bento-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--directory-border);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.directory-page--tools .bento-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.875rem;
}

.directory-page--tools .bento-section__all {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  color: #4f46e5;
  background: #f7f7ff;
  border: 1px solid #dcdcff;
  border-radius: 9px;
  font-size: .74rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease,background-color .16s ease,border-color .16s ease;
}

.directory-page--tools .bento-section__all:hover {
  color: #fff;
  background: #4f46e5;
  border-color: #4f46e5;
}

.directory-page--tools .bento-section__all:focus-visible {
  outline: 3px solid rgba(79,70,229,.2);
  outline-offset: 2px;
}

.directory-page--tools .bento-section__label,
.directory-page--tools .section-panel__label {
  color: #46546b;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.directory-page--tools .bento-categories {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.directory-page--tools .cat-card {
  min-height: 76px;
  padding: 0.85rem;
  border: 1px solid var(--directory-border);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 28px -27px rgba(15, 23, 42, 0.42), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.directory-page--tools .cat-card:hover {
  border-color: rgba(99, 102, 241, 0.24);
  background: #fbfcff;
  box-shadow: 0 16px 32px -28px rgba(15, 23, 42, 0.38);
  transform: translateY(-2px);
}

.directory-page--tools .cat-card--active {
  border-color: rgba(255, 255, 255, 0.38);
  background: linear-gradient(118deg, var(--directory-purple), var(--directory-blue));
  color: #fff;
  box-shadow: 0 16px 32px -18px rgba(79, 70, 229, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.33);
}

/* Keep the selected category legible when it is also hovered. */
.directory-page--tools .cat-card--active:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: linear-gradient(118deg, var(--directory-purple), var(--directory-blue));
  color: #fff;
  box-shadow: 0 18px 34px -18px rgba(79, 70, 229, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.directory-page--tools .cat-card--active:hover .cat-card__icon {
  background: rgba(255, 255, 255, 0.24);
}

/* Compact category navigation SVGs; independent of the main mascot artwork. */
.directory-page--tools .bento-categories {
  --cat-icon-ink: #635bff;
  --cat-icon-bg: #f0efff;
  --cat-icon-dark: #a5b4fc;
}

:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="ai-writing-tools"] { --cat-icon-ink: #7452ed; --cat-icon-bg: #f2edff; --cat-icon-dark: #b59bff; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="text-tools"] { --cat-icon-ink: #4267dc; --cat-icon-bg: #edf2ff; --cat-icon-dark: #92b0ff; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="pdf-tools"] { --cat-icon-ink: #e05c69; --cat-icon-bg: #fff0f1; --cat-icon-dark: #ff99a3; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="image-tools"] { --cat-icon-ink: #bf58d2; --cat-icon-bg: #fbf0ff; --cat-icon-dark: #e7a1f5; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="video-tools"] { --cat-icon-ink: #e87541; --cat-icon-bg: #fff3eb; --cat-icon-dark: #ffad83; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="social-tools"] { --cat-icon-ink: #2878dc; --cat-icon-bg: #edf6ff; --cat-icon-dark: #83baff; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="seo-tools"] { --cat-icon-ink: #0d9d91; --cat-icon-bg: #e9faf7; --cat-icon-dark: #65dfcc; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="developer-tools"] { --cat-icon-ink: #5964cb; --cat-icon-bg: #eff0ff; --cat-icon-dark: #a8afff; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="utility-tools"] { --cat-icon-ink: #de9b26; --cat-icon-bg: #fff8e8; --cat-icon-dark: #f8cd73; }
:is(.directory-page--tools .bento-categories, .category-type-grid) [data-category="audio-tools"] { --cat-icon-ink: #dd5b9d; --cat-icon-bg: #fff0f7; --cat-icon-dark: #ffa0ce; }

.directory-page--tools .bento-categories .cat-card__icon {
  border-radius: 12px;
  color: var(--cat-icon-ink);
  background: var(--cat-icon-bg);
}

.directory-page--tools .bento-categories .cat-card__icon svg {
  width: 23px;
  height: 23px;
  color: inherit;
}

.directory-page--tools .bento-categories .cat-card--active .cat-card__icon {
  --category-icon-contrast: #635bff;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.directory-page--tools .bento-categories .cat-card--active:hover .cat-card__icon {
  background: rgba(255, 255, 255, 0.24);
}

[data-theme="dark"] .directory-page--tools .bento-categories .cat-card:not(.cat-card--active) .cat-card__icon {
  color: var(--cat-icon-dark);
  background: rgba(148, 163, 184, 0.08);
}

.directory-page--tools .cat-card__name {
  color: inherit;
  font-size: 0.78rem;
  font-weight: var(--font-semibold);
}

.directory-page--tools .cat-card__count {
  font-size: 0.68rem;
}

.directory-page--tools .tools-grid-bento,
.directory-page--tools .tools-grid-bento--featured {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.directory-page--tools .tool-card {
  min-width: 0;
  min-height: 218px;
  padding: 1.1rem;
}

.directory-page--tools .tool-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
}

.directory-page--tools .tool-card:hover .tool-card__name {
  color: #4f46e5;
}

.directory-page--tools .tool-card__bottom {
  border-top-color: rgba(99, 102, 241, 0.09);
}

.directory-page--tools .tool-card__arrow {
  opacity: 1;
  transform: none;
}

/* Dark theme */
[data-theme="dark"] .directory-page {
  --directory-ink: #f8fafc;
  background:
    radial-gradient(circle at 8% 2%, rgba(124, 58, 237, 0.12), transparent 27rem),
    radial-gradient(circle at 92% 12%, rgba(37, 131, 248, 0.1), transparent 28rem),
    var(--color-bg);
}

[data-theme="dark"] .directory-section-heading__kicker { color: #a5b4fc; }

[data-theme="dark"] .directory-page .breadcrumb,
[data-theme="dark"] .directory-btn--secondary,
[data-theme="dark"] .directory-section-heading__count,
[data-theme="dark"] .directory-page--categories .category-stats-bar,
[data-theme="dark"] .directory-page--category .cat-stats {
  border-color: rgba(165, 180, 252, 0.13);
  background: rgba(23, 33, 54, 0.82);
  color: #b7c2d5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

[data-theme="dark"] .directory-page .breadcrumb a,
[data-theme="dark"] .directory-page .breadcrumb-current,
[data-theme="dark"] .directory-btn--secondary {
  color: #d6deea;
}

[data-theme="dark"] .directory-page--category .cat-stats {
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .directory-page--category .cat-stats__label,
[data-theme="dark"] .directory-page--category .cat-stats__item--updated .cat-stats__label {
  color: #aebbd0;
}

[data-theme="dark"] .directory-page--category .cat-stats__divider {
  background: rgba(165, 180, 252, 0.16);
}

[data-theme="dark"] .directory-page--category .cat-hero__badge {
  border-color: rgba(165, 180, 252, 0.18);
  background: rgba(30, 41, 59, 0.82);
  color: #c6d1e1;
}

[data-theme="dark"] .directory-page--category .cat-hero__badge strong {
  color: #f8fafc;
}

[data-theme="dark"] .directory-page--category .breadcrumb,
[data-theme="dark"] .directory-page--categories .breadcrumb {
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .directory-page--categories .category-hero {
  border-color: rgba(165, 180, 252, 0.13);
  background:
    radial-gradient(circle at 4% 4%, color-mix(in srgb, var(--directory-accent) 17%, transparent), transparent 30rem),
    radial-gradient(circle at 94% 92%, rgba(37, 131, 248, 0.14), transparent 28rem),
    linear-gradient(145deg, rgba(27, 39, 60, 0.98), rgba(20, 30, 48, 0.96));
  box-shadow: 0 32px 68px -48px rgba(0, 0, 0, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

[data-theme="dark"] .directory-page--categories .category-hero {
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .directory-page--categories .category-stats-bar {
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .directory-page--categories .category-guide,
[data-theme="dark"] .directory-page--categories .category-audience {
  border-color: rgba(148, 163, 184, 0.17);
  background: rgba(23, 33, 54, 0.82);
  box-shadow: 0 18px 40px -38px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .category-guide__intro h2,
[data-theme="dark"] .category-audience__copy h2,
[data-theme="dark"] .category-guide__item h3 {
  color: #eef3fb;
}

[data-theme="dark"] .category-guide__intro p,
[data-theme="dark"] .category-audience__copy p,
[data-theme="dark"] .category-guide__item p {
  color: #aebbd0;
}

[data-theme="dark"] .category-guide__item,
[data-theme="dark"] .category-audience__list li {
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.38);
  color: #dbe4f1;
}

[data-theme="dark"] .directory-page--category .cat-what,
[data-theme="dark"] .directory-page--category .cat-popular,
[data-theme="dark"] .directory-page--category .cat-benefits,
[data-theme="dark"] .directory-page--category .cat-audience,
[data-theme="dark"] .directory-page--category .cat-tool-picker,
[data-theme="dark"] .directory-page--category .cat-more {
  border-color: rgba(165, 180, 252, 0.12);
  background: #172134;
  box-shadow: 0 20px 44px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .directory-page--categories .category-hero-desc,
[data-theme="dark"] .directory-page--category .cat-hero__desc,
[data-theme="dark"] .directory-page--categories .cat-card__desc,
[data-theme="dark"] .directory-page--category .cat-tool-card__desc,
[data-theme="dark"] .directory-page--tools .tool-card__desc,
[data-theme="dark"] .directory-page--tools .search-hero__subtitle {
  color: #b3bfd2;
}

[data-theme="dark"] .directory-page--tools .bento-section__all {
  color: #c7d2fe;
  background: rgba(99,102,241,.1);
  border-color: rgba(165,180,252,.22);
}

[data-theme="dark"] .directory-page--tools .bento-section__all:hover {
  color: #fff;
  background: #4f46e5;
  border-color: #6366f1;
}

[data-theme="dark"] .directory-page--categories .cat-card,
[data-theme="dark"] .directory-page--category .cat-tool-card,
[data-theme="dark"] .directory-page--tools .tool-card,
[data-theme="dark"] .directory-page--category .cat-what__inner,
[data-theme="dark"] .directory-page--category .cat-benefit,
[data-theme="dark"] .directory-page--category .cat-tool-picker__item,
[data-theme="dark"] .directory-page--category .cat-popular__item,
[data-theme="dark"] .directory-page--category .cat-audience__roles li,
[data-theme="dark"] .directory-page--category .cat-chip {
  border-color: rgba(165, 180, 252, 0.12);
  background:
    radial-gradient(circle at 4% 2%, color-mix(in srgb, var(--directory-accent) 15%, transparent), transparent 42%),
    linear-gradient(145deg, #1c273b, #172134);
  box-shadow: 0 20px 44px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .directory-page--category .cat-what__inner {
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .directory-page--category .cat-benefit,
[data-theme="dark"] .directory-page--category .cat-tool-picker__item,
[data-theme="dark"] .directory-page--category .cat-popular__item,
[data-theme="dark"] .directory-page--category .cat-audience__roles li,
[data-theme="dark"] .directory-page--category .cat-chip {
  border-color: rgba(165, 180, 252, 0.12);
  background: rgba(30, 42, 64, 0.76);
  box-shadow: none;
}

[data-theme="dark"] .directory-page--category .cat-tool-picker__intro p,
[data-theme="dark"] .directory-page--category .cat-tool-picker__item p {
  color: #b3bfd2;
}

[data-theme="dark"] .directory-page--category .cat-tool-picker__links a {
  border-color: rgba(165, 180, 252, 0.14);
  background: rgba(15, 23, 42, 0.45);
  color: #c7d2fe;
}

[data-theme="dark"] .directory-page--tools .cat-card,
[data-theme="dark"] .directory-page--tools .search-bento-card {
  border-color: rgba(165, 180, 252, 0.12);
  background: rgba(23, 33, 54, 0.86);
}

[data-theme="dark"] .directory-page--tools .hero-content {
  border-color: rgba(165, 180, 252, 0.16);
  background: linear-gradient(145deg, #1c273b, #172134);
  box-shadow: 0 20px 44px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .directory-page--tools .search-hero__title {
  color: #f8fafc;
}

[data-theme="dark"] .directory-page--tools .hero-eyebrow {
  border-color: rgba(165, 180, 252, 0.22);
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
}

[data-theme="dark"] .directory-page--tools .search-input-wrapper,
[data-theme="dark"] .directory-page--tools .search-input-wrapper:focus-within {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.82);
}

[data-theme="dark"] .directory-page--tools .search-input-wrapper:focus-within {
  border-color: rgba(129, 140, 248, 0.72);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

[data-theme="dark"] .directory-page--tools .search-input {
  color: #f8fafc;
}

[data-theme="dark"] .directory-page--tools .search-input::placeholder,
[data-theme="dark"] .directory-page--tools .search-icon-left {
  color: #94a3b8;
}

[data-theme="dark"] .directory-page--tools .bento-section {
  border-color: rgba(165, 180, 252, 0.12);
  background: #172134;
  box-shadow: 0 20px 44px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .directory-page--tools .search-page-autocomplete {
  color: #f8fafc;
  background: rgba(17, 24, 39, 0.98);
  border-color: #334155;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.72);
}

[data-theme="dark"] .directory-page--tools .search-page-autocomplete .header-tools-search__label,
[data-theme="dark"] .directory-page--tools .search-page-autocomplete .header-tools-search__item-text small {
  color: #94a3b8;
}

[data-theme="dark"] .directory-page--tools .search-page-autocomplete .header-tools-search__item-text strong {
  color: #f8fafc;
}

[data-theme="dark"] .directory-page--tools .search-page-autocomplete .header-tools-search__item:hover,
[data-theme="dark"] .directory-page--tools .search-page-autocomplete .header-tools-search__item.is-selected {
  border-color: rgba(129, 140, 248, 0.24);
  background: rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .directory-page--tools .cat-card:hover {
  background: rgba(30, 42, 64, 0.96);
}

[data-theme="dark"] .directory-page--tools .cat-card--active {
  background: linear-gradient(118deg, var(--directory-purple), var(--directory-blue));
}

[data-theme="dark"] .directory-page--tools .cat-card--active:hover {
  background: linear-gradient(118deg, var(--directory-purple), var(--directory-blue));
}

[data-theme="dark"] .directory-hero__visual-card,
[data-theme="dark"] .cat-hero__visual-tag,
[data-theme="dark"] .cat-hero__visual-note {
  border-color: rgba(165, 180, 252, 0.13);
  background: rgba(23, 33, 54, 0.84);
  color: #dbe4f1;
  box-shadow: 0 18px 30px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

[data-theme="dark"] .directory-page--category .cat-hero__accent {
  border-color: rgba(165, 180, 252, 0.13);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--directory-accent) 28%, transparent), rgba(23, 33, 54, 0.62) 64%);
}

[data-theme="dark"] .directory-page--categories .how-it-works {
  border-color: rgba(129, 140, 248, 0.18);
  background:
    radial-gradient(circle at 7% 10%, rgba(59, 130, 246, 0.12), transparent 25rem),
    radial-gradient(circle at 94% 12%, rgba(139, 92, 246, 0.12), transparent 26rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: 0 24px 52px -42px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .directory-page--categories .how-it-works__badge {
  border-color: rgba(129, 140, 248, 0.23);
  background: rgba(79, 70, 229, 0.13);
  color: #b8c2ff;
}

[data-theme="dark"] .directory-page--categories .how-it-works__lead,
[data-theme="dark"] .directory-page--categories .how-it-works__step > p {
  color: #aebbd0;
}

[data-theme="dark"] .directory-page--categories .how-it-works__step {
  border-color: rgba(var(--step-rgb), 0.27);
  background: linear-gradient(180deg, rgba(var(--step-rgb), 0.1), rgba(20, 30, 49, 0.94) 44%);
  box-shadow: 0 22px 44px -38px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] .directory-page--categories .how-it-works__mock {
  border-color: rgba(var(--step-rgb), 0.19);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .directory-page--categories .how-it-works__search,
[data-theme="dark"] .directory-page--categories .how-it-works__mock small {
  color: #94a3b8;
}

[data-theme="dark"] .directory-page--categories .how-it-works__mock strong {
  color: #e5edf8;
}

[data-theme="dark"] .directory-page--categories .how-it-works__foot {
  border-color: rgba(129, 140, 248, 0.16);
  background: rgba(15, 23, 42, 0.7);
}

[data-theme="dark"] .directory-page--categories .how-it-works__foot span {
  color: #cbd5e1;
}

[data-theme="dark"] .directory-page--categories .how-it-works__foot svg {
  background: rgba(129, 140, 248, 0.12);
}

/* Responsive */
@media (max-width: 1024px) {
  .directory-page--category .cat-hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.56fr);
    column-gap: 1.5rem;
  }

  .directory-page--category .cat-hero__visual {
    min-height: 220px;
  }

  .directory-page--category .cat-hero__visual-image {
    height: 240px;
  }

  .directory-page--category .cat-tools__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page--categories .category-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr);
    min-height: 0;
    padding: 1rem 0 0;
  }

  .directory-page--categories .category-hero__visual {
    min-height: 260px;
  }

  .directory-page--categories .category-hero__art {
    width: min(100%, 420px);
  }

  .directory-page--categories .cat-grid,
  .directory-page--tools .tools-grid-bento,
  .directory-page--tools .tools-grid-bento--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page--categories .category-guide,
  .directory-page--categories .category-audience {
    grid-template-columns: 1fr;
  }

  .directory-page--categories .how-it-works__step {
    min-height: 360px;
    padding-inline: 1rem;
  }

  .directory-page--tools .bento-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .directory-page--category .cat-popular__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page--category .cat-audience {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Keep the tools hub inside the device viewport. The desktop hero uses
     oversized, absolutely-positioned orbs and visible overflow for its
     autocomplete; together they used to expand the mobile page horizontally. */
  .directory-page--tools {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: clip;
  }

  .directory-page--tools .hero-orb {
    display: none;
  }

  .directory-page--tools .search-hero,
  .directory-page--tools .hero-content,
  .directory-page--tools .search-body,
  .directory-page--tools .search-body > .container,
  .directory-page--tools .bento-section,
  .directory-page--tools .tools-section,
  .directory-page--tools .results-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .directory-page--tools .search-hero {
    overflow-x: hidden;
    overflow-x: clip;
  }

  .directory-page--tools .hero-content {
    padding: 18px 16px;
  }

  .directory-page--tools .search-bento-card,
  .directory-page--tools .search-form,
  .directory-page--tools .search-input-wrapper,
  .directory-page--tools .search-input,
  .directory-page--tools .bento-categories,
  .directory-page--tools .tools-grid-bento,
  .directory-page--tools .tools-grid-bento--featured {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .directory-page--tools .cat-card,
  .directory-page--tools .cat-card__info,
  .directory-page--tools .tool-card,
  .directory-page--tools .tool-card__top,
  .directory-page--tools .tool-card__body,
  .directory-page--tools .tool-card__bottom {
    min-width: 0;
  }

  .directory-page--tools .cat-card__name,
  .directory-page--tools .cat-card__count {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .directory-page:not(.directory-page--tools) {
    padding-top: 1rem;
  }

  .directory-page--categories .breadcrumb {
    width: auto;
    border-radius: 0;
  }

  .directory-page--categories .category-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0.75rem;
    padding: 0.5rem 0 0;
    border-radius: 0;
  }

  .directory-hero__visual,
  .directory-page--category .cat-hero__accent {
    display: none;
  }

  .directory-page--categories .category-hero__visual {
    display: grid;
    min-height: 190px;
    order: 2;
  }

  .directory-page--categories .category-hero__art {
    width: min(100%, 340px);
  }

  .directory-page--categories .how-it-works {
    padding: 2rem 1rem 1rem;
    border-radius: 22px;
  }

  .directory-page--categories .how-it-works__title {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .directory-page--categories .how-it-works__lead {
    font-size: 0.87rem;
  }

  .directory-page--categories .how-it-works__steps {
    grid-template-columns: 1fr;
    gap: 5.25rem;
    max-width: 480px;
    margin: 5.25rem auto 0;
  }

  .directory-page--categories .how-it-works__step {
    min-height: 320px;
    padding: 3.5rem 1.15rem 1.15rem;
  }

  .directory-page--categories .how-it-works__step:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -5.25rem;
    width: 9px;
    height: 5.25rem;
    background: linear-gradient(180deg, rgba(var(--step-rgb), 0.55) 58%, transparent 58%) 50% 0 / 2px 8px repeat-y;
    clip-path: polygon(38% 0, 62% 0, 62% 72%, 100% 72%, 50% 100%, 0 72%, 38% 72%);
    transform: translateX(50%);
  }

  .directory-page--categories .how-it-works__step > p {
    min-height: 0;
  }

  .directory-page--categories .how-it-works__foot {
    grid-template-columns: 1fr;
    padding-block: 0.35rem;
  }

  .directory-page--categories .how-it-works__foot span {
    justify-content: flex-start;
    min-height: 42px;
  }

  .directory-page--categories .how-it-works__foot span + span {
    border-top: 1px solid rgba(99, 102, 241, 0.11);
    border-left: 0;
  }

  .directory-page--category .cat-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    row-gap: 0;
  }

  .directory-page--category .cat-hero__text {
    max-width: none;
  }

  .directory-page--category .cat-hero__footer {
    align-items: flex-start;
    margin-top: 0.9rem;
  }

  .directory-page--category .directory-hero__actions {
    width: auto;
    margin: 0;
  }

  .directory-page--category .directory-btn {
    width: auto;
    min-height: 42px;
    padding-inline: 1rem;
    font-size: 0.84rem;
  }

  .directory-page--category .cat-hero__visual {
    display: none;
  }

  .directory-page--category .cat-hero__visual-image {
    height: auto;
  }

  .directory-page--categories .category-hero h1,
  .directory-page--category .cat-hero__h1 {
    font-size: 1.875rem;
    letter-spacing: 0;
  }

  .directory-page--categories .category-stats-bar,
  .directory-page--category .cat-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 18px;
  }

  .directory-page--categories .category-stats-bar {
    gap: 0;
    padding: 0.25rem 0;
    border: 0;
    background: transparent;
  }

  .directory-page--categories .category-stats-bar__sep,
  .directory-page--category .cat-stats__divider {
    display: none;
  }

  .directory-page--categories .category-stats-bar__item,
  .directory-page--category .cat-stats__item {
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid var(--directory-border);
    border-radius: 14px;
    background: #fff;
  }

  .directory-page--categories .category-stats-bar__item {
    align-items: center;
    min-height: 72px;
    padding: 0.65rem 0.45rem;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .directory-page--categories .category-stats-bar__item:nth-child(1),
  .directory-page--categories .category-stats-bar__item:nth-child(3) {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  .directory-page--categories .category-stats-bar__item:nth-child(3),
  .directory-page--categories .category-stats-bar__item:nth-child(7) {
    border-left: 1px solid rgba(148, 163, 184, 0.2);
  }

  .directory-page--categories .category-stats-bar__label,
  .directory-page--category .cat-stats__label {
    max-width: 100%;
    line-height: 1.35;
    white-space: normal;
  }

  .directory-page--category .cat-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0.3rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .directory-page--category .cat-stats__item {
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 0.75rem 0.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .directory-page--category .cat-stats__item:nth-child(1),
  .directory-page--category .cat-stats__item:nth-child(3) {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  .directory-page--category .cat-stats__item:nth-child(3),
  .directory-page--category .cat-stats__item:nth-child(7) {
    border-left: 1px solid rgba(148, 163, 184, 0.2);
  }

  .directory-page--categories .cat-grid {
    grid-template-columns: 1fr;
  }

  .directory-page--tools .tools-grid-bento,
  .directory-page--tools .tools-grid-bento--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .directory-page--categories .cat-card {
    min-height: 235px;
  }

  .category-guide__grid,
  .category-audience__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page--category .cat-tools__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page--category .cat-popular__list {
    grid-template-columns: 1fr;
  }

  .directory-page--category .cat-what,
  .directory-page--category .cat-popular,
  .directory-page--category .cat-benefits,
  .directory-page--category .cat-audience,
  .directory-page--category .cat-tool-picker,
  .directory-page--category .cat-more {
    border-radius: 20px;
  }

  .directory-page--tools .search-hero {
    padding: 14px 0 8px;
  }

  .directory-page--tools .search-hero__title {
    font-size: 1.75rem;
  }

  .directory-page--tools .search-hero__subtitle {
    margin-bottom: 16px;
  }

  .directory-page--tools .bento-section {
    margin-bottom: 1.25rem;
    padding: 0.875rem;
  }

  .directory-page--tools .bento-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page--tools .search-bento-card {
    margin-bottom: 12px;
  }

  .directory-page--tools .tool-card {
    min-height: 208px;
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 15px;
  }

  .directory-page--tools .tool-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .directory-page--tools .tool-card__name {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .directory-page--tools .tool-card__desc {
    font-size: 0.74rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }

  .directory-page--tools .tool-card__bottom {
    gap: 0.35rem;
    padding-top: 0.65rem;
  }

  .directory-page--tools .tool-card__cat {
    min-width: 0;
    overflow: hidden;
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .directory-page--tools .tool-card__arrow {
    width: 28px;
    height: 28px;
  }

  .directory-page--tools .search-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 390px;
    margin-inline: auto;
  }

  .directory-page--tools .search-stats > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: fit-content;
    justify-self: center;
  }

  .directory-page--tools .stat-chip {
    justify-content: center;
    min-height: 38px;
  }
}

@media (max-width: 520px) {
  .directory-page--tools .tools-grid-bento,
  .directory-page--tools .tools-grid-bento--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .directory-page--tools .tool-card {
    min-height: 200px;
    padding: 0.8rem;
  }

  .directory-page--tools .tool-card__badges {
    gap: 2px;
  }

  .directory-page--tools .tool-badge {
    padding: 2px 5px;
    font-size: 8px;
  }

  .directory-page--tools .search-page-autocomplete {
    right: -0.15rem;
    left: -0.15rem;
    max-height: min(360px, 52vh);
    padding: 0.4rem;
    border-radius: 14px;
  }

  .directory-page--tools .search-page-autocomplete .header-tools-search__item {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    min-height: 56px;
    gap: 0.55rem;
    padding: 0.45rem 0.5rem;
  }

  .directory-page--tools .search-page-autocomplete .header-tools-search__item-icon {
    width: 34px;
    height: 34px;
  }

  .directory-page--categories .category-hero__visual {
    min-height: 155px;
  }

  .directory-page--categories .category-hero__art {
    width: min(100%, 280px);
  }

  .directory-page--categories .how-it-works {
    padding-inline: 0.75rem;
  }

  .directory-page--categories .how-it-works__step {
    min-height: 306px;
    border-radius: 18px;
  }

  .directory-page--categories .how-it-works__mascot {
    width: 108px;
  }

  .directory-page--categories .category-hero-desc {
    font-size: 0.92rem;
    line-height: 1.68;
  }

  .directory-page--categories .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .directory-page--categories .cat-card {
    min-width: 0;
    min-height: 230px;
    padding: 0.9rem;
    gap: 0.65rem;
  }

  .directory-page--categories .cat-card__icon {
    width: 40px;
    height: 40px;
  }

  .directory-page--categories .cat-card__badge {
    padding: 3px 6px;
    font-size: 8px;
  }

  .directory-page--categories .cat-card__title {
    font-size: 0.88rem;
  }

  .directory-page--categories .cat-card__sub {
    min-height: 0;
    font-size: 0.7rem;
  }

  .directory-page--categories .cat-card__desc {
    font-size: 0.69rem;
    line-height: 1.48;
    -webkit-line-clamp: 3;
  }

  .directory-page--categories .cat-card__count {
    font-size: 0.6rem;
  }

  .category-guide__grid,
  .category-audience__list {
    grid-template-columns: 1fr;
  }

  .directory-page--categories .category-guide,
  .directory-page--categories .category-audience {
    padding: 1.1rem;
    border-radius: 19px;
  }

  .directory-page--category .cat-hero {
    row-gap: 0;
  }

  .directory-page--category .cat-hero__visual {
    min-height: 205px;
  }

  .directory-page--category .cat-hero__visual-image {
    width: min(96%, 390px);
    height: 220px;
  }

  .directory-hero__actions,
  .directory-btn {
    width: 100%;
  }

  .directory-page--categories .category-hero__content {
    min-width: 0;
  }

  .directory-page--categories .directory-hero__actions {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .directory-page--categories .directory-hero__actions .directory-btn {
    min-width: 0;
    padding-inline: 0.5rem;
    gap: 0.35rem;
    font-size: clamp(0.75rem, 3.2vw, 0.8125rem);
    line-height: 1.25;
  }

  .directory-page--categories .directory-hero__actions .directory-btn svg {
    flex-shrink: 0;
    width: 0.875rem;
    height: 0.875rem;
  }

  .directory-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .directory-page--category .cat-tools__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }

  .directory-page--category .cat-tools__grid .cat-tool-card {
    --cat-tool-icon-size: 64px;
    min-height: 136px;
    padding: 0.9rem;
    gap: 0.85rem;
  }

  .directory-page--category .cat-tools__grid .cat-tool-card__name {
    font-size: 0.94rem;
  }

  .directory-page--category .cat-tools__grid .cat-tool-card__desc {
    font-size: .8125rem;
  }

  .directory-page--categories .category-hero h1,
  .directory-page--category .cat-hero__h1 {
    font-size: 1.7rem;
    line-height: 1.13;
  }

  .directory-page--category .cat-hero__desc {
    font-size: 0.92rem;
  }

  .directory-page--category .cat-what,
  .directory-page--category .cat-popular,
  .directory-page--category .cat-benefits,
  .directory-page--category .cat-audience,
  .directory-page--category .cat-tool-picker,
  .directory-page--category .cat-more {
    padding: 1.1rem;
    border-radius: 18px;
  }

  .directory-page--category .cat-tool-picker__grid {
    grid-template-columns: 1fr;
  }

  .directory-page--category .cat-audience__roles {
    grid-template-columns: 1fr;
  }

  .directory-page--tools .search-bento-card {
    border-radius: 18px;
  }

  .directory-page--tools .search-input-wrapper {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 52px;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem 0.45rem 0.8rem;
  }

  .directory-page--tools .search-btn {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-height: 46px;
    justify-content: center;
    gap: 0;
    padding: 0;
    font-size: 0;
  }

  .directory-page--tools .search-btn svg {
    display: block;
    width: 17px;
    height: 17px;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .directory-page--tools .section-panel__header,
  .directory-page--tools .tools-alpha-group__header {
    width: 100%;
    min-width: 0;
  }

  .directory-page--tools .section-panel__label,
  .directory-page--tools .tools-alpha-group__header h3 {
    min-width: 0;
  }

  .directory-page--tools .tools-grid-bento,
  .directory-page--tools .tools-grid-bento--featured {
    grid-template-columns: 1fr;
  }

  .directory-page--tools .tool-card {
    min-height: 0;
  }

  .directory-page--tools .tool-alpha-nav {
    max-width: 100%;
    gap: 0.2rem;
    overflow: hidden;
  }

  .directory-page--tools .tool-alpha-nav__link {
    width: 1.65rem;
    height: 1.65rem;
  }
}

/* Keep every rectangular surface on the tools hub on one radius scale. */
.directory-page--tools :is(
  .hero-content,
  .hero-eyebrow,
  .search-bento-card,
  .search-input-wrapper,
  .search-btn,
  .stat-chip,
  .bento-section,
  .cat-card,
  .cat-card__icon,
  .results-panel,
  .results-panel__icon,
  .results-clear-btn,
  .tool-card,
  .tool-card__icon,
  .tool-badge,
  .tool-card__arrow,
  .section-panel__count,
  .search-page-autocomplete,
  .tools-hub-seo,
  .tools-hub-guide,
  .faq-section__layout,
  .tools-hub-seo__card,
  .tools-hub-guide__item,
  .tools-hub-faq__item,
  .tools-hub-seo__icon,
  .tools-hub-guide__links a,
  .tool-alpha-nav,
  .tool-alpha-nav__link,
  .tools-alpha-group__letter,
  .search-empty__icon
) {
  border-radius: var(--tools-radius);
}

.directory-page--tools .search-page-autocomplete :is(
  .header-tools-search__item,
  .header-tools-search__view-all
),
.directory-page--tools .tools-hub-faq__item summary::after,
.directory-page--tools .tools-alpha-group__header > span:last-child {
  border-radius: var(--tools-radius);
}

.directory-page--tools :is(.tools-hub-seo, .tools-hub-guide) {
  border-color: #d5deea;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .directory-page--tools :is(.tools-hub-seo, .tools-hub-guide) {
  border-color: rgba(165, 180, 252, 0.12);
  background: #172134;
  box-shadow: 0 20px 44px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.directory-page .cat-ai-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-block: var(--space-6);
}
.directory-page .cat-ai-guide > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.directory-page .cat-ai-guide__label {
  color: var(--directory-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
}
.directory-page .cat-ai-guide h2 {
  margin: var(--space-2) 0;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
}
.directory-page .cat-ai-guide p,
.directory-page .cat-writing-utilities__intro {
  margin: 0 0 var(--space-5);
  line-height: 1.65;
  color: var(--color-text-secondary);
}
.directory-page .cat-ai-guide .directory-btn { margin-top: auto; }
.directory-page .cat-writing-utilities { margin-block: var(--space-6); }
.directory-page .cat-writing-utilities .cat-section-label { margin-bottom: var(--space-3); }
@media (max-width: 640px) {
  .directory-page--category .cat-tools__grid { grid-template-columns: minmax(0, 1fr); }
  .directory-page .cat-ai-guide { grid-template-columns: minmax(0, 1fr); }
  .directory-page .cat-ai-guide > div { padding: var(--space-5); }
}

@media (prefers-reduced-motion: reduce) {
  .directory-page--category .cat-tools__grid .cat-tool-card,
  .directory-page--category .cat-tools__grid .cat-tool-card__icon > .alltoll-icon,
  .directory-page--category .cat-tools__grid .cat-tool-card__cta svg {
    transition: none;
  }

  .directory-page *,
  .directory-page *::before,
  .directory-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Action-based discovery on the category hub. */
.directory-page--categories .category-actions {
  margin: 3.5rem 0;
  scroll-margin-top: 6rem;
}

.category-actions__heading {
  align-items: end;
  margin-bottom: 1.35rem;
}

.category-actions__intro { min-width: 0; }

.category-actions__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.category-actions__heading p {
  margin: 0;
  color: var(--color-text-secondary, #52617a);
  font-size: .875rem;
  line-height: 1.55;
}

.category-actions__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.category-action-card {
  --action-accent: #2563eb;
  --action-soft: color-mix(in srgb, var(--action-accent) 9%, white);
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--directory-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .025);
}

.category-action-card--create { --action-accent: #7752d8; }
.category-action-card--edit { --action-accent: #d74467; }
.category-action-card--convert { --action-accent: #087d89; }
.category-action-card--analyze { --action-accent: #a96508; }
.category-action-card--calculate { --action-accent: #167c59; }

.category-action-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-bottom: 12px;
}

.category-action-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--action-soft);
  color: var(--action-accent);
}

.category-action-card__count {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--color-text-secondary);
  font-size: .6875rem;
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

.category-action-card h3 {
  min-width: 0;
  margin: 0;
  color: var(--color-text, #14223c);
  font-size: 1rem;
  font-weight: var(--font-semibold);
  line-height: 1.4;
  letter-spacing: -.02em;
}

.category-action-card > p {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--color-text-secondary, #52617a);
  font-size: .8125rem;
  line-height: 1.6;
}

.category-action-card__tools {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-action-card__tools a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text, #14223c);
  font-size: .8125rem;
  line-height: 1.5;
  text-decoration: none;
}

.category-action-card__tools a svg { flex: 0 0 16px; color: var(--color-text-muted); }
.category-action-card__tools a:hover {
  background: var(--action-soft);
}

.category-action-card__tools a:hover svg { color: var(--action-accent); }

.category-action-card__tools a:focus-visible,
.category-action-card__more summary:focus-visible,
.category-action-card__overflow:focus-visible {
  outline: 2px solid var(--action-accent);
  outline-offset: 2px;
}

.category-action-card__tools a:focus-visible {
  background: var(--action-soft);
}

.category-action-card__more {
  margin-top: 10px;
  border-top: 1px solid var(--directory-border);
  padding-top: 6px;
}

.category-action-card__more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--action-accent);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
}

.category-action-card__more summary::-webkit-details-marker { display: none; }
.category-action-card__label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.category-action-card__more summary:hover { background: var(--action-soft); }
.category-action-card__more summary svg { flex: 0 0 16px; }
.category-action-card__more[open] summary svg { transform: rotate(180deg); }
.category-action-card__collapse,
.category-action-card__more[open] .category-action-card__expand { display: none; }
.category-action-card__more[open] .category-action-card__collapse { display: inline; }

.category-action-card__overflow {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--directory-border) transparent;
  margin-top: 6px;
  padding: 3px;
  border-radius: 8px;
}

[data-theme="dark"] .category-action-card {
  --action-soft: color-mix(in srgb, var(--action-accent) 14%, #172134);
  border-color: #334155;
  background: #172134;
  box-shadow: none;
}

[data-theme="dark"] .category-action-card--optimize { --action-accent: #8ab4ff; }
[data-theme="dark"] .category-action-card--create { --action-accent: #ba9aff; }
[data-theme="dark"] .category-action-card--edit { --action-accent: #ff97ad; }
[data-theme="dark"] .category-action-card--convert { --action-accent: #6ad4dd; }
[data-theme="dark"] .category-action-card--analyze { --action-accent: #f4c371; }
[data-theme="dark"] .category-action-card--calculate { --action-accent: #7cddae; }

[data-theme="dark"] .category-action-card__more { border-color: #334155; }

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

@media (max-width: 640px) {
  .category-actions__grid { grid-template-columns: 1fr; }
  .category-actions__heading { align-items: start; }
  .category-action-card > p { min-height: 0; }
  .category-action-card { padding: 14px; }
  .category-action-card__tools a,
  .category-action-card__more summary { min-height: 44px; }
}

