/* ===== HNL Growth — Production Styles v3.0 — Mobile-First Audit ===== */

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

:root {
  --bg-primary: #0B0F1A;
  --bg-card: #111827;
  --bg-elevated: #1A2235;
  --accent-purple: #6C5CE7;
  --accent-green: #00D26A;
  --accent-gold: #F5A623;
  --accent-red: #EF4444;
  --accent-blue: #00B4D8;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --border: #1E293B;
  --radius: 16px;
  --nav-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 1024px) { :root { --nav-height: 72px; } }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100dvh;
  /* Prevent iOS bounce showing white background */
  overscroll-behavior-y: none;
}

/* Body scroll lock for overlays */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.font-jakarta { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
.font-inter { font-family: 'Inter', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* Skip to content — accessibility */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 8px 20px;
  background: var(--accent-purple);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-to-content:focus { top: 0; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== Selection ===== */
::selection { background: rgba(108, 92, 231, 0.3); color: #fff; }

/* ===== Focus States — Accessibility ===== */
*:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* ===== Touch targets — min 44px ===== */
@media (pointer: coarse) {
  button, a, select, input[type="checkbox"], .filter-pill, .nav-link, .mobile-nav-link {
    min-height: 44px;
    min-width: 44px;
  }
  .filter-pill { min-width: unset; padding: 0.5rem 1rem; }
  select { min-width: unset; }
}

/* ===== NAVBAR ===== */
#navbar {
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
#navbar.scrolled {
  background: rgba(11, 15, 26, 0.95);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
  position: relative;
}
.nav-link:hover { color: var(--text-primary); background-color: rgba(255,255,255,0.06); }
.nav-link.nav-active { color: var(--text-primary); }
.nav-link.nav-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: linear-gradient(to right, var(--accent-purple), var(--accent-green));
  border-radius: 1px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.75rem;
  transition: color 0.2s, background-color 0.2s, transform 0.15s;
}
.mobile-nav-link:hover, .mobile-nav-link:active {
  color: var(--text-primary);
  background-color: rgba(255,255,255,0.06);
  transform: translateX(4px);
}

/* Mobile menu animation */
#mobile-menu {
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Search overlay */
#search-overlay {
  animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
#search-results a { transition: background 0.15s; }
#search-results .search-category {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.5rem 1rem 0.25rem;
  font-weight: 600;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes floatDelayed {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 30px) scale(0.95); }
  66% { transform: translate(20px, -20px) scale(1.05); }
}
@keyframes scrollX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.2); }
  50% { box-shadow: 0 0 20px 5px rgba(108, 92, 231, 0.1); }
}
@keyframes barGrow {
  from { width: 0; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}
@keyframes slideUpIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.6s ease-out; }
.animate-fade-in-up { animation: fadeInUp 0.7s ease-out; }
.animate-fade-in-up-delay { animation: fadeInUp 0.7s ease-out 0.15s both; }
.animate-fade-in-up-delay2 { animation: fadeInUp 0.7s ease-out 0.3s both; }
.animate-float { animation: float 20s ease-in-out infinite; }
.animate-float-delayed { animation: floatDelayed 25s ease-in-out infinite; }
.animate-scroll-x {
  animation: scrollX 40s linear infinite;
  display: flex;
  width: max-content;
}
.animate-scroll-x:hover { animation-play-state: paused; }
.animate-bar { animation: barGrow 1.2s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* Bounce for rank badges */
.firm-card .absolute.-top-3 { animation: bounceIn 0.5s ease; }

/* ===== CARD EFFECTS ===== */
.firm-card, .deal-card {
  position: relative;
  overflow: hidden;
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s, opacity 0.3s;
}
.firm-card::before, .deal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(108, 92, 231, 0.08), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
.firm-card:hover::before, .deal-card:hover::before { opacity: 1; }
.firm-card > *, .deal-card > * { position: relative; z-index: 1; }

/* Card hide/show animation for filters */
.firm-card.card-hidden, .deal-card.card-hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ===== CHECKBOX ===== */
.compare-checkbox:checked + .checkbox-visual {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
}
.compare-checkbox:checked + .checkbox-visual i { color: white; }

/* ===== SCROLLBAR HIDE ===== */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== LINE CLAMP ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== FILTER CHECKBOX ===== */
.filter-cb {
  width: 1.125rem;
  height: 1.125rem;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--border);
  border-radius: 0.25rem;
  background: var(--bg-elevated);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}
.filter-cb:hover { border-color: var(--accent-purple); }
.filter-cb:checked {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
}
.filter-cb:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.6rem;
  color: white;
  font-weight: bold;
}

