/* ============================================================
   Coco Icons — Design System
   High-end design marketplace aesthetic: clean, minimal, spacious
   ============================================================ */

/* ---- Tokens ---- */
:root {
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Ink scale */
  --ink-1: #0C0C0E;
  --ink-2: #3A3A42;
  --ink-3: #6B6B7A;
  --ink-4: #9A9AA8;
  --ink-5: #C8C8D2;

  /* Surface scale */
  --bg:         #FFFFFF;
  --surface-1:  #F7F7F8;
  --surface-2:  #F0F0F2;
  --surface-3:  #E3E3E8;

  /* Brand */
  --accent:        #0C0C0E;
  --accent-hover:  #2A2A32;
  --brand:         #5B5CF6;
  --brand-hover:   #4745E4;
  --brand-light:   #EEEEFF;
  --success:       #16A34A;
  --success-light: #DCFCE7;
  --danger:        #DC2626;
  --danger-light:  #FEE2E2;
  --warn:          #D97706;
  --warn-light:    #FEF3C7;

  /* Gradient orb colours (light mode — very subtle) */
  --orb-1: rgba(91, 92, 246, 0.10);
  --orb-2: rgba(168, 85, 247, 0.07);
  --orb-3: rgba(59, 130, 246, 0.06);
  --orb-4: rgba(236, 72, 153, 0.05);

  /* Radius */
  --r-sm:   6px;
  --r:      10px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 64px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);

  /* Transitions */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t:      150ms;
  --t-md:   250ms;

  /* ---- Admin compatibility aliases ---- */
  --primary:            #5B5CF6;
  --primary-mid:        #4F46E5;
  --primary-dark:       #3730A3;
  --primary-light:      #EEEEFF;
  --primary-glow:       rgba(91, 92, 246, 0.20);
  --bg-base:            #FFFFFF;
  --surface:            #F7F7F8;
  --glass-bg:           rgba(255, 255, 255, 0.72);
  --glass-border:       rgba(255, 255, 255, 0.90);
  --glass-shadow:       0 8px 32px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  --glass-card-bg:      rgba(255, 255, 255, 0.60);
  --glass-card-border:  rgba(255, 255, 255, 0.70);
  --border:             rgba(0, 0, 0, 0.08);
  --border-mid:         rgba(0, 0, 0, 0.12);
  --border-strong:      rgba(0, 0, 0, 0.16);
  --text:               #0C0C0E;
  --text-muted:         #6B6B7A;
  --text-light:         #9A9AA8;
  --text-inverse:       #FFFFFF;
  --shadow-glow:        0 0 40px rgba(91, 92, 246, 0.18);
  --radius-xs:          4px;
  --radius-sm:          6px;
  --radius:             10px;
  --radius-md:          12px;
  --radius-lg:          16px;
  --radius-xl:          24px;
  --radius-2xl:         36px;
  --ease-spring:        cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition:         150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:    250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring:  400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --ink-1: #F4F4F6;
  --ink-2: #C0C0CC;
  --ink-3: #8A8A9A;
  --ink-4: #60606E;
  --ink-5: #3C3C48;

  --bg:        #08080F;
  --surface-1: #10101A;
  --surface-2: #18182A;
  --surface-3: #24243A;

  --accent:       #F4F4F6;
  --accent-hover: #D0D0D8;
  --brand-light:  #1A1A2E;

  /* Gradient orb colours — stronger in dark mode */
  --orb-1: rgba(99, 102, 241, 0.22);
  --orb-2: rgba(168, 85, 247, 0.17);
  --orb-3: rgba(59, 130, 246, 0.13);
  --orb-4: rgba(236, 72, 153, 0.11);

  /* Admin compatibility aliases — dark mode overrides */
  --primary:           #6366F1;
  --primary-light:     rgba(99, 102, 241, 0.14);
  --primary-glow:      rgba(99, 102, 241, 0.28);
  --bg-base:           #0D0D18;
  --surface:           rgba(255, 255, 255, 0.04);
  --glass-bg:          rgba(18, 18, 32, 0.75);
  --glass-border:      rgba(255, 255, 255, 0.09);
  --glass-shadow:      0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.07);
  --glass-card-bg:     rgba(255, 255, 255, 0.04);
  --glass-card-border: rgba(255, 255, 255, 0.08);
  --border:            rgba(255, 255, 255, 0.07);
  --border-mid:        rgba(255, 255, 255, 0.10);
  --border-strong:     rgba(255, 255, 255, 0.15);
  --text:              #F0F0FA;
  --text-muted:        #8080A0;
  --text-light:        #50506A;
  --text-inverse:      #0F0F18;
  --shadow-glow:       0 0 40px rgba(99, 102, 241, 0.28);
  --shadow-xs:         0 1px 2px rgba(0,0,0,0.20);
  --shadow-sm:         0 1px 4px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.18);
  --shadow-md:         0 4px 20px rgba(0,0,0,0.30), 0 2px 8px rgba(0,0,0,0.20);
  --shadow-lg:         0 12px 48px rgba(0,0,0,0.40), 0 4px 16px rgba(0,0,0,0.25);
  --shadow-xl:         0 24px 80px rgba(0,0,0,0.50), 0 8px 32px rgba(0,0,0,0.30);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-1);
  line-height: 1.6;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* ---- Gradient orb mesh background ---- */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); will-change: transform;
  animation: orbDrift ease-in-out infinite alternate;
}
.bg-orb-1 { width: 700px; height: 700px; background: var(--orb-1); top: -200px; left: -150px; animation-duration: 18s; }
.bg-orb-2 { width: 600px; height: 600px; background: var(--orb-2); top: 10%; right: -100px; animation-duration: 22s; animation-delay: -6s; }
.bg-orb-3 { width: 500px; height: 500px; background: var(--orb-3); bottom: 20%; left: 30%; animation-duration: 26s; animation-delay: -12s; }
.bg-orb-4 { width: 400px; height: 400px; background: var(--orb-4); bottom: -100px; right: 20%; animation-duration: 20s; animation-delay: -3s; }
@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.05); }
  66%  { transform: translate(-20px, 40px) scale(0.97); }
  100% { transform: translate(30px, 20px) scale(1.03); }
}

