@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- NATIVE PAGE TRANSITIONS --- */
@view-transition {
  navigation: auto;
}

/* --- DESIGN SYSTEM TOKENS --- */
:root {
  --pure-white: #0B0B0B;
  --near-black: #F5F2E8;
  --text-secondary: #888888;
  --surface-dark: #121212;
  --off-white: #161616;
  --border-grey: #222222;
  --signal-red: #FF3B00;
  --font-sans: var(--font-body);
  --text-primary: var(--near-black);

  /* Matte card backgrounds */
  --matte-0: #2A1E1E;
  --matte-1: #1C2720;
  --matte-2: #1D232C;
  --matte-3: #2A261C;
  --matte-4: #241E2A;
  --matte-5: #2A221C;
  --matte-6: #1A2625;
  --matte-7: #1E1F21;
  --thumbnail-bg: #1E1F21;

  /* Typography scale */
  --font-display: 'DM Serif Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ts-xs: 0.75rem;
  --ts-sm: 0.875rem;
  --ts-base: 1rem;
  --ts-lg: 1.125rem;
  --ts-xl: 1.25rem;
  --ts-2xl: 1.5rem;
  --ts-3xl: 2rem;
  --ts-4xl: 2.75rem;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- RESET & BASICS --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--ts-base);
  color: var(--near-black);
  background-color: var(--pure-white);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button, input {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--pure-white);
}
::-webkit-scrollbar-thumb {
  background: var(--border-grey);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--surface-dark);
}

/* --- NAVIGATION BAR --- */
header,
header#navbar {
  position: relative !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  z-index: 1000 !important;
  background-color: rgba(10, 11, 13, 0.94) !important;
  background: rgba(10, 11, 13, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 1.5rem;
  margin: 0 !important;
  box-sizing: border-box !important;
  color: #ffffff !important;
  transition: background-color 0.3s ease, border-color 0.3s ease, height 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] header,
[data-theme="dark"] header#navbar {
  background-color: rgba(10, 11, 13, 0.96) !important;
  background: rgba(10, 11, 13, 0.96) !important;
  border-bottom-color: rgba(255, 255, 255, 0.09) !important;
}

header.collapsed,
header#navbar.collapsed {
  height: 48px !important;
  background-color: rgba(10, 11, 13, 0.98) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] header.collapsed,
[data-theme="dark"] header#navbar.collapsed {
  background-color: rgba(10, 11, 13, 0.98) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
}

.logo {
  font-family: var(--font-body), sans-serif;
  font-size: var(--ts-xl);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  height: 100%;
  gap: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border-grey);
  background: transparent;
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: var(--ts-sm);
  font-weight: 500;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border-radius: 0;
  margin: 0 0 0 -1px;
  box-sizing: border-box;
  text-decoration: none;
}

.nav-btn:hover {
  background-color: var(--off-white);
  color: var(--near-black);
}

.nav-btn.active {
  background-color: var(--near-black) !important;
  color: var(--pure-white) !important;
  border-left-color: var(--near-black);
  border-right-color: var(--near-black);
}

/* Nav text link — used for AI Font Finder */
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border-grey);
  background: transparent;
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: var(--ts-sm);
  font-weight: 600;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border-radius: 0;
  margin: 0 0 0 -1px;
  box-sizing: border-box;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  background-color: var(--off-white);
  color: var(--near-black);
}

.nav-link--active {
  color: var(--near-black);
  background-color: var(--off-white);
}

.dark-toggle-btn {
  width: 64px;
  padding: 0;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  border: none !important;
  border-left: 1px solid var(--border-grey) !important;
  border-right: 1px solid var(--border-grey) !important;
  border-radius: 0 !important;
  padding: 0 1.25rem !important;
  background-color: transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  width: 280px;
  height: 100% !important;
  align-self: stretch !important;
  box-sizing: border-box;
}

.search-container:focus-within {
  border-color: var(--border-grey) !important;
  background-color: rgba(255,255,255,0.12);
  width: 320px;
}

.search-container input {
  width: 100%;
  padding-left: 0.5rem;
  font-size: var(--ts-sm);
}

.search-container svg {
  width: 16px;
  height: 16px;
  color: var(--surface-dark);
}

.search-clear-icon {
  cursor: pointer;
  padding: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  color: #999 !important;
}

.search-clear-icon:hover {
  color: var(--signal-red) !important;
  transform: scale(1.1);
}

.search-clear-icon.visible {
  opacity: 1;
  pointer-events: all;
}

.nav-link {
  font-size: var(--ts-sm);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.nav-link:hover {
  border-bottom-color: var(--near-black);
}

/* Navigation bar adaptive links and buttons */
#vault-btn {
  border: 1px solid var(--border-grey) !important;
  border-radius: 0 !important; /* rectangular */
  color: var(--near-black) !important;
  background-color: transparent !important;
  transition: var(--transition-smooth);
}

#vault-btn:hover,
#vault-btn.active {
  background-color: var(--near-black) !important;
  color: var(--pure-white) !important;
  border-color: var(--near-black) !important;
}

#submit-font-nav-btn {
  color: var(--near-black) !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: var(--ts-sm) !important;
  transition: var(--transition-smooth);
  border: none !important;
  border-bottom: 1px solid transparent !important;
  padding-bottom: 2px !important;
  cursor: pointer !important;
  background: none !important;
}

#submit-font-nav-btn:hover {
  color: var(--near-black) !important;
  border-bottom-color: var(--near-black) !important;
  opacity: 0.8 !important;
}

/* Uniform font-family and medium weight for nav actions */
.nav-actions .nav-link,
#vault-btn,
#search-input {
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: var(--ts-sm) !important;
}

/* ═══════════════════════════════════════════════
   HERO — Liquid Glass Aurora
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  background-color: #050505;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10rem 2rem 6rem;
  margin-top: -64px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ── Layer 1: Aurora gradient blobs ── */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
  will-change: transform, opacity;
}

.hero-blob--1 {
  width: 700px;
  height: 700px;
  top: -180px;
  left: -180px;
  background: radial-gradient(circle at 40% 40%, #7C3AED 0%, rgba(79,70,229,0.4) 50%, transparent 70%);
  opacity: 0.65;
  animation: blobFloat1 18s ease-in-out infinite alternate;
}

.hero-blob--2 {
  width: 600px;
  height: 600px;
  top: 0;
  right: -150px;
  background: radial-gradient(circle at 60% 40%, #EC4899 0%, rgba(124,58,237,0.35) 50%, transparent 70%);
  opacity: 0.5;
  animation: blobFloat2 24s ease-in-out infinite alternate;
}

.hero-blob--3 {
  width: 550px;
  height: 550px;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 60%, #4F46E5 0%, rgba(6,182,212,0.25) 50%, transparent 70%);
  opacity: 0.55;
  animation: blobFloat3 30s ease-in-out infinite alternate;
}

@keyframes blobFloat1 {
  0%   { transform: translate(0, 0)     scale(1)    rotate(0deg);   }
  33%  { transform: translate(60px, 40px)  scale(1.08) rotate(3deg);  }
  66%  { transform: translate(20px, 80px)  scale(0.95) rotate(-2deg); }
  100% { transform: translate(80px, 20px)  scale(1.05) rotate(5deg);  }
}

@keyframes blobFloat2 {
  0%   { transform: translate(0, 0)     scale(1)    rotate(0deg);   }
  33%  { transform: translate(-50px, 60px) scale(1.1)  rotate(-4deg); }
  66%  { transform: translate(-80px, 20px) scale(0.92) rotate(2deg);  }
  100% { transform: translate(-30px, 70px) scale(1.06) rotate(-3deg); }
}

@keyframes blobFloat3 {
  0%   { transform: translateX(-50%) translate(0, 0)      scale(1)    rotate(0deg);   }
  33%  { transform: translateX(-50%) translate(40px, -50px) scale(1.07) rotate(2deg);  }
  66%  { transform: translateX(-50%) translate(-40px, -30px) scale(0.97) rotate(-3deg); }
  100% { transform: translateX(-50%) translate(20px, -60px) scale(1.04) rotate(4deg);  }
}

/* ── Layer 2: Grid pattern ── */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* ── Layer 3: Glass overlay ── */
.hero-glass-pane {
  position: absolute;
  inset: 0;
  background: rgba(5,5,5,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3;
  pointer-events: none;
}

/* ── Layer 4: Radial spotlight ── */
.hero-spotlight {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle at center, rgba(124,58,237,0.18) 0%, rgba(79,70,229,0.08) 35%, transparent 65%);
  z-index: 4;
  pointer-events: none;
}

/* ── Layer 5: Floating orbs ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
}

.hero-orb--a {
  width: 80px;
  height: 80px;
  top: 18%;
  left: 12%;
  background: rgba(124,58,237,0.18);
  filter: blur(12px);
  box-shadow: 0 0 60px rgba(124,58,237,0.4);
  animation: orbDrift 14s ease-in-out infinite alternate;
}

.hero-orb--b {
  width: 140px;
  height: 140px;
  top: 60%;
  left: 8%;
  background: rgba(79,70,229,0.12);
  filter: blur(18px);
  box-shadow: 0 0 80px rgba(79,70,229,0.3);
  animation: orbDrift 20s ease-in-out infinite alternate-reverse;
}

.hero-orb--c {
  width: 60px;
  height: 60px;
  top: 25%;
  right: 10%;
  background: rgba(236,72,153,0.2);
  filter: blur(10px);
  box-shadow: 0 0 50px rgba(236,72,153,0.35);
  animation: orbDrift 16s ease-in-out infinite alternate;
  animation-delay: -6s;
}

.hero-orb--d {
  width: 100px;
  height: 100px;
  bottom: 20%;
  right: 18%;
  background: rgba(6,182,212,0.12);
  filter: blur(16px);
  box-shadow: 0 0 70px rgba(6,182,212,0.25);
  animation: orbDrift 22s ease-in-out infinite alternate-reverse;
  animation-delay: -10s;
}

.hero-orb--e {
  width: 50px;
  height: 50px;
  bottom: 30%;
  left: 30%;
  background: rgba(167,139,250,0.25);
  filter: blur(8px);
  box-shadow: 0 0 40px rgba(167,139,250,0.4);
  animation: orbDrift 12s ease-in-out infinite alternate;
  animation-delay: -4s;
}

@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(16px, -20px) scale(1.08); }
}

/* ── Layer 6: Noise texture ── */
.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  z-index: 5;
  pointer-events: none;
}

/* ── Layer 7: Hero content ── */
.hero-content {
  position: relative;
  z-index: 6;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #c4b5fd;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(167,139,250,0.25);
  padding: 0.4rem 1.1rem;
  border-radius: 99px;
  margin-bottom: 2.25rem;
  box-shadow: 0 0 24px rgba(124,58,237,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7.5vw, 5.2rem);
  line-height: 1.02;
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: #fff;
  text-shadow:
    0 0 20px rgba(124,58,237,0.35),
    0 0 60px rgba(124,58,237,0.18);
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, #c4b5fd 45%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(167,139,250,0.5));
}

.hero-subline {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255,255,255,0.55);
  margin-bottom: 3rem;
  max-width: 580px;
  line-height: 1.65;
}

/* ── Glass CTA buttons ── */
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  box-shadow: 0 2px 20px rgba(124,58,237,0.15), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-glass:hover,
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(124,58,237,0.45), 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  border-color: rgba(167,139,250,0.4);
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(167,139,250,0.12));
}

.btn-glass-outline {
  background: transparent;
  border: 1px solid rgba(167,139,250,0.35);
  color: #c4b5fd;
  backdrop-filter: blur(12px);
  text-decoration: none;
  box-shadow: 0 0 20px rgba(124,58,237,0.1);
  transition: var(--transition-smooth);
}

.btn-glass-outline:hover {
  transform: translateY(-2px);
  background: rgba(124,58,237,0.12);
  border-color: rgba(167,139,250,0.6);
  color: #e9d5ff;
  box-shadow: 0 0 40px rgba(124,58,237,0.3);
}

/* ── Cursor glow ── */
.hero-cursor-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
  filter: blur(20px);
}

.hero:hover .hero-cursor-glow {
  opacity: 1;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  z-index: 6;
  animation: pulse-arrow 2s infinite ease-in-out;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.scroll-indicator:hover { opacity: 1; }

@keyframes pulse-arrow {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 0.8; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.2rem;
  border-radius: 4px;
  font-size: var(--ts-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-height: 48px;
}

.btn-primary {
  background-color: var(--pure-white);
  color: var(--near-black);
}

.btn-primary:hover {
  background-color: var(--off-white);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--signal-red);
  color: var(--pure-white);
}

.btn-secondary:hover {
  background-color: rgba(255, 59, 0, 0.1);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  z-index: 2;
  animation: pulse-arrow 2s infinite ease-in-out;
  cursor: pointer;
}

@keyframes pulse-arrow {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* --- SIDEBAR FILTERS & LAYOUT --- */
.content-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
  border-bottom: 1px solid var(--border-grey);
}

.sidebar-filters {
  position: -webkit-sticky;
  position: sticky;
  top: 48px !important;
  align-self: start;
  z-index: 99;
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 2rem 2rem; /* padding-left set to 2rem */
  margin-top: 0;
  color: var(--near-black);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.grid-area {
  border-left: 1px solid var(--border-grey);
}

header.collapsed ~ #main-content .sidebar-filters,
header.collapsed ~ * .sidebar-filters,
header.collapsed ~ .main-container .sidebar-filters {
  top: 48px !important;
}

header:not(.collapsed) ~ #main-content .sidebar-filters,
header:not(.collapsed) ~ * .sidebar-filters {
  top: 64px !important;
}

.sidebar-filters::-webkit-scrollbar {
  width: 4px;
}
.sidebar-filters::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-filters::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.sidebar-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-grey);
  padding: 0 2rem 0.8rem 0; /* padding-right reduced to 2rem */
  box-sizing: border-box;
}

.sidebar-filters-header h3 {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--near-black);
}

.sidebar-filters .filter-groups {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-right: 2rem; /* padding-right reduced to 2rem */
  box-sizing: border-box;
}

.sidebar-filters .filter-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0.25rem; /* reduced spacing between headings */
  transition: margin-bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-filters .filter-group[open] {
  margin-bottom: 0.75rem; /* reduced open spacing */
}

.sidebar-filters .filter-group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  outline: none;
  list-style: none;
  color: var(--near-black);
  opacity: 1;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.4rem 0; /* reduced padding */
  margin-top: 0.5rem; /* reduced margin top */
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-grey); /* single dividing line below */
  transition: opacity 0.2s ease;
}

.sidebar-filters .filter-group-title::-webkit-details-marker {
  display: none;
}

.sidebar-filters .filter-group-title::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 400;
  transition: none;
}

.sidebar-filters .filter-group[open] .filter-group-title::after {
  content: '−';
  transform: none;
}

.sidebar-filters .pill-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, padding-top 0.2s ease;
}

.sidebar-filters .filter-group[open] .pill-container {
  max-height: 300px;
  opacity: 1;
  padding-top: 0.75rem;
}

.sidebar-filters .pill {
  font-size: var(--ts-xs);
  color: var(--near-black);
  opacity: 0.7;
  cursor: pointer;
  padding: 4px 10px;
  margin-left: -10px;
  transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  background: transparent !important;
  border: none !important;
  border-radius: 4px !important;
  height: auto !important;
  white-space: nowrap;
}

.sidebar-filters .pill:hover {
  opacity: 1;
  color: var(--signal-red) !important;
  background-color: rgba(255, 75, 43, 0.04) !important;
}

.sidebar-filters .pill.active {
  color: var(--signal-red) !important;
  font-weight: 700 !important;
  background-color: rgba(255, 75, 43, 0.08) !important;
  border: none !important;
}

[data-theme="dark"] .sidebar-filters .pill.active {
  background-color: rgba(255, 75, 43, 0.12) !important;
}

.sidebar-filters .divider {
  display: none; /* Hide dividers in sidebar */
}

.sidebar-filters .clear-all {
  color: var(--signal-red) !important;
  font-size: var(--ts-xs);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  display: none;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.sidebar-filters .clear-all:hover {
  text-decoration: underline;
  opacity: 0.8;
}


/* --- MAIN CONTENT & GRID --- */
.main-container {
  max-width: 100%;
  margin: 0;
  padding: 3rem 1.5rem;
  width: 100%;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--ts-3xl);
  font-weight: 400;
  margin-bottom: 2rem;
}

.masonry-grid {
  display: flex;
  flex-direction: column;
  gap: 0; /* Continuous grid layout */
  width: 100%;
}


.font-card {
  background-color: transparent;
  border-bottom: 1px solid var(--border-grey);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  cursor: text; /* Text edit cursor */
  width: 100%;
  min-height: 320px;  /* grows taller when large text wraps */
  padding: 2rem 1.5rem 2rem 3rem; /* Indented left padding to touch divider */
  box-sizing: border-box;
  overflow-x: hidden; /* never produce horizontal scroll */
  
  /* Infinite scroll emerge animation */
  opacity: 0;
  transform: translateY(40px);
  animation: emergeCard 0.6s var(--easing-spring) forwards;
}

