/*
  AI RANKER — Voice-Driven Dark Theme
  =============================================
  Design intent: authoritative yet warm.
  Dark like a control room, amber like firelight.
  No gradients-as-crutch. Texture over polish.
  Typography does the heavy lifting.
  ============================================= */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --bg: #0d0d12;
  --bg-warm: #111116;
  --bg-card: #1a1922;
  --bg-card-hover: #21202c;
  --bg-elevated: #201f2b;
  --bg-modal: #161520;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(245, 158, 11, 0.25);
  --text: #f0ece5;
  --text-soft: #d4cfc8;
  --text-muted: #a5a098;
  --text-dim: #88817a;
  --amber: #d4942b;
  --amber-bright: #f0b34b;
  --amber-glow: rgba(212, 148, 43, 0.15);
  --clay: #8b7d6b;
  --pine: #3d7a5a;
  --slate: #5b6e8a;
  --stone: #6b6560;
  --indigo: #5c5f8a;
  --wine: #7a3848;
  --rust: #c45d3a;
  --blue: #4a7a9c;
  --teal: #3d8a7a;
  --green: #4a8a5a;
  --purple: #7a6b8a;
  --rose: #8a4a5a;
  --font-display: 'Tahoma', 'Arial Black', sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--amber-glow); color: var(--amber-bright); }
a { color: inherit; text-decoration: none; }

/* Subtle noise texture — gives the dark background a tactile, non-flat feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

/* Scrollbar — thin, unobtrusive */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--stone); border-radius: 3px; }

/* Shared utility — visually hides without breaking accessibility or animation */
.hidden { display: none !important; }

/* ---------- TYPOGRAPHIC SCALE ---------- */
/*
  Intentional contrast: hero is massive, section titles are bold,
  supporting text recedes into muted tones. Creates a clear reading hierarchy.
*/
.section-eyebrow {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.section-title i { font-size: 0.9em; }

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
}

/* Accent icon colours — used inline for section header icons */
.accent-amber { color: var(--amber-bright); }
.accent-clay { color: var(--clay); }
.accent-rust { color: var(--rust); }
.accent-pine { color: var(--pine); }
.accent-slate { color: var(--slate); }
.accent-indigo { color: var(--indigo); }
.accent-wine { color: var(--wine); }

/* ---------- NAVIGATION ---------- */
/*
  Semi-transparent backdrop. The scrolled state adds a heavier shadow
  to signal depth as you move through content.
*/
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 13, 18, 0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: 0 1px 32px rgba(0, 0, 0, 0.5); }

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  background: var(--amber);
  color: #0d0d12;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.logo-text { color: var(--text); }

.nav-links { display: flex; gap: 6px; align-items: center; }

.nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-about-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.nav-about-btn:hover { border-color: var(--border-hover); color: var(--text); }

/* Dropdown — Tools menu with a 2-column grid of category links */
.nav-dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 210px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.dropdown-menu a i { width: 14px; text-align: center; font-size: 0.7rem; opacity: 0.6; }
.drop-trigger i { font-size: 0.55rem; margin-left: 2px; }

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background 0.2s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 20px;
  gap: 2px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.mobile-menu a:hover { color: var(--amber); background: var(--amber-glow); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-about-btn { display: none; }
  .read-mode-btn { display: none; }
}

/* ---------- READ MODE ---------- */
.read-mode-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.read-mode-btn:hover { border-color: var(--amber); color: var(--amber-bright); }

.read-mode-dropdown {
  position: fixed;
  top: 64px;
  right: 100px;
  z-index: 1000;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-hover);
}
.read-mode-dropdown.hidden { display: none; }

.read-mode-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.read-mode-option i { width: 16px; text-align: center; }
.read-mode-option:hover { background: var(--bg-card-hover); color: var(--text); }
.read-mode-option.active { color: var(--amber-bright); background: var(--amber-glow); }

