/* ==========================================================================
   PayoutDeals - Modern Directory Design System
   High-contrast, content-first layout with Dark/Light theme support,
   Grid/Table view toggles, and streamlined card anatomy.
   ========================================================================== */

:root {
  /* Light Theme (Ecowitt / Modern SaaS Clean) */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;

  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #10b981;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Accent Palettes */
  --accent-green: #059669;
  --accent-green-light: #ecfdf5;
  --accent-green-hover: #047857;
  
  --accent-blue: #2563eb;
  --accent-blue-light: #eff6ff;
  
  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;
  
  --accent-amber: #d97706;
  --accent-amber-light: #fef3c7;

  --accent-rose: #e11d48;
  --accent-rose-light: #fff1f2;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-dropdown: 0 10px 25px rgba(15, 23, 42, 0.12);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-primary: #0b111e;
  --bg-surface: #121927;
  --bg-subtle: #1a2335;
  --bg-hover: #1e293b;

  --border-light: #222f44;
  --border-subtle: #192333;
  --border-focus: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-light: #475569;

  --accent-green: #10b981;
  --accent-green-light: rgba(16, 185, 129, 0.15);
  --accent-green-hover: #059669;
  
  --accent-blue: #3b82f6;
  --accent-blue-light: rgba(59, 130, 246, 0.15);
  
  --accent-purple: #a855f7;
  --accent-purple-light: rgba(168, 85, 247, 0.15);
  
  --accent-amber: #f59e0b;
  --accent-amber-light: rgba(245, 158, 11, 0.15);

  --accent-rose: #f43f5e;
  --accent-rose-light: rgba(244, 63, 94, 0.15);

  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.6);
  --shadow-dropdown: 0 14px 32px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity 0.15s ease;
}

.brand-logo:hover {
  opacity: 0.92;
}

.brand-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo:hover .brand-logo-mark {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.logo-text-accent {
  color: var(--accent-green);
  font-weight: 700;
  margin-left: 1px;
}

.logo-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--accent-green-light);
  color: var(--accent-green);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-left: 0.45rem;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Right-aligned Navigation Group */
.nav-right-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Navigation Hub & Dropdown System */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown-wrap {
  position: relative;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  user-select: none;
  font-family: inherit;
}

.nav-link-btn:hover,
.nav-link-btn.active,
.nav-dropdown-wrap:hover .nav-link-btn,
.nav-dropdown-wrap.open .nav-link-btn {
  color: var(--text-primary);
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.nav-link-icon {
  stroke: var(--text-muted);
  transition: stroke var(--transition-fast);
  flex-shrink: 0;
}

.nav-link-btn:hover .nav-link-icon,
.nav-dropdown-wrap:hover .nav-link-icon,
.nav-dropdown-wrap.open .nav-link-icon {
  stroke: var(--accent-green);
}

.nav-chevron-icon {
  stroke: var(--text-muted);
  transition: transform 0.2s ease, stroke var(--transition-fast);
  flex-shrink: 0;
}

.nav-dropdown-wrap:hover .nav-chevron-icon,
.nav-dropdown-wrap.open .nav-chevron-icon {
  transform: rotate(180deg);
  stroke: var(--accent-green);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 290px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 0.45rem;
  z-index: 500;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  animation: navDropdownFade 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-dropdown-wrap.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.nav-dropdown-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.dropdown-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 2px;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.nav-dropdown-item:hover .dropdown-item-icon {
  background: var(--accent-green-light);
  border-color: rgba(16, 185, 129, 0.3);
  transform: scale(1.04);
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dropdown-item-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-item-desc {
  font-size: 0.715rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.35rem 0.2rem;
}

.nav-dropdown-header {
  padding: 0.35rem 0.65rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}


/* User Quick-Menu Dropdown (Concept 2) */
.user-nav-wrap {
  position: relative;
}

.user-menu-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-family: inherit;
  user-select: none;
}

.user-menu-trigger-btn:hover,
.user-nav-wrap:hover .user-menu-trigger-btn,
.user-nav-wrap.open .user-menu-trigger-btn {
  border-color: var(--border-focus);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.user-avatar-circle {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.user-menu-trigger-btn:hover .user-avatar-circle,
.user-nav-wrap:hover .user-avatar-circle,
.user-nav-wrap.open .user-avatar-circle {
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.4);
  background: var(--accent-green-light);
}

.user-saved-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 4px var(--accent-green);
}

.user-dropdown-menu {
  left: auto;
  right: 0;
  min-width: 250px;
  padding: 0.5rem;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.user-dropdown-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.user-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.user-dropdown-item:hover .user-item-icon {
  background: var(--accent-green-light);
  border-color: rgba(16, 185, 129, 0.3);
  transform: scale(1.05);
}

.user-item-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--text-primary);
}

.user-saved-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.user-dropdown-item:hover .user-saved-badge {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-green);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.45rem 0.2rem;
}