/* Subtle noise texture on dark backgrounds */
[data-theme="dark"] body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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-size: 200px 200px;
}

/* Animated gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--brand) 0%, #818CF8 45%, #A78BFA 75%, #F472B6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; background-size: 200% auto;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50%       { background-position: 100% center; }
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 40px; } }
@media (min-width: 1280px) { .container { padding: 0 48px; } }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease);
}
[data-theme="dark"] .nav { background: rgba(12,12,14,.85); }
.nav.scrolled { border-color: var(--surface-3); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink-1);
  flex-shrink: 0;
  margin-right: 8px;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  background: var(--ink-1);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  transition: transform var(--t) var(--spring);
}
.nav-logo:hover .nav-logo-mark { transform: scale(1.08) rotate(-4deg); }

.nav-search {
  flex: 1;
  max-width: 420px;
  position: relative;
  margin: 0 12px;
}
.nav-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); pointer-events: none;
}
.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 38px;
  background: var(--surface-1);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-full);
  font-size: .875rem;
  color: var(--ink-1);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.nav-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,92,246,.12);
}
.nav-search input::placeholder { color: var(--ink-4); }

.nav-links {
  display: none;
  gap: 4px;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  padding: 6px 12px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: var(--r);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--ink-1); background: var(--surface-1); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.btn-theme {
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.btn-theme:hover { color: var(--ink-1); background: var(--surface-1); }
.btn-theme .icon-moon { display: none; }
[data-theme="dark"] .btn-theme .icon-sun  { display: none; }
[data-theme="dark"] .btn-theme .icon-moon { display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
/* Base button — shared by .btn and all standalone variant classes */
.btn,
.btn-primary, .btn-brand, .btn-ghost, .btn-surface,
.btn-load-more, .btn-upgrade, .btn-manage,
.btn-light, .btn-ghost-light {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 0 18px;
  height: 40px;
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
              box-shadow var(--t) var(--ease), transform var(--t) var(--spring);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.btn:active,
.btn-primary:active, .btn-brand:active, .btn-ghost:active, .btn-surface:active,
.btn-load-more:active, .btn-upgrade:active, .btn-manage:active,
.btn-light:active, .btn-ghost-light:active { transform: scale(.97); }

.btn-sm  { height: 34px; padding: 0 14px; font-size: .8125rem; }
.btn-lg  { height: 48px; padding: 0 28px; font-size: .9375rem; border-radius: var(--r-md); }
.btn-xl  { height: 56px; padding: 0 36px; font-size: 1rem; border-radius: var(--r-lg); }

.btn-primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 14px rgba(0,0,0,.15); }

