/* ==========================================================================
   Aiversely — Design System
   Brand: Aiversely | "Your Universe of AI Tools, Agents & Workflows"
   ========================================================================== */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Futura PT', 'Futura', 'Jost', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Theme Colors - Light Mode */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-hover: #e2e8f0;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Brand Accents - Primary: #FD2A51 -> #BC0650 */
  --primary: #FD2A51;
  --primary-hover: #BC0650;
  --primary-light: #fff0f3;
  --primary-dark: #BC0650;
  --accent-cyan: #06b6d4;
  --accent-purple: #BC0650;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #FD2A51;

  /* Bootstrap 5 Theme Overrides */
  --bs-primary: #FD2A51;
  --bs-primary-rgb: 253, 42, 81;
  --bs-link-color: #FD2A51;
  --bs-link-hover-color: #BC0650;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --glow: 0 0 35px -5px rgba(253, 42, 81, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* Dark Mode Tokens */
body.dark {
  --bg: #090d16;
  --surface: #111827;
  --surface-alt: #1a2234;
  --surface-hover: #222d42;
  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --border: #1f293d;
  --border-light: #161f30;
  --primary-light: rgba(253, 42, 81, 0.15);
  --bs-primary: #FD2A51;
  --bs-primary-rgb: 253, 42, 81;
  --bs-link-color: #FD2A51;
  --bs-link-hover-color: #ff6584;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6);
  --glow: 0 0 35px -5px rgba(253, 42, 81, 0.35);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  line-height: 1.62;
  letter-spacing: -0.011em;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

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

/* Typography Utility */
h1, h2, h3, h4, h5, h6, .brand {
  font-family: var(--font-display);
  letter-spacing: -0.028em;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

body.dark .site-header {
  background-color: rgba(17, 24, 39, 0.88);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 32px;
  width: auto;
  max-height: 36px;
  object-fit: contain;
  vertical-align: middle;
}
.brand-logo.logo-light {
  display: none !important;
}
.brand-logo.logo-dark {
  display: inline-block !important;
}

body.dark .brand-logo.logo-dark {
  display: none !important;
}
body.dark .brand-logo.logo-light {
  display: inline-block !important;
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted) !important;
  padding: 0.45rem 0.65rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap !important;
}

@media (min-width: 992px) and (max-width: 1320px) {
  .nav-link {
    font-size: 12.5px;
    padding: 0.4rem 0.45rem !important;
  }
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-light);
}

.site-header {
  white-space: nowrap;
}