.user-menu-section {
  padding: 0.25rem 0.35rem 0.15rem;
}

.user-menu-section-header {
  margin-bottom: 0.45rem;
}

.user-menu-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Reddit-Style Segmented Theme Switcher */
.theme-segmented-group {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.theme-segment-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.25rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  user-select: none;
}

.theme-segment-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.theme-segment-btn.active,
.theme-segment-btn[aria-checked="true"] {
  background: var(--bg-surface);
  color: var(--accent-green);
  border-color: var(--border-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.theme-segment-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

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

.btn-sm {
  font-size: 0.825rem;
  padding: 0.45rem 0.85rem;
}

.btn-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Directory Header */
.directory-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 2rem 0 1.25rem;
  margin-bottom: 1.5rem;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.directory-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.directory-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
}

.directory-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.directory-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: break-word;
}

.directory-stats-chip {
  display: inline-block;
  font-size: 0.825rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  margin-top: 0.7rem;
  line-height: 1.4;
}

.directory-stats-chip:empty {
  display: none;
}

.directory-stats-chip strong {
  color: var(--accent-green);
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem 0.55rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.search-icon {
  color: var(--text-muted);
  width: 19px;
  height: 19px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.4rem;
  display: none;
  transition: color var(--transition-fast);
}

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

.search-clear-btn.visible {
  display: block;
}

/* Category Filter Tabs - Horizontal Track */
.niche-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.search-box[hidden],
.niche-scroll-wrapper[hidden] {
  display: none !important;
}

.niche-scroll-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.niche-scroll-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--accent-green);
}

.niche-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.25rem 0.15rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.niche-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.niche-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.niche-tab:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.niche-tab.active {
  background: var(--accent-green);
  color: #ffffff;
  border-color: var(--accent-green);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.tab-count {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

[data-theme="dark"] .tab-count {
  background: rgba(255, 255, 255, 0.12);
}

.niche-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Category Tab Groups with Embedded Info Trigger */
.niche-nav.networks-nav {
  overflow: visible;
}

.niche-tab-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0 0.2rem 0 0;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.niche-tab-group:hover {
  background: var(--bg-subtle);
  border-color: var(--border-focus);
}

.niche-tab-group.active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.niche-tab-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.38rem 0.55rem 0.38rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: color var(--transition-fast);
}

.niche-tab-group:hover .niche-tab-main {
  color: var(--text-primary);
}

.niche-tab-group.active .niche-tab-main {
  color: #ffffff;
}

.niche-tab-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin-right: 0.25rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.niche-tab-info-btn:hover,
.niche-tab-info-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.niche-tab-group.active .niche-tab-info-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.niche-tab-group.active .niche-tab-info-btn:hover,
.niche-tab-group.active .niche-tab-info-btn.active {
  background: #ffffff;
  color: var(--accent-green);
  border-color: #ffffff;
}

/* ============================================================
   Compact Toolbar + Collapsible Filter Panel
   ============================================================ */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex-wrap: wrap;
}

.directory-results-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.saved-print-btn {
  flex: 0 0 auto;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.saved-print-btn[hidden] {
  display: none !important;
}

.sort-group[hidden] {
  display: none !important;
}

.browse-help-wrap {
  position: relative;
}

.browse-help-wrap .filter-info-popover {
  width: 340px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.browse-help-lead {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 0.65rem;
}

.deals-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: -2rem 0 3.5rem;
}

.deals-load-more-wrap[hidden] {
  display: none;
}

/* Filter Toggle Button */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.85rem;
  font-size: 0.825rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.filter-toggle-btn:hover {
  border-color: var(--accent-green);
  color: var(--text-primary);
}

.filter-toggle-btn.is-active {
  border-color: var(--accent-green);
  background: var(--accent-green-light);
  color: var(--accent-green-hover);
}

[data-theme="dark"] .filter-toggle-btn.is-active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.filter-toggle-btn[aria-expanded="true"] {
  border-color: var(--accent-green);
  color: var(--text-primary);
}

.filter-active-badge {
  background: var(--accent-green);
  color: #ffffff;
  font-size: 0.675rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  line-height: 1.3;
}

/* Collapsible Filter Panel */
.filter-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  position: relative;
  z-index: 50;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin 0.3s ease;
  margin-top: 0;
  margin-bottom: 0;
}