.btn-brand, .btn-upgrade {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.btn-brand:hover, .btn-upgrade:hover { background: var(--brand-hover); box-shadow: 0 4px 14px rgba(91,92,246,.3); }

.btn-ghost, .btn-manage {
  background: transparent; color: var(--ink-2); border-color: var(--surface-3);
}
.btn-ghost:hover, .btn-manage:hover { background: var(--surface-1); color: var(--ink-1); }

.btn-surface, .btn-load-more {
  background: var(--surface-1); color: var(--ink-2); border-color: var(--surface-3);
}
.btn-surface:hover, .btn-load-more:hover { background: var(--surface-2); color: var(--ink-1); }

/* CTA band buttons (always on dark background — use hardcoded dark text) */
.btn-light {
  background: #fff; color: #0C0C0E; border-color: #fff;
}
.btn-light:hover { opacity: .9; }

.btn-ghost-light {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.35);
}
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(91,92,246,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: .8125rem;
  font-weight: 600;
  border-radius: var(--r-full);
  margin-bottom: 28px;
  letter-spacing: .01em;
}
.hero-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: var(--ink-1);
  margin-bottom: 22px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-title span { color: var(--brand); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--ink-3);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-search-wrap {
  max-width: 600px;
  margin: 0 auto 48px;
  position: relative;
}
.hero-search {
  width: 100%;
  height: 56px;
  padding: 0 80px 0 52px;
  font-size: 1rem;
  background: var(--bg);
  border: 2px solid var(--surface-3);
  border-radius: var(--r-full);
  color: var(--ink-1);
  box-shadow: var(--shadow-md);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.hero-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,92,246,.12), var(--shadow-md); }
.hero-search::placeholder { color: var(--ink-4); }
.hero-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-4); }
.hero-search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  height: 40px; padding: 0 20px;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: var(--r-full);
  font-size: .875rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--t) var(--ease);
}
.hero-search-btn:hover { background: var(--accent-hover); }

.hero-stats {
  display: flex; justify-content: center; gap: 0;
  flex-wrap: wrap;
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}
.hero-stat {
  flex: 1;
  min-width: 120px;
  padding: 20px 16px;
  border-right: 1.5px solid var(--surface-3);
  text-align: center;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink-1);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-lbl { font-size: .75rem; color: var(--ink-4); font-weight: 500; }

/* ============================================================
   ICON GRID
   ============================================================ */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px; gap: 16px; flex-wrap: wrap;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink-1);
  line-height: 1.2;
}
.section-sub { font-size: .875rem; color: var(--ink-3); margin-top: 6px; }

.filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 14px;
  font-size: .8125rem; font-weight: 500;
  background: var(--surface-1); color: var(--ink-3);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.filter-chip:hover { background: var(--surface-2); color: var(--ink-1); }
.filter-chip.active {
  background: var(--ink-1); color: var(--bg);
  border-color: var(--ink-1);
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
  padding-top: 6px;
  margin-top: -6px;
}
.icon-grid-lg { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }

.icon-card {
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-md);
  padding: 20px 12px 14px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--spring);
  overflow: hidden;
  text-align: center;
  user-select: none;
  will-change: transform;
  contain: layout style;
}
.icon-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(91,92,246,.12);
  transform: translateY(-2px);
  z-index: 1;
}
.icon-card-preview {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
  color: var(--ink-2);
  transition: color var(--t) var(--ease), transform var(--t) var(--spring);
}
.icon-card:hover .icon-card-preview { color: var(--brand); transform: scale(1.12); }
.icon-card-preview img { width: 40px; height: 40px; object-fit: contain; }
.icon-card-name {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  width: 100%;
  transition: color var(--t) var(--ease);
}
.icon-card:hover .icon-card-name { color: var(--ink-1); }