/* Light mode overrides */
html[data-read-mode="light"] {
  --bg: #f8f6f2;
  --bg-warm: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f1ec;
  --bg-elevated: #ffffff;
  --bg-modal: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --border-accent: rgba(212, 148, 43, 0.2);
  --text: #1a1814;
  --text-soft: #3a3630;
  --text-muted: #6b655c;
  --text-dim: #9c9488;
  --amber: #b8862a;
  --amber-bright: #c4912e;
  --amber-glow: rgba(184, 134, 42, 0.1);
}
html[data-read-mode="light"] .nav { background: rgba(248, 246, 242, 0.92); }
html[data-read-mode="light"] .logo-mark { color: #f8f6f2; }
html[data-read-mode="light"] .search-btn { color: #f8f6f2; }
html[data-read-mode="light"] .stat-card-icon { color: var(--bg) !important; }
html[data-read-mode="light"] .tool-card .card-icon i { color: var(--bg) !important; }

/* Eye comfort mode overrides */
html[data-read-mode="eye-comfort"] {
  --bg: #f5f0e8;
  --bg-warm: #efe9df;
  --bg-card: #e8e2d6;
  --bg-card-hover: #ddd6c9;
  --bg-elevated: #e8e2d6;
  --bg-modal: #f0ebe2;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --text: #2c241e;
  --text-soft: #4a3f36;
  --text-muted: #7a6e63;
  --text-dim: #a0968b;
  --amber: #b8862a;
  --amber-bright: #c4912e;
  --amber-glow: rgba(184, 134, 42, 0.12);
}
html[data-read-mode="eye-comfort"] .hero-title em { color: var(--amber); }
html[data-read-mode="eye-comfort"] .search-btn { color: #f5f0e8; }
html[data-read-mode="eye-comfort"] .stat-card-icon { color: var(--bg) !important; }
html[data-read-mode="eye-comfort"] .team-member img { filter: sepia(0.15); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 28px 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}
.hero.hero-hidden { display: none; }
.hero.hero-hidden + .tab-bar { top: 0; }

/* BG container */
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

/* Gradient orbs — calm atmospheric presence */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: 0;
  will-change: transform;
}
.orb-1 {
  width: 50vw;
  padding-bottom: 50vw;
  background: radial-gradient(circle, rgba(212, 148, 43, 0.2), transparent 70%);
  top: -35%; left: -20%;
  animation: floatOrb 40s infinite alternate ease-in-out;
}
.orb-2 {
  width: 40vw;
  padding-bottom: 40vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  bottom: -30%; right: -15%;
  animation: floatOrb 35s infinite alternate-reverse ease-in-out;
}
.orb-3 {
  width: 25vw;
  padding-bottom: 25vw;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%);
  top: 20%; left: 50%;
  animation: floatOrb 45s infinite alternate ease-in-out;
  opacity: 0.15;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, 3%) scale(1.04); }
  66% { transform: translate(-1%, 1%) scale(0.96); }
  100% { transform: translate(3%, -2%) scale(1.02); }
}

/* Animated grid lines — subtle, slow */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 85%);
  z-index: 0;
  animation: shiftGrid 40s linear infinite;
}

@keyframes shiftGrid {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* Shimmer line at bottom */
.hero-shimmer-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 148, 43, 0.3), transparent);
  animation: shimmerSweep 8s ease-in-out infinite;
}

@keyframes shimmerSweep {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* Floating tool names background */
.hero-tools-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.hero-tool-name {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  animation: toolFloat 30s infinite alternate ease-in-out;
  opacity: 0;
}
@keyframes toolFloat {
  0% { transform: translateY(0) rotate(-1deg); opacity: 0; }
  10% { opacity: var(--tool-opacity, 0.04); }
  90% { opacity: var(--tool-opacity, 0.04); }
  100% { transform: translateY(-20px) rotate(1deg); opacity: 0; }
}

/* Hero canvas */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Hero content */
.hero-content {
  position: relative;
  max-width: 680px;
  width: 100%;
  text-align: center;
  z-index: 5;
  padding-bottom: 20px;
  animation: fadeInContent 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInContent {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 148, 43, 0.1);
  border: 1px solid rgba(212, 148, 43, 0.2);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 14px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-bright);
}
.hero-badge i { font-size: 0.65rem; }

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--amber-bright), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 0.82rem;
  color: var(--text-soft);
  max-width: 540px;
  margin: 0 auto 18px;
  font-weight: 400;
  line-height: 1.55;
}