.filter-panel.open {
  overflow: visible;
  max-height: 260px;
  opacity: 1;
  z-index: 200;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.filter-panel-inner {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem 0.8rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.filter-panel-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem 1rem;
  align-items: end;
}

@media (max-width: 1100px) {
  .filter-panel-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-panel.open {
    max-height: 360px;
  }
}

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

  .filter-panel.open {
    max-height: 520px;
  }
}

.filter-panel-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-panel-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: var(--text-muted);
  user-select: none;
}

/* ---- Filter Label Row & Floating Explanation Popover ---- */
.filter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  position: relative;
}

.filter-info-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
}

.filter-info-btn:hover,
.filter-info-btn:focus-visible,
.filter-info-btn.active {
  color: var(--accent-green);
  background: var(--accent-green-light);
  outline: none;
}

[data-theme="dark"] .filter-info-btn:hover,
[data-theme="dark"] .filter-info-btn:focus-visible,
[data-theme="dark"] .filter-info-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.filter-info-btn svg {
  display: block;
}

/* Floating Popover Container */
.filter-info-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0.85rem 0.95rem;
  z-index: 500;
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  backdrop-filter: blur(14px);
  animation: filterPopoverFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

[data-theme="dark"] .filter-info-popover {
  background: rgba(15, 23, 42, 0.97);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.filter-info-popover.open {
  display: flex;
}

/* Right-aligned for fields near the right edge */
.filter-info-popover.align-right {
  left: auto;
  right: 0;
}

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

.filter-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-info-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-green);
}

.filter-info-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.filter-info-close-btn:hover {
  color: var(--text-primary);
}

.filter-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.filter-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.filter-info-term {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-info-term::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
}

.filter-info-desc {
  font-size: 0.725rem;
  line-height: 1.4;
  color: var(--text-secondary);
  padding-left: 0.65rem;
}

.filter-info-footer {
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-subtle);
}

.filter-info-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.filter-info-guide-link:hover {
  text-decoration: underline;
  color: var(--accent-green-hover);
}

.glossary-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  z-index: 1100;
  margin: 0;
}

.glossary-popover .filter-info-desc {
  margin: 0;
}

.glossary-popover-footer[hidden] {
  display: none;
}

[data-glossary] {
  cursor: help;
}

[data-glossary]:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.filter-panel-field .filter-select,
.filter-panel-field .multi-select-trigger {
  width: 100%;
}

.filter-panel-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
}

.filter-reset-btn {
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: color var(--transition-fast);
}

.filter-reset-btn:hover {
  color: var(--accent-rose);
}

.filter-select {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.825rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--accent-green);
  color: var(--text-primary);
}


/* Multi-Select Traffic Channels Dropdown */
.multi-select-container {
  position: relative;
  display: inline-block;
}

.multi-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.825rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.multi-select-trigger:hover,
.multi-select-trigger:focus,
.multi-select-trigger[aria-expanded="true"] {
  border-color: var(--accent-green);
  color: var(--text-primary);
}

.multi-select-trigger.has-selection {
  border-color: var(--accent-green);
  background: var(--accent-green-light);
  color: var(--accent-green-hover);
  font-weight: 500;
}

[data-theme="dark"] .multi-select-trigger.has-selection {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.multi-select-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.multi-select-trigger[aria-expanded="true"] .multi-select-arrow {
  transform: rotate(180deg);
}

.multi-select-badge {
  background: var(--accent-green);
  color: #ffffff;
  font-size: 0.675rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.multi-select-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInFast 0.15s ease;
}

.multi-select-popover.open {
  display: flex;
}

.multi-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.multi-select-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.multi-select-clear-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--accent-rose);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast);
}

.multi-select-clear-btn:hover {
  text-decoration: underline;
}