/* ===== FAQ ===== */
.faq-toggle i { transition: transform 0.3s ease; }
.faq-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.faq-item .faq-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s;
  padding: 0 1.25rem;
}
.faq-item .faq-content.open {
  max-height: 500px;
  padding: 0 1.25rem 1rem;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* ===== TOAST ===== */
.hnl-toast {
  position: fixed;
  bottom: 80px;
  right: 16px;
  left: 16px;
  z-index: 9999;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  font-family: 'Inter', sans-serif;
  max-width: 360px;
  animation: slideInRight 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  align-items: center;
  gap: 8px;
  word-break: break-word;
}
@media (min-width: 640px) {
  .hnl-toast {
    left: auto;
    right: 20px;
    bottom: 80px;
  }
}
.hnl-toast.exit {
  animation: slideOutRight 0.35s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* ===== TOOLTIP ===== */
.copy-tooltip {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  background: var(--accent-green);
  color: white;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
  animation: fadeInUp 0.3s ease;
}

/* ===== GRADIENT TEXT UTILITY ===== */
.text-gradient {
  background: linear-gradient(to right, var(--accent-purple), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BUTTON HOVER STATES ===== */
a[class*="bg-gradient"], button[class*="bg-gradient"] {
  position: relative;
  overflow: hidden;
}
a[class*="bg-gradient"]::after, button[class*="bg-gradient"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s;
}
a[class*="bg-gradient"]:hover::after, button[class*="bg-gradient"]:hover::after {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== BADGE PULSE for "Exclusive" / "Limited Time" ===== */
span[class*="border-\\[#F5A623\\]"] {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ===== TABLE OF CONTENTS — active state ===== */
aside nav a {
  transition: color 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
  padding-left: 0;
}
aside nav a.toc-active {
  color: var(--accent-purple) !important;
  font-weight: 600;
  border-left-color: var(--accent-purple);
  padding-left: 8px;
}

/* ===== FILTER PILLS — active state ===== */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  user-select: none;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--text-primary); border-color: var(--accent-purple); }
.filter-pill.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

/* ===== COMPARISON TABLE ===== */
#comparison-table .grid > div,
#comparison-default .grid > div {
  transition: background 0.15s;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-green));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 20px rgba(108,92,231,0.3);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  box-shadow: 0 6px 30px rgba(108,92,231,0.5);
  transform: translateY(-2px);
}

/* ===== MOBILE FILTER DRAWER ===== */
.filter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.filter-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.filter-drawer {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  z-index: 61;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + var(--safe-bottom));
}
.filter-drawer.open { transform: translateX(0); }

/* ===== COMPARE SLOT ===== */
.compare-slot {
  transition: border-color 0.3s, transform 0.2s;
}
.compare-slot.has-firm {
  border-style: solid;
  border-color: var(--accent-purple);
  background: rgba(108, 92, 231, 0.05);
}

/* ===== COOKIE BANNER ===== */
#cookie-banner {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: calc(1rem + var(--safe-bottom));
}
#cookie-banner.cookie-hidden {
  transform: translateY(100%);
}

/* ===== RESULTS COUNT ===== */
.results-count .count-value {
  transition: all 0.3s;
}

/* ============================================================
   RESPONSIVE — MOBILE-FIRST COMPREHENSIVE FIXES
   ============================================================ */

/* ===== EXTRA SMALL: ≤ 400px (iPhone SE, small phones) ===== */
@media (max-width: 400px) {
  /* Hero heading */
  h1 { font-size: 1.75rem !important; line-height: 1.2 !important; }

  /* Tighter padding */
  .max-w-7xl { padding-left: 12px !important; padding-right: 12px !important; }

  /* Cards tighter */
  .firm-card, .deal-card { padding: 0.875rem !important; }

  /* Stats grid stacks fully on tiny screens */
  .grid.grid-cols-2 { grid-template-columns: 1fr !important; gap: 0.5rem !important; }

  /* Footer social icons wrap */
  .flex.gap-3 > a[aria-label] { width: 36px; height: 36px; }

  /* Newsletter input + button stack */
  footer .flex.gap-3:has(input[type="email"]) {
    flex-direction: column;
  }
  footer .flex.gap-3:has(input[type="email"]) button {
    width: 100%;
  }
}