.badge-free {
  position: absolute; top: 7px; right: 7px;
  padding: 2px 7px; font-size: .625rem; font-weight: 700;
  background: var(--success-light); color: var(--success);
  border-radius: var(--r-full); line-height: 1.6;
  letter-spacing: .02em;
}
.badge-pro {
  position: absolute; top: 7px; right: 7px;
  padding: 2px 7px; font-size: .625rem; font-weight: 700;
  background: var(--brand-light); color: var(--brand);
  border-radius: var(--r-full); line-height: 1.6;
  letter-spacing: .02em;
}

/* Quick-action overlay on hover */
.icon-card-actions {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: var(--bg);
  border-top: 1.5px solid var(--surface-3);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.icon-card:hover .icon-card-actions { opacity: 1; transform: translateY(0); }
.icon-action {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: none; border: none; cursor: pointer;
  color: var(--ink-3);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.icon-action:hover { color: var(--brand); background: var(--brand-light); }

/* ============================================================
   CATEGORIES
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.category-card {
  padding: 20px;
  background: var(--bg);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--spring);
}
.category-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-icon {
  width: 44px; height: 44px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  margin-bottom: 12px;
}
.category-name { font-size: .9375rem; font-weight: 700; color: var(--ink-1); margin-bottom: 2px; }
.category-count { font-size: .8125rem; color: var(--ink-4); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  position: relative;
  transition: box-shadow var(--t-md) var(--ease);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  background: var(--ink-1);
  border-color: var(--ink-1);
  color: var(--bg);
}
.pricing-card.featured .pricing-price { color: var(--bg); }
.pricing-card.featured .pricing-desc  { color: rgba(255,255,255,.6); }
.pricing-card.featured .pricing-feature { color: rgba(255,255,255,.75); }
.pricing-card.featured .pricing-feature svg { stroke: rgba(255,255,255,.5); }

.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 14px; font-size: .75rem; font-weight: 700;
  background: var(--brand); color: #fff;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.pricing-plan { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 16px; }
.pricing-card.featured .pricing-plan { color: rgba(255,255,255,.5); }
.pricing-price {
  font-size: 3rem; font-weight: 800; letter-spacing: -.04em;
  color: var(--ink-1); line-height: 1; margin-bottom: 4px;
}
.pricing-price sup { font-size: 1.25rem; vertical-align: top; margin-top: 10px; font-weight: 700; }
.pricing-period { font-size: .8125rem; color: var(--ink-4); margin-bottom: 20px; }
.pricing-desc { font-size: .9375rem; color: var(--ink-3); margin-bottom: 28px; line-height: 1.5; }
.pricing-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.pricing-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: .875rem; color: var(--ink-2);
}
.pricing-feature svg { color: var(--brand); flex-shrink: 0; }
.pricing-card.featured .pricing-feature svg { color: #A5B4FC; }
.pricing-divider { border: none; border-top: 1.5px solid var(--surface-3); margin: 20px 0; }
.pricing-card.featured .pricing-divider { border-color: rgba(255,255,255,.12); }

.billing-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 40px;
}
.billing-opt {
  font-size: .875rem; font-weight: 500; color: var(--ink-3);
  cursor: pointer; padding: 6px 14px; border-radius: var(--r-full);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.billing-opt.active { color: var(--ink-1); background: var(--surface-1); font-weight: 600; }
.billing-save {
  padding: 3px 10px; font-size: .75rem; font-weight: 700;
  background: var(--success-light); color: var(--success);
  border-radius: var(--r-full);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-md) var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-xl);
  padding: 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-xl);
  transform: scale(.95) translateY(8px);
  transition: transform var(--t-md) var(--spring);
  position: relative;
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: var(--surface-1); border: none; border-radius: var(--r-sm);
  cursor: pointer; color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.modal-close:hover { background: var(--surface-2); color: var(--ink-1); }
.modal-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.modal-sub { font-size: .875rem; color: var(--ink-3); margin-bottom: 24px; }

.modal-icon-preview {
  width: 72px; height: 72px;
  background: var(--surface-1);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--ink-2);
}
.modal-icon-name { font-size: 1.125rem; font-weight: 700; text-align: center; margin-bottom: 20px; }

.format-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.format-chip {
  padding: 10px 8px;
  text-align: center;
  font-size: .8125rem; font-weight: 600;
  background: var(--surface-1);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.format-chip.active { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
.format-chip:hover:not(.active) { background: var(--surface-2); }

.quota-banner {
  padding: 12px 16px;
  background: var(--surface-1);
  border-radius: var(--r);
  font-size: .8125rem; color: var(--ink-3);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.quota-banner strong { color: var(--ink-1); }
.quota-bar { flex: 1; height: 4px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.quota-fill { height: 100%; background: var(--brand); border-radius: var(--r-full); transition: width .5s var(--ease); }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 18px; }
.field-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--bg);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r);
  font-size: .9375rem;
  color: var(--ink-1);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,92,246,.12);
}
.field-input::placeholder { color: var(--ink-4); }
.field-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: .8125rem; color: var(--ink-4); margin: 18px 0;
}
.field-divider::before, .field-divider::after { content: ''; flex: 1; height: 1px; background: var(--surface-3); }

/* ============================================================
   BROWSE PAGE
   ============================================================ */
.browse-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 767px) { .browse-layout { grid-template-columns: 1fr; } }

.browse-sidebar { position: sticky; top: 80px; }
.sidebar-section { margin-bottom: 32px; }
.sidebar-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 10px;
}
.sidebar-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: .875rem; color: var(--ink-3);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.sidebar-item:hover { background: var(--surface-1); color: var(--ink-1); }
.sidebar-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.sidebar-count {
  font-size: .75rem; color: var(--ink-5);
  background: var(--surface-2);
  padding: 1px 7px; border-radius: var(--r-full);
}
.sidebar-item.active .sidebar-count { background: rgba(91,92,246,.15); color: var(--brand); }