.multi-select-options {
  max-height: 270px;
  overflow-y: auto;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.multi-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  font-size: 0.825rem;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.multi-select-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.multi-select-option.selected {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 500;
}

.multi-select-option-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.multi-select-option input[type="checkbox"] {
  accent-color: var(--accent-green);
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
}

.multi-select-option-count {
  font-size: 0.725rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

[data-theme="dark"] .multi-select-option-count {
  background: rgba(255, 255, 255, 0.06);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-green);
  width: 15px;
  height: 15px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sort-label {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* View Mode Switcher (Grid / Table) */
.view-switch-group {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.view-switch-btn:hover {
  color: var(--text-primary);
}

.view-switch-btn.active {
  background: var(--accent-green);
  color: #ffffff;
}

/* ==========================================================================
   Card Grid & Streamlined Card Anatomy
   ========================================================================== */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.deal-card {
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card-hover);
}

[data-theme="dark"] .deal-card:hover {
  border-color: #334155;
}

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

.brand-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  flex-shrink: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 5px;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="dark"] .brand-avatar {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.brand-avatar.has-fallback {
  padding: 0;
}

.brand-favicon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.table-brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 3px;
  position: relative;
}

[data-theme="dark"] .table-brand-avatar {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-brand-avatar.has-fallback {
  padding: 0;
}

.table-brand-avatar .brand-favicon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-details {
  min-width: 0;
}

.brand-details h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-details h3 a {
  color: inherit;
  text-decoration: none;
}

.brand-details h3 a:hover {
  color: var(--accent-green, var(--green));
}

.brand-name {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-top-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.card-bookmark-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.deal-card .card-bookmark-btn {
  padding: 0.35rem;
}

.card-bookmark-btn svg {
  display: inline-block;
  vertical-align: middle;
}

.deal-card .card-bookmark-btn svg {
  width: 22px;
  height: 22px;
}

.card-bookmark-btn:hover {
  color: var(--accent-amber);
}

.card-bookmark-btn.saved {
  color: var(--accent-amber);
}

/* Streamlined Badges (Uniform Niche Style) */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.badge,
.badge-category,
.badge-network,
.badge-uk,
.badge-featured,
.badge-new,
.badge-sentiment,
.badge-market,
.badge-uk-only,
.payout-type-tag,
.payout-type-recurring,
.payout-type-cpa,
.payout-type-revshare,
.payout-type-hybrid {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  line-height: 1.4;
  white-space: nowrap;
  text-transform: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.badge:hover,
.badge-category:hover,
.badge-network:hover,
.badge-market:hover,
.badge-uk-only:hover,
.badge-sentiment:hover,
.badge-featured:hover,
.payout-type-tag:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.badge-green {
  background: var(--accent-green-light) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: var(--accent-green) !important;
}

.badge-icon {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Payout Highlight Box */

.payout-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payout-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: -0.01em;
}

.payout-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.card-description {
  font-size: 0.835rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Card Summary Specs */
.card-quick-specs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border-light);
  flex-wrap: wrap;
}

.card-quick-specs span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.spec-icon {
  width: 13px;
  height: 13px;
  stroke: var(--text-muted);
  flex-shrink: 0;
  display: inline-block;
}

.card-quick-specs span strong {
  color: var(--text-primary);
}

.card-health {
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0.5rem 0 0;
}

.card-health-ok {
  color: var(--green);
}

.card-health-warn,
.card-health-dead,
.card-health-muted {
  color: var(--text-secondary);
}

/* Card Actions */
.card-footer {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ==========================================================================
   Table / Compact List View
   ========================================================================== */
.deals-table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
  margin-bottom: 3.5rem;
}

.deals-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.825rem;
}

.deals-table th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.7rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.deals-table th.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.deals-table th.th-sortable:hover {
  color: var(--green);
}

.deals-table td {
  padding: 0.65rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-secondary);
}

.deals-table tbody tr {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.deals-table tbody tr:hover {
  background-color: var(--bg-hover);
}

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

/* Explicit column proportions to ensure all 8 columns fit */
.th-brand, .td-brand {
  min-width: 180px;
  max-width: 240px;
}

.th-category, .td-category {
  white-space: nowrap;
}

.th-payout, .td-payout {
  max-width: 200px;
}

.th-cookie, .td-cookie {
  text-align: center;
  white-space: nowrap;
}

.th-approval, .td-approval {
  text-align: center;
  white-space: nowrap;
}

.th-type, .td-type {
  white-space: nowrap;
}

.th-network, .td-network {
  white-space: nowrap;
}

.th-actions, .td-actions {
  text-align: right;
  white-space: nowrap;
}

.table-brand-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.table-brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  flex-shrink: 0;
  overflow: hidden;
}

.table-brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.table-brand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.table-brand-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

a.table-brand-title:hover {
  color: var(--accent-green);
}

.table-brand-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-payout-cell {
  font-weight: 700;
  color: var(--accent-green);
  font-size: 0.825rem;
  display: inline-block;
  line-height: 1.35;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.table-actions-cell .btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .th-approval, .td-approval,
  .th-cookie, .td-cookie {
    display: none;
  }
}

@media (max-width: 860px) {
  .th-network, .td-network {
    display: none;
  }
}

/* ==========================================================================
   Buttons & General Components
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent-green);
  color: #ffffff;
  flex: 1;
}

.btn-primary:hover {
  background: var(--accent-green-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

[data-theme="dark"] .btn-secondary:hover {
  border-color: #475569;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 30, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  position: relative;
  transform: scale(0.97);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.network-portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding: 0.38rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  width: 100%;
  cursor: pointer;
}

.network-portal-link:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Community Review Cards & Sentiment */
.community-review-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.community-review-card.review-pro {
  border-left: 4px solid var(--accent-green);
}

.community-review-card.review-con {
  border-left: 4px solid var(--accent-amber);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.review-badge {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.review-badge.badge-pro {
  color: var(--accent-green);
}

.review-badge.badge-con {
  color: var(--accent-amber);
}

.review-source {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-author {
  color: var(--text-secondary);
  font-weight: 500;
}

.review-quote {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
  margin: 0;
}

.modal-close-btn {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: all var(--transition-fast);
  z-index: 15;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
  border-color: var(--border-medium);
}

.modal-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-green);
  font-weight: 700;
  margin: 1.25rem 0 0.4rem;
}

.pro-list {
  list-style: none;
  margin-bottom: 0.85rem;
}

.pro-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pro-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 800;
}

/* Calculator Grid inside modal */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.calc-control-group {
  margin-bottom: 1.2rem;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  margin-bottom: 0.4rem;
}

.calc-label-name {
  color: var(--text-secondary);
}

.calc-label-val {
  color: var(--accent-green);
  font-weight: 700;
}

.range-slider {
  width: 100%;
  accent-color: var(--accent-green);
  cursor: pointer;
}

.calc-result-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.result-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.result-number {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--accent-green);
  margin: 0.35rem 0;
}

.result-breakdown {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-dropdown);
  z-index: 200;
  transform: translateY(150%);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  padding: 2.25rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.825rem;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.footer-disclaimer {
  max-width: 640px;
  margin: 0.75rem auto 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .deals-table-container {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .deals-grid {
    grid-template-columns: 1fr;
  }
  .networks-grid {
    grid-template-columns: 1fr;
  }
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .directory-headline {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .directory-title-wrap {
    max-width: 100%;
  }
  .directory-toggle-group {
    width: 100%;
    display: flex;
  }
  .dir-toggle-btn {
    flex: 1;
    justify-content: center;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-right {
    justify-content: space-between;
  }
  .net-modal-dual-columns {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   Directory Switcher Toggle Bar
   ========================================================================== */
.directory-toggle-group {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 3px;
  box-shadow: var(--shadow-sm);
  gap: 4px;
}

.dir-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dir-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.dir-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .dir-toggle-btn.active {
  background: var(--bg-card);
  border-color: var(--border-light);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.dir-toggle-btn.active svg {
  color: var(--green);
}

.dir-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.08rem 0.42rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.dir-toggle-btn.active .dir-badge {
  background: var(--green-glow);
  border-color: var(--green-border);
  color: var(--green);
}

/* ==========================================================================
   Network Audience Perspective Switcher
   ========================================================================== */
.perspective-toggle-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
  box-shadow: var(--shadow-sm);
}

.perspective-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.perspective-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.perspective-toggle-btn.active {
  background: var(--green-glow);
  border-color: var(--green-border);
  color: var(--green);
}

.perspective-toggle-btn svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Affiliate Networks Benchmark Table Styles
   ========================================================================== */
.networks-benchmark-table {
  width: 100%;
  border-collapse: collapse;
}

.networks-benchmark-table th {
  padding: 0.65rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.networks-benchmark-table td {
  padding: 0.55rem 0.45rem;
  vertical-align: middle;
  font-size: 0.78rem;
}

.networks-benchmark-table .td-brand {
  min-width: 160px;
  max-width: 220px;
}

.networks-benchmark-table .td-terms {
  white-space: nowrap;
}

.networks-benchmark-table .btn-intel-tbl {
  padding: 0.32rem 0.7rem;
  font-size: 0.75rem;
}

.networks-benchmark-table .table-brand-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.networks-benchmark-table .table-brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.networks-benchmark-table .table-brand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.networks-benchmark-table .table-brand-heading {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.networks-benchmark-table .table-brand-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.networks-benchmark-table .table-brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.table-subtext {
  display: block;
  font-size: 0.69rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 1px;
}

.net-highlight-pill {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.net-highlight-pill.green {
  color: var(--green);
}

.net-methods-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 130px;
}

/* ==========================================================================
   Affiliate Networks Directory Grid & Cards (Streamlined)
   ========================================================================== */
.networks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 3.5rem;
}

.network-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.network-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card-hover);
}

[data-theme="dark"] .network-card:hover {
  border-color: #334155;
}

.net-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.net-brand-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.net-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.net-info {
  min-width: 0;
}

.net-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.net-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.net-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.net-card-facts {
  margin: 0;
  margin-top: auto;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border-light);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.net-card-count {
  flex-shrink: 0;
  border: 0;
  background: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  text-align: right;
}

.net-card-count:hover,
.net-card-count:focus-visible {
  color: var(--green);
}

.net-card-count.is-empty {
  color: var(--text-muted);
  cursor: default;
}

/* Perspective Box inside Streamlined Network Card */
.net-dual-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.net-dual-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.35rem;
}

.net-dual-col-header.pub {
  color: var(--green);
}

.net-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

.net-metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.net-metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.net-metric-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.net-quote-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.net-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.net-card-btn-link {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  padding: 0.42rem 0.65rem;
}

/* ==========================================================================
   Detail Modal Shared & Header Styles
   ========================================================================== */
.modal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 0.4rem;
}

.modal-meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.modal-meta-strip strong {
  color: var(--text-primary);
  font-weight: 600;
}

.modal-meta-sep {
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 0.75rem;
  user-select: none;
}

.modal-lead-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-light);
}

.net-modal-header,
.deal-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1rem;
  padding-right: 3.5rem; /* Generous breathing room ensuring badges never crowd or overlap the close button */
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.net-modal-dual-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.net-col-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.net-col-panel-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.net-col-panel-title.pub svg {
  color: var(--green);
}

.net-col-panel-title.merch svg {
  color: #6366f1;
}

.net-spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.net-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--border-light);
}