@keyframes emergeCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.font-card:hover {
  background-color: #121212; /* slightly brightens card since default is #0B0B0B */
}

[data-theme="light"] .font-card:hover {
  background-color: #F9F9F9; /* light mode hover */
}

/* Card Header, Body, Footer structure */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.font-name-label {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--near-black);
  opacity: 0.6;
}

.card-meta-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: var(--near-black);
}

.card-meta-right .meta-item {
  border: 1px solid var(--border-grey);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  opacity: 0.6;
}

.card-body-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.huge-preview-text {
  font-size: var(--preview-font-size, 120px);
  text-align: left;
  line-height: 1.1;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: var(--near-black);
  transition: font-size 0.1s ease;
  outline: none;
  cursor: text;
}
/* When user has activated inline editing, don't clip text */
.huge-preview-text[contenteditable="true"] {
  cursor: text;
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
}

.foundry-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* Font Uploader Card Styles */
.uploader-dropzone {
  border-color: var(--border-grey) !important;
  background-color: rgba(0, 0, 0, 0.01) !important;
}
.uploader-dropzone.dragover {
  border-color: var(--signal-red) !important;
  background-color: rgba(255, 59, 0, 0.05) !important;
  box-shadow: 0 0 20px rgba(255, 59, 0, 0.15) !important;
}
.uploader-dropzone.dragover svg {
  transform: translateY(-5px);
  color: var(--signal-red) !important;
}
[data-theme="dark"] .uploader-dropzone {
  border-color: #2A2A2A !important;
  background-color: rgba(255, 255, 255, 0.01) !important;
}
[data-theme="dark"] .uploader-dropzone.dragover {
  border-color: #00f3ff !important;
  background-color: rgba(0, 243, 255, 0.05) !important;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.15) !important;
}
[data-theme="dark"] .uploader-dropzone.dragover svg {
  color: #00f3ff !important;
}

.card-font-name {
  font-family: var(--font-display);
  font-size: var(--ts-lg);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.card-tags {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: #777;
  margin-bottom: 1.2rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-grey);
  padding-top: 1rem;
}