/* Search bar */
.hero-search { margin-bottom: 18px; }
.hero-search .search-quick-links { margin-top: 8px; }

.search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 16px;
  max-width: 480px;
  margin: 0 auto;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-wrap:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.search-icon { color: var(--text-dim); font-size: 0.8rem; margin-right: 8px; }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.search-input::placeholder { color: var(--text-dim); }

.search-btn {
  background: var(--amber);
  color: #0d0d12;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.search-btn:hover { opacity: 0.85; }

.search-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.search-quick-links span { font-size: 0.65rem; color: var(--text-dim); }

.quick-search {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.quick-search:hover { background: var(--amber-glow); border-color: var(--border-accent); color: var(--amber-bright); }

/* Stats strip */
.hero-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  border-radius: 80px;
  padding: 0;
  margin: 0 auto;
}
.hero-stat { text-align: center; padding: 0 14px; }
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}
.hero-stat span { font-size: 0.58rem; color: var(--text-dim); font-weight: 400; display: block; margin-top: 1px; }
.hero-stat-div { width: 1px; height: 24px; background: var(--border); }

/* Featured tools strip */
.hero-tools-strip {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}
.tools-strip-track {
  display: flex;
  gap: 0;
  animation: scrollTools 40s linear infinite;
  white-space: nowrap;
}
.tools-strip-track span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 500;
  padding: 0 14px;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}
.tools-strip-track span i {
  font-size: 0.6rem;
  color: var(--amber-bright);
  opacity: 0.7;
}

@keyframes scrollTools {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
  font-size: 0.65rem;
}
.hero-stars .stars-display i:nth-child(1) { animation: starPop 0.6s ease 0.6s forwards; opacity: 0; transform: scale(0); }
.hero-stars .stars-display i:nth-child(2) { animation: starPop 0.6s ease 0.7s forwards; opacity: 0; transform: scale(0); }
.hero-stars .stars-display i:nth-child(3) { animation: starPop 0.6s ease 0.8s forwards; opacity: 0; transform: scale(0); }
.hero-stars .stars-display i:nth-child(4) { animation: starPop 0.6s ease 0.9s forwards; opacity: 0; transform: scale(0); }
.hero-stars .stars-display i:nth-child(5) { animation: starPop 0.6s ease 1.0s forwards; opacity: 0; transform: scale(0); }
@keyframes starPop { to { opacity: 1; transform: scale(1); } }

/* Page section transition */
.section { transition: opacity 0.25s ease; }

/* ---------- TAB BAR ---------- */
/*
  Sticky below the nav. Horizontal scroll on mobile.
  Active tab gets the amber underline — like a lit fuse.
*/
.tab-bar {
  position: sticky;
  top: 60px;
  z-index: 80;
  background: rgba(13, 13, 18, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.tab-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar-inner::-webkit-scrollbar { display: none; }

.tab-btn {
  white-space: nowrap;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.tab-btn:hover { color: var(--text-muted); }
.tab-btn.active {
  color: var(--amber-bright);
  border-bottom-color: var(--amber);
}

/* ---------- MAIN LAYOUT ---------- */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 60px;
}

/* ---------- SEARCH NOTICE ---------- */
.search-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--amber-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 8px 16px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.search-notice i { color: var(--amber-bright); }

.clear-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.clear-btn:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- FILTER BAR ---------- */
/*
  Sits between the tabs and the first section. Compact, with two groups:
  left (sort + price) and right (count + compare toggle).
*/
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 0;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  flex-wrap: wrap;
  position: sticky;
  top: 62px;
  z-index: 50;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-bright);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}