.net-spec-row:last-child {
  border-bottom: none;
}

.net-spec-row-k {
  color: var(--text-muted);
  font-weight: 500;
}

.net-spec-row-v {
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
}

.net-pro-con-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.net-list-block-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.net-item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.net-item-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.net-reddit-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.net-reddit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.net-reddit-quotes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.net-reddit-quote-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-body);
  line-height: 1.5;
}

.net-reddit-author {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.net-deals-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.net-deals-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.net-deal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.net-deal-pill:hover {
  border-color: var(--green);
  color: var(--green);
}

.deal-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
}

@media (max-width: 600px) {
  .deal-specs-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.listing-report {
  position: relative;
  margin-top: 0.85rem;
}

.listing-report-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.listing-report-toggle:hover,
.listing-report-toggle:focus-visible {
  color: var(--text-secondary);
}

.listing-report-form {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.listing-report-lead {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.listing-report-fieldset {
  border: 0;
  margin: 0 0 0.75rem;
  padding: 0;
}

.listing-report-fieldset legend {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.listing-report-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.listing-report-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.listing-report-field textarea,
.listing-report-field input[type="email"] {
  font: inherit;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.listing-report-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.listing-report-status {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.listing-report-status.is-error {
  color: var(--accent-rose, #f43f5e);
}

.digest-signup {
  position: relative;
  margin: 1.25rem auto 1rem;
  max-width: 40rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  text-align: left;
}

.digest-signup-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.digest-signup-lead {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.digest-signup-note {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.digest-signup-note a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.digest-signup-note a:hover {
  color: var(--accent-green);
}

.digest-signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
}

.digest-signup-topics {
  flex: 1 1 100%;
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.digest-signup-topics legend {
  padding: 0;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.digest-signup-check {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.digest-signup-check input {
  margin-top: 0.2rem;
  accent-color: var(--accent-green, #10b981);
}

.digest-signup-hint {
  flex: 1 1 100%;
  margin: 0 0 0 1.35rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}

.digest-signup-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 12rem;
  flex: 1;
}

.digest-signup-field input,
.digest-signup-field select {
  font: inherit;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.digest-signup-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.digest-signup-status {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.digest-signup-status.is-error {
  color: var(--accent-rose, #f43f5e);
}

.digest-signup-modal-content {
  max-width: 32rem;
  padding: 1.5rem 1.4rem 1.35rem;
}

.modal-content .digest-signup {
  margin: 0 auto;
  max-width: none;
  padding: 0;
  border: none;
  background: transparent;
}