.site-header .nav-item,
.site-header .nav-link,
.site-header .btn,
.site-header .btn-brand,
.site-header .btn-outline-brand {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.header-quick-search {
  width: 110px;
  font-size: 12px;
  transition: width 0.25s ease, background-color 0.2s ease;
}

.header-quick-search:focus {
  width: 160px;
  background-color: var(--surface) !important;
  box-shadow: 0 0 0 2px rgba(253, 42, 81, 0.2);
}

/* Quick Search Button in Nav */
.header-search-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-search-btn:hover {
  border-color: var(--primary);
  color: var(--ink);
  background: var(--surface);
}

.kbd-shortcut {
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Modern Breadcrumbs Component
   ========================================================================== */
nav[aria-label="Breadcrumb"] {
  margin-bottom: 1.25rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

body.dark .breadcrumb {
  background: rgba(17, 24, 39, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.breadcrumb-item a {
  color: var(--muted) !important;
  text-decoration: none !important;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item a:hover {
  color: var(--primary) !important;
  text-decoration: none !important;
}

/* Home Icon on First Item */
.breadcrumb-item:first-child a {
  color: var(--ink-secondary) !important;
  font-weight: 600;
}

.breadcrumb-item:first-child a:hover {
  color: var(--primary) !important;
}

.breadcrumb-item:first-child a::before {
  content: "\f425";
  font-family: "bootstrap-icons" !important;
  font-size: 11.5px;
  margin-right: 5px;
  color: var(--primary);
  display: inline-block;
  vertical-align: -0.5px;
}

/* Crisp Chevron Arrow Separator */
.breadcrumb-item + .breadcrumb-item {
  padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-top: 1.5px solid var(--muted);
  border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
  margin: 0 9px 1px 9px;
  opacity: 0.55;
  float: none;
  padding: 0;
}

body.dark .breadcrumb-item + .breadcrumb-item::before {
  border-color: rgba(255, 255, 255, 0.35);
}

/* Active / Current Page */
.breadcrumb-item.active {
  color: var(--ink) !important;
  font-weight: 650;
  white-space: nowrap;
}

body.dark .breadcrumb-item.active {
  color: #f1f5f9 !important;
}

@media (max-width: 767px) {
  nav[aria-label="Breadcrumb"] {
    margin-bottom: 0.85rem;
  }
  .breadcrumb {
    padding: 5px 12px;
    font-size: 11.5px;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .breadcrumb::-webkit-scrollbar {
    display: none;
  }
  .breadcrumb-item + .breadcrumb-item::before {
    margin: 0 6px 1px 6px;
  }
  .breadcrumb-item.text-truncate {
    max-width: 160px !important;
  }
}

/* Buttons */
.btn-brand {
  background: linear-gradient(135deg, #FD2A51 0%, #BC0650 100%);
  color: #ffffff !important;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(253, 42, 81, 0.28);
}

.btn-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(253, 42, 81, 0.42);
  color: #ffffff !important;
}

.btn-primary {
  background: linear-gradient(135deg, #FD2A51 0%, #BC0650 100%) !important;
  border-color: #FD2A51 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(253, 42, 81, 0.25);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, #e01b42 0%, #9e0441 100%) !important;
  border-color: #BC0650 !important;
  box-shadow: 0 6px 18px rgba(253, 42, 81, 0.38);
  color: #ffffff !important;
}

.text-primary {
  color: #FD2A51 !important;
}
a.text-primary:hover {
  color: #BC0650 !important;
}

.bg-primary {
  background-color: #FD2A51 !important;
}

.bg-primary-subtle {
  background-color: #fff0f3 !important;
  color: #BC0650 !important;
}
body.dark .bg-primary-subtle {
  background-color: rgba(253, 42, 81, 0.16) !important;
  color: #ff6584 !important;
}

.border-primary {
  border-color: #FD2A51 !important;
}
.border-primary-subtle {
  border-color: rgba(253, 42, 81, 0.25) !important;
}

.btn-outline-brand {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

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

/* Hero Section */
.hero-compact {
  padding: 50px 0 40px;
  position: relative;
  overflow: visible !important;
  z-index: 20;
}

.hero-compact.hero-centered {
  padding: 75px 0 65px;
}

.hero-compact:has(.has-dropdown-open),
.hero-compact:has(.hero-search-wrapper:focus-within) {
  z-index: 1050;
}

/* Lightweight High-Performance Gradient Mesh Background */
.hero-aurora-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  background:
    radial-gradient(ellipse 65% 55% at 15% 15%, rgba(196, 181, 253, 0.55) 0%, rgba(196, 181, 253, 0) 70%),
    radial-gradient(ellipse 60% 50% at 85% 18%, rgba(254, 205, 211, 0.6) 0%, rgba(254, 205, 211, 0) 70%),
    radial-gradient(ellipse 55% 48% at 30% 90%, rgba(254, 215, 170, 0.45) 0%, rgba(254, 215, 170, 0) 70%),
    radial-gradient(ellipse 60% 50% at 75% 85%, rgba(233, 213, 255, 0.48) 0%, rgba(233, 213, 255, 0) 70%),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.85) 0%, rgba(248, 250, 252, 0.5) 100%);
  contain: strict;
}

body.dark .hero-aurora-bg {
  background:
    radial-gradient(ellipse 65% 55% at 15% 15%, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0) 70%),
    radial-gradient(ellipse 60% 50% at 85% 18%, rgba(244, 63, 94, 0.16) 0%, rgba(244, 63, 94, 0) 70%),
    radial-gradient(ellipse 55% 48% at 30% 90%, rgba(168, 85, 247, 0.18) 0%, rgba(168, 85, 247, 0) 70%),
    radial-gradient(ellipse 60% 50% at 75% 85%, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0) 70%),
    radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.9) 0%, #090d16 100%);
}

.aurora-blob {
  display: none !important;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(253, 42, 81, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary);
  border: 1px solid rgba(253, 42, 81, 0.22);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(253, 42, 81, 0.08);
}

body.dark .hero-pill {
  background: rgba(188, 6, 80, 0.18);
  border-color: rgba(253, 42, 81, 0.35);
}

.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.hero-title {
  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: 1100px;
}

@media (min-width: 992px) {
  .hero-title {
    white-space: nowrap;
  }
}

.hero-highlight {
  position: relative;
  display: inline-block;
  color: var(--ink);
  white-space: nowrap;
}

.hero-underline-svg {
  position: absolute;
  left: -2px;
  bottom: -10px;
  width: 104%;
  height: 16px;
  color: #FD2A51;
  pointer-events: none;
}

.hero-desc {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Master Hero Search Bar */
.hero-search-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  box-sizing: border-box;
  transition: all 0.25s ease;
  position: relative;
  z-index: 50;
  overflow: visible;
}

.hero-search-pill {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 30px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  width: 100%;
  max-width: 560px;
  overflow: visible;
}

body.dark .hero-search-pill {
  background: rgba(17, 24, 39, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.5);
}

.hero-search-wrapper:focus-within,
.hero-search-wrapper.has-dropdown-open {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(253, 42, 81, 0.18), 0 12px 30px -6px rgba(15, 23, 42, 0.08);
  z-index: 1050;
}

.hero-search-wrapper .search-icon {
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}

.hero-search-wrapper input,
.hero-search-wrapper input:focus,
.hero-search-wrapper input:focus-visible {
  border: none !important;
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  flex: 1;
  font-size: 15px;
  color: var(--ink);
  padding: 8px 6px;
}

.hero-search-wrapper input::-webkit-search-cancel-button {
  cursor: pointer;
  filter: opacity(0.5);
  transition: filter 0.15s ease;
}
.hero-search-wrapper input::-webkit-search-cancel-button:hover {
  filter: opacity(0.9);
}

.hero-search-wrapper input::placeholder {
  color: var(--muted);
}

.search-submit-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border: none;
}

.search-submit-btn i {
  font-size: 16px;
  margin: 0;
}

/* ==========================================================================
   Live Instant Search Autocomplete Dropdown
   ========================================================================== */
.live-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 50px -10px rgba(15, 23, 42, 0.28), 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1060;
  text-align: left;
  display: none;
  overflow: hidden;
  animation: liveSearchFadeIn 0.18s ease-out;
}

body.dark .live-search-dropdown {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.live-search-loading-bar {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan, #06b6d4), var(--primary));
  background-size: 200% 100%;
  animation: liveSearchLoading 1.2s infinite linear;
}

@keyframes liveSearchLoading {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.live-search-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 16px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-search-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}

body.dark .live-search-categories {
  border-color: rgba(255, 255, 255, 0.07);
}

.live-search-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-alt, #f1f5f9);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

body.dark .live-search-cat-pill {
  background: rgba(30, 41, 59, 0.8);
  color: #f8fafc;
}

.live-search-cat-pill:hover,
.live-search-cat-pill.is-selected {
  background: var(--primary);
  color: #ffffff;
}

.live-search-results-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 380px;
  overflow-y: auto;
}

.live-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
  cursor: pointer;
}