.browse-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.browse-search {
  flex: 1; min-width: 200px;
  height: 40px; padding: 0 14px 0 38px;
  position: relative;
}
.browse-search-wrap { position: relative; flex: 1; min-width: 200px; }
.browse-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.browse-count { font-size: .875rem; color: var(--ink-3); margin-left: auto; white-space: nowrap; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  padding: 80px 24px;
  text-align: center;
  color: var(--ink-3);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-title { font-size: 1.125rem; font-weight: 700; color: var(--ink-1); margin-bottom: 8px; }
.empty-state-desc { font-size: .9375rem; max-width: 380px; margin: 0 auto 24px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.testimonial-card {
  background: var(--surface-1);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-xl);
  padding: 28px;
}
.testimonial-quote { font-size: .9375rem; line-height: 1.65; color: var(--ink-2); margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 700; color: var(--ink-2);
}
.testimonial-name { font-size: .875rem; font-weight: 700; color: var(--ink-1); }
.testimonial-role { font-size: .8125rem; color: var(--ink-4); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: #0C0C0E;
  border-radius: var(--r-xl);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .cta-band { background: #1a1a24; }
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(91,92,246,.25) 0%, transparent 70%);
}
.cta-band-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800; letter-spacing: -.03em;
  position: relative; margin-bottom: 16px;
}
.cta-band-sub {
  font-size: 1.0625rem; color: rgba(255,255,255,.65);
  position: relative; margin-bottom: 36px;
}
.cta-band .btn-ghost { border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.85); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ============================================================
   AD SLOTS
   ============================================================ */
.ad-slot {
  background: var(--surface-1);
  border: 1.5px dashed var(--surface-3);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-5);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ad-728x90 { width: 100%; height: 90px; max-width: 728px; margin: 0 auto; }