.filter-label i { font-size: 0.65rem; }

.filter-left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-right { display: flex; gap: 10px; align-items: center; }

.filter-select {
  background: var(--bg);
  border: 1px solid var(--border-hover);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 8px 14px 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  min-width: 140px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: auto;
}
.filter-select:hover { border-color: var(--amber); }
.filter-select:focus { border-color: var(--amber-bright); box-shadow: 0 0 0 2px var(--amber-glow); }

.filter-count { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
.filter-count strong { color: var(--text); font-weight: 700; }

.compare-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.compare-toggle-btn:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-card-hover); }
.compare-toggle-btn.active { background: var(--amber); color: #0d0d12; border-color: var(--amber); }

/* ---------- SECTION ---------- */
.section { padding: 36px 0 0; }

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

.section-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 12px;
}

/* Count badge — pill with category accent colour */
.count-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.count-badge.amber { background: var(--amber-glow); color: var(--amber-bright); border: 1px solid var(--border-accent); }
.count-badge.clay { background: rgba(139, 125, 107, 0.12); color: var(--clay); border: 1px solid rgba(139, 125, 107, 0.2); }
.count-badge.rust { background: rgba(196, 93, 58, 0.12); color: var(--rust); border: 1px solid rgba(196, 93, 58, 0.2); }
.count-badge.pine { background: rgba(61, 122, 90, 0.12); color: var(--pine); border: 1px solid rgba(61, 122, 90, 0.2); }
.count-badge.slate { background: rgba(91, 110, 138, 0.12); color: var(--slate); border: 1px solid rgba(91, 110, 138, 0.2); }
.count-badge.indigo { background: rgba(92, 95, 138, 0.12); color: var(--indigo); border: 1px solid rgba(92, 95, 138, 0.2); }
.count-badge.wine { background: rgba(122, 56, 72, 0.12); color: var(--wine); border: 1px solid rgba(122, 56, 72, 0.2); }

/* ---------- AGENT TABS ---------- */
/*
  Tabs used in the Agents and Wellness sections.
  Active state uses amber glow — same language as the main tab bar.
*/
.agent-tabs { display: flex; gap: 3px; flex-wrap: wrap; }

.agent-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.agent-tab:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-soft); }
.agent-tab.active {
  background: var(--amber-glow);
  border-color: var(--border-accent);
  color: var(--amber-bright);
}

/* ---------- CARDS GRID ---------- */
/*
  Responsive auto-fill grid. Min card width 270px.
  Falls back to single column on narrow screens.
*/
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

/* ---------- TOOL CARD ---------- */
/*
  The core unit. Subtle lift on hover — like picking up a card from a table.
  The transition uses a spring-like cubic-bezier for tactile feedback.
*/
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition:
    background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.card-badges { display: flex; gap: 3px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }

.badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}
.badge-new { background: var(--amber-glow); color: var(--amber-bright); border: 1px solid var(--border-accent); }
.badge-trending { background: rgba(61, 122, 90, 0.15); color: var(--pine); border: 1px solid rgba(61, 122, 90, 0.2); }
.badge-price {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border);
  font-size: 0.55rem;
  padding: 1px 6px;
}

.card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.card-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stars { display: flex; gap: 1px; }
.stars i { font-size: 0.6rem; color: var(--amber-bright); }
.stars i.fa-star-half-alt { color: var(--amber-bright); }
.stars i.far { color: rgba(255, 255, 255, 0.1); }

.rating-num { font-size: 0.75rem; font-weight: 700; color: var(--text-soft); }
.card-users { font-size: 0.65rem; color: var(--text-dim); }

.card-rank {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-dim);
}

/* ---------- AGENT COLUMNS ---------- */
/*
  Three-column layout for agent listings. Each column scrolls independently
  when the list exceeds 500px. Show-more button sits at the bottom.
*/
.agent-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .agent-columns { grid-template-columns: 1fr; } }