/* ===== SMALL: ≤ 640px (most phones) ===== */
@media (max-width: 640px) {
  /* Hero gradient orbs — scale down and contain */
  .animate-float, .animate-float-delayed {
    width: 200px !important;
    height: 200px !important;
  }

  /* Hero min height — use dvh for mobile address bar */
  section.min-h-\[85vh\] {
    min-height: 80dvh;
    min-height: 80vh; /* fallback */
  }

  /* Hero heading responsive */
  h1.text-4xl { font-size: 2rem !important; }

  /* Stats grid columns */
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .grid.grid-cols-2.md\:grid-cols-4 > div {
    padding: 0.75rem !important;
  }

  /* CTA buttons stack */
  .flex.flex-col.sm\:flex-row { flex-direction: column; }
  .flex.flex-col.sm\:flex-row > a { width: 100%; text-align: center; }

  /* Bar chart — firm name shorter */
  .flex.items-center.gap-4 > span.w-28 {
    width: 70px !important;
    font-size: 0.6875rem;
  }

  /* Deal cards — remove min-width to prevent overflow */
  .deal-card {
    min-width: 0 !important;
  }
  /* Deal cards in horizontal scroll */
  .snap-x .deal-card,
  .snap-x .deal-card-wrapper {
    min-width: 280px;
  }

  /* Compare page — slots stack */
  .grid.grid-cols-1.md\:grid-cols-3 .compare-slot {
    min-height: 140px;
  }

  /* Comparison table — ensure scrollable */
  #comparison-default, #comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #comparison-default .grid.grid-cols-4,
  #comparison-table .grid {
    min-width: 640px;
  }

  /* Review page — header flex-col */
  .flex.flex-col.lg\:flex-row.gap-8.items-start {
    flex-direction: column;
  }

  /* Review page — challenge rules grid stacks */
  .grid.grid-cols-2.gap-0 {
    grid-template-columns: 1fr !important;
  }
  .grid.grid-cols-2.gap-0 > div {
    border-right: none !important;
  }

  /* Quick stats — 2 cols on phone */
  .grid.grid-cols-2.md\:grid-cols-3.lg\:grid-cols-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Payout process grid */
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Trading conditions grid */
  .grid.grid-cols-2.md\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  /* Footer grid — 1 col on small screens */
  footer .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  footer .col-span-2 { grid-column: span 1; }

  /* Blog featured post — stack fully */
  .grid.grid-cols-1.lg\:grid-cols-2 > div.h-64 {
    height: 160px;
  }

  /* Lists page items */
  .grid.grid-cols-2.sm\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
  }

  /* How It Works — hide connector */
  .hidden.md\:block.absolute.top-24 { display: none !important; }

  /* Deals page — alert banner text wrap */
  .flex.items-center.justify-center.gap-3 {
    flex-wrap: wrap;
    text-align: center;
    gap: 0.5rem;
  }

  /* Review action buttons stack on small */
  .flex.gap-3:has(a[href*="visit"]) {
    flex-direction: column;
  }
  .flex.gap-3:has(a[href*="visit"]) > a {
    width: 100%;
    justify-content: center;
  }

  /* Prop firm card action buttons — stack vertically */
  .firm-card .flex.gap-3:last-child {
    flex-direction: column;
    gap: 0.5rem;
  }
  .firm-card .flex.gap-3:last-child > a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Cookie banner stack */
  #cookie-banner .flex.flex-col.sm\:flex-row {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Comparison table buttons */
  #comparison-default .grid.grid-cols-4:last-child a,
  #comparison-table a[class*="bg-gradient"] {
    font-size: 0.6875rem;
    padding: 0.375rem 0.5rem;
  }

  /* Sidebar hides on mobile — show inline TOC instead */
  aside.lg\:w-72 { display: none; }
  
  /* Tables */
  table { font-size: 0.8125rem; }
  th, td { padding: 0.5rem 0.375rem !important; }
  
  /* Word break for long text */
  h1, h2, h3 { word-break: break-word; overflow-wrap: break-word; }

  /* Back-to-top position adjusted for mobile */
  #back-to-top {
    bottom: 16px;
    right: 16px;
  }

  /* Section padding reduction */
  section.py-16 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  section.py-12 { padding-top: 2rem; padding-bottom: 2rem; }
  .lg\:py-20 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

/* ===== MEDIUM: ≤ 768px (landscape phones, small tablets) ===== */
@media (max-width: 768px) {
  .firm-card, .deal-card { min-width: 0 !important; }
  .compare-slot { min-height: 140px; }

  /* Filter sidebar hidden on mobile, shown via drawer */
  aside.lg\:w-72 { display: none; }
  aside.filter-visible { display: block; }

  /* Rankings controls — wrap */
  .flex.flex-col.sm\:flex-row.items-start.sm\:items-center.justify-between {
    gap: 0.75rem;
  }
}

/* ===== LARGE-ISH: ≤ 1024px (tablets, small laptops) ===== */
@media (max-width: 1024px) {
  /* Review page sidebar → horizontal on tablet */
  .flex.flex-col.lg\:flex-row {
    flex-direction: column;
  }
  aside.lg\:w-72 {
    width: 100%;
  }
  /* Unstick sidebar on tablet */
  .lg\:sticky { position: relative !important; top: auto !important; }
}

/* ===== HOVER DISABLE ON TOUCH ===== */
@media (hover: none) {
  .firm-card:hover, .deal-card:hover {
    transform: none;
    box-shadow: none;
  }
  .firm-card::before, .deal-card::before {
    display: none;
  }
}

/* ===== PRINT ===== */
@media print {
  nav, footer, #cookie-banner, #back-to-top, .no-print { display: none !important; }
  body { background: white; color: black; }
  .firm-card, .deal-card { break-inside: avoid; border: 1px solid #ccc; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-scroll-x { animation: none; }
  .animate-float, .animate-float-delayed { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== SAFE AREA INSETS (notch phones) ===== */
@supports (padding: env(safe-area-inset-bottom)) {
  #cookie-banner {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  #compare-bar {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  #back-to-top {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .filter-drawer {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}