.ad-300x250 { width: 300px; height: 250px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1.5px solid var(--surface-3);
  padding: 56px 0 40px;
  color: var(--ink-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand-desc { font-size: .875rem; line-height: 1.7; margin-top: 14px; max-width: 240px; }
.footer-col-title { font-size: .8125rem; font-weight: 700; color: var(--ink-2); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-link { font-size: .875rem; color: var(--ink-4); transition: color var(--t) var(--ease); }
.footer-link:hover { color: var(--ink-1); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px;
  border-top: 1.5px solid var(--surface-3);
  font-size: .8125rem; color: var(--ink-5);
  gap: 16px; flex-wrap: wrap;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 400;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--ink-1); color: var(--bg);
  border-radius: var(--r-lg);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-xl);
  min-width: 280px; max-width: 380px;
  animation: toastIn .3s var(--spring) forwards;
  pointer-events: all;
}
.toast.removing { animation: toastOut .25s var(--ease) forwards; }
.toast-success .toast-icon { color: #4ADE80; }
.toast-error   .toast-icon { color: #F87171; }
.toast-info    .toast-icon { color: #60A5FA; }

@keyframes toastIn  { from { opacity:0; transform:translateY(16px) scale(.95); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; transform:none; } to { opacity:0; transform:translateY(8px) scale(.95); } }

/* ============================================================
   ACCOUNT / DASHBOARD
   ============================================================ */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 48px 0 80px;
  align-items: start;
}
@media (max-width: 767px) { .account-layout { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  border: 1.5px solid var(--surface-3);
  border-radius: var(--r-xl);
  padding: 28px;
}
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }

.plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: var(--r-full);
}
.plan-free     { background: var(--surface-2); color: var(--ink-3); }
.plan-pro      { background: var(--brand-light); color: var(--brand); }
.plan-business { background: var(--ink-1); color: var(--bg); }

/* ============================================================
   LOADING
   ============================================================ */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--surface-3);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   UTILITIES
   ============================================================ */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.text-muted { color: var(--ink-3); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1.5px solid var(--surface-3); margin: 24px 0; }

/* ============================================================
   BEM ALIASES — nav, icon-card, auth modal, badges, toasts
   ============================================================ */

/* Nav BEM aliases */
.nav__inner  { display:flex; align-items:center; gap:8px; height:60px; max-width:1200px; margin:0 auto; padding:0 24px; }
.nav__brand  { display:flex; align-items:center; gap:9px; font-size:.9375rem; font-weight:700; letter-spacing:-.02em; color:var(--ink-1); text-decoration:none; flex-shrink:0; margin-right:8px; }
.nav__brand svg { transition: transform var(--t) var(--spring); }
.nav__brand:hover svg { transform: scale(1.08) rotate(-4deg); }
.nav__links  { display:none; gap:4px; }
@media (min-width:768px) { .nav__links { display:flex; } }
.nav__link   { padding:6px 12px; font-size:.875rem; font-weight:500; color:var(--ink-3); border-radius:var(--r); text-decoration:none; transition:color var(--t) var(--ease), background var(--t) var(--ease); }
.nav__link:hover, .nav__link[aria-current="page"] { color:var(--ink-1); background:var(--surface-1); }
.nav__actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.nav__icon-btn { width:36px; height:36px; background:none; border:none; cursor:pointer; border-radius:var(--r); display:flex; align-items:center; justify-content:center; color:var(--ink-3); transition:color var(--t),background var(--t); }
.nav__icon-btn:hover { color:var(--ink-1); background:var(--surface-1); }

/* Icon card BEM aliases */
.icon-card__preview { width:100%; display:flex; align-items:center; justify-content:center; min-height:56px; margin-bottom:8px; position:relative; }
.icon-card__preview img { width:40px; height:40px; object-fit:contain; }
.icon-card__meta { width:100%; }
.icon-card__name { font-size:.6875rem; font-weight:500; color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:100%; text-align:center; transition:color var(--t); }
.icon-card:hover .icon-card__name { color:var(--ink-1); }
.icon-card__overlay { position:absolute; bottom:0; left:0; right:0; background:rgba(255,255,255,.95); [data-theme="dark"] & { background:rgba(22,22,26,.95); } padding:6px; opacity:0; transform:translateY(4px); transition:opacity var(--t),transform var(--t); border-top:1px solid var(--surface-3); display:flex; justify-content:center; }
[data-theme="dark"] .icon-card__overlay { background: rgba(22,22,26,.95); }

/* Invert icon strokes in dark mode: black → white */
[data-theme="dark"] .icon-card__preview img,
[data-theme="dark"] .icon-card-preview img,
[data-theme="dark"] .icon-detail__preview img,
[data-theme="dark"] .featured-icon img,
[data-theme="dark"] .modal-backdrop .modal img { filter: invert(1); }
.icon-card:hover .icon-card__overlay { opacity:1; transform:translateY(0); }
.icon-card__action { background:var(--brand); color:#fff; border:none; border-radius:8px; padding:5px 10px; font-size:.75rem; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:5px; transition:opacity .15s; }
.icon-card__action:hover { opacity:.85; }
.icon-card__placeholder { width:40px; height:40px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1.1rem; color:var(--brand); }

/* Icon badges */
.icon-badge { position:absolute; top:5px; right:5px; padding:2px 7px; font-size:.6rem; font-weight:700; border-radius:999px; line-height:1.6; letter-spacing:.03em; }
.icon-badge--pro { background:var(--brand-light); color:var(--brand); }
.icon-badge--lg { position:static; font-size:.75rem; padding:3px 10px; display:inline-block; margin-bottom:12px; }

/* Plan badge (nav) */
.plan-badge { font-size:.65rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; padding:2px 8px; border-radius:999px; }
.plan-badge.plan-free     { background:var(--surface-2); color:var(--ink-4); }
.plan-badge.plan-pro      { background:var(--brand-light); color:var(--brand); }
.plan-badge.plan-business { background:#FEF3C7; color:#D97706; }

/* Tag chip */
.tag { display:inline-block; background:var(--surface-2); color:var(--ink-3); font-size:.75rem; padding:3px 10px; border-radius:999px; }

/* Auth modal */
.auth-modal { max-width: 400px; }
.auth-tabs { display:flex; background:var(--surface-2); border-radius:10px; padding:3px; margin-bottom:24px; }
.auth-tab { flex:1; padding:8px; background:none; border:none; border-radius:8px; font-size:.875rem; font-weight:500; color:var(--ink-3); cursor:pointer; transition:background .15s,color .15s; }
.auth-tab.active { background:var(--bg); color:var(--ink-1); box-shadow:var(--shadow-xs); }
.auth-form { display:flex; flex-direction:column; gap:16px; }
.form-field { display:flex; flex-direction:column; gap:5px; }
.form-field label { font-size:.8rem; font-weight:500; color:var(--ink-2); }
.form-field input { padding:10px 14px; background:var(--surface-1); border:1.5px solid var(--surface-3); border-radius:10px; font-size:.9rem; color:var(--ink-1); transition:border-color .15s,box-shadow .15s; }
.form-field input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent); }
.auth-error { background:var(--danger-light); color:var(--danger); border-radius:8px; padding:10px 14px; font-size:.85rem; }
.auth-footer { text-align:center; margin-top:16px; font-size:.875rem; color:var(--ink-3); }
.auth-footer a { color:var(--brand); text-decoration:none; font-weight:500; }
.auth-footer a:hover { text-decoration:underline; }
.btn-full { width:100%; justify-content:center; }
.btn-spinner { width:16px; height:16px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; }

/* Toast */
.toast-container { position:fixed; bottom:24px; right:24px; z-index:9999; display:flex; flex-direction:column; gap:8px; }
.toast { background:var(--ink-1); color:#fff; padding:12px 18px; border-radius:12px; font-size:.875rem; font-weight:500; box-shadow:var(--shadow-lg); opacity:0; transform:translateY(8px); transition:opacity .2s,transform .2s; max-width:360px; }
.toast.visible { opacity:1; transform:translateY(0); }
.toast-success { background:#16A34A; }
.toast-error   { background:#DC2626; }
.toast-warning { background:#D97706; }
.toast-info    { background:var(--ink-2); }

/* Skeleton override for icon cards */
.icon-card.skeleton {
  pointer-events: none; border-color: var(--surface-2);
  min-height: 110px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.icon-card.skeleton .icon-card__preview,
.icon-card.skeleton .icon-card__meta { background: transparent; }

@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 0; }
  .hide-mobile { display: none !important; }
}