.live-search-item:hover,
.live-search-item.is-selected {
  background: var(--surface-hover, #f1f5f9);
  color: var(--ink);
}

body.dark .live-search-item:hover,
body.dark .live-search-item.is-selected {
  background: rgba(31, 41, 55, 0.9);
}

.live-search-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.live-search-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.live-search-info {
  flex: 1;
  min-width: 0;
}

.live-search-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.live-search-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-search-tagline {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.live-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.live-search-footer {
  padding: 10px 16px;
  background: var(--surface-alt, #f8fafc);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

body.dark .live-search-footer {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

.live-search-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: space-between;
}

.live-search-footer a:hover {
  text-decoration: underline;
}

.live-search-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.trending-topics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.trending-tag {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--ink-secondary);
  font-weight: 500;
  font-size: 12.5px;
  transition: all 0.15s ease;
}

body.dark .trending-tag {
  background: rgba(26, 34, 52, 0.65);
  border-color: rgba(255, 255, 255, 0.1);
}

.trending-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* Section Common */
.section {
  padding: 38px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}

.section-title {
  font-size: 26px;
  margin: 0;
}

.section-subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Category Quick Filter Grid */
.btn-all-topics {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.btn-all-topics:hover {
  border-color: var(--primary);
  color: #ffffff !important;
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(253, 42, 81, 0.28);
}

.btn-all-topics i {
  transition: transform 0.2s ease;
}

.btn-all-topics:hover i {
  transform: translateX(3px);
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100% !important;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  min-height: 96px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.cat-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.cat-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--muted);
  background: var(--surface-alt);
  opacity: 0.6;
  transform: scale(0.9);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -4px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--cat-accent, var(--primary));
  border-color: var(--cat-accent, var(--primary));
}

.category-card:hover .cat-icon-box {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 4px 10px var(--cat-glow, rgba(253, 42, 81, 0.25));
}

.category-card:hover .cat-arrow {
  opacity: 1;
  color: #ffffff;
  background: var(--cat-accent, var(--primary));
  transform: scale(1) translate(1px, -1px);
}

.cat-body {
  margin-top: auto;
}

.cat-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.category-card:hover .cat-name {
  color: var(--cat-accent, var(--primary));
}

.cat-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  display: block;
}

/* Category Accent Theme Tokens */
.cat-theme-indigo {
  --cat-accent: #FD2A51;
  --cat-glow: rgba(253, 42, 81, 0.25);
}
.cat-theme-indigo .cat-icon-box {
  background: rgba(253, 42, 81, 0.1);
  color: #FD2A51;
}

.cat-theme-cyan {
  --cat-accent: #0284c7;
  --cat-glow: rgba(2, 132, 199, 0.25);
}
.cat-theme-cyan .cat-icon-box {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

.cat-theme-rose {
  --cat-accent: #e11d48;
  --cat-glow: rgba(225, 29, 72, 0.25);
}
.cat-theme-rose .cat-icon-box {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

.cat-theme-amber {
  --cat-accent: #d97706;
  --cat-glow: rgba(217, 119, 6, 0.25);
}
.cat-theme-amber .cat-icon-box {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.cat-theme-emerald {
  --cat-accent: #059669;
  --cat-glow: rgba(5, 150, 105, 0.25);
}
.cat-theme-emerald .cat-icon-box {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.cat-theme-purple {
  --cat-accent: #7c3aed;
  --cat-glow: rgba(124, 58, 237, 0.25);
}
.cat-theme-purple .cat-icon-box {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
}

.cat-theme-blue {
  --cat-accent: #2563eb;
  --cat-glow: rgba(37, 99, 235, 0.25);
}
.cat-theme-blue .cat-icon-box {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.cat-theme-teal {
  --cat-accent: #0d9488;
  --cat-glow: rgba(13, 148, 136, 0.25);
}
.cat-theme-teal .cat-icon-box {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
}

/* Dark Mode Tokens for Category Cards */
body.dark .category-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.dark .btn-all-topics {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .cat-arrow {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

body.dark .cat-theme-indigo .cat-icon-box { background: rgba(253, 42, 81, 0.18); color: #FD2A51; }
body.dark .cat-theme-cyan .cat-icon-box { background: rgba(6, 182, 212, 0.18); color: #38bdf8; }
body.dark .cat-theme-rose .cat-icon-box { background: rgba(244, 63, 94, 0.18); color: #fb7185; }
body.dark .cat-theme-amber .cat-icon-box { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
body.dark .cat-theme-emerald .cat-icon-box { background: rgba(16, 185, 129, 0.18); color: #34d399; }
body.dark .cat-theme-purple .cat-icon-box { background: rgba(168, 85, 247, 0.18); color: #c084fc; }
body.dark .cat-theme-blue .cat-icon-box { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
body.dark .cat-theme-teal .cat-icon-box { background: rgba(20, 184, 166, 0.18); color: #2dd4bf; }

/* Article Cards - Optimized Editorial Design */
.card-clean {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.card-clean:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(253, 42, 81, 0.14), 0 4px 10px rgba(0, 0, 0, 0.04);
  border-color: rgba(253, 42, 81, 0.45);
}

body.dark .card-clean {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.dark .card-clean:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.6);
}

.card-thumbnail {
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-thumbnail.has-card-image {
  height: 172px;
  background: #0f172a;
}

.card-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-clean:hover .card-thumbnail-img {
  transform: scale(1.05);
}

.card-symbol {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  font-size: 25px;
  color: var(--primary);
  transform: rotate(-3deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-clean:hover .card-symbol {
  transform: rotate(0deg) scale(1.08);
}

body.dark .card-symbol {
  background: rgba(17, 24, 39, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Gradient Themes for Thumbnails */
.thumb-mint    { background: linear-gradient(135deg, #d1fae5 0%, #6ee7b7 100%); }
.thumb-lilac   { background: linear-gradient(135deg, #e0e7ff 0%, #a5b4fc 100%); }
.thumb-peach   { background: linear-gradient(135deg, #ffedd5 0%, #fdba74 100%); }
.thumb-blue    { background: linear-gradient(135deg, #e0f2fe 0%, #7dd3fc 100%); }
.thumb-yellow  { background: linear-gradient(135deg, #fef9c3 0%, #fde047 100%); }
.thumb-pink    { background: linear-gradient(135deg, #fce7f3 0%, #f472b6 100%); }
.thumb-purple  { background: linear-gradient(135deg, #ede9fe 0%, #c4b5fd 100%); }
.thumb-indigo  { background: linear-gradient(135deg, #e0e7ff 0%, #818cf8 100%); }
.thumb-emerald { background: linear-gradient(135deg, #d1fae5 0%, #34d399 100%); }
.thumb-cyan    { background: linear-gradient(135deg, #cffafe 0%, #38bdf8 100%); }
.thumb-teal    { background: linear-gradient(135deg, #ccfbf1 0%, #2dd4bf 100%); }
.thumb-rose    { background: linear-gradient(135deg, #ffe4e6 0%, #fb7185 100%); }
.thumb-amber   { background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%); }
.thumb-slate   { background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%); }

body.dark .thumb-mint    { background: linear-gradient(135deg, #064e3b 0%, #047857 100%); }
body.dark .thumb-lilac   { background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 100%); }
body.dark .thumb-peach   { background: linear-gradient(135deg, #431407 0%, #7c2d12 100%); }
body.dark .thumb-blue    { background: linear-gradient(135deg, #082f49 0%, #0369a1 100%); }
body.dark .thumb-yellow  { background: linear-gradient(135deg, #422006 0%, #713f12 100%); }
body.dark .thumb-pink    { background: linear-gradient(135deg, #500724 0%, #831843 100%); }
body.dark .thumb-purple  { background: linear-gradient(135deg, #2e1065 0%, #581c87 100%); }
body.dark .thumb-indigo  { background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%); }
body.dark .thumb-emerald { background: linear-gradient(135deg, #064e3b 0%, #059669 100%); }
body.dark .thumb-cyan    { background: linear-gradient(135deg, #083344 0%, #0284c7 100%); }
body.dark .thumb-teal    { background: linear-gradient(135deg, #042f2e 0%, #0d9488 100%); }
body.dark .thumb-rose    { background: linear-gradient(135deg, #4c0519 0%, #be123c 100%); }
body.dark .thumb-amber   { background: linear-gradient(135deg, #451a03 0%, #b45309 100%); }
body.dark .thumb-slate   { background: linear-gradient(135deg, #1e293b 0%, #334155 100%); }

.card-badge-top {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-thumbnail .btn-bookmark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  display: grid;
  place-items: center;
  color: #1e293b;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
  z-index: 2;
}

.card-thumbnail .btn-bookmark:hover {
  background: #ffffff;
  transform: scale(1.1);
  color: var(--primary);
}

.card-thumbnail .btn-bookmark.saved {
  background: var(--primary);
  color: #ffffff;
}

body.dark .card-thumbnail .btn-bookmark {
  background: rgba(17, 24, 39, 0.75);
  color: #f1f5f9;
}

body.dark .card-thumbnail .btn-bookmark:hover {
  background: rgba(17, 24, 39, 0.95);
  color: #a5b4fc;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
}

.card-meta .category-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10.5px;
}

.card-title {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 8px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 41px;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.card-clean:hover .card-title a {
  color: var(--primary);
}

.card-excerpt {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
  flex: none;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 11px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: auto;
}

.read-more-link {
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: transform 0.15s ease;
}

.card-clean:hover .read-more-link {
  transform: translateX(2px);
}

/* Tool Directory Card */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(253, 42, 81, 0.4);
  box-shadow: var(--shadow-md);
}

.tool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tool-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark .tool-logo-wrap {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.tool-logo-img {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.tool-logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(99, 102, 241, 0.15) 100%);
  color: var(--primary);
  border-radius: 13px;
}

.tool-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: capitalize;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}

.badge-freemium { background: #e0e7ff; color: #4338ca; }
.badge-free { background: #d1fae5; color: #065f46; }
.badge-paid { background: #fee2e2; color: #991b1b; }
.badge-enterprise { background: #fef3c7; color: #92400e; }

body.dark .badge-freemium { background: #312e81; color: #c7d2fe; }
body.dark .badge-free { background: #064e3b; color: #a7f3d0; }
body.dark .badge-paid { background: #7f1d1d; color: #fecaca; }
body.dark .badge-enterprise { background: #78350f; color: #fde68a; }

/* Product Hunt Style Community Upvote Button */
.btn-upvote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  line-height: 1.2;
}

.btn-upvote:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-upvote.upvoted {
  background: linear-gradient(135deg, #FD2A51 0%, #BC0650 100%);
  border-color: #BC0650;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(253, 42, 81, 0.35);
}

.btn-upvote.upvoted i {
  color: #ffffff !important;
}

.btn-upvote i {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.btn-upvote:hover i {
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-upvote-lg {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 10px;
  gap: 8px;
}

.btn-upvote-lg i {
  font-size: 15px;
}

/* AEO / GEO Direct Answer Box */
.aeo-answer-box {
  background: linear-gradient(135deg, rgba(253, 42, 81, 0.04) 0%, rgba(99, 102, 241, 0.02) 100%);
  border: 1px solid rgba(253, 42, 81, 0.22);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 24px;
}

body.dark .aeo-answer-box {
  background: rgba(253, 42, 81, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  border-left-color: #818cf8;
}

.aeo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 8px;
}


.tool-name {
  font-size: 17.5px;
  margin: 0 0 4px;
  font-weight: 700;
}

.tool-name a {
  color: var(--ink);
}

.tool-name a:hover {
  color: var(--primary);
}

.tool-category-badge {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.tool-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tool-tag {
  background: var(--surface-alt);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

/* Custom Numbered Pagination */
.pagination-custom .page-item .page-link {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.15s ease;
  margin: 0 2px;
}

.pagination-custom .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(253, 42, 81, 0.3);
}

.pagination-custom .page-item .page-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

body.dark .pagination-custom .page-item .page-link {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

body.dark .pagination-custom .page-item.active .page-link {
  background: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   Google AdSense Compliant Banner Architecture
   ========================================================================== */
.ad-container-wrap {
  width: 100%;
  clear: both;
}

.ad-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.ad-slot-box {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ad-slot-box.demo-ad {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-alt) 100%);
}

.ad-inner-content {
  text-align: center;
}

.ad-badge {
  background: rgba(253, 42, 81, 0.1);
  color: var(--primary);
  border: 1px solid rgba(253, 42, 81, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Article Reading Layout */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.article-header {
  margin-bottom: 28px;
}

.article-headline {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  margin: 12px 0 16px;
}

.article-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

.article-author-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
  font-size: 13px;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
  border: 2px solid rgba(253, 42, 81, 0.25);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.author-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-bio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 12px rgba(253, 42, 81, 0.2);
  flex-shrink: 0;
}

@media (max-width: 576px) {
  .author-bio-card {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
}


.article-hero-banner {
  height: 280px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.article-hero-symbol {
  font-size: 110px;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.takeaways-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 30px;
}

.takeaways-card h3 {
  font-size: 16px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.takeaways-card ul {
  margin: 0;
  padding-left: 18px;
}

.takeaways-card li {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ink-secondary);
}

.prose {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

.prose h2 {
  font-size: 24px;
  margin-top: 36px;
  margin-bottom: 14px;
}

.prose h3 {
  font-size: 19px;
  margin-top: 26px;
  margin-bottom: 10px;
}

.prose p {
  margin-bottom: 20px;
  color: var(--ink-secondary);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
}

.callout-box {
  background: var(--primary-light);
  border: 1px solid rgba(253, 42, 81, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 14.5px;
}

/* Sidebar Box */
.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-box h4 {
  font-size: 15px;
  margin: 0 0 14px;
  font-weight: 750;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  font-size: 13px;
  color: var(--muted);
  display: block;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.toc-list a:hover {
  color: var(--primary);
}

/* Social Share Component */
.share-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-top: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body.dark .share-section-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.share-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  text-decoration: none !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.share-btn-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

body.dark .share-btn-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

body.dark .share-btn-pill:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(129, 140, 248, 0.4);
  color: #ffffff;
}

.share-btn-pill i {
  font-size: 14px;
}

/* Newsletter Box */
.newsletter-banner {
  background: linear-gradient(135deg, #1f040e 0%, #3d081f 50%, #6e0a35 100%);
  border: 1px solid rgba(253, 42, 81, 0.25);
  box-shadow: 0 10px 30px rgba(188, 6, 80, 0.2);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.newsletter-banner h2 {
  color: #ffffff;
  font-size: 28px;
  margin-bottom: 8px;
}

.newsletter-banner p {
  color: #fce7f3;
  font-size: 14px;
  max-width: 500px;
  margin-bottom: 0;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
}

.newsletter-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
}

.newsletter-form input::placeholder {
  color: #fbcfe8;
}

.newsletter-form button {
  background: linear-gradient(135deg, #FD2A51 0%, #BC0650 100%);
  color: #ffffff;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(253, 42, 81, 0.35);
}

.newsletter-form button:hover {
  transform: scale(1.02);
}

/* Comparison Matrix Table */
.comparison-table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  overflow-x: auto;
  margin: 28px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.comparison-table th {
  background: var(--surface-alt);
  padding: 14px 18px;
  text-align: left;
  font-weight: 750;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  letter-spacing: 0.03em;
}

.comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-secondary);
  vertical-align: middle;
  transition: background-color 0.15s ease-in-out;
}

.comparison-table tbody tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* Tool Logo Large (48px) */
.comparison-table .tool-logo-wrap {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 13px !important;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

body.dark .comparison-table .tool-logo-wrap {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.comparison-table .tool-logo-img {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 6px;
}

.comparison-table .tool-logo-fallback {
  font-size: 18px !important;
  font-weight: 800 !important;
}

/* High-Contrast Brand View Tool Button */
.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-full, 9999px);
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #FD2A51 0%, #BC0650 100%);
  color: #ffffff !important;
  border: none;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(253, 42, 81, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-table-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(253, 42, 81, 0.4);
  color: #ffffff !important;
}

body.dark .comparison-table-wrapper {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body.dark .comparison-table tbody tr:hover td {
  background: rgba(99, 102, 241, 0.1);
}

/* Mobile-Friendly Adaptive Layout */
@media (max-width: 768px) {
  .comparison-table-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    margin: 20px 0;
  }

  .comparison-table-wrapper .table-responsive {
    overflow: visible;
  }

  .comparison-table {
    display: block;
    width: 100%;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .comparison-table tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }

  body.dark .comparison-table tbody tr {
    background: var(--surface);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  }

  .comparison-table tbody td {
    display: block;
    padding: 0;
    border: none;
    margin-bottom: 10px;
    text-align: left !important;
  }

  .comparison-table tbody td:first-child {
    margin-bottom: 12px;
  }

  .comparison-table tbody td:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
  }

  .comparison-table .btn-table-action {
    display: flex;
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    text-align: center;
  }
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 50px 0 30px;
  margin-top: 50px;
  font-size: 13px;
  color: var(--muted);
}

.footer-heading {
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: var(--muted);
}

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

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 2000;
}

.toast-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Floating WhatsApp Channel Button */
.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.42), 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 1020;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
  color: #ffffff !important;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2);
}

.floating-whatsapp-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: wa-pulse 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

@keyframes wa-pulse {
  0% { transform: scale(0.96); opacity: 0.85; }
  50% { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

.floating-whatsapp-tooltip {
  position: absolute;
  right: 64px;
  background: #111827;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.floating-whatsapp:hover .floating-whatsapp-tooltip,
.floating-whatsapp:focus-visible .floating-whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 82px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 576px) {
  .floating-whatsapp {
    width: 48px;
    height: 48px;
    font-size: 25px;
    right: 16px;
    bottom: 16px;
  }
  .back-to-top {
    right: 16px;
    bottom: 74px;
  }
  .floating-whatsapp-tooltip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-whatsapp-pulse {
    animation: none;
    display: none;
  }
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-banner {
    padding: 30px 24px;
  }
  .newsletter-form {
    max-width: 100%;
    flex-direction: column;
  }
  .newsletter-form button {
    padding: 12px;
  }
}

@media (max-width: 767px) {
  .hero-compact {
    padding: 28px 0 20px;
  }
  .hero-compact.hero-centered {
    padding: 42px 0 30px;
  }
  .hero-title {
    font-size: clamp(25px, 6vw, 32px);
    line-height: 1.22;
  }
  .hero-desc {
    font-size: 15px;
    margin-bottom: 22px;
  }
  .section {
    padding: 26px 0;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 575px) {
  .hero-compact.hero-centered {
    padding: 32px 0 22px;
  }
  .hero-title {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 12px;
  }
  .hero-desc {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
  }
  .hero-pill {
    font-size: 10px;
    padding: 4px 10px;
    margin-bottom: 12px;
    max-width: 100%;
    letter-spacing: 0.03em;
  }
  .hero-search-pill {
    padding: 4px 6px 4px 14px;
  }
  .hero-search-wrapper input {
    font-size: 14px;
    padding: 6px 4px;
  }
  .search-submit-btn {
    width: 38px;
    height: 38px;
  }
  .trending-topics {
    gap: 5px;
    font-size: 11px;
    margin-top: 10px;
  }
  .trending-tag {
    font-size: 11px;
    padding: 3px 8px;
  }
  .featured-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
  }
  .featured-tabs .btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .category-card {
    padding: 11px 12px !important;
    min-height: 86px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cat-icon-box {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
  }
  .cat-arrow {
    width: 20px !important;
    height: 20px !important;
    font-size: 9px !important;
  }
  .cat-name {
    font-size: 12.5px !important;
    line-height: 1.25 !important;
  }
  .cat-count {
    font-size: 10.5px !important;
  }
  .card-clean .card-thumbnail {
    height: 112px;
  }
  .tutorial-card {
    padding: 16px;
    border-radius: 16px;
  }
  .newsletter-banner {
    padding: 22px 16px;
    border-radius: 16px;
  }
  .newsletter-banner h2 {
    font-size: 21px;
  }
  .brand {
    font-size: 19px;
    gap: 7px;
  }
  .brand-badge {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 8px;
  }
}

/* Tablet refinements (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .category-card {
    padding: 12px 14px !important;
    min-height: 92px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cat-name {
    font-size: 13px !important;
  }
}

/* Mobile category section header alignment */
@media (max-width: 767px) {
  .category-section .section-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 14px !important;
    text-align: left !important;
  }
  .category-section .section-title {
    font-size: 20px !important;
  }
  .category-section .btn-outline-brand {
    font-size: 12px;
    padding: 4px 12px;
  }
}

@media (max-width: 480px) {
  .category-section .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .category-section .btn-outline-brand {
    align-self: flex-start;
  }
}

/* Rendering performance & containment optimizations */
.card-clean,
.tutorial-card {
  contain: layout style;
}

.category-section,
.section[aria-labelledby="tutorialsHeading"],
.section[aria-labelledby="latestHeading"],
.section[aria-label="Comparisons and recommendations"],
.section[aria-labelledby="newsletterHeading"] {
  content-visibility: auto;
  contain-intrinsic-size: 380px;
}

.site-header .dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  z-index: 1050 !important;
}

body.dark .site-header .dropdown-menu {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.site-header .dropdown-item {
  color: var(--ink);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
  background: var(--surface-alt);
  color: var(--primary);
}

body.dark .site-header .dropdown-item:hover,
body.dark .site-header .dropdown-item:focus {
  background: #1f2937;
  color: var(--primary);
}

.site-header .dropdown-divider {
  border-color: var(--border);
  opacity: 0.6;
}

body.dark .site-header .dropdown-divider {
  border-color: #1f2937;
}

.dropdown-menu-mega {
  min-width: 540px;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  z-index: 1050 !important;
}

/* Ensure in-page sticky sidebars (TOC, etc.) never render above header/dropdowns */
.sidebar-box.sticky-top,
.article-sidebar .sticky-top {
  z-index: 10 !important;
}

[data-theme="dark"] .dropdown-menu-mega {
  background: #111827;
  border-color: #1f2937 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.dropdown-mega-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  transition: all 0.15s ease;
}

.dropdown-mega-item:hover {
  background: var(--surface-alt);
  color: var(--primary);
  transform: translateX(2px);
}

.dropdown-mega-item i {
  font-size: 14px;
  color: var(--primary);
  opacity: 0.85;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.dropdown-section-title {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 4px 10px;
  margin-bottom: 4px;
}

@media (max-width: 991.98px) {
  .dropdown-menu-mega {
    min-width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 8px 0 !important;
  }
}

/* ==========================================================================
   Production-readiness additions (accessibility, utilities, ads, prompts)
   ========================================================================== */

/* Width utilities used across templates */
.max-w-600 { max-width: 600px; }
.max-w-650 { max-width: 650px; }
.max-w-700 { max-width: 700px; }
.max-w-800 { max-width: 800px; }
.max-w-900 { max-width: 900px; }
.max-w-1000 { max-width: 1000px; }

/* Skip link: visible only when focused */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }
main:focus { outline: none; }

/* Clear, consistent keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  box-shadow: none;
}
body.dark a:focus-visible,
body.dark button:focus-visible,
body.dark input:focus-visible,
body.dark select:focus-visible,
body.dark textarea:focus-visible,
body.dark [tabindex]:focus-visible { outline-color: #a5b4fc; }

/* Minimum touch target for icon buttons */
.btn-upvote, .btn-bookmark, .back-to-top, #themeBtn, #savedCountBtn { min-height: 32px; min-width: 32px; }

/* Ads: labelled, separated from content, never a dashed placeholder in production */
.ad-container-wrap { text-align: center; }
.ad-container-wrap .ad-label { text-transform: uppercase; }
.ad-slot-box { border-style: solid; max-width: 100%; margin: 0 auto; }

/* Prompt templates */
.prompt-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 12.5px;
  max-height: 240px;
  overflow-y: auto;
}

/* Table of contents nesting */
.toc-list a.toc-sub { padding-left: 14px; font-size: 12px; }

/* Pricing badges added for new pricing types */
.badge-usage-based { background: #e0f2fe; color: #075985; }
.badge-unknown { background: #f1f5f9; color: #475569; }
.badge-discontinued { background: #f1f5f9; color: #64748b; text-decoration: line-through; }
body.dark .badge-usage-based { background: #0c4a6e; color: #bae6fd; }
body.dark .badge-unknown, body.dark .badge-discontinued { background: #1e293b; color: #cbd5e1; }

/* Comparison tables stay readable on small screens */
.comparison-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.comparison-table { min-width: 560px; }
.comparison-table th[scope="row"] { font-weight: 600; text-align: left; }

/* Modern Minimalist Comparison Table */
.modern-comparison-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  margin: 28px 0;
}
.modern-comparison-card .table-responsive {
  margin: 0;
  border: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.modern-comparison-table {
  display: table !important;
  width: 100% !important;
  min-width: 620px;
  margin: 0 !important;
  border-collapse: collapse;
}
.modern-comparison-table th {
  background: var(--surface-alt) !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 13px 16px !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  white-space: nowrap;
}
.modern-comparison-table td {
  padding: 14px 16px !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle !important;
  background: transparent !important;
  color: var(--ink) !important;
  font-size: 13.5px !important;
}
.modern-comparison-table th:first-child,
.modern-comparison-table td:first-child {
  padding-left: 20px !important;
}
.modern-comparison-table th:last-child,
.modern-comparison-table td:last-child {
  padding-right: 20px !important;
  text-align: right !important;
  width: 1% !important;
  white-space: nowrap !important;
}
.modern-comparison-table .btn {
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modern-comparison-table tbody tr:last-child td {
  border-bottom: none !important;
}
.modern-comparison-table tbody tr {
  transition: background-color 0.15s ease;
}
.modern-comparison-table tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.03) !important;
}
body.dark .modern-comparison-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02) !important;
}
.modern-table-logo {
  width: 44px !important;
  height: 44px !important;
  border-radius: 11px !important;
  border: 1px solid var(--border) !important;
  padding: 4px !important;
  background: #ffffff !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

@media (max-width: 767px) {
  .modern-comparison-table {
    min-width: 530px !important;
  }
  .modern-comparison-table th,
  .modern-comparison-table td {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  .modern-comparison-table th:first-child,
  .modern-comparison-table td:first-child {
    padding-left: 14px !important;
  }
  .modern-comparison-table th:last-child,
  .modern-comparison-table td:last-child {
    padding-right: 14px !important;
  }
  .modern-table-logo {
    width: 38px !important;
    height: 38px !important;
    border-radius: 9px !important;
  }
}

/* Article In-Content CTA & Callout Boxes (Mobile-First) */
.article-cta-box,
.prose .bg-surface-alt.border {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .article-cta-box,
  .prose .bg-surface-alt.border.d-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 16px !important;
  }
  .article-cta-box .d-flex.gap-2,
  .article-cta-box .d-flex.flex-wrap,
  .prose .bg-surface-alt.border .d-flex.gap-2,
  .prose .bg-surface-alt.border .d-flex.flex-wrap {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .article-cta-box .btn,
  .prose .bg-surface-alt.border .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
    padding: 9px 14px !important;
  }
}

/* Policy pages: comfortable reading width */
.policy-prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.policy-prose .table { font-size: 13px; }
.not-prose p { margin: 0; }

/* Wizard fieldsets */
fieldset.wizard-step { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
fieldset.wizard-step[hidden] { display: none; }
.option-label { cursor: pointer; }
.option-label:has(input:checked) { border-color: var(--primary) !important; background: var(--primary-light) !important; }

/* Long URLs and names must not overflow cards */
.tool-card, .card-clean, .sidebar-box { overflow-wrap: anywhere; }

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

/* Article layout: let grid columns shrink; wide tables scroll inside the column */
.article-grid,
.article-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

.prose {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
}

.prose > * {
  max-width: 100% !important;
}

.prose table {
  max-width: 100%;
}

.prose table:not(.modern-comparison-table) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.prose img,
.prose video,
.prose iframe {
  max-width: 100% !important;
  height: auto !important;
}

/* Mobile Article Tweaks */
@media (max-width: 991px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
  }
  .article-sidebar {
    margin-top: 24px;
  }
  .article-sidebar .sticky-top {
    position: static !important;
    top: auto !important;
    z-index: 1 !important;
  }
}

@media (max-width: 576px) {
  .article-headline {
    font-size: clamp(24px, 6vw, 34px) !important;
    line-height: 1.22 !important;
    margin: 8px 0 12px !important;
  }
  .article-lead {
    font-size: 15.5px !important;
    line-height: 1.6 !important;
  }
  .article-author-bar {
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 12px 0 !important;
  }
  .article-author-bar .article-meta-dates,
  .article-author-bar .ms-auto {
    margin-left: 0 !important;
    width: 100% !important;
    text-align: left !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
    padding-top: 10px !important;
    border-top: 1px dashed var(--border) !important;
    font-size: 12px !important;
  }
  .takeaways-card {
    padding: 16px 18px !important;
    margin-bottom: 24px !important;
  }
  .takeaways-card ul {
    padding-left: 18px !important;
  }
  .share-section-card {
    padding: 16px !important;
  }
  .share-section-card .d-flex.flex-wrap {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .share-section-card .share-btn-pill {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
  .share-section-card [data-copy-url] {
    grid-column: span 2 !important;
    width: 100% !important;
    padding: 8px 12px !important;
  }
}

/* Keep anchor targets and focused elements clear of the sticky header */
html { scroll-padding-top: 96px; }

/* Links inside secondary text must remain identifiable */
.text-muted a:not(.btn), .small a:not(.btn):not(.nav-link):not(.dropdown-mega-item):not(.breadcrumb-item a) { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Compact Interactive Featured Tools Section */
.featured-carousel-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 4px 2px 14px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(253, 42, 81, 0.25) transparent;
  overscroll-behavior-x: contain;
  contain: layout;
  will-change: scroll-position;
}

.featured-carousel-container::-webkit-scrollbar {
  height: 5px;
}
.featured-carousel-container::-webkit-scrollbar-track {
  background: transparent;
}
.featured-carousel-container::-webkit-scrollbar-thumb {
  background: rgba(253, 42, 81, 0.25);
  border-radius: 999px;
}

.featured-card-compact {
  flex: 0 0 calc(25% - 0.75rem);
  min-width: 255px;
  max-width: 310px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
  contain: layout style;
}

.featured-card-compact:hover {
  transform: translateY(-3px);
  border-color: rgba(253, 42, 81, 0.45);
  box-shadow: 0 10px 24px -4px rgba(253, 42, 81, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.dark .featured-card-compact {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.dark .featured-card-compact:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5);
}

.featured-card-compact .btn-bookmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  transition: all 0.15s ease;
  text-decoration: none;
  background: transparent;
  border: none;
}

.featured-card-compact .btn-bookmark:hover {
  color: var(--primary);
  background: rgba(253, 42, 81, 0.09);
  transform: scale(1.1);
}

.featured-card-compact .btn-bookmark.saved,
.featured-card-compact .btn-bookmark.saved i {
  color: var(--primary) !important;
}

body.dark .featured-card-compact .btn-bookmark:hover {
  background: rgba(255, 255, 255, 0.08);
}

.featured-tool-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

.featured-tool-title a {
  color: inherit;
  text-decoration: none;
}
.featured-tool-title a:hover {
  color: var(--primary);
}

.featured-tool-cat {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.featured-tool-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
  height: 35px;
}

.btn-carousel-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s ease;
  cursor: pointer;
  padding: 0;
}

.btn-carousel-nav:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.06);
}

body.dark .btn-carousel-nav {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.featured-tabs .btn {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  font-weight: 600;
}

@media (max-width: 991px) {
  .featured-card-compact {
    flex: 0 0 calc(50% - 0.5rem);
    min-width: 240px;
  }
}

@media (max-width: 575px) {
  .featured-card-compact {
    flex: 0 0 85%;
    min-width: 230px;
  }
}

/* Homepage Tutorial Cards */
.tutorial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-decoration: none;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(253, 42, 81, 0.14), 0 4px 10px rgba(0, 0, 0, 0.04);
  border-color: rgba(253, 42, 81, 0.45);
}

body.dark .tutorial-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.dark .tutorial-card:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.6);
}

.tutorial-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

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

.tutorial-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 41px;
}

.tutorial-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tutorial-card:hover .tutorial-card-title,
.tutorial-card:hover .tutorial-card-title a {
  color: var(--primary);
}

.tutorial-card-outcome {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 11px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 52px;
}

body.dark .tutorial-card-outcome {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.tutorial-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

/* Homepage Prompt Showcase Cards */
.home-prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.home-prompt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(253, 42, 81, 0.14), 0 4px 10px rgba(0, 0, 0, 0.04);
  border-color: rgba(253, 42, 81, 0.45);
}

body.dark .home-prompt-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.dark .home-prompt-card:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.6);
}

.home-prompt-pre {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink);
  height: 84px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  margin-bottom: 14px;
  position: relative;
}

body.dark .home-prompt-pre {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

.home-prompt-pre::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

body.dark .home-prompt-pre::after {
  background: linear-gradient(to bottom, transparent, #111827);
}

/* Category Directory Cards & Interactions */
.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(253, 42, 81, 0.3) !important;
}

body.dark .hover-lift:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

.category-icon-bubble {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hover-lift:hover .category-icon-bubble {
  transform: scale(1.08);
}

/* Progressive Blog Grid Reveal Animation */
@keyframes blogCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-item {
  animation: blogCardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}



/* Touch screens: at least 44x44 px tap areas (WCAG 2.5.5 target size) for small controls */
@media (pointer: coarse), (max-width: 767.98px) {
  .trending-tag, .tool-tag, .tool-category-badge, .btn-sm, .page-link, .btn-upvote, .btn-bookmark,
  .footer-nav a, .breadcrumb-item a, .read-more-link, .dropdown-mega-item, .nav-link, .back-to-top, #themeBtn, #savedCountBtn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .footer-nav a, .dropdown-mega-item, .nav-link, .breadcrumb-item a, .read-more-link { justify-content: flex-start; }
  .footer-nav li { margin-bottom: 2px; }
}

/* Card-title and footer-bar links: taller tap areas on touch/small screens without changing the visual layout */
@media (pointer: coarse), (max-width: 767.98px) {
  .tool-name a, .featured-tool-title a, h3 > a, .card-title a, .site-footer .d-flex a, .col-md-4 > a, .sidebar-box li a {
    display: inline-block;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-top: -12px;
    margin-bottom: -12px;
    min-height: 44px;
  }
}