.agent-column {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.agent-col-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-col-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-col-count { font-size: 0.62rem; color: var(--text-dim); font-weight: 600; }
.agent-col-body { max-height: 500px; overflow-y: auto; }

.agent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  cursor: default;
}
.agent-item:last-child { border-bottom: none; }
.agent-item:hover { background: rgba(255, 255, 255, 0.025); }

.agent-num {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.agent-num.top { background: var(--amber-glow); color: var(--amber-bright); }
.agent-num.reg { background: rgba(255, 255, 255, 0.03); color: var(--text-dim); }

.agent-name { font-size: 0.8rem; font-weight: 500; color: var(--text-soft); }

.agent-arrow { margin-left: auto; color: var(--text-dim); font-size: 0.6rem; opacity: 0; transition: opacity 0.15s; }
.agent-item:hover .agent-arrow { opacity: 1; }

.agent-hidden { display: none; }

.show-more-agent {
  padding: 10px 18px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amber-bright);
  cursor: pointer;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  width: 100%;
  transition: background 0.12s;
}
.show-more-agent:hover { background: var(--amber-glow); }

/* ---------- TESTIMONIALS ---------- */
/*
  Serif quotes for warmth. The opening curly quote is larger and amber.
  Cards are uniform but the organic quote text breaks the grid rigidity.
*/
.testimonial-section { padding: 48px 0 0; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 768px) { .testimonial-grid { grid-template-columns: 1fr; } }

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-quote::before { content: '\201C'; color: var(--amber); font-size: 1.4rem; font-family: var(--font-serif); }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testimonial-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--amber-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--amber-bright);
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.testimonial-name { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.testimonial-role { font-size: 0.68rem; color: var(--text-dim); }

/* ---------- COMPARISON ---------- */
.compare-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.compare-selectors {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.compare-slot { flex: 1; min-width: 180px; }

.compare-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}

.compare-vs {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.compare-results { margin-top: 24px; }

.compare-table { width: 100%; border-collapse: collapse; }

.compare-table th,
.compare-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.compare-table th {
  font-weight: 700;
  color: var(--text);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.02);
}
.compare-table td:first-child { font-weight: 600; color: var(--text-dim); width: 120px; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .cmp-name { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--text); }

/* ---------- FAQ ---------- */
/*
  Accordion-style. The question is clickable, the answer expands.
  Transition is height-constrained using max-height trick.
*/
.faq-grid { display: grid; gap: 10px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item.open { border-color: var(--border-accent); }

.faq-question {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.faq-question i {
  font-size: 0.7rem;
  color: var(--text-dim);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item.open .faq-question i { transform: rotate(180deg); color: var(--amber-bright); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

/* ---------- BLOG ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.25s,
    box-shadow 0.25s;
  cursor: pointer;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-hover); }

.blog-card-img {
  height: 140px;
  overflow: hidden;
  background: var(--bg-card);
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }

.blog-card-body { padding: 18px; }

.blog-card-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-bright);
  margin-bottom: 6px;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.blog-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 0.65rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- NEWSLETTER ---------- */
.newsletter-section { padding: 64px 0 0; }

.newsletter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 36px;
  text-align: center;
}

.newsletter-content { max-width: 500px; margin: 0 auto; }

.newsletter-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.newsletter-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }

.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }

.newsletter-btn {
  background: var(--amber);
  color: #0d0d12;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 24px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.newsletter-btn:hover { opacity: 0.88; }

.newsletter-disclaimer { font-size: 0.68rem; color: var(--text-dim); margin-top: 12px; }

/* ---------- ANALYTICS ---------- */
.analytics-section { padding: 64px 0 0; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .analytics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .analytics-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up { color: var(--pine); }
.stat-change.neutral { color: var(--text-dim); }

.engagement-bars {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.bars-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-item { margin-bottom: 16px; }
.bar-item:last-child { margin-bottom: 0; }

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.bar-label span:last-child { font-weight: 700; color: var(--text-soft); }

.bar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-controls { display: flex; gap: 8px; align-items: center; }

.dash-select {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}

.refresh-dash-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.refresh-dash-btn:hover { border-color: var(--border-hover); color: var(--text); }

/* ---------- GLOSSARY ---------- */
.glossary-section { padding: 48px 0 0; }

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.glossary-term {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.glossary-term:hover { border-color: var(--border-hover); }

.glossary-word {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.glossary-def {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- SUBMISSION FORM ---------- */
.submission-section { padding: 48px 0 0; }

.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
}

.submission-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.submission-card p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 20px; }
.submission-form .form-row { margin-bottom: 10px; }

/* ---------- FORM ELEMENTS ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.form-select { margin-bottom: 10px; cursor: pointer; }
.form-textarea { resize: vertical; margin-bottom: 14px; }

.form-submit {
  background: var(--amber);
  color: #0d0d12;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 28px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.form-submit:hover { opacity: 0.88; }

/* ---------- MODALS ---------- */
/*
  Overlay with blur backdrop. Content panel slides in (no animation currently,
  but the backdrop blur creates a sense of depth).
  Different content types share the same structure.
*/
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: var(--bg-modal);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-lg { max-width: 760px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  font-size: 0.8rem;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

/* Tool detail modal — shows full tool info */
.modal-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.modal-detail-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.modal-detail-info { flex: 1; }

.modal-detail-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.modal-detail-maker { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.modal-detail-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.modal-detail-body { margin-top: 18px; }

.modal-detail-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-detail-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.modal-detail-item-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.modal-detail-item-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
}

.modal-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: #0d0d12;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  transition: opacity 0.2s;
}
.modal-detail-link:hover { opacity: 0.88; }

.modal-detail-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.modal-detail-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* Legal content — shared by about, privacy, terms, contact modals */
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-content h2 i { font-size: 0.9em; }

.legal-content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
}
.legal-content h3 i { font-size: 0.85em; margin-right: 6px; }

.legal-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.legal-content em { color: var(--text-dim); font-size: 0.8rem; }
.legal-content ul { margin: 8px 0 12px 24px; color: var(--text-muted); font-size: 0.82rem; }
.legal-content li { margin-bottom: 4px; }

/* Contact info block inside contact modal */
.contact-info {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.contact-info p { margin-bottom: 6px; font-size: 0.82rem; }
.contact-info p:last-child { margin-bottom: 0; }
.contact-info i { width: 18px; color: var(--amber-bright); }
.contact-info a { color: var(--amber-bright); text-decoration: underline; }

/* About modal — stat grid */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 24px 0;
}
@media (max-width: 640px) { .about-stats { grid-template-columns: repeat(2, 1fr); } }

.about-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
}
.about-stat i {
  font-size: 1.4rem;
  color: var(--amber-bright);
  margin-bottom: 8px;
  display: block;
}
.about-stat-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.about-stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Team grid inside about modal */
.team-grid-modal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}
@media (max-width: 640px) { .team-grid-modal { grid-template-columns: 1fr; } }

.team-member {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.team-member:hover { border-color: var(--border-hover); }

.team-member img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--amber-glow);
}

.team-member h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.team-member .team-role {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber-bright);
  margin-bottom: 6px;
}

.team-member p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Contact modal — method cards */
.contact-method-modern {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.contact-method-modern:hover { border-color: var(--border-hover); }

.contact-method-icon {
  width: 42px;
  height: 42px;
  background: var(--amber-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--amber-bright);
  flex-shrink: 0;
}

.contact-method-text h4 { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.contact-method-text p { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0; }

.social-links-modal {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.social-link-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.social-link-modal:hover { border-color: var(--border-hover); color: var(--amber-bright); }
.social-link-modal i { color: var(--amber-bright); }

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--pine);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Privacy modal — GDPR rights grid */
.gdpr-badge {
  background: var(--amber-glow);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
}
.gdpr-badge i { color: var(--amber-bright); margin-right: 8px; }
.gdpr-badge h3 { margin-top: 0; font-size: 0.95rem; }
.gdpr-badge p { font-size: 0.82rem; margin-bottom: 0; }

.rights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
@media (max-width: 640px) { .rights-grid { grid-template-columns: 1fr; } }

.right-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.2s;
}
.right-card:hover { border-color: var(--border-hover); }

.right-card i {
  font-size: 1.2rem;
  color: var(--amber-bright);
  margin-bottom: 6px;
  display: block;
}

.right-card h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.right-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 52px 28px 0;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2.8fr;
  gap: 48px;
  padding-bottom: 40px;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand { max-width: 300px; }

.footer-brand .logo-mark { font-size: 0.7rem; }
.footer-brand .logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1rem; margin-left: 6px; }
.footer-brand p { margin-top: 12px; font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; }

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.footer-badge {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.footer-badge i { color: var(--pine); font-size: 0.6rem; }

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .footer-links-group { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-links-group { grid-template-columns: 1fr 1fr; } }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--amber-bright); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.footer-bottom a { color: var(--text-muted); transition: color 0.15s; }
.footer-bottom a:hover { color: var(--amber-bright); }

.trust-pills { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-pills span { display: flex; align-items: center; gap: 4px; }
.trust-pills i { color: var(--pine); }

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s, color 0.2s;
  z-index: 90;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--amber); color: #0d0d12; border-color: var(--amber); }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}
.empty-state i { font-size: 2rem; margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 4px; }
.empty-state p { font-size: 0.8rem; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--text-soft);
  font-size: 0.82rem;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.toast.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast i { color: var(--pine); }

/* ---------- COOKIE CONSENT ---------- */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 16px 28px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-consent.show { display: flex; }

.cookie-consent p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 600px;
}
.cookie-consent a { color: var(--amber-bright); text-decoration: underline; }