.card-status {
  font-size: var(--ts-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.green { background-color: #00C853; }
.status-dot.grey { background-color: #9E9E9E; }

.card-btn {
  font-size: var(--ts-sm);
  font-weight: 600;
  color: var(--near-black);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-btn:hover {
  color: var(--signal-red);
}

/* --- DETAIL BOTTOM SHEET / PANEL --- */
.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.detail-panel {
  position: fixed;
  background-color: var(--pure-white);
  z-index: 201;
  transition: transform 0.4s var(--easing-spring);
  display: flex;
  flex-direction: column;
}

/* Mobile style bottom drawer */
@media (max-width: 1024px) {
  .detail-panel {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .detail-panel.active {
    transform: translateY(0);
  }
}

/* Desktop style slide-in panel */
@media (min-width: 1025px) {
  .detail-panel {
    top: 0;
    right: 0;
    width: 480px;
    height: 100vh;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
  }
  .detail-panel.active {
    transform: translateX(0);
  }
}

.detail-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-grey);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-header-title {
  font-family: var(--font-display);
  font-size: var(--ts-xl);
}

.close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--off-white);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.close-btn:hover {
  background-color: var(--border-grey);
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.specimen-preview-box {
  background-color: var(--off-white);
  border: 1px dashed var(--border-grey);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.specimen-text {
  font-size: 2.5rem;
  line-height: 1.2;
  word-break: break-word;
  min-height: 100px;
}

.specimen-controls {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 1px solid var(--border-grey);
  padding-top: 1rem;
}

.specimen-input-wrap {
  display: flex;
  background-color: var(--pure-white);
  border: 1px solid var(--border-grey);
  border-radius: 4px;
  padding: 0.5rem;
}

.specimen-input-wrap input {
  width: 100%;
  font-size: var(--ts-sm);
}

.size-slider-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: #666;
}

.size-slider-wrap input {
  width: 70%;
  accent-color: var(--near-black);
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-grey);
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.8rem 0;
  text-align: center;
  font-size: var(--ts-sm);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #777;
}

.tab-btn.active {
  border-bottom-color: var(--near-black);
  color: var(--near-black);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  font-size: var(--ts-sm);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: #777;
}

.info-value {
  font-weight: 600;
}

.detail-desc {
  grid-column: span 2;
  color: #555;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.badge-license {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  font-weight: 600;
  margin-top: 1rem;
}

.detail-cta-panel {
  padding: 1.5rem;
  border-top: 1px solid var(--border-grey);
  background-color: var(--pure-white);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.cta-price-tag {
  font-size: var(--ts-sm);
  color: #555;
  text-align: center;
}

.btn-full {
  width: 100%;
}

.btn-black {
  background-color: var(--near-black);
  color: var(--pure-white);
}

.btn-black:hover {
  background-color: #222;
}

/* Confirm tooltip styling */
.download-confirm-tooltip {
  background-color: var(--surface-dark);
  color: var(--pure-white);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: var(--ts-xs);
  font-family: var(--font-mono);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  display: none;
}

.download-confirm-tooltip.active {
  display: block;
}

/* --- CURATED COLLECTIONS --- */
.collections-section {
  background-color: var(--off-white);
  padding: 6rem 2rem;
  border-top: 1px solid var(--border-grey);
  border-bottom: 1px solid var(--border-grey);
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.collection-card {
  aspect-ratio: 1;
  background-color: var(--near-black);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  color: var(--pure-white);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.collection-card:hover {
  transform: translateY(-4px);
}

.collection-bg-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 1rem;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 2rem;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.collection-card:hover .collection-bg-preview {
  opacity: 0.25;
  transform: scale(1.05);
}

.collection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

.collection-content {
  position: relative;
  z-index: 2;
}

.collection-title {
  font-family: var(--font-display);
  font-size: var(--ts-xl);
  font-weight: 400;
  margin-bottom: 4px;
}

.collection-count {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: var(--border-grey);
}

/* --- FOOTER --- */
footer {
  background-color: var(--off-white);
  color: var(--near-black);
  padding: 5rem 2rem 2rem;
  border-top: 1px solid var(--border-grey);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 4rem;
  border-bottom: 1px solid var(--border-grey);
  padding-bottom: 4rem;
}

.footer-branding .logo {
  font-size: var(--ts-2xl);
  margin-bottom: 1rem;
}

.footer-branding p {
  color: var(--text-secondary);
  max-width: 320px;
  font-size: var(--ts-sm);
}

.footer-links h4, .footer-newsletter h4 {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--near-black);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  font-size: var(--ts-sm);
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--signal-red);
}

.footer-newsletter p {
  font-size: var(--ts-sm);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  border-bottom: 1px solid var(--border-grey);
  padding-bottom: 0.5rem;
}

.newsletter-form input {
  width: 100%;
  color: var(--pure-white);
  font-size: var(--ts-sm);
}

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

.newsletter-form button {
  color: var(--pure-white);
  cursor: pointer;
}

.newsletter-form button:hover {
  color: var(--signal-red);
}

.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: var(--text-secondary);
}

/* --- FOOTER CREDIT LINE --- */
.footer-credit {
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.footer-credit-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-credit-link:hover {
  color: var(--near-black);
  opacity: 1;
}

[data-theme="dark"] .footer-credit-link:hover {
  color: #f0efec;
}

/* --- LOGO IMAGE: theme-aware --- */
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.logo-img {
  height: 24px;
  width: auto;
  display: block;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.logo-img-dark  { display: block; }
.logo-img-light { display: none; }

[data-theme="dark"] .logo-img-dark  { display: none; }
[data-theme="dark"] .logo-img-light { display: block; }

.footer-branding .logo-img { height: 28px; }

@media (max-width: 768px) {
  .logo-img { height: 20px; }
  .footer-branding .logo-img { height: 22px; }
}


/* --- RESPONSIVE LAYOUTS --- */
@media (max-width: 1024px) {
  .global-preview-bar {
    flex-direction: column !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
    align-items: stretch !important;
  }
  .toolbar-controls-group {
    margin-left: 0 !important;
    border-left: none !important;
    padding-left: 0 !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    width: 100% !important;
  }
  .toolbar-slider-wrap, .toolbar-sort-wrap, .toolbar-display-wrap {
    border-left: none !important;
    padding-left: 0 !important;
  }
  .content-layout {
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
  }
  .sidebar-filters {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 76px !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto;
    padding: 0 0 2rem 1.5rem !important;
    border-right: none !important;
    border-bottom: none !important;
  }
  .masonry-grid {
    flex-direction: column;
  }
  .font-card {
    flex-direction: column !important;
    min-height: auto !important;
    padding: 1.5rem !important;
  }
  .card-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
  .card-meta-right {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
  .card-size-slider-wrap {
    display: none !important;
  }
  .card-footer-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  .card-footer-right {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .card-info {
    width: 100% !important;
    order: 2 !important;
    border-right: none !important;
    border-top: 1px solid var(--border-grey) !important;
  }
  .card-preview-wrapper {
    width: 100% !important;
    order: 1 !important;
  }
  .card-preview-wrapper .card-mockup {
    aspect-ratio: 16/10 !important;
    height: auto !important;
    min-height: 220px !important;
    border-bottom: 1px solid var(--border-grey) !important;
  }
  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ========================================
   RESPONSIVE NAVBAR — Tablet + Mobile
   Breakpoint: ≤1024px
   Layout: [FONTVAULT logo] ... [🌙] [☰]
   All nav links + search live inside
   the slide-down mobile menu panel.
======================================== */

/* Hidden by default on desktop */
.hamburger-btn { display: none; }
.mobile-menu   { display: none; }
.mobile-search-wrap { display: none; }

/* ── Tablet + Mobile (≤1024px) ── */
@media (max-width: 1024px) {

  /* --- Navbar shell --- */
  header#navbar {
    height: 60px !important;
    padding: 0 1rem 0 1.25rem !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    position: relative !important; top: auto !important;
    top: 0 !important;
    z-index: 200 !important;
    overflow: visible !important;
  }
  header#navbar.collapsed { height: 60px !important; }

  /* --- Hide desktop-only items --- */
  .nav-actions .nav-link,
  .nav-actions .search-container,
  #vault-btn,
  #submit-font-nav-btn {
    display: none !important;
  }

  /* --- nav-actions becomes a flex row on the right --- */
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    align-self: auto !important;
    height: auto !important;
    gap: 0.5rem !important;
    margin-left: auto !important;
  }

  /* --- Dark toggle: keep visible, clean up --- */
  #dark-toggle.dark-toggle-btn {
    display: inline-flex !important;
    height: 36px !important;
    width: 36px !important;
    padding: 0 !important;
    border: 1px solid var(--border-grey) !important;
    border-radius: 50% !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  /* --- Hamburger button --- */
  .hamburger-btn {
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    background: transparent !important;
    border: 1px solid var(--border-grey) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    z-index: 210 !important;
    transition: background 0.2s ease !important;
  }
  .hamburger-btn:hover            { background: var(--off-white) !important; }
  [data-theme="dark"] .hamburger-btn:hover { background: #2A2A2A !important; }

  .hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
    transform-origin: center;
  }
  .hamburger-btn.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger-btn.open .hamburger-line:nth-child(2) { opacity: 0; }
  .hamburger-btn.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ── Mobile menu panel ── */
  .mobile-menu {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: var(--pure-white) !important;
    border-bottom: 1px solid var(--border-grey) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08) !important;
    z-index: 199 !important;
    padding: 0.75rem 0 !important;
    /* Hidden state */
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1),
                opacity 0.25s ease,
                visibility 0.25s ease !important;
  }
  [data-theme="dark"] .mobile-menu {
    background-color: #111 !important;
    border-color: #2A2A2A !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5) !important;
  }
  .mobile-menu.open {
    max-height: 80vh !important;
    overflow-y: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* --- Search bar inside mobile menu --- */
  .mobile-search-wrap {
    display: block !important;
    padding: 0.75rem 1.25rem 0.5rem !important;
    border-bottom: 1px solid var(--border-grey) !important;
  }
  [data-theme="dark"] .mobile-search-wrap { border-color: #2A2A2A !important; }

  .mobile-search-wrap .mobile-search-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    background: var(--off-white) !important;
    border: 1px solid var(--border-grey) !important;
    border-radius: 10px !important;
    padding: 0.55rem 0.9rem !important;
  }
  [data-theme="dark"] .mobile-search-wrap .mobile-search-input-row {
    background: #1A1A1A !important;
    border-color: #333 !important;
  }
  .mobile-search-wrap svg {
    width: 16px; height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
  }
  .mobile-search-wrap input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-family: var(--font-body) !important;
    font-size: 16px !important;
    color: var(--text-primary) !important;
  }
  .mobile-search-wrap input::placeholder { color: var(--text-secondary); }

  /* --- Nav links inside mobile menu --- */
  .mobile-menu-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.85rem 1.5rem !important;
    text-align: left !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: var(--font-body) !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background 0.15s ease !important;
  }
  .mobile-menu-item:hover { background: var(--off-white) !important; }
  [data-theme="dark"] .mobile-menu-item:hover { background: #1E1E1E !important; }

  .mobile-menu-item.active {
    color: var(--accent) !important;
    font-weight: 600 !important;
  }

  /* Divider between groups */
  .mobile-menu-divider {
    height: 1px;
    background: var(--border-grey);
    margin: 0.5rem 0;
  }
  [data-theme="dark"] .mobile-menu-divider { background: #2A2A2A; }

  /* Vault button inside menu gets accent style */
  .mobile-menu-item.accent-item {
    color: var(--near-black) !important;
    font-weight: 600 !important;
    background: var(--off-white) !important;
    margin: 0.5rem 1.25rem !important;
    border-radius: 10px !important;
    width: calc(100% - 2.5rem) !important;
    justify-content: center !important;
    border: 1px solid var(--border-grey) !important;
  }
  [data-theme="dark"] .mobile-menu-item.accent-item {
    background: #1E1E1E !important;
    border-color: #333 !important;
    color: #fff !important;
  }
  .mobile-menu-item.accent-item:hover { opacity: 0.8 !important; }

  /* --- Logo stays left --- */
  .logo { flex-shrink: 0; }

} /* end @media ≤1024px */

/* ── Mobile only (≤480px) — tighten spacing ── */
@media (max-width: 480px) {
  header#navbar {
    padding: 0 0.75rem 0 1rem !important;
    height: 56px !important;
  }
  .logo { font-size: 1rem !important; letter-spacing: -0.02em !important; }
  #dark-toggle.dark-toggle-btn {
    width: 32px !important; height: 32px !important;
  }
  .hamburger-btn {
    width: 32px !important; height: 32px !important;
  }
}

/* ── Small mobile content tweaks (≤640px) ── */
@media (max-width: 640px) {
  .sidebar-filters-header {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
  }
  .sidebar-filters.expanded .sidebar-filters-header {
    margin-bottom: 1.5rem;
  }
  .sidebar-filters-header h3::after {
    content: ' ▾';
    display: inline-block;
    transition: transform 0.25s ease;
  }
  .sidebar-filters.expanded .sidebar-filters-header h3::after {
    transform: rotate(180deg);
  }
  .sidebar-filters .filter-groups {
    display: none;
  }
  .sidebar-filters.expanded .filter-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
  }
  .sidebar-filters .filter-group {
    flex: 0 0 auto;
  }
  .hero-headline {
    font-size: var(--ts-3xl);
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
  }
  .masonry-grid {
    flex-direction: column;
  }
  .collections-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ========================================
   SCROLL PROGRESS BAR
======================================== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--signal-red);
  z-index: 9999;
  width: 0%;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ========================================
   DARK MODE TOGGLE BUTTON
======================================== */
.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-grey);
  cursor: pointer;
  background: transparent;
  color: var(--near-black);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.dark-toggle:hover {
  background: var(--near-black);
  color: var(--pure-white);
}

/* ========================================
   DARK MODE
======================================== */
[data-theme="dark"] {
  --pure-white: #0D0D0D;
  --near-black: #F0F0F0;
  --surface-dark: #1E1E1E;
  --off-white: #161616;
  --border-grey: #2A2A2A;

  /* Matte card backgrounds */
  --matte-0: #2A1E1E;
  --matte-1: #1C2720;
  --matte-2: #1D232C;
  --matte-3: #2A261C;
  --matte-4: #241E2A;
  --matte-5: #2A221C;
  --matte-6: #1A2625;
  --matte-7: #1E1F21;
  --thumbnail-bg: #1E1F21;
}
[data-theme="dark"] body { background-color:#0D0D0D; color:#F0F0F0; }
[data-theme="dark"] header.navbar-scrolled { background-color:rgba(13,13,13,0.95); border-color:#2A2A2A; }
[data-theme="dark"] .grid-area { border-color:#2A2A2A; }
[data-theme="dark"] .font-card { background:#141414; border-color:#2A2A2A; }
[data-theme="dark"] .font-card:hover { border-color:#555; box-shadow:0 20px 60px rgba(0,0,0,0.5); }
[data-theme="dark"] .collections-section { background:#111; }
[data-theme="dark"] .collection-card { border-color:#2A2A2A; }
[data-theme="dark"] .detail-panel { background:#141414; border-color:#2A2A2A; }
[data-theme="dark"] .detail-header { border-color:#2A2A2A; }
[data-theme="dark"] .specimen-preview-box { background:#1A1A1A; border-color:#2A2A2A; }
[data-theme="dark"] .specimen-text { color:#F0F0F0; }
[data-theme="dark"] .specimen-controls { border-color:#2A2A2A; }
[data-theme="dark"] .tab-nav { border-color:#2A2A2A; }
[data-theme="dark"] .tab-btn { color:#888; }
[data-theme="dark"] .tab-btn.active { color:#F0F0F0; }
[data-theme="dark"] .info-item { border-color:#2A2A2A; }
[data-theme="dark"] .detail-cta-panel { background:#1A1A1A; border-color:#2A2A2A; }
[data-theme="dark"] footer { background: #0A0B0D !important; border-color: rgba(255, 255, 255, 0.08) !important; }
[data-theme="dark"] .footer-bottom { border-color: var(--border-grey); }
[data-theme="dark"] .sidebar-filters-header h3 { color:#F0F0F0; }
[data-theme="dark"] #search-input { color:#F0F0F0; }
[data-theme="dark"] .search-container { border-color:#333; }
[data-theme="dark"] .search-container svg { color:#666; }
[data-theme="dark"] .trending-card { background:#141414; border-color:#2A2A2A; }
[data-theme="dark"] .trending-card:hover { border-color:#555; }
[data-theme="dark"] .compare-overlay { background:#0D0D0D; }
[data-theme="dark"] .compare-overlay-header { border-color:#2A2A2A; background:#0D0D0D; }
[data-theme="dark"] .compare-col { background:#141414; border-color:#2A2A2A; }
[data-theme="dark"] .compare-col-divider { border-color:#2A2A2A; }
[data-theme="dark"] .compare-shared-text-wrap input { background:#1A1A1A; border-color:#2A2A2A; color:#F0F0F0; }
[data-theme="dark"] .pairing-card { background:#1A1A1A; border-color:#2A2A2A; }
[data-theme="dark"] .pairing-card:hover { background:#222; border-color:#555; }
[data-theme="dark"] .compare-add-btn {
  background: transparent;
  border-color: #333;
  color: #F0F0F0;
}
[data-theme="dark"] .compare-add-btn:hover {
  background: #F5F2E8;
  color: #0B0B0B;
  border-color: #F5F2E8;
}
[data-theme="dark"] .compare-add-btn.in-compare {
  background: var(--signal-red);
  color: #FFF;
  border-color: var(--signal-red);
}
[data-theme="dark"] .compare-tray { background:#1A1A1A; }

[data-theme="light"] {
  --pure-white: #FFFFFF;
  --near-black: #0A0A0A;
  --text-secondary: #666666;
  --surface-dark: #F5F5F5;
  --off-white: #F5F5F5;
  --border-grey: #E0E0E0;
  --text-primary: var(--near-black);

  /* Matte card backgrounds */
  --matte-0: #FDEBEC;
  --matte-1: #EAF7EE;
  --matte-2: #ECF2FB;
  --matte-3: #FDF6E5;
  --matte-4: #F4ECFB;
  --matte-5: #FDF1E9;
  --matte-6: #E7F7F6;
  --matte-7: #F1F2F4;
  --thumbnail-bg: #EAEAEA;
}
[data-theme="light"] body { background-color:#FFFFFF; color:#0A0A0A; }
[data-theme="light"] header.navbar-scrolled { background-color:rgba(255,255,255,0.95); border-color:#E0E0E0; }
[data-theme="light"] .grid-area { border-color:#E0E0E0; }
[data-theme="light"] .font-card { background:transparent; border-color:#E0E0E0; }
[data-theme="light"] .font-card:hover { background-color:#F9F9F9; border-color:#0A0A0A; }
[data-theme="light"] .collections-section { background:#F5F5F5; }
[data-theme="light"] .collection-card { border-color:#E0E0E0; }
[data-theme="light"] .detail-panel { background:#FFFFFF; border-color:#E0E0E0; }
[data-theme="light"] .detail-header { border-color:#E0E0E0; }
[data-theme="light"] .specimen-preview-box { background:#F5F5F5; border-color:#E0E0E0; }
[data-theme="light"] .specimen-text { color:#0A0A0A; }
[data-theme="light"] .specimen-controls { border-color:#E0E0E0; }
[data-theme="light"] .tab-nav { border-color:#E0E0E0; }
[data-theme="light"] .tab-btn { color:#888; }
[data-theme="light"] .tab-btn.active { color:#0A0A0A; }
[data-theme="light"] .info-item { border-color:#E0E0E0; }
[data-theme="light"] .detail-cta-panel { background:#F5F5F5; border-color:#E0E0E0; }
[data-theme="light"] footer { background: var(--off-white); border-color: var(--border-grey); }
[data-theme="light"] .footer-bottom { border-color: var(--border-grey); }
[data-theme="light"] .sidebar-filters-header h3 { color:#0A0A0A; }
[data-theme="light"] #search-input { color:#0A0A0A; }
[data-theme="light"] .search-container { border-color:#E0E0E0; }
[data-theme="light"] .search-container svg { color:#888; }
[data-theme="light"] .trending-card { background:#FFFFFF; border-color:#E0E0E0; }
[data-theme="light"] .trending-card:hover { border-color:#0A0A0A; }
[data-theme="light"] .compare-overlay { background:#FFFFFF; }
[data-theme="light"] .compare-overlay-header { border-color:#E0E0E0; background:#FFFFFF; }
[data-theme="light"] .compare-col { background:#FFFFFF; border-color:#E0E0E0; }
[data-theme="light"] .compare-col-divider { border-color:#E0E0E0; }
[data-theme="light"] .compare-shared-text-wrap input { background:#F5F5F5; border-color:#E0E0E0; color:#0A0A0A; }
[data-theme="light"] .pairing-card { background:#F5F5F5; border-color:#E0E0E0; }
[data-theme="light"] .pairing-card:hover { background:#EAEAEA; border-color:#0A0A0A; }
[data-theme="light"] .compare-add-btn {
  background: transparent;
  border-color: #E0E0E0;
  color: #0A0A0A;
}
[data-theme="light"] .compare-add-btn:hover {
  background: #0A0A0A;
  color: #FFFFFF;
  border-color: #0A0A0A;
}
[data-theme="light"] .compare-add-btn.in-compare {
  background: var(--signal-red);
  color: #FFF;
  border-color: var(--signal-red);
}
[data-theme="light"] .compare-tray { background:#FFFFFF; }


/* ========================================
   STAGGER ENTRANCE ANIMATIONS
======================================== */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.font-card { 
  opacity: 0; 
  transform: translateY(30px);
}

.font-card.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ========================================
   TRENDING SECTION
======================================== */
.trending-section {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border-grey);
  overflow: hidden;
}
.trending-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0 2rem;
}
.trending-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--signal-red);
  font-weight: 600;
}
.trending-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-red);
  animation: pulseDot 1.6s ease infinite;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.35; transform:scale(0.65); }
}
.trending-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0 2rem 1.2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}
.trending-strip::-webkit-scrollbar { display:none; }
.trending-strip.grabbing { cursor:grabbing; }
.trending-card {
  flex-shrink: 0;
  width: 190px;
  height: 230px;
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  background: var(--pure-white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  overflow: hidden;
}
.trending-card:hover { border-color:var(--near-black); transform:translateY(-5px); box-shadow:0 16px 40px rgba(0,0,0,0.1); }
.trending-rank { font-family:var(--font-mono); font-size:0.6rem; color:#bbb; letter-spacing:0.08em; }
.trending-name { font-size:1.5rem; line-height:1.05; font-weight:400; }
.trending-meta { display:flex; flex-direction:column; gap:0.2rem; }
.trending-style-tag { font-family:var(--font-mono); font-size:0.58rem; text-transform:uppercase; letter-spacing:0.12em; color:#999; }
.trending-provider-tag { font-family:var(--font-mono); font-size:0.58rem; text-transform:uppercase; letter-spacing:0.1em; color:var(--signal-red); }

/* ========================================
   CARD LIVE PREVIEW & COMPARE BUTTON
======================================== */
.font-card { position:relative; overflow:hidden; }

.compare-add-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid var(--border-grey);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--near-black);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.compare-add-btn:hover {
  background: var(--near-black);
  color: var(--pure-white);
  border-color: var(--near-black);
}
.compare-add-btn.in-compare {
  opacity: 1;
  transform: scale(1);
  background: var(--signal-red);
  color: #fff;
  border-color: var(--signal-red);
}

.view-family-hover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 0 !important; /* Rectangular! */
  border: 1px solid var(--signal-red) !important;
  background-color: transparent !important;
  color: var(--signal-red) !important;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: none !important;
}

.view-family-hover-btn:hover {
  background-color: var(--signal-red) !important;
  color: #ffffff !important;
}

/* ── Download Button ── */
.card-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 0 !important;
  border: 1px solid var(--border-grey) !important;
  background-color: transparent !important;
  color: var(--near-black) !important;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.card-download-btn:hover {
  border-color: var(--near-black) !important;
  background-color: var(--near-black) !important;
  color: var(--pure-white) !important;
}

.card-download-btn.downloading {
  border-color: var(--signal-red) !important;
  color: var(--signal-red) !important;
  pointer-events: none;
}

.card-download-btn.downloaded {
  border-color: #22c55e !important;
  color: #22c55e !important;
}

[data-theme="dark"] .card-download-btn {
  border-color: #333 !important;
  color: #F0F0F0 !important;
}

[data-theme="dark"] .card-download-btn:hover {
  border-color: #F0F0F0 !important;
  background-color: #F0F0F0 !important;
  color: #0D0D0D !important;
}

.favorite-add-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--pure-white);
  border: 1px solid var(--border-grey);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-secondary);
}
.favorite-add-btn:hover { background: #f5f5f5; border-color: var(--near-black); color: var(--near-black); }
.favorite-add-btn.active { opacity:1; transform:scale(1); background:var(--pure-white); color:var(--signal-red); border-color:var(--signal-red); }
[data-theme="dark"] .favorite-add-btn { background:#1A1A1A; border-color:#333; color:#F0F0F0; }
[data-theme="dark"] .favorite-add-btn.active { color:var(--signal-red); border-color:var(--signal-red); }

/* ========================================
   COMPARE TRAY
======================================== */
.compare-tray {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 68px;
  background: var(--near-black);
  color: var(--pure-white);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
  z-index: 500;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  border-top: 2px solid var(--signal-red);
}
.compare-tray.visible { transform:translateY(0); }
.compare-tray-label { font-family:var(--font-mono); font-size:0.65rem; text-transform:uppercase; letter-spacing:0.12em; color:#888; flex-shrink:0; }
.compare-tray-fonts { display:flex; gap:0.6rem; flex:1; overflow:hidden; }
.compare-chip { display:flex; align-items:center; gap:0.5rem; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); border-radius:4px; padding:0.3rem 0.65rem; font-size:0.78rem; white-space:nowrap; animation:fadeUp 0.3s ease forwards; }
.compare-chip-remove { cursor:pointer; color:#888; line-height:1; transition:color 0.15s; font-size:1rem; }
.compare-chip-remove:hover { color:var(--signal-red); }
.compare-tray-actions { display:flex; gap:0.6rem; flex-shrink:0; }
.btn-compare-now { background:var(--signal-red); color:#fff; border:none; padding:0.55rem 1.3rem; border-radius:4px; cursor:pointer; font-family:var(--font-mono); font-size:0.72rem; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; transition:opacity 0.2s; }
.btn-compare-now:hover { opacity:0.85; }
.btn-compare-clear { background:transparent; color:#888; border:1px solid #444; padding:0.55rem 0.9rem; border-radius:4px; cursor:pointer; font-size:0.72rem; transition:var(--transition-smooth); }
.btn-compare-clear:hover { border-color:#aaa; color:#ccc; }

/* ========================================
   COMPARE OVERLAY
======================================== */
.compare-overlay {
  position: fixed; inset: 0;
  z-index: 900;
  background: var(--pure-white);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25,0.8,0.25,1);
}
.compare-overlay.visible { transform:translateY(0); }
.compare-overlay-header { display:flex; align-items:center; justify-content:space-between; padding:1rem 2rem; border-bottom:1px solid var(--border-grey); flex-shrink:0; background:var(--pure-white); }
.compare-overlay-title { font-family:var(--font-display); font-size:var(--ts-xl); }
.compare-overlay-controls { display:flex; align-items:center; gap:1rem; }
.compare-shared-text-wrap { display:flex; align-items:center; gap:0.5rem; font-size:0.75rem; color:#888; }
.compare-shared-text-wrap input { border:1px solid var(--border-grey); border-radius:4px; padding:0.4rem 0.75rem; font-size:0.8rem; width:200px; background:var(--pure-white); color:var(--near-black); }
.compare-overlay-close { width:36px; height:36px; border-radius:50%; border:1px solid var(--border-grey); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:var(--transition-smooth); background:transparent; color:var(--near-black); }
.compare-overlay-close:hover { background:var(--near-black); color:var(--pure-white); }
.compare-overlay-body { display:flex; flex:1; overflow:hidden; }
.compare-col { flex:1; border-right:1px solid var(--border-grey); display:flex; flex-direction:column; overflow-y:auto; padding:2rem; background:var(--pure-white); }
.compare-col:last-child { border-right:none; }
.compare-col-source { font-family:var(--font-mono); font-size:0.6rem; text-transform:uppercase; letter-spacing:0.12em; color:var(--signal-red); margin-bottom:0.25rem; }
.compare-col-name { font-family:var(--font-display); font-size:var(--ts-2xl); margin-bottom:0.25rem; }
.compare-col-style { font-family:var(--font-mono); font-size:0.65rem; color:#888; margin-bottom:2rem; }
.compare-specimen { font-size:2.8rem; line-height:1.15; min-height:100px; margin-bottom:2rem; word-break:break-word; }
.compare-col-divider { border:none; border-top:1px solid var(--border-grey); margin-bottom:1.5rem; }
.compare-col-meta { display:grid; grid-template-columns:1fr 1fr; gap:1rem 1.5rem; }
.compare-meta-item label { font-family:var(--font-mono); font-size:0.58rem; text-transform:uppercase; letter-spacing:0.12em; color:#999; display:block; margin-bottom:0.2rem; }
.compare-meta-item span { font-size:0.85rem; font-weight:500; }
.compare-col-download { margin-top:2rem; }

/* ========================================
   FONT PAIRING SECTION
======================================== */
.pairing-section { margin-top:2rem; padding-top:1.5rem; border-top:1px solid var(--border-grey); }
.pairing-section-title { font-family:var(--font-mono); font-size:0.62rem; text-transform:uppercase; letter-spacing:0.12em; color:#888; margin-bottom:1rem; }
.pairing-cards { display:flex; flex-direction:column; gap:0.65rem; }
.pairing-card { display:flex; align-items:center; gap:1rem; padding:0.75rem 1rem; border:1px solid var(--border-grey); border-radius:6px; cursor:pointer; transition:var(--transition-smooth); background:var(--pure-white); }
.pairing-card:hover { border-color:var(--near-black); background:var(--off-white); }
.pairing-preview { font-size:1.8rem; line-height:1; width:56px; text-align:center; flex-shrink:0; }
.pairing-info { flex:1; }
.pairing-role { font-family:var(--font-mono); font-size:0.58rem; text-transform:uppercase; letter-spacing:0.1em; color:var(--signal-red); margin-bottom:0.2rem; }
.pairing-name { font-size:0.88rem; font-weight:600; }
.pairing-style { font-size:0.72rem; color:#888; }
.pairing-arrow { color:#bbb; font-size:1rem; flex-shrink:0; }

/* ========================================
   RESPONSIVE — NEW FEATURES
======================================== */
@media (max-width:900px) {
  .trending-header { padding:0 1rem; }
  .trending-strip { padding:0 1rem 1rem; }
  .trending-card { width:155px; height:195px; padding:1rem; }
  .compare-overlay-body { flex-direction:column; overflow-y:auto; }
  .compare-col { border-right:none; border-bottom:1px solid var(--border-grey); }
  .compare-specimen { font-size:2rem; }
}
@media (max-width:640px) {
  .compare-tray { height:auto; min-height:60px; padding:0.75rem 1rem; flex-wrap:wrap; gap:0.5rem; }
  .compare-overlay-header { flex-direction:column; align-items:flex-start; gap:0.75rem; }
  .compare-shared-text-wrap input { width:130px; }
  .nav-link { display:none; }
  .nav-link { display:none; }
}

/* ========================================
   TRENDING AUTO-SCROLL (infinite marquee)
======================================== */
.trending-outer {
  overflow: hidden;
  position: relative;
  /* Fade edges for a premium feel */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.trending-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding: 1rem 2rem 3.5rem; /* Increased top/bottom padding to prevent hover cropping */
  animation: scrollMarquee 38s linear infinite;
  will-change: transform;
}

/* Pause entire strip on any hover within */
.trending-outer:hover .trending-track {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Highlight the hovered card */
.trending-card {
  transition: all 0.22s ease;
}

.trending-outer:hover .trending-card:not(:hover) {
  opacity: 0.55;
  transform: scale(0.97);
}

.trending-card:hover {
  opacity: 1 !important;
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
  border-color: var(--near-black) !important;
  background-color: var(--near-black) !important;
  color: var(--pure-white) !important;
  z-index: 2;
}

.trending-card:hover .trending-rank { color: #888 !important; }
.trending-card:hover .trending-style-tag {
  background: transparent !important;
  color: #aaa !important;
  border: none !important;
}
.trending-card:hover .trending-provider-tag {
  background: transparent !important;
  color: #FF7043 !important;
  border: none !important;
}

/* ========================================
   COLLECTION CARD — REAL IMAGE
======================================== */
.collection-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
  will-change: transform;
}

.collection-card:hover .collection-img {
  transform: scale(1.07);
}

/* Ensure overlay sits above image */
.collection-overlay {
  z-index: 1;
}

.collection-content {
  z-index: 2;
  position: relative;
}

/* ========================================
   SEARCH RESULT COUNT
======================================== */
.search-result-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0 1rem 3rem;
  display: none;
}

.search-result-count.visible { display: block; }

[data-theme="dark"] .search-result-count { color: #666; }



/* ========================================
   AUTH MODAL
======================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.auth-modal {
  background: var(--pure-white);
  color: var(--near-black);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 40px 120px rgba(0,0,0,0.25);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
  opacity: 0;
}

.auth-overlay.visible .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

[data-theme="dark"] .auth-modal {
  background: #1A1A1A;
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-grey);
  background: transparent;
  color: var(--near-black);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition-smooth);
}

.auth-close:hover {
  background: var(--near-black);
  color: var(--pure-white);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--off-white);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1.2rem;
}

[data-theme="dark"] .auth-tabs {
  background: #111;
}

.auth-tab {
  flex: 1;
  padding: 0.55rem 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  color: #888;
  transition: var(--transition-smooth);
}

.auth-tab.active {
  background: var(--pure-white);
  color: var(--near-black);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

[data-theme="dark"] .auth-tab.active {
  background: #2A2A2A;
  color: #F0F0F0;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: #888;
  text-align: center;
  margin-bottom: 1.4rem;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  background: var(--pure-white);
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: 1.2rem;
}

.btn-google:hover {
  background: var(--off-white);
  border-color: var(--near-black);
}

[data-theme="dark"] .btn-google {
  background: #222;
  border-color: #333;
  color: #F0F0F0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  color: #bbb;
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-grey);
}

.auth-field {
  margin-bottom: 1rem;
  position: relative;
}

.auth-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.4rem;
}

.auth-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--pure-white);
  color: var(--near-black);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--near-black);
}

[data-theme="dark"] .auth-field input {
  background: #222;
  border-color: #333;
  color: #F0F0F0;
}

.auth-forgot {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.72rem;
  color: #888;
  text-decoration: none;
}

.auth-forgot:hover { color: var(--signal-red); }

.btn-auth-submit {
  width: 100%;
  padding: 0.8rem;
  background: var(--near-black);
  color: var(--pure-white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  margin-top: 0.5rem;
}

.btn-auth-submit:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.auth-terms {
  font-size: 0.68rem;
  color: #aaa;
  text-align: center;
  margin-top: 1.2rem;
  line-height: 1.5;
}

.auth-terms a { color: #888; text-decoration: underline; }
.auth-terms a:hover { color: var(--signal-red); }

@media (max-width: 480px) {
  .auth-modal { padding: 2rem 1.25rem 1.5rem; max-width: 94vw; }
}

/* ========================================
   SEARCH DROPDOWN (MyFonts Style)
======================================== */
.search-container {
  position: relative;
  z-index: 1000;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: min(340px, 90vw); max-width: 100vw;
  background: var(--pure-white);
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-dropdown.visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

[data-theme="dark"] .search-dropdown {
  background: #1A1A1A;
  border-color: #333;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.search-dropdown-list {
  max-height: 350px;
  overflow-y: auto;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-grey);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover {
  background: var(--off-white);
}

[data-theme="dark"] .search-dropdown-item {
  border-color: #333;
}

[data-theme="dark"] .search-dropdown-item:hover {
  background: #222;
}

.search-dropdown-item-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.search-dropdown-name {
  font-size: 1.25rem;
  line-height: 1.1;
  /* Font family will be set dynamically inline */
}

.search-dropdown-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-dropdown-provider {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  background: var(--border-grey);
  border-radius: 4px;
  text-transform: uppercase;
}

[data-theme="dark"] .search-dropdown-provider {
  background: #333;
  color: #ccc;
}

.search-dropdown-footer {
  padding: 0.75rem 1rem;
  background: var(--off-white);
  border-top: 1px solid var(--border-grey);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  color: var(--near-black);
  transition: background 0.15s ease;
}

.search-dropdown-footer:hover {
  background: #e5e5e5;
}

[data-theme="dark"] .search-dropdown-footer {
  background: #222;
  border-color: #333;
  color: #F0F0F0;
}

/* ========================================
   GLOBAL TEXT PREVIEW BAR
======================================== */
.global-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  width: 100%;
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 48px !important;
  z-index: 90;
  background-color: var(--pure-white);
  box-sizing: border-box;
  border-bottom: 1px solid var(--border-grey);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  margin-bottom: 2rem;
}

/* Toolbar controls group */
.toolbar-controls-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1.5rem;
  border-left: 1px solid var(--border-grey);
  padding-left: 1.5rem;
}

.toolbar-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  opacity: 0.8;
  white-space: nowrap;
}

.size-input-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#global-size-input {
  width: 42px;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--border-grey);
  color: inherit;
  font-family: var(--font-mono);
  font-size: var(--ts-xs);
  text-align: right;
  margin-right: 2px;
  outline: none;
}

#global-size-reset {
  margin-left: 0.5rem;
  display: none;
}

.toolbar-sort-wrap {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border-grey);
  padding-left: 1.25rem;
}

.toolbar-select {
  background: var(--pure-white);
  color: var(--near-black);
  border: 1px solid var(--border-grey);
  border-radius: 0;
  padding: 5px 28px 5px 12px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23444444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.toolbar-select:hover {
  border-color: var(--near-black);
}

.toolbar-display-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 1px solid var(--border-grey);
  padding-left: 1.25rem;
}

.display-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.display-pill-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--off-white);
  padding: 3px;
  border-radius: 0;
  border: 1px solid var(--border-grey);
}

.display-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0;
  transition: all 0.2s ease;
}

.display-toggle-btn:hover:not(.active) {
  color: var(--near-black);
}

.display-toggle-btn.active {
  background: var(--pure-white);
  color: var(--near-black);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Dark theme overrides */
[data-theme="dark"] .toolbar-select {
  background-color: #141414;
  color: #f0f0f0;
  border-color: #2A2A2A;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cccccc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

[data-theme="dark"] .toolbar-select:hover {
  border-color: #555;
}

[data-theme="dark"] .display-pill-toggle {
  background: #1f1f1f;
  border-color: #2A2A2A;
}

[data-theme="dark"] .display-toggle-btn:hover:not(.active) {
  color: #fff;
}

[data-theme="dark"] .display-toggle-btn.active {
  background: #2d2d2d;
  color: var(--pure-white);
}

header.collapsed ~ #main-content .global-preview-bar,
header.collapsed ~ * .global-preview-bar,
header.collapsed ~ .main-container .global-preview-bar {
  top: 48px !important;
}

header:not(.collapsed) ~ #main-content .global-preview-bar,
header:not(.collapsed) ~ * .global-preview-bar {
  top: 64px !important;
}

.global-preview-clear {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  display: none;
  padding: 0.5rem;
  transition: color 0.2s;
  border-radius: 50%;
}

.global-preview-clear:hover {
  color: var(--near-black);
  background-color: rgba(0,0,0,0.05);
}

.global-preview-clear.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .global-preview-clear:hover {
  color: var(--pure-white);
  background-color: rgba(255,255,255,0.1);
}

#global-preview-input {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border-grey);
  border-radius: 0;
  background-color: var(--pure-white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
}

#global-preview-input:focus {
  outline: none;
  border-color: var(--near-black);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

[data-theme="dark"] #global-preview-input {
  background-color: #1A1A1A;
  border-color: #333;
  color: var(--pure-white);
}

[data-theme="dark"] #global-preview-input:focus {
  border-color: #555;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
[data-theme="dark"] .search-dropdown-footer:hover {
  background: #2a2a2a;
}
/* Custom Modern Sliders */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  margin: 10px 0;
}

input[type=range]:focus {
  outline: none;
}

/* Track */
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--border-grey);
  border-radius: 2px;
  transition: all 0.2s ease;
}

[data-theme="dark"] input[type=range]::-webkit-slider-runnable-track {
  background: #333;
}

/* Thumb */
input[type=range]::-webkit-slider-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--signal-red);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 0 0 2px var(--pure-white), 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

[data-theme="dark"] input[type=range]::-webkit-slider-thumb {
  box-shadow: 0 0 0 2px var(--near-black), 0 2px 5px rgba(0,0,0,0.5);
}

input[type=range]:hover::-webkit-slider-thumb {
  transform: scale(1.15);
}

input[type=range]:active::-webkit-slider-thumb {
  transform: scale(0.95);
  background: #e63500;
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--border-grey);
  border-radius: 2px;
}

input[type=range]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--signal-red);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 2px var(--pure-white), 0 2px 5px rgba(0,0,0,0.2);
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Futuristic Thumbnail CSS */
.futuristic-glass {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
}
[data-theme="dark"] .futuristic-glass {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.futuristic-text {
  color: #0A0A0A;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] .futuristic-text {
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.futuristic-designer {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: var(--signal-red);
}
[data-theme="dark"] .futuristic-designer {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.glow-orb {
  mix-blend-mode: multiply;
}
[data-theme="dark"] .glow-orb {
  mix-blend-mode: screen;
}

.tech-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: rgba(0,0,0,0.2);
  border-style: solid;
  border-width: 0;
}
[data-theme="dark"] .tech-corner {
  border-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .badge-custom {
  border: 1px solid rgba(0, 243, 255, 0.8);
  background-color: rgba(0, 243, 255, 0.15);
  color: #00f3ff;
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
}

/* --- AVAILABLE WEIGHTS PREVIEW SECTION --- */
.fd-weight-card {
  background-color: var(--pure-white);
  border: 1px solid var(--border-grey);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.fd-weight-card:hover {
  border-color: var(--near-black);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

[data-theme="dark"] .fd-weight-card:hover {
  border-color: #555;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.fd-weight-preview {
  caret-color: var(--signal-red);
}

/* --- CUSTOM UPLOAD DELETE BUTTON --- */
.custom-font-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(10, 10, 10, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-sans);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

.font-card:hover .custom-font-delete-btn {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.custom-font-delete-btn:hover {
  background: var(--signal-red);
  border-color: var(--signal-red);
  transform: scale(1.1) !important;
  box-shadow: 0 0 10px rgba(255, 59, 0, 0.5);
}

/* --- RECENT SEARCHES DROPDOWN ITEMS --- */
.search-dropdown-recent-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-grey);
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-dropdown-recent-item:hover {
  background: var(--off-white);
}

[data-theme="dark"] .search-dropdown-recent-item {
  border-color: #333;
}

[data-theme="dark"] .search-dropdown-recent-item:hover {
  background: #222;
}

.delete-recent-search-btn:hover {
  color: var(--signal-red) !important;
}

/* --- SMOOTH PAGE LOAD FADE-IN --- */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.font-detail-container, .main-container {
  animation: pageFadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* --- CURSOR-FOLLOWING EDIT TOOLTIP --- */
.edit-tooltip {
  position: fixed;
  display: none;
  pointer-events: none;
  background-color: rgba(240, 240, 240, 0.98);
  color: #333;
  border: 1px solid #D0D0D0;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: opacity 0.3s ease;
  opacity: 1;
}

.edit-tooltip.fade-out {
  opacity: 0;
}

[data-theme="dark"] .edit-tooltip {
  background-color: rgba(20, 20, 20, 0.98);
  color: #ccc;
  border-color: #333;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.size-reset-btn {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.size-reset-btn:hover {
  color: var(--signal-red) !important;
}

/* Hide spin buttons in number inputs for cleaner look */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

/* ========================================
   GLYPHS SECTION
======================================== */
.fd-glyphs-section {
  width: 100%;
  padding: 6rem 4rem;
  border-top: 1px solid var(--border-grey);
  box-sizing: border-box;
}

.fd-glyphs-layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.fd-glyphs-left {
  flex: 0 0 58%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.fd-glyphs-right {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.fd-glyph-preview-card {
  border: 1px solid var(--border-grey);
  border-radius: 8px;
  background: rgba(0,0,0,0.01);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 480px;
  box-sizing: border-box;
}

[data-theme="dark"] .fd-glyph-preview-card {
  background: rgba(255,255,255,0.01);
}

.fd-glyph-display {
  font-size: 320px;
  line-height: 1;
  color: var(--near-black);
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  user-select: none;
}

.fd-glyph-display.scale-pop {
  transform: scale(0.92);
  opacity: 0.5;
}

/* Guidelines Container */
.fd-guidelines-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  padding: 3rem;
  box-sizing: border-box;
}

.fd-guideline {
  position: absolute;
  left: 3rem;
  right: 3rem;
  border-top: 1px dashed rgba(255, 75, 43, 0.15);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-secondary);
  opacity: 0.6;
  padding-top: 2px;
}

[data-theme="dark"] .fd-guideline {
  border-top-color: rgba(255, 255, 255, 0.12);
}

/* Guideline Heights */
.fd-guideline.cap-height { top: 22%; }
.fd-guideline.x-height { top: 42%; }
.fd-guideline.baseline { 
  top: 76%; 
  border-top-style: solid; 
  border-top-color: var(--signal-red); 
  opacity: 0.8;
}
.fd-guideline.descender { top: 88%; }

/* Controls */
.fd-glyph-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.fd-control-select, .fd-control-input {
  background: var(--pure-white);
  border: 1px solid var(--border-grey);
  border-radius: 4px;
  color: var(--near-black);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.fd-control-input {
  flex: 1;
  min-width: 140px;
  cursor: text;
}

[data-theme="dark"] .fd-control-select, 
[data-theme="dark"] .fd-control-input {
  background: #1A1A1A;
  border-color: #333;
}

/* Segmented Control / Button group */
.fd-btn-group {
  display: flex;
  border: 1px solid var(--border-grey);
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="dark"] .fd-btn-group {
  border-color: #333;
}

.fd-btn-group-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fd-btn-group-btn.active {
  background: var(--near-black);
  color: var(--pure-white);
}

/* Glyph Grids */
.fd-glyph-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fd-glyph-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-grey);
  padding-bottom: 0.5rem;
}

[data-theme="dark"] .fd-glyph-section-header {
  border-color: #222;
}

.fd-glyph-section-header span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.fd-glyph-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1px;
  background-color: var(--border-grey);
  border: 1px solid var(--border-grey);
}

[data-theme="dark"] .fd-glyph-grid {
  background-color: #222;
  border-color: #222;
}

.fd-glyph-cell {
  background: var(--pure-white);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  color: var(--near-black);
}

[data-theme="dark"] .fd-glyph-cell {
  background: #121212;
}

.fd-glyph-cell:hover {
  background: rgba(255, 75, 43, 0.05);
  color: var(--signal-red);
}

.fd-glyph-cell.active {
  background: rgba(255, 75, 43, 0.1);
  color: var(--signal-red);
  position: relative;
  z-index: 1;
  outline: 1px solid var(--signal-red);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .fd-glyphs-layout {
    flex-direction: column;
    gap: 3rem;
  }
  .fd-glyphs-left, .fd-glyphs-right {
    flex: 0 0 100%;
    width: 100%;
  }
  .fd-glyph-preview-card {
    height: 400px;
  }
  .fd-glyph-display {
    font-size: 240px;
  }
}

@media (max-width: 768px) {
  .fd-glyphs-section {
    padding: 4rem 1.5rem;
  }
  .fd-glyph-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 480px) {
  .fd-glyphs-section {
    padding: 3rem 1rem;
  }
  .fd-glyph-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .fd-glyph-preview-card {
    height: 300px;
    padding: 1.5rem;
  }
  .fd-glyph-display {
    font-size: 160px;
  }
  .fd-guidelines-container {
    padding: 1.5rem;
  }
  .fd-guideline {
    left: 1.5rem;
    right: 1.5rem;
  }
}

/* ========================================
   SPECIMEN + WEIGHTS SIDE BY SIDE
======================================== */
.fd-specimen-section {
  border-top: 1px solid var(--border-grey);
  padding: 4rem 0 4rem;
}

.fd-specimen-inner {
  width: 100%;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 4rem;
  align-items: flex-start;
  box-sizing: border-box;
}

.fd-specimen-left {
  /* full-width large specimen */
}

.fd-weights-right {
  /* no auto-scroll — show/hide logic via JS */
}

.fd-weight-card.fd-weight-hidden {
  display: none;
}

.fd-weight-card {
  cursor: text;
}

.fd-weights-see-more {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  border: 1px dashed var(--border-grey);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.fd-weights-see-more:hover {
  border-color: var(--signal-red);
  color: var(--signal-red);
  background: rgba(255, 75, 43, 0.04);
}

.fd-weights-see-more .see-more-count {
  background: var(--signal-red);
  color: #fff;
  border-radius: 99px;
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  font-weight: 700;
  letter-spacing: 0;
}


@media (max-width: 1100px) {
  .fd-specimen-inner {
    grid-template-columns: 1fr;
    padding: 0 1.5rem;
  }
  .fd-weights-right {
    max-height: none;
  }
}

/* ========================================
   LAYOUT SECTION
======================================== */
.fd-layout-section {
  border-top: 1px solid var(--border-grey);
  padding: 5rem 0;
  background: var(--near-black);
  color: var(--pure-white);
}

[data-theme="light"] .fd-layout-section {
  background: #0B0B0B;
  color: #f0f0f0;
}

.fd-layout-header {
  width: 100%;
  padding: 0 4rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 1rem;
}

.fd-layout-header h2 {
  color: #f0f0f0;
}

.fd-layout-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.fd-layout-preset-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fd-layout-preset-btn:hover {
  color: rgba(255,255,255,0.75);
}

.fd-layout-preset-btn.active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fd-layout-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fd-layout-btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* Layout rows */
.fd-layout-row {
  width: 100%;
  padding: 3rem 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  box-sizing: border-box;
}

.fd-layout-row-label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.fd-layout-font-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fd-layout-font-tag::after {
  content: "▲";
  font-size: 0.45rem;
  margin-left: 0.2rem;
  vertical-align: middle;
  opacity: 0.6;
}

.fd-layout-role-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* Title text */
.fd-layout-title {
  font-size: clamp(3rem, 7vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  color: #f5f5f5;
  outline: none;
  cursor: text;
  transition: color 0.15s ease;
}

.fd-layout-title:focus {
  color: #fff;
}

/* Subheading text */
.fd-layout-sub {
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.25;
  color: #e0e0e0;
  outline: none;
  cursor: text;
  max-width: 900px;
}

.fd-layout-sub:focus {
  color: #fff;
}

/* Body text grid */
.fd-layout-body-text {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  line-height: 1.75;
}

.fd-layout-body-text > div {
  outline: none;
  cursor: text;
}

.fd-layout-body-text > div:focus {
  color: rgba(255,255,255,0.9);
}

/* Add Style label */
.fd-layout-row-add {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.15);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.fd-layout-row:hover .fd-layout-row-add {
  color: rgba(255,255,255,0.45);
}

@media (max-width: 768px) {
  .fd-layout-header {
    padding: 0 1.5rem 2rem;
  }
  .fd-layout-row {
    padding: 2rem 1.5rem;
  }
  .fd-layout-body-text {
    grid-template-columns: 1fr;
  }
  .fd-layout-row-add {
    position: static;
    transform: none;
    margin-top: 1.5rem;
  }
}

/* ========================================
   FONT DETAILS SECTION (bottom)
======================================== */
.fd-details-section {
  border-top: 1px solid var(--border-grey);
  padding: 5rem 0;
}

.fd-details-inner {
  width: 100%;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 5rem;
  align-items: flex-start;
  box-sizing: border-box;
}

.fd-details-col h3,
.fd-pairings-col h3 {
  border-bottom: 1px solid var(--border-grey);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .fd-details-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 0 1.5rem;
  }
}

/* --- HOMEPAGE HEADER OVERRIDES (when transparent over the dark aurora hero) --- */
/* Dark mode only — white text over dark hero background */
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) {
  background-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .logo {
  color: #ffffff;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-link,
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-btn {
  color: rgba(255, 255, 255, 0.85) !important;
  border-left-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-link:hover,
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-container {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-left-color: rgba(255, 255, 255, 0.1) !important;
  border-right-color: rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-container:focus-within {
  background-color: rgba(255, 255, 255, 0.12) !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) #search-input {
  color: #ffffff !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) #search-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-container svg {
  color: rgba(255, 255, 255, 0.6) !important;
}
/* ── Search dropdown: frosted-glass dark hero treatment (both themes, hero is always dark) ── */
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown {
  background: rgba(8, 8, 12, 0.82) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.06) !important;
  color: #f0f0f0 !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-item {
  color: rgba(255, 255, 255, 0.88) !important;
  border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-name {
  color: #ffffff !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-meta {
  color: rgba(255, 255, 255, 0.45) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-provider {
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-footer {
  background: rgba(255, 255, 255, 0.04) !important;
  border-top-color: rgba(255, 255, 255, 0.07) !important;
  color: rgba(255, 255, 255, 0.5) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-footer:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #ffffff !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-recent-item {
  color: rgba(255, 255, 255, 0.75) !important;
  border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown-recent-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .delete-recent-search-btn {
  color: rgba(255, 255, 255, 0.35) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) .delete-recent-search-btn:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}
/* Section labels (e.g. "Recent Searches", "Results") */
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown .search-section-label,
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown [class*="section-label"],
body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-dropdown [class*="recent-label"] {
  color: rgba(255, 255, 255, 0.35) !important;
  border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}
[data-theme="dark"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .dark-toggle-btn svg {
  color: #ffffff !important;
}
/* Override hardcoded !important colors on specific nav buttons */
body:not(.ai-finder-page) header:not(.navbar-scrolled) #vault-btn {
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  background-color: transparent !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) #vault-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) #submit-font-nav-btn {
  color: rgba(255, 255, 255, 0.85) !important;
  background: transparent !important;
  border-bottom-color: transparent !important;
}
body:not(.ai-finder-page) header:not(.navbar-scrolled) #submit-font-nav-btn:hover {
  color: #ffffff !important;
  border-bottom-color: rgba(255, 255, 255, 0.6) !important;
}

/* Light mode — hero is always dark, so navbar text must be white for contrast */
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) {
  background-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .logo {
  color: #ffffff !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-link,
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-btn {
  color: rgba(255, 255, 255, 0.85) !important;
  border-left-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-link:hover,
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .nav-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-container {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-left-color: rgba(255, 255, 255, 0.1) !important;
  border-right-color: rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-container:focus-within {
  background-color: rgba(255, 255, 255, 0.12) !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) #search-input {
  color: #ffffff !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) #search-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .search-container svg {
  color: rgba(255, 255, 255, 0.6) !important;
}
[data-theme="light"] body:not(.ai-finder-page) header:not(.navbar-scrolled) .dark-toggle-btn svg {
  color: #ffffff !important;
}

/* ========================================
   SPECIMEN HERO REDESIGN
======================================== */
.hero {
  background-color: #0a0a0d !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Hide background elements for the specimen design */
.hero .hero-blob,
.hero .hero-bg-grid,
.hero .hero-glass-pane,
.hero .hero-spotlight,
.hero .hero-orb,
.hero .hero-noise {
  display: none !important;
}

.hero-content {
  max-width: 920px !important;
  text-align: center;
  padding: 40px 24px 100px;
}

.hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: .18em;
  color: #8a8a92;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-headline-fraunces {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: clamp(52px, 7.2vw, 110px);
  line-height: .98;
  color: #f0efec;
  letter-spacing: -.01em;
  max-width: 920px;
  margin-bottom: 0;
  text-shadow: none !important;
}

.hero-headline-fraunces em {
  font-style: italic;
  font-weight: 500;
}

.hero-subline-fraunces {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #8a8a92;
  max-width: 440px;
  margin: 32px auto 0;
  line-height: 1.6;
}

.hero-ctas-fraunces {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-ctas-fraunces a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 14px 26px;
  text-decoration: none;
  border-radius: 0;
  transition: opacity 0.2s ease;
}

.hero-ctas-fraunces a:hover {
  opacity: 0.9;
}

.hero-ctas-fraunces .btn-fill {
  background: #f0efec;
  color: #0a0a0d;
}

.hero-ctas-fraunces .btn-ghost {
  border: 1px solid #2a2a30;
  color: #f0efec;
}

.hero-count {
  position: absolute;
  bottom: 36px;
  left: 48px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: #8a8a92;
}

.hero-count b {
  color: #f0efec;
  font-style: normal;
}

@media (max-width: 640px) {
  .hero-count {
    left: 24px;
    bottom: 24px;
  }
}

.hero-word {
  display: inline-block;
  white-space: nowrap;
}

.hero-char {
  display: inline-block;
  font-weight: 250;
  transition: font-weight 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center bottom;
  will-change: font-weight, transform, color;
}

/* ========================================
   SCROLL TO TOP BUTTON (FLUSH CORNER & EXPANDING)
======================================== */
.scroll-to-top-btn {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background-color: #f0efec;
  color: #0a0a0d;
  border: 1px solid #0a0a0d;
  border-radius: 0 !important; /* Sharp corners */
  margin: 0 !important; /* Flush with corner */
  padding: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              background-color 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease;
  box-shadow: -2px -2px 15px rgba(0,0,0,0.15);
  will-change: width, opacity, transform;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top-btn .btn-text {
  width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.2s ease,
              margin-right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.scroll-to-top-btn .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scroll-to-top-btn:hover {
  width: 170px; /* Expands to fit text + icon */
  background-color: #0a0a0d !important;
  color: #f0efec !important;
  border-color: #f0efec !important;
}

.scroll-to-top-btn:hover .btn-text {
  width: 105px;
  opacity: 1;
  margin-right: 8px;
}

/* ==========================================================================
   SEO BREADCRUMBS DESIGN SYSTEM
   ========================================================================== */
.seo-breadcrumbs {
  font-family: var(--font-mono), monospace;
  font-size: var(--ts-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  width: 100%;
}

.seo-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.seo-breadcrumbs li {
  display: flex;
  align-items: center;
  color: #888;
}

.seo-breadcrumbs a {
  color: #888;
  text-decoration: none;
  transition: color var(--transition-smooth);
}

.seo-breadcrumbs a:hover {
  color: var(--near-black);
}

.seo-breadcrumbs li.active a {
  color: var(--near-black);
  pointer-events: none;
  font-weight: 500;
}

.seo-breadcrumbs .sep {
  margin: 0 0.75rem;
  color: #ccc;
  font-size: 0.9em;
  user-select: none;
}

[data-theme="dark"] .seo-breadcrumbs a:hover,
[data-theme="dark"] .seo-breadcrumbs li.active a {
  color: #fff;
}

[data-theme="dark"] .seo-breadcrumbs .sep {
  color: #333;
}

/* ============================================================
   COMPREHENSIVE RESPONSIVE — CONTENT SECTIONS
   Tablet: ≤768px  |  Mobile: ≤480px
   Desktop (>1024px) is NEVER affected here.
============================================================ */

/* Prevent horizontal overflow on sections without breaking root sticky positioning context */
html, body {
  max-width: 100%;
}
.hero, footer, #mobile-menu {
  overflow-x: hidden;
}
header#navbar {
  overflow: visible !important;
}
.main-container {
  overflow: visible !important;
}

/* ── Tablet (≤768px) ── */
@media (max-width: 768px) {
  /* Hero */
  .hero {
    min-height: auto !important;
    padding-top: 40px !important;
    padding-bottom: 2.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .hero-content {
    padding: 2rem 1.25rem 1.5rem !important;
  }
  .hero-headline-fraunces {
    font-size: clamp(30px, 6.5vw, 48px) !important;
    line-height: 1.12 !important;
  }
  .hero-subline-fraunces {
    font-size: 14px !important;
    max-width: 480px !important;
    margin: 14px auto 0 !important;
  }
  .hero-ctas-fraunces {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 24px !important;
  }
  .hero-ctas-fraunces a {
    width: auto !important;
    min-width: 130px !important;
    text-align: center !important;
  }

  /* Main Container & Layout */
  .main-container {
    padding: 2rem 1.25rem !important;
  }
  .global-preview-bar {
    position: -webkit-sticky !important;
    position: sticky !important;
    padding: 1rem 1.25rem !important;
    top: 60px !important;
    z-index: 180 !important;
  }

  /* Font list / Masonry grid single column */
  #font-grid.masonry-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  
  /* Sidebar filters */
  .content-layout {
    grid-template-columns: 1fr !important;
  }

  /* Trending */
  .trending-section { padding: 3rem 1.25rem !important; }

  /* Collections */
  .collections-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; padding: 0 1.25rem !important; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .blog-container { padding: 2rem 1.25rem !important; }

  /* Footer */
  .footer-content { grid-template-columns: 1fr !important; gap: 2rem !important; padding: 3rem 1.25rem 2rem !important; }
  .footer-bottom { flex-direction: column !important; gap: 0.75rem !important; text-align: center !important; padding: 1.5rem 1.25rem !important; }

  /* Detail / blog post page */
  .post-container { padding: 2rem 1.25rem !important; }

  /* Font pairing */
  .fp-layout { flex-direction: column !important; }
  .fp-sidebar { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border-grey) !important; }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {
  /* Hero */
  .hero {
    min-height: auto !important;
    padding-top: 24px !important;
    padding-bottom: 1.5rem !important;
  }
  .hero-content {
    padding: 1.25rem 1rem 0.75rem !important;
  }
  .hero-headline-fraunces {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.15 !important;
  }
  .hero-eyebrow {
    font-size: 10px !important;
    margin-bottom: 10px !important;
  }
  .hero-subline-fraunces {
    font-size: 13px !important;
    margin-top: 10px !important;
    line-height: 1.4 !important;
  }
  .hero-ctas-fraunces {
    flex-direction: row !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 16px auto 0 !important;
    gap: 8px !important;
  }
  .hero-ctas-fraunces a {
    flex: 1 !important;
    width: auto !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
    text-align: center !important;
  }
  .hero-count,
  .scroll-indicator {
    display: none !important;
  }

  /* Main Container & Layout */
  .main-container {
    padding: 1.5rem 1rem !important;
  }

  /* Global preview bar layout & controls on small mobile */
  .global-preview-bar {
    position: -webkit-sticky !important;
    position: sticky !important;
    padding: 0.75rem 1rem !important;
    gap: 0.75rem !important;
    top: 56px !important;
    z-index: 180 !important;
  }
  .global-preview-bar .toolbar-controls-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }
  .global-preview-bar .toolbar-slider-wrap,
  .global-preview-bar .toolbar-sort-wrap,
  .global-preview-bar .toolbar-display-wrap {
    width: 100% !important;
    justify-content: space-between !important;
    border-left: none !important;
    padding-left: 0 !important;
  }
  .global-preview-bar .toolbar-slider-wrap {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  /* Allow the range input to shrink properly and prevent overflow */
  .global-preview-bar .toolbar-slider-wrap input[type="range"] {
    flex: 1 !important;
    min-width: 60px !important;
    width: auto !important;
  }

  /* Font cards spacing */
  .font-card {
    padding: 1.25rem 1rem !important;
  }
  
  /* Font size slider inside card meta is hidden anyway, make sure layout is clean */
  .card-meta-right {
    gap: 0.4rem !important;
  }

  /* Collections — single column */
  .collections-grid {
    grid-template-columns: 1fr !important;
  }

  /* Sections */
  .trending-section { padding: 2rem 1rem !important; }
  .section-title { font-size: 1.5rem !important; }

  /* Footer */
  .footer-content { padding: 2rem 1rem 1.5rem !important; }
  .footer-bottom { padding: 1.25rem 1rem !important; font-size: 12px !important; }

  /* Blog */
  .blog-container { padding: 1.5rem 1rem !important; }

  /* Sidebar */
  .sidebar-filters { padding: 1rem !important; }

  /* Scroll-to-top — no hover expand on mobile */
  .scroll-to-top-btn { width: 42px !important; height: 42px !important; }
  .scroll-to-top-btn:hover { width: 42px !important; }
  .scroll-to-top-btn:hover .btn-text { display: none !important; }
}

/* ============================================================
   TRENDING THIS WEEK — NEW DESIGN GRID
============================================================ */
:root {
  --trending-surface: #111111;
  --trending-surface-2: #181818;
  --trending-border: rgba(255,255,255,0.08);
  --trending-border-hover: rgba(255,255,255,0.16);
  --trending-accent: #C8B89A;
  --trending-tag-bg: rgba(255,255,255,0.05);
  --trending-tag-border: rgba(255,255,255,0.1);
}

/* Light mode adjustments */
[data-theme="light"] {
  --trending-surface: #F9F9F9;
  --trending-surface-2: #F0F0F0;
  --trending-border: rgba(0,0,0,0.08);
  --trending-border-hover: rgba(0,0,0,0.16);
  --trending-tag-bg: rgba(0,0,0,0.03);
  --trending-tag-border: rgba(0,0,0,0.08);
}

.trending-section-new + .main-container {
  padding-top: 0.5rem !important;
}

.trending-section-new {
  width: 100%;
  padding: 4rem 3rem 0;
  box-sizing: border-box;
  overflow: visible;
  position: relative;
}

.trending-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  /* Fade edges on the cards row only */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

@keyframes pulseLiveDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(76,175,130,0.2); }
  50% { box-shadow: 0 0 0 5px rgba(76,175,130,0.1); }
}

/* ── Grid (Infinite Scrolling Marquee Track) ── */
.trending-new-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  gap: 0 !important; /* No spacing between cards */
  padding: 1.5rem 0 3.5rem !important; /* Padding for hover translation floating */
  animation: scrollMarqueeNew 38s linear infinite;
  will-change: transform;
}

@keyframes scrollMarqueeNew {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Pause marquee animation on hovering the cards track */
.trending-new-grid:hover {
  animation-play-state: paused;
}

/* ── Card ── */
.trending-new-card {
  background: var(--trending-surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  min-height: 290px;
  flex: 0 0 250px !important; /* Keep cards compact at 250px so more fit on 1 row! */
  border: none !important;
  border-right: 1px solid var(--trending-border) !important; /* Border between cards */
  border-radius: 0 !important; /* Sharp corners */
}

/* Dim non-hovered cards ONLY when hovering the cards track itself */
.trending-new-grid:hover .trending-new-card:not(:hover) {
  opacity: 0.55;
  transform: scale(0.97);
}

.trending-new-card:hover {
  background: var(--trending-surface-2) !important;
  opacity: 1 !important;
  transform: translateY(-6px) scale(1.02) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
  z-index: 10;
}
.trending-new-card:hover .trending-new-cta {
  opacity: 1;
}

/* Top row: meta */
.trending-new-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}
.trending-new-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.6;
  letter-spacing: 0.08em;
}
.trending-new-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  border: 0.5px solid var(--trending-tag-border);
  background: var(--trending-tag-bg);
  color: var(--text-secondary);
}
.trending-new-badge.free {
  border-color: rgba(76,175,130,0.3);
  color: #4CAF82;
}

/* Specimen — the big type moment */
.trending-new-specimen {
  flex: 1;
  min-height: 90px;
  display: flex;
  align-items: flex-end;
  line-height: 0.95;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

/* Bottom row: name + tags */
.trending-new-footer {
  width: 100%;
}
.trending-new-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 4px;
}
.trending-new-foundry {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-bottom: 12px;
}
.trending-new-tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.trending-new-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.75;
  background: var(--trending-tag-bg);
  border: 0.5px solid var(--trending-tag-border);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* Hover CTA */
.trending-new-cta {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--trending-accent);
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.2s;
  font-weight: 600;
}

/* Specimen sizes & styling — scaled to fit 250px card width */
.s-playfair { font-family: 'Playfair Display', serif; font-size: 54px; font-weight: 700; color: var(--near-black); letter-spacing: -0.02em; }
.s-playfair em { font-style: italic; color: var(--trending-accent); }
.s-cormorant { font-family: 'Cormorant Garamond', serif; font-size: 60px; font-weight: 300; font-style: italic; color: var(--near-black); letter-spacing: -0.01em; line-height: 0.88; }
.s-syne { font-family: 'Syne', sans-serif; font-size: 42px; font-weight: 800; color: var(--near-black); letter-spacing: -0.04em; text-transform: uppercase; }
.s-fraunces { font-family: 'Fraunces', serif; font-size: 50px; font-weight: 300; font-style: italic; color: var(--near-black); letter-spacing: -0.01em; }
.s-space { font-family: 'Space Grotesk', sans-serif; font-size: 38px; font-weight: 300; color: var(--near-black); letter-spacing: -0.03em; }
.s-lora { font-family: 'Lora', serif; font-size: 44px; font-weight: 400; font-style: italic; color: var(--near-black); letter-spacing: 0.01em; line-height: 0.9; }
.s-baskerville { font-family: 'Libre Baskerville', serif; font-size: 42px; font-weight: 700; color: var(--near-black); letter-spacing: -0.01em; }
.s-dm { font-family: 'DM Sans', sans-serif; font-size: 40px; font-weight: 300; color: var(--near-black); letter-spacing: -0.04em; }

/* Filter chip toggle styles */
.trending-mood-chip {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--trending-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}
.trending-mood-chip:hover {
  border-color: var(--trending-border-hover);
  color: var(--near-black);
}
.trending-mood-chip.active {
  background: var(--near-black);
  color: var(--pure-white);
  border-color: var(--near-black);
}

@media (max-width: 768px) {
  .trending-section-new {
    padding: 3rem 1.5rem 2rem !important;
  }
}
@media (max-width: 480px) {
  .trending-section-new {
    padding: 2.5rem 1rem 2rem !important;
  }
  .trending-new-card {
    flex: 0 0 220px !important; /* Narrower on mobile for peek scrolling */
  }
}

/* ============================================================
   DISPLAY LAYOUT: GRID VIEW ACTIVE (MAIN FONT LISTINGS)
============================================================ */
#font-grid.layout-grid-active {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; /* Slightly increased width */
  gap: 1px !important;
  background: var(--trending-border) !important;
  border: 1px solid var(--trending-border) !important;
  border-radius: 0 !important; /* Sharp corners like trending cards */
  overflow: hidden !important;
  width: 100% !important;
  flex-direction: row !important;
  margin-top: 1.5rem !important;
  box-sizing: border-box !important;
}

#font-grid.layout-grid-active .font-card {
  background: var(--trending-surface) !important; /* Unified surface token */
  padding: 1.5rem 1.5rem 2rem !important;
  border: none !important;
  border-right: 1px solid var(--trending-border) !important;
  border-bottom: 1px solid var(--trending-border) !important;
  border-radius: 0 !important;
  min-height: 290px !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  transition: background-color 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  will-change: background-color; /* Smooth performance hint */
  box-sizing: border-box !important;
  cursor: pointer;
}

#font-grid.layout-grid-active .font-card:hover {
  background: var(--trending-surface-2) !important;
}

#font-grid.layout-grid-active .font-card:hover .grid-card-cta {
  opacity: 1 !important;
}

/* Hide original List-view rows completely on normal font cards */
#font-grid.layout-grid-active .font-card:not(.uploader-card) .card-header-row,
#font-grid.layout-grid-active .font-card:not(.uploader-card) .card-footer-row {
  display: none !important;
}

/* Show custom Grid-view header and footer structures on normal font cards */
#font-grid.layout-grid-active .font-card:not(.uploader-card) .grid-card-header,
#font-grid.layout-grid-active .font-card:not(.uploader-card) .grid-card-footer {
  display: flex !important;
}

/* Specific uploader card styling in grid view (preventing text/icon misalignment) */
#font-grid.layout-grid-active .uploader-card {
  padding: 1.5rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: stretch !important;
  min-height: 290px !important;
  cursor: default !important;
}

#font-grid.layout-grid-active .uploader-card .card-header-row,
#font-grid.layout-grid-active .uploader-card .card-footer-row {
  display: none !important; /* Hide original rows inside uploader */
}

#font-grid.layout-grid-active .uploader-card .card-body-row.uploader-dropzone {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100% !important;
  width: 100% !important;
  border: 2px dashed var(--trending-border) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.01) !important;
  padding: 1.5rem !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

[data-theme="light"] #font-grid.layout-grid-active .uploader-card .uploader-dropzone {
  background: rgba(0, 0, 0, 0.01) !important;
}

/* Specimen rendering inside normal grid font cards (explicitly excluding uploader) */
#font-grid.layout-grid-active .font-card:not(.uploader-card) .card-body-row {
  flex: 1 !important;
  display: flex !important;
  align-items: flex-end !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#font-grid.layout-grid-active .huge-preview-text {
  width: 100% !important;
  border: none !important;
  padding: 1rem 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  line-height: 1.1 !important;
  min-height: 100px !important;
  font-size: clamp(24px, 4vw, 40px) !important; /* Scale down so preview fits grid card */
}

/* Dark mode adjustments for main active grid */
[data-theme="dark"] #font-grid.layout-grid-active {
  background: var(--trending-border) !important;
  border-color: var(--trending-border) !important;
}

#font-grid.layout-grid-active .grid-card-cta {
  display: inline !important;
}

/* Availability Pill Badges (Grid and List View) */
.availability-badge,
.grid-card-badge {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 3px 8px !important;
  border-radius: 20px !important;
  border: 0.5px solid var(--trending-tag-border) !important;
  background: var(--trending-tag-bg) !important;
  color: var(--text-secondary) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  height: fit-content !important;
}

.availability-badge.free,
.grid-card-badge.free,
.trending-new-badge.free {
  background: rgba(76, 175, 130, 0.08) !important;
  border-color: rgba(76, 175, 130, 0.3) !important;
  color: #4caf82 !important;
}

/* ============================================================
   FAQ SECTION (ACCORDION TYPE)
 ============================================================ */
.home-faq-section {
  max-width: 100%;
  margin: 0;
  padding: 6rem 3rem;
  border-top: 1px solid var(--border-grey);
  box-sizing: border-box;
  background-color: var(--card-bg, #fbfbfb);
}

[data-theme="dark"] .home-faq-section {
  background-color: #0d0d10;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.faq-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.faq-info-col {
  position: -webkit-sticky;
  position: sticky;
  top: 160px;
  height: fit-content;
}

.faq-info-col h2 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--near-black);
  letter-spacing: -0.02em;
}

[data-theme="dark"] .faq-info-col h2 {
  color: #f0efec !important;
}

.faq-accordion-col {
  display: flex;
  flex-direction: column;
}

.faq-accordion-item {
  border-bottom: 1px solid var(--border-grey);
}

[data-theme="dark"] .faq-accordion-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.faq-accordion-item:first-child {
  border-top: 1px solid var(--border-grey);
}

[data-theme="dark"] .faq-accordion-item:first-child {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 0;
  cursor: pointer;
  text-align: left;
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  transition: color 0.2s ease;
  outline: none;
}

[data-theme="dark"] .faq-trigger {
  color: #f0efec;
}

.faq-trigger:hover {
  color: var(--signal-red, #ff3b00);
}

[data-theme="dark"] .faq-trigger:hover {
  color: var(--signal-red, #ff3b00);
}

.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.2s ease;
  color: var(--text-secondary);
  opacity: 0.7;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-accordion-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--signal-red, #ff3b00);
  opacity: 1;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.faq-content-inner {
  padding-bottom: 2rem;
  color: var(--text-secondary);
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 760px;
}

[data-theme="dark"] .faq-content-inner {
  color: #a0a0a8;
}

/* Responsive adjustment */
@media (max-width: 900px) {
  .home-faq-section {
    padding: 3.5rem 1.5rem;
  }
  .faq-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .faq-info-col {
    position: relative;
    top: 0;
  }
  .faq-info-col h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }
}

/* ============================================================
   ACCESSIBILITY, FEEDBACK & UX OVERHAUL STYLES
   ============================================================ */

/* 1. Accessible Skip to Content Link (WCAG 2.1 AA) */
.skip-to-content {
  position: fixed;
  top: -100px;
  left: 1rem;
  background: var(--signal-red, #ff3b00);
  color: #ffffff !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  z-index: 100000;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-to-content:focus {
  top: 1rem;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* 2. Universal Toast Notification Engine */
.fv-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 4rem);
}

.fv-toast {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(18, 18, 22, 0.94);
  color: #ffffff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  font-family: var(--font-body, sans-serif);
  font-size: 0.85rem;
  line-height: 1.4;
  pointer-events: auto;
  animation: fvToastEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

[data-theme="light"] .fv-toast {
  background: rgba(255, 255, 255, 0.96);
  color: #111111;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.fv-toast.fv-toast-hiding {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

.fv-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fv-toast-success .fv-toast-icon { color: #10B981; }
.fv-toast-error .fv-toast-icon { color: #EF4444; }
.fv-toast-info .fv-toast-icon { color: #3B82F6; }

.fv-toast-msg {
  flex: 1;
  font-weight: 500;
}

.fv-toast-close {
  background: none;
  border: none;
  color: currentColor;
  opacity: 0.6;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 0.5rem;
  transition: opacity 0.15s ease;
}
.fv-toast-close:hover {
  opacity: 1;
}

@keyframes fvToastEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 3. Search Dropdown Keyboard Active State */
.search-dropdown-item.dropdown-keyboard-active,
.search-dropdown-recent-item.dropdown-keyboard-active {
  background: rgba(255, 255, 255, 0.12) !important;
  outline: none;
}
[data-theme="light"] .search-dropdown-item.dropdown-keyboard-active,
[data-theme="light"] .search-dropdown-recent-item.dropdown-keyboard-active {
  background: var(--off-white, #f2f2f2) !important;
}

/* 4. Filter Tooltips & Explanations */
.pill[title] {
  position: relative;
  cursor: pointer;
}

/* 5. Contact Support & Footer Enhancements */
.footer-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}
.footer-support-btn:hover {
  background: var(--signal-red, #ff3b00);
  border-color: var(--signal-red, #ff3b00);
  color: #ffffff !important;
  transform: translateY(-1px);
}
[data-theme="light"] .footer-support-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #111111;
}
[data-theme="light"] .footer-support-btn:hover {
  background: var(--signal-red, #ff3b00);
  color: #ffffff;
  border-color: var(--signal-red, #ff3b00);
}


/* ============================================================
   RESPONSIVE ENHANCEMENTS & SAFE AREA SYSTEM
   ============================================================ */

/* Fluid preview text font size */
@media (max-width: 768px) {
  :root {
    --preview-font-size: clamp(36px, 8vw, 64px) !important;
  }
  .trending-section-new {
    padding: 2.5rem 1.25rem 1.5rem !important;
  }
  .trending-mood-row {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 8px !important;
    scrollbar-width: none !important;
    margin-bottom: 1.25rem !important;
  }
  .trending-mood-row::-webkit-scrollbar {
    display: none !important;
  }
  .trending-mood-chip {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 14px !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .card-header-row {
    gap: 0.5rem !important;
  }
  .card-footer-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  .card-footer-right {
    width: 100% !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .card-download-btn,
  .view-family-hover-btn {
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .home-faq-section {
    padding: 3rem 1.25rem !important;
  }
  .faq-container {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .faq-info-col {
    position: relative !important;
    top: 0 !important;
  }
}

@media (max-width: 640px) {
  .fv-toast-container {
    bottom: 1rem !important;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
    max-width: calc(100vw - 2rem) !important;
  }
  .fv-toast {
    padding: 0.75rem 1rem !important;
    font-size: 0.8rem !important;
  }
  .compare-tray {
    height: auto !important;
    min-height: 56px !important;
    padding: 0.5rem 0.75rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .compare-tray-label {
    display: none !important;
  }
  .compare-tray-fonts {
    flex: 1 1 auto !important;
    overflow-x: auto !important;
  }
  .compare-overlay-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }
  .compare-overlay-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }
  .compare-shared-text-wrap {
    width: 100% !important;
  }
  .compare-shared-text-wrap input {
    flex: 1 !important;
    width: 100% !important;
  }
  .compare-overlay-body {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .compare-col {
    padding: 1.25rem 1rem !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-grey) !important;
  }
  .compare-specimen {
    font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
    min-height: 60px !important;
  }
  .auth-modal {
    width: calc(100vw - 2rem) !important;
    max-width: 400px !important;
    padding: 2rem 1.25rem 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .trending-section-new {
    padding: 2rem 1rem 1.5rem !important;
  }
  .home-faq-section {
    padding: 2.5rem 1rem !important;
  }
  .font-card {
    padding: 1rem 0.85rem !important;
  }
  .card-meta-right {
    gap: 0.35rem !important;
  }
  .meta-item {
    font-size: 0.65rem !important;
    padding: 2px 6px !important;
  }
  .footer-support-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   MODERN HORIZONTAL FILTER BAR (EXPLORE FONTS)
   ========================================================================== */
.explore-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.font-results-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.horizontal-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

.category-pills-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-pills-scroll::-webkit-scrollbar {
  display: none;
}

.category-pills-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: max-content;
  padding: 2px 0;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--border-grey);
  background-color: transparent;
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.cat-pill:hover {
  border-color: rgba(0, 0, 0, 0.35);
  background-color: var(--off-white);
  transform: translateY(-1px);
}

[data-theme="dark"] .cat-pill {
  color: var(--pure-white);
}

[data-theme="dark"] .cat-pill:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.08);
}

.cat-pill.active {
  background-color: var(--near-black) !important;
  color: var(--pure-white) !important;
  border-color: var(--near-black) !important;
  font-weight: 600;
}

[data-theme="dark"] .cat-pill.active {
  background-color: var(--pure-white) !important;
  color: var(--near-black) !important;
  border-color: var(--pure-white) !important;
}

.cat-pill-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.6;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.cat-pill.active .cat-pill-count {
  background: rgba(255, 255, 255, 0.22);
  opacity: 0.95;
}

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

[data-theme="dark"] .cat-pill.active .cat-pill-count {
  background: rgba(0, 0, 0, 0.15);
}

/* Secondary Refinements Row */
.filter-refinements-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.refinement-dropdowns {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.filter-dropdown-wrapper {
  position: relative;
  flex-shrink: 0;
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-grey);
  background: transparent;
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

[data-theme="dark"] .filter-dropdown-btn {
  color: var(--pure-white);
}

.filter-dropdown-btn:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background-color: var(--off-white);
}

[data-theme="dark"] .filter-dropdown-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-label-prefix {
  opacity: 0.5;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.dropdown-selected-val {
  font-weight: 600;
}

.dropdown-chevron {
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.filter-dropdown-btn[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 120;
  background: var(--pure-white);
  border: 1px solid var(--border-grey);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  min-width: 190px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}

[data-theme="dark"] .filter-dropdown-menu {
  background: #141418;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.filter-dropdown-menu.open {
  display: flex;
  animation: popoverFadeIn 0.15s ease-out;
}

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

.dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}

[data-theme="dark"] .dropdown-item {
  color: var(--pure-white);
}

.dropdown-item:hover {
  background-color: var(--off-white);
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.07);
}

.dropdown-item.active {
  font-weight: 600;
  color: var(--signal-red) !important;
}

.dropdown-item-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.5;
}

/* Active Tags Strip & Clear */
.active-filters-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.active-filter-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 75, 43, 0.08);
  color: var(--signal-red);
  border: 1px solid rgba(255, 75, 43, 0.2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.remove-tag-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
}

.remove-tag-btn:hover {
  opacity: 0.7;
}

.clear-all-filters-btn {
  background: none;
  border: none;
  color: var(--signal-red);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  transition: opacity 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clear-all-filters-btn:hover {
  text-decoration: underline;
}

/* Ensure font cards take generous full width */
.font-card {
  padding: 2.25rem 2rem !important;
  width: 100% !important;
}
/* ==========================================================================
   STICKY UNIFIED FONT CONTROLS (SMOOTH FLUID GLIDE & WIDE PREVIEW)
   ========================================================================== */
.sticky-font-controls {
  position: relative !important;
  top: auto !important;
  z-index: 10 !important;
  background-color: transparent !important;
  padding: 0.85rem 0 1rem 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 1.5rem !important;
  border-bottom: 1px solid var(--border-grey) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
  box-shadow: none !important;
}

[data-theme="dark"] .sticky-font-controls {
  background-color: var(--near-black);
}

header.collapsed ~ #main-content .sticky-font-controls,
header.collapsed ~ * .sticky-font-controls,
header.collapsed ~ .main-container .sticky-font-controls {
  top: 48px !important;
}

header:not(.collapsed) ~ #main-content .sticky-font-controls,
header:not(.collapsed) ~ * .sticky-font-controls {
  top: 64px !important;
}

/* Scrolled Sticky Bar: frosted glass & elevation */
.sticky-font-controls.is-sticky {
  background-color: rgba(255, 255, 255, 0.98) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  padding: 0.55rem 1.5rem 0.65rem 1.5rem !important;
  gap: 0.45rem;
}

[data-theme="dark"] .sticky-font-controls.is-sticky {
  background-color: rgba(12, 12, 16, 0.98) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Row 1: Primary Category Pills & Sticky Slot */
.sticky-row-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.25rem;
  min-height: 38px;
}

.sticky-row-primary .category-pills-scroll {
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sticky-font-controls:not(.is-sticky) .category-pills-scroll {
  max-width: 100%;
  flex: 1 1 auto;
}

.sticky-font-controls.is-sticky .category-pills-scroll {
  max-width: 52%;
  flex: 0 1 auto;
  min-width: 0;
}

.sticky-row-primary .category-pills-scroll::-webkit-scrollbar {
  display: none;
}

.sticky-slot-row1 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

/* Empty slots occupy zero width and never displace siblings */
.sticky-slot-row1:empty,
.sticky-slot-row2:empty {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  flex: 0 0 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Row 2: Multi-select Filters & Normal Slot */
.sticky-row-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.25rem;
  min-height: 36px;
}

.sticky-font-controls.is-sticky .sticky-row-secondary {
  min-height: 32px;
  gap: 0.75rem;
  justify-content: flex-start;
}

.sticky-slot-row2 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

/* Preview Bar & Controls Cluster (GPU-accelerated smooth transitions) */
.sticky-preview-options-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  width: 100%;
  will-change: transform;
}

.sticky-preview-options-cluster .toolbar-controls-group {
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   SLOT-AWARE PREVIEW INPUT WIDTH & SPACING
   ───────────────────────────────────────────────────────────── */
/* When in Row 2 (unscrolled): Wide, spacious preview input */
.sticky-slot-row2 .sticky-preview-options-cluster {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.sticky-slot-row2 .global-preview-input-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: 650px;
  min-width: 320px;
}

/* When in Row 1 (sticky): Expanded preview input sharing Row 1 beside pills */
.sticky-slot-row1 .sticky-preview-options-cluster {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
}

.sticky-slot-row1 .global-preview-input-wrap,
.sticky-font-controls.is-sticky .global-preview-input-wrap {
  flex: 1 1 300px;
  max-width: 480px;
  min-width: 220px;
  width: 100%;
}

.sticky-font-controls.is-sticky .cat-pill {
  padding: 0.32rem 0.68rem;
  font-size: 0.76rem;
  gap: 0.35rem;
}

.sticky-font-controls.is-sticky .cat-pill-count {
  font-size: 0.68rem;
  padding: 1px 5px;
}

.sticky-font-controls.is-sticky .toolbar-controls-group {
  gap: 0.75rem;
}

.sticky-font-controls.is-sticky #font-size-slider {
  width: 75px;
}

.sticky-font-controls.is-sticky .size-reset-btn {
  display: none;
}

.sticky-font-controls.is-sticky .size-input-container input {
  width: 36px;
  padding: 2px 4px;
  font-size: 0.72rem;
}

/* Input Styles */
.global-preview-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  transition: max-width 0.38s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.38s ease, width 0.38s ease;
}

.global-preview-input-wrap input {
  width: 100%;
  padding: 0.48rem 2.2rem 0.48rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-grey);
  background: var(--off-white);
  color: var(--near-black);
  font-size: 0.82rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.global-preview-input-wrap input:focus {
  border-color: var(--near-black);
  background: var(--pure-white);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .global-preview-input-wrap input {
  background: rgba(255, 255, 255, 0.05);
  color: var(--pure-white);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .global-preview-input-wrap input:focus {
  border-color: var(--pure-white);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────────────────────────────
   MULTI-SELECT DROPDOWN STYLING
   ───────────────────────────────────────────────────────────── */
.filter-multiselect-menu {
  min-width: 220px;
  padding: 6px;
}

.multiselect-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px 6px 8px;
  border-bottom: 1px solid var(--border-grey);
  margin-bottom: 4px;
}

.multiselect-action-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
}

.multiselect-action-btn:hover {
  color: var(--signal-red);
  background: rgba(255, 75, 43, 0.06);
}

.dropdown-checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
  user-select: none;
  position: relative;
}

.dropdown-checkbox-item:hover {
  background-color: var(--off-white);
}

[data-theme="dark"] .dropdown-checkbox-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.checkbox-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.custom-checkbox-box {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid var(--border-grey);
  background: var(--pure-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

[data-theme="dark"] .custom-checkbox-box {
  background: #1c1c22;
  border-color: rgba(255, 255, 255, 0.2);
}

.dropdown-checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dropdown-checkbox-item.checked .custom-checkbox-box {
  background: var(--signal-red);
  border-color: var(--signal-red);
  color: #fff;
}

.custom-checkbox-check {
  display: none;
}

.dropdown-checkbox-item.checked .custom-checkbox-check {
  display: block;
}

.multiselect-item-name {
  font-size: 0.78rem;
  color: var(--near-black);
  font-weight: 450;
}

[data-theme="dark"] .multiselect-item-name {
  color: var(--pure-white);
}

.dropdown-checkbox-item.checked .multiselect-item-name {
  font-weight: 600;
  color: var(--signal-red);
}

.multiselect-item-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.5;
}

.dropdown-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--signal-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 2px;
}

/* Responsive adjustments for tablet and mobile */
@media (max-width: 768px) {
  .sticky-slot-row1,
  .sticky-slot-row2 {
    width: 100%;
  }
  .global-preview-input-wrap {
    flex: 1;
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  .sticky-preview-options-cluster {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .toolbar-controls-group {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVE ENGINE (320px - 768px)
   Carefully crafted for seamless handheld typography experience
   ========================================================================== */

/* Global horizontal overflow lockdown (clip preserves position: sticky context) */
html, body {
  overflow-x: clip !important;
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

@supports not (overflow: clip) {
  html, body {
    overflow-x: hidden !important;
  }
}

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

#main-content,
.main-container {
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

/* Desktop default: Hide mobile-only navbar controls */
@media (min-width: 1025px) {
  .mobile-search-toggle-btn,
  .mobile-search-drawer {
    display: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE HEADER & SEARCH DRAWER (≤1024px & ≤768px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  header#navbar {
    height: 56px !important;
    padding: 0 1rem !important;
    z-index: 1000 !important;
  }

  header#navbar.collapsed {
    height: 56px !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    margin-left: auto !important;
  }

  /* Compact Header Search Toggle */
  .mobile-search-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border: 1px solid var(--border-grey) !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
  }

  .mobile-search-toggle-btn:hover,
  .mobile-search-toggle-btn.active {
    background: var(--off-white) !important;
    border-color: var(--text-primary) !important;
    color: var(--signal-red) !important;
  }

  [data-theme="dark"] .mobile-search-toggle-btn:hover,
  [data-theme="dark"] .mobile-search-toggle-btn.active {
    background: #2A2A2A !important;
    border-color: #555 !important;
  }

  #dark-toggle.dark-toggle-btn,
  .hamburger-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  /* Expandable Search Drawer */
  .mobile-search-drawer {
    display: flex !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: var(--pure-white) !important;
    border-bottom: 1px solid var(--border-grey) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    padding: 0 1rem !important;
    z-index: 198 !important;
    max-height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
    transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.2s ease,
                visibility 0.2s ease,
                padding 0.25s ease !important;
  }

  [data-theme="dark"] .mobile-search-drawer {
    background-color: #111 !important;
    border-color: #2A2A2A !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
  }

  .mobile-search-drawer.open {
    max-height: 64px !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0.65rem 1rem !important;
  }

  .mobile-search-drawer-inner {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0.65rem !important;
    background: var(--off-white) !important;
    border: 1px solid var(--border-grey) !important;
    border-radius: 8px !important;
    padding: 0 0.85rem !important;
    height: 40px !important;
  }

  [data-theme="dark"] .mobile-search-drawer-inner {
    background: #18181c !important;
    border-color: #2e2e36 !important;
  }

  .mobile-search-icon {
    color: var(--text-secondary) !important;
    flex-shrink: 0 !important;
  }

  #mobile-header-search-input {
    flex: 1 1 auto !important;
    border: none !important;
    background: transparent !important;
    font-size: 16px !important;
    font-family: var(--font-body) !important;
    color: var(--near-black) !important;
    outline: none !important;
    width: 100% !important;
  }

  [data-theme="dark"] #mobile-header-search-input {
    color: var(--pure-white) !important;
  }

  .mobile-search-clear {
    background: none !important;
    border: none !important;
    font-size: 1.3rem !important;
    color: var(--text-secondary) !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 24px !important;
    min-height: 24px !important;
  }

  /* Sticky Font Controls on Tablet & Mobile (≤1024px) */
  .sticky-font-controls {
    top: 56px !important;
    z-index: 900 !important;
  }

  .sticky-font-controls.is-sticky .category-pills-scroll,
  .sticky-font-controls:not(.is-sticky) .category-pills-scroll,
  .category-pills-scroll {
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .category-pills-scroll::-webkit-scrollbar {
    display: none !important;
  }

  .category-pills-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: max-content !important;
    min-width: 100% !important;
    padding: 2px 2px !important;
  }

  .cat-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-height: 34px !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  .sticky-row-primary {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
    min-height: 36px !important;
  }

  .sticky-slot-row1 {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    flex: 0 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .sticky-row-secondary {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.5rem !important;
    min-height: auto !important;
  }

  .sticky-slot-row2,
  .sticky-preview-options-cluster {
    display: contents !important;
  }

  .global-preview-input-wrap {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .global-preview-input-wrap input {
    height: 38px !important;
    font-size: 0.85rem !important;
  }

  .refinement-dropdowns {
    order: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .refinement-dropdowns .filter-dropdown-wrapper {
    flex: 1 1 50% !important;
    min-width: 0 !important;
  }

  .refinement-dropdowns .filter-dropdown-btn {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 0.65rem !important;
    font-size: 0.78rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .dropdown-selected-val {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: calc(100% - 60px) !important;
  }

  .toolbar-controls-group {
    order: 3 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .toolbar-slider-wrap {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
    border-left: none !important;
    padding-left: 0 !important;
  }

  .toolbar-slider-wrap > span {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    flex-shrink: 0 !important;
  }

  .toolbar-slider-wrap input[type="range"] {
    flex: 1 1 auto !important;
    min-width: 45px !important;
    max-width: 130px !important;
    height: 4px !important;
  }

  .size-input-container {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  .size-input-container input {
    width: 32px !important;
    padding: 2px !important;
    font-size: 0.75rem !important;
    text-align: right !important;
  }

  .toolbar-display-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    flex-shrink: 0 !important;
    border-left: none !important;
    padding-left: 0 !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   TABLET & MOBILE (≤768px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Container Padding */
  .main-container {
    padding: 2rem 1.25rem !important;
  }
  .sticky-font-controls {
    margin-left: -1.25rem !important;
    margin-right: -1.25rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    width: calc(100% + 2.5rem) !important;
  }

  /* Hero Section */
  .hero {
    min-height: auto !important;
    padding-top: 2.5rem !important;
    padding-bottom: 2.25rem !important;
  }

  .hero-content {
    padding: 1.5rem 1.25rem 1rem !important;
    max-width: 100% !important;
  }

  .hero-eyebrow {
    font-size: 11px !important;
    letter-spacing: 0.16em !important;
    margin-bottom: 16px !important;
  }

  .hero-headline-fraunces {
    font-size: clamp(28px, 7.5vw, 46px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.015em !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .hero-subline-fraunces {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    max-width: 440px !important;
    margin: 18px auto 0 !important;
  }

  .hero-ctas-fraunces {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 24px !important;
    width: 100% !important;
  }

  .hero-ctas-fraunces a {
    min-height: 44px !important;
    padding: 11px 22px !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
  }

  /* Trending Section */
  .trending-section-new {
    padding: 2.5rem 1.25rem 1.75rem !important;
  }

  .trending-mood-row {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    margin-bottom: 1.25rem !important;
  }

  .trending-mood-row::-webkit-scrollbar { display: none !important; }

  .trending-mood-chip {
    min-height: 36px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .trending-new-card {
    flex: 0 0 220px !important;
    min-height: 270px !important;
    padding: 1.25rem !important;
  }

  .trending-new-card .trending-new-cta {
    opacity: 0.85 !important; /* Always visible on mobile touch */
  }

  /* Explore Section Header */
  .explore-header-row {
    margin-bottom: 1rem !important;
    gap: 0.5rem !important;
  }

  .section-title {
    font-size: 1.65rem !important;
  }

  /* Sticky Font Controls on Tablet/Mobile (≤768px) */
  .sticky-font-controls {
    top: 56px !important;
    z-index: 900 !important;
    margin-left: -1.25rem !important;
    margin-right: -1.25rem !important;
    padding: 0.65rem 1.25rem 0.75rem 1.25rem !important;
    width: calc(100% + 2.5rem) !important;
    gap: 0.5rem !important;
    box-sizing: border-box !important;
  }

  .sticky-font-controls.is-sticky {
    padding: 0.45rem 1.25rem 0.55rem 1.25rem !important;
    gap: 0.4rem !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  }

  [data-theme="dark"] .sticky-font-controls.is-sticky {
    background-color: rgba(12, 12, 16, 0.98) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  }

  .sticky-font-controls.is-sticky .cat-pill {
    min-height: 32px !important;
    padding: 0.3rem 0.65rem !important;
    font-size: 0.75rem !important;
  }

  .sticky-font-controls.is-sticky .global-preview-input-wrap input {
    height: 36px !important;
  }

  .sticky-font-controls.is-sticky .filter-dropdown-btn {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.75rem !important;
  }

  .sticky-font-controls.is-sticky .toolbar-controls-group {
    height: 32px !important;
    min-height: 32px !important;
  }

  .filter-dropdown-menu {
    max-width: calc(100vw - 2rem) !important;
    left: 0 !important;
  }

  #mood-dropdown-wrapper .filter-dropdown-menu {
    left: auto !important;
    right: 0 !important;
  }

  /* ─────────────────────────────────────────────────────────
     FONT CARDS RESPONSIVE OVERRIDE (Fixes desktop padding lock)
     ───────────────────────────────────────────────────────── */
  .font-card {
    padding: 1.5rem 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .card-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .font-name-label {
    font-size: 1.15rem !important;
    word-break: break-word !important;
  }

  .card-meta-right {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .card-size-slider-wrap {
    display: none !important; /* Hidden on touch devices; global sticky slider provides uniform control */
  }

  .huge-preview-text {
    font-size: clamp(24px, var(--preview-font-size, 52px), 110px) !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    padding: 0.5rem 0 !important;
  }

  .card-footer-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .foundry-label {
    font-size: 0.8rem !important;
    word-break: break-word !important;
  }

  .card-footer-right {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .card-download-btn,
  .view-family-hover-btn {
    min-height: 42px !important;
    flex: 1 1 auto !important;
    text-align: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
  }

  /* Grid View Active on Tablet (2 columns) */
  #font-grid.layout-grid-active {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #font-grid.layout-grid-active .font-card {
    padding: 1.25rem !important;
  }

  #font-grid.layout-grid-active .grid-card-cta {
    opacity: 0.9 !important; /* Visible without hover on touch */
  }

  /* Footer Content Stacking */
  .footer-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    padding: 2.5rem 1.25rem 1.5rem !important;
  }

  .footer-branding p {
    max-width: 100% !important;
  }

  .footer-links ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .footer-links a {
    display: inline-block !important;
    padding: 4px 0 !important;
    min-height: 36px !important;
    line-height: 28px !important;
  }

  .newsletter-form {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .newsletter-form input {
    flex: 1 !important;
    min-width: 0 !important;
    height: 44px !important;
  }

  .newsletter-form button {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
  }

  .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.5rem !important;
    padding: 1.25rem 1rem !important;
  }

  /* FAQ Accordion Section */
  .home-faq-section {
    padding: 2.5rem 1.25rem !important;
  }

  .faq-container {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }

  .faq-info-col h2 {
    font-size: 2rem !important;
  }

  .faq-trigger {
    padding: 1rem 0 !important;
    min-height: 48px !important;
    font-size: 0.95rem !important;
  }

  /* Compare Tray on Mobile */
  .compare-tray {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 0.6rem 0.85rem !important;
    z-index: 95 !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12) !important;
  }

  .compare-tray-actions {
    display: flex !important;
    gap: 0.5rem !important;
  }

  .btn-compare-now,
  .btn-compare-clear {
    min-height: 44px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE PHONES (≤600px & ≤480px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #font-grid.layout-grid-active {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 1.5rem 1rem !important;
  }
  .sticky-font-controls {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    padding: 0.55rem 1rem 0.65rem 1rem !important;
    width: calc(100% + 2rem) !important;
    gap: 0.45rem !important;
  }

  .sticky-font-controls.is-sticky {
    padding: 0.35rem 1rem 0.45rem 1rem !important;
    gap: 0.35rem !important;
  }

  /* Hero Section */
  .hero {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }

  .hero-content {
    padding: 1rem 0.75rem 0.75rem !important;
  }

  .hero-eyebrow {
    font-size: 10px !important;
    letter-spacing: 0.14em !important;
    margin-bottom: 12px !important;
  }

  .hero-headline-fraunces {
    font-size: clamp(24px, 7.5vw, 32px) !important;
    line-height: 1.12 !important;
  }

  .hero-subline-fraunces {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    max-width: 320px !important;
    margin: 14px auto 0 !important;
  }

  .hero-ctas-fraunces {
    margin-top: 20px !important;
    gap: 8px !important;
    max-width: 320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-ctas-fraunces a {
    flex: 1 1 140px !important;
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  /* Trending Section */
  .trending-section-new {
    padding: 2rem 1rem 1.25rem !important;
  }

  .trending-new-card {
    flex: 0 0 195px !important;
    min-height: 250px !important;
    padding: 1rem !important;
  }

  .trending-new-specimen {
    min-height: 70px !important;
  }

  /* Font Cards */
  .font-card {
    padding: 1rem 0.85rem !important;
  }

  .huge-preview-text {
    font-size: clamp(1.65rem, 7vw, 2.5rem) !important;
  }

  .meta-item {
    font-size: 0.65rem !important;
    padding: 3px 7px !important;
  }

  .compare-add-btn {
    padding: 4px 8px !important;
    font-size: 0.65rem !important;
  }

  .favorite-add-btn {
    padding: 4px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .card-download-btn,
  .view-family-hover-btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-height: 42px !important;
  }

  /* Newsletter Form Stacking */
  .newsletter-form {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .newsletter-form button {
    width: 100% !important;
    border-radius: 6px !important;
  }

  /* Scroll To Top */
  .scroll-to-top-btn {
    bottom: 1.25rem !important;
    right: 1.25rem !important;
    width: 44px !important;
    height: 44px !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   ULTRA-COMPACT PHONES (≤360px & 320px)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .main-container {
    padding: 1.25rem 0.75rem !important;
  }

  .sticky-font-controls {
    margin-left: -0.75rem !important;
    margin-right: -0.75rem !important;
    padding: 0.45rem 0.75rem 0.55rem 0.75rem !important;
    width: calc(100% + 1.5rem) !important;
    gap: 0.35rem !important;
  }

  .sticky-font-controls.is-sticky {
    padding: 0.3rem 0.75rem 0.4rem 0.75rem !important;
    gap: 0.3rem !important;
  }

  .hero-headline-fraunces {
    font-size: 22px !important;
  }

  .hero-ctas-fraunces a {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .font-card {
    padding: 0.85rem 0.65rem !important;
  }

  .font-name-label {
    font-size: 1rem !important;
  }

  .huge-preview-text {
    font-size: 1.5rem !important;
  }

  .trending-new-card {
    flex: 0 0 175px !important;
    min-height: 230px !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   TOUCH DEVICES: TAP-FRIENDLY INTERACTIONS
   ───────────────────────────────────────────────────────────── */
@media (hover: none) {
  .card-download-btn,
  .view-family-hover-btn,
  .grid-card-cta {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}


/* ============================================================
   HERO CODE REVEAL — Interactive Spotlight Background
   ============================================================ */

/* ── Base Layer: 1px subtle grid at ~3% opacity on #0A0B0D ── */
.hero-base-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

/* ── Code layer hidden beneath CSS mask spotlight ── */
.hero-code-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  --x: 50%;
  --y: 50%;
  --r: 0px;
  -webkit-mask-image: radial-gradient(
    circle var(--r, 0px) at var(--x, 50%) var(--y, 50%),
    black 0%,
    rgba(0, 0, 0, 0.6) 45%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle var(--r, 0px) at var(--x, 50%) var(--y, 50%),
    black 0%,
    rgba(0, 0, 0, 0.6) 45%,
    transparent 100%
  );
  will-change: mask-image, -webkit-mask-image, transform;
}

.hero-code-inner {
  position: absolute;
  inset: -80px;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  white-space: pre;
  color: #abb2bf;
  animation: heroCodeScroll 110s linear infinite;
}

@keyframes heroCodeScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* Syntax token colors matching prompt spec */
.hck { color: #7C9CFF; font-weight: 500; }   /* keywords */
.hcs { color: #7EE0A3; }                     /* strings */
.hcf { color: #FFC66D; }                     /* functions */
.hcc { color: #5C6370; font-style: italic; } /* comments */
.hcp { color: #8B93A1; }                     /* punctuation */
.hcn { color: #E5C07B; }                     /* numbers */
.hco { color: #C678DD; }                     /* classes/types */
.hcv { color: #ABB2BF; }                     /* variables/props */

/* ── Secondary halo glow: 300px blurred radial gradient (electric green #3DDC84 @ 12%) ── */
.hero-code-halo {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(61, 220, 132, 0.12) 0%, transparent 70%);
  filter: blur(28px);
  opacity: 0;
  will-change: left, top, opacity;
  transition: opacity 0.4s ease-out;
}
.hero.cr-active .hero-code-halo {
  opacity: 1;
}

/* ── Border glow on hover: 1px border that brightens when hovered ── */
.hero {
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.hero.cr-active {
  border-color: rgba(61, 220, 132, 0.22) !important;
  box-shadow: inset 0 0 24px rgba(61, 220, 132, 0.05) !important;
}

/* ── Content layer (z-index 10, pointer events only on interactive elements) ── */
.hero-content {
  position: relative;
  z-index: 10 !important;
  pointer-events: none;
}
.hero-content a,
.hero-content button,
.scroll-indicator {
  pointer-events: auto;
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
  .hero-code-inner {
    font-size: 11px;
    line-height: 1.6;
  }
}

/* ── Reduced motion: static spotlight at center, no lerp/scroll ── */
@media (prefers-reduced-motion: reduce) {
  .hero-code-inner { animation: none !important; }
  .hero-code-layer {
    --r: 180px !important;
    --x: 50% !important;
    --y: 50% !important;
  }
  .hero-code-halo {
    opacity: 0.6 !important;
    left: 50% !important;
    top: 50% !important;
  }
}

/* ============================================================
   NAVBAR & FOOTER DARK AESTHETIC & THEME-AWARE LOGOS (v8.0)
   ============================================================ */

/* ── Navbar Items: always crisp white on dark navbar ── */
header#navbar .nav-actions .nav-link,
header#navbar .nav-actions .nav-btn {
  color: rgba(255, 255, 255, 0.85) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.09) !important;
  background: transparent !important;
}
header#navbar .nav-actions .nav-link:hover,
header#navbar .nav-actions .nav-btn:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

header#navbar #submit-font-nav-btn {
  color: #3DDC84 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.09) !important;
}

header#navbar #vault-btn {
  color: rgba(255, 255, 255, 0.88) !important;
}

header#navbar .search-container {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.09) !important;
}
header#navbar #search-input {
  color: #ffffff !important;
}
header#navbar #search-input::placeholder {
  color: rgba(255, 255, 255, 0.42) !important;
}
header#navbar .search-container svg {
  color: rgba(255, 255, 255, 0.6) !important;
}

header#navbar #dark-toggle {
  color: rgba(255, 255, 255, 0.85) !important;
}
header#navbar .hamburger-line {
  background-color: #ffffff !important;
}
header#navbar .mobile-search-toggle-btn {
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ── Logo Image Rules ── */
.logo-link {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  line-height: 1 !important;
}

/* In dark navbar: show white logo, hide dark logo */
header#navbar .logo-img-light {
  display: block !important;
  height: 32px !important;
  width: auto !important;
  object-fit: contain !important;
}
header#navbar .logo-img-dark {
  display: none !important;
}

/* ── Footer Overhaul: dark aesthetic matching FontVault ── */
footer {
  background-color: #0A0B0D !important;
  background: #0A0B0D !important;
  color: #f0efec !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 5rem 2rem 2.5rem !important;
}

.footer-content {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.footer-branding p,
.footer-newsletter p,
.footer-links a,
.footer-bottom {
  color: #8A8F98 !important;
}

.footer-links h4,
.footer-newsletter h4 {
  color: #ffffff !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.12em !important;
}

.footer-links a:hover {
  color: #3DDC84 !important;
}

.footer-support-btn {
  color: #f0efec !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.footer-support-btn:hover {
  border-color: #3DDC84 !important;
  color: #3DDC84 !important;
}

.newsletter-form input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}
.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}
.newsletter-form button {
  background: #ffffff !important;
  color: #0A0B0D !important;
}
.newsletter-form button:hover {
  background: #3DDC84 !important;
}

/* Footer Logo: show white logo on dark footer */
footer .logo-img-light {
  display: block !important;
  height: 36px !important;
  width: auto !important;
  object-fit: contain !important;
  margin-bottom: 0.5rem !important;
}
footer .logo-img-dark {
  display: none !important;
}

/* Mobile responsive sizes */
@media (max-width: 768px) {
  header#navbar .logo-img-light {
    height: 24px !important;
  }
  footer .logo-img-light {
    height: 28px !important;
  }
  header#navbar {
    padding: 0 1rem !important;
  }
}


/* ============================================================
   USER CUSTOMIZATIONS OVERHAUL (v9.0)
   1. Non-sticky navbar
   2. Base grid soft radial fade-in effect
   3. Structured & responsive filter controls
   4. Hide submit a font button
   5. Clean consistent layout
   ============================================================ */

/* ── 1. Navbar is NOT sticky ── */
header,
header#navbar,
header.collapsed,
header#navbar.collapsed {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  height: 64px !important;
  background-color: #0A0B0D !important;
  background: #0A0B0D !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Hide 'Submit a Font' button everywhere */
#submit-font-nav-btn,
.nav-actions #submit-font-nav-btn {
  display: none !important;
}

/* ── 2. Grid Background: Soft radial fade-out vignette + fade-in animation ── */
.hero-base-grid {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) !important;
  background-size: 38px 38px !important;
  -webkit-mask-image: radial-gradient(ellipse 62% 52% at 50% 48%, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 88%) !important;
  mask-image: radial-gradient(ellipse 62% 52% at 50% 48%, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 88%) !important;
  animation: gridSoftFadeIn 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  z-index: 0 !important;
}

@keyframes gridSoftFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── 3. Logo Display: Crisp White Wordmark on Dark ── */
.logo-link {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
}
header#navbar .logo-img-light {
  display: block !important;
  height: 32px !important;
  width: auto !important;
  object-fit: contain !important;
}
header#navbar .logo-img-dark {
  display: none !important;
}

footer .logo-img-light {
  display: block !important;
  height: 36px !important;
  width: auto !important;
  object-fit: contain !important;
}
footer .logo-img-dark {
  display: none !important;
}

/* ── 4. Structured & Responsive Filter Section ── */
.sticky-font-controls {
  position: sticky !important;
  top: 0 !important;
  z-index: 920 !important;
  background: rgba(10, 11, 13, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  padding: 0.85rem 1.5rem !important;
  margin-left: -1.5rem !important;
  margin-right: -1.5rem !important;
  width: calc(100% + 3rem) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
}

/* Row 1: Category Pills */
.sticky-row-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 1rem !important;
}

.category-pills-scroll {
  flex: 1 1 auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
.category-pills-scroll::-webkit-scrollbar {
  display: none !important;
}

.category-pills-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.cat-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  font-family: var(--font-body), sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #8A8F98 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 99px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}

.cat-pill:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.cat-pill.active {
  color: #0A0B0D !important;
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  font-weight: 600 !important;
}

.cat-pill-count {
  font-family: var(--font-mono), monospace !important;
  font-size: 11px !important;
  opacity: 0.75 !important;
}

/* Row 2: Secondary Controls (Filters on Left, Toolbar on Right) */
.sticky-row-secondary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  width: 100% !important;
}

.refinement-dropdowns {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.filter-dropdown-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 12px !important;
  font-size: 12.5px !important;
  color: #ABB2BF !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.filter-dropdown-btn:hover {
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.sticky-preview-options-cluster {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.global-preview-input-wrap {
  min-width: 260px !important;
  max-width: 420px !important;
}
.global-preview-input-wrap input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
}
.global-preview-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

.toolbar-controls-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.toolbar-slider-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: var(--font-mono), monospace !important;
  font-size: 11px !important;
  color: #8A8F98 !important;
}

.toolbar-slider-wrap input[type="range"] {
  accent-color: #3DDC84 !important;
  width: 90px !important;
}

.size-input-container input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
  width: 40px !important;
  text-align: center !important;
  font-size: 12px !important;
}

.display-pill-toggle {
  display: inline-flex !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 2px !important;
  gap: 2px !important;
}
.display-toggle-btn {
  background: transparent !important;
  border: none !important;
  color: #8A8F98 !important;
  padding: 6px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.display-toggle-btn.active {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
}

/* Responsive Breakpoints for Filters */
@media (max-width: 1024px) {
  .sticky-font-controls {
    position: relative !important;
    top: auto !important;
    padding: 1rem 1rem !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    width: calc(100% + 2rem) !important;
  }
  .sticky-row-secondary {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .global-preview-input-wrap {
    max-width: 100% !important;
    width: 100% !important;
  }
  .sticky-preview-options-cluster {
    justify-content: space-between !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  header#navbar .logo-img-light { height: 24px !important; }
  footer .logo-img-light { height: 28px !important; }
  .toolbar-slider-wrap { display: none !important; }
}


/* ============================================================
   NON-STICKY FILTER CONTROLS OVERRIDE (v10.0)
   Filter section flows naturally in document; strictly non-sticky
   ============================================================ */
.sticky-font-controls,
.sticky-font-controls.is-sticky,
header.collapsed ~ #main-content .sticky-font-controls,
header.collapsed ~ * .sticky-font-controls,
header.collapsed ~ .main-container .sticky-font-controls,
header:not(.collapsed) ~ #main-content .sticky-font-controls,
header:not(.collapsed) ~ * .sticky-font-controls {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  z-index: 10 !important;
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--border-grey) !important;
  padding: 0.85rem 0 1rem 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.85rem !important;
}

[data-theme="dark"] .sticky-font-controls,
[data-theme="dark"] .sticky-font-controls.is-sticky {
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

@media (max-width: 1024px) {
  .sticky-font-controls,
  .sticky-font-controls.is-sticky {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    padding: 0.75rem 0 1rem 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
  }
}

@media (max-width: 768px) {
  .sticky-font-controls,
  .sticky-font-controls.is-sticky {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    padding: 0.65rem 0 0.85rem 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
  }
}