.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

.cookie-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cookie-btn:hover { border-color: var(--border-hover); color: var(--text); }

.cookie-btn.accept {
  background: var(--amber);
  color: #0d0d12;
  border-color: var(--amber);
}
.cookie-btn.accept:hover { opacity: 0.88; }

/* ---------- ADS ---------- */
.ad-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 28px;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .filter-bar { top: 54px; }
}
@media (max-width: 768px) {
  .hero { height: 1.8in; padding: 48px 16px 28px; }
  .hero-stats { border-radius: 40px; padding: 0.1rem 0.6rem; flex-wrap: nowrap; }
  .hero-stat { padding: 0 6px; }
  .hero-stat strong { font-size: 0.75rem; }
  .hero-stat span { font-size: 0.5rem; }
  .hero-stat-div { height: 16px; }
  .hero-stars { flex-wrap: wrap; }
  .knowledge-ticker { display: none; }
  .particle-field { display: none; }
  .hero-title { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
  .hero-sub { font-size: 0.6rem; }
}
@media (max-width: 640px) {
  .hero { height: 1.6in; padding: 40px 12px 24px; }
  .hero-stats { border-radius: 28px; padding: 0.1rem 0.4rem; gap: 2px; }
  .hero-stat { padding: 0 3px; }
  .hero-stat strong { font-size: 0.65rem; }
  .hero-stat span { font-size: 0.45rem; }
  .hero-stat-div { display: none; }
  .hero-stars { font-size: 0.6rem; }
  .hero-badge { font-size: 0.5rem; padding: 0.1rem 0.6rem; }
  .section-header { flex-direction: column; gap: 14px; }
  .section-meta { padding-top: 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .modal-detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .compare-selectors { flex-direction: column; }
  .compare-vs { transform: rotate(90deg); }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-label { display: none; }
  .filter-right { justify-content: space-between; }
  .filter-select { min-width: 0; flex: 1; }
  .blog-card-img { height: 110px; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
  .main { padding: 0 16px 40px; }
  .nav-inner { padding: 0 16px; }
  .tab-bar-inner { padding: 0 16px; }
  .footer { padding: 40px 16px 0; }
  .newsletter-card { padding: 36px 20px; }
  .submission-card { padding: 24px; }
}
