/**
 * Critical CSS - Premium Dark Mode
 * Refined to match the new MC NovaTools design language
 */

/* ============================================
   FONT FACE - font-display: swap for CWV
   ============================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Inter');
}

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ============================================
   DESIGN TOKENS - COLORS
   ============================================ */
:root {
  /* Backgrounds */
  --bg-primary: #06070b;
  --bg-secondary: #0b1020;
  --bg-tertiary: #10172a;
  --bg-elevated: #131c31;
  --bg-hover: #18233d;

  /* Surfaces */
  --surface-default: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-active: rgba(255, 255, 255, 0.1);

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;

  /* Accent System */
  --accent-primary: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-secondary: #8b5cf6;
  --accent-warm: #ef4444;
  --accent-glow: rgba(34, 211, 238, 0.24);
  --accent-subtle: rgba(34, 211, 238, 0.12);

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Borders */
  --border-default: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(34, 211, 238, 0.38);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.34);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.12);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Card */
  --card-bg: linear-gradient(180deg, rgba(19, 28, 49, 0.82), rgba(10, 14, 24, 0.96));
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-bg: linear-gradient(180deg, rgba(24, 35, 61, 0.88), rgba(11, 16, 32, 0.98));
  --card-hover-border: rgba(34, 211, 238, 0.22);

  /* Ad frame */
  --ad-bg: rgba(255, 255, 255, 0.025);
  --ad-border: rgba(255, 255, 255, 0.08);
  --ad-label-color: #64748b;

  /* Header */
  --header-bg: rgba(6, 7, 11, 0.82);
  --header-border: rgba(255, 255, 255, 0.08);

  /* Footer */
  --footer-bg: rgba(8, 13, 24, 0.9);
  --footer-border: rgba(255, 255, 255, 0.08);
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-hover: #e2e8f0;

  --surface-default: rgba(15, 23, 42, 0.03);
  --surface-hover: rgba(15, 23, 42, 0.06);
  --surface-active: rgba(15, 23, 42, 0.09);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;

  --accent-primary: #0891b2;
  --accent-hover: #06b6d4;
  --accent-secondary: #7c3aed;
  --accent-warm: #dc2626;
  --accent-glow: rgba(8, 145, 178, 0.12);
  --accent-subtle: rgba(8, 145, 178, 0.08);

  --success: #16a34a;
  --warning: #d97706;
  --error: #dc2626;
  --info: #2563eb;

  --border-default: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.16);
  --border-accent: rgba(8, 145, 178, 0.28);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 32px rgba(8, 145, 178, 0.08);

  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, 0.08);
  --card-hover-bg: #ffffff;
  --card-hover-border: rgba(8, 145, 178, 0.22);

  --ad-bg: #f8fafc;
  --ad-border: rgba(15, 23, 42, 0.08);
  --ad-label-color: #94a3b8;

  --header-bg: rgba(255, 255, 255, 0.9);
  --header-border: rgba(15, 23, 42, 0.08);

  --footer-bg: #f8fafc;
  --footer-border: rgba(15, 23, 42, 0.08);
}

/* Auto-detect system preference */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-hover: #e2e8f0;

    --surface-default: rgba(15, 23, 42, 0.03);
    --surface-hover: rgba(15, 23, 42, 0.06);
    --surface-active: rgba(15, 23, 42, 0.09);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;

    --accent-primary: #0891b2;
    --accent-hover: #06b6d4;
    --accent-secondary: #7c3aed;
    --accent-warm: #dc2626;
    --accent-glow: rgba(8, 145, 178, 0.12);
    --accent-subtle: rgba(8, 145, 178, 0.08);

    --success: #16a34a;
    --warning: #d97706;
    --error: #dc2626;
    --info: #2563eb;

    --border-default: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.16);
    --border-accent: rgba(8, 145, 178, 0.28);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 32px rgba(8, 145, 178, 0.08);

    --card-bg: #ffffff;
    --card-border: rgba(15, 23, 42, 0.08);
    --card-hover-bg: #ffffff;
    --card-hover-border: rgba(8, 145, 178, 0.22);

    --ad-bg: #f8fafc;
    --ad-border: rgba(15, 23, 42, 0.08);
    --ad-label-color: #94a3b8;

    --header-bg: rgba(255, 255, 255, 0.9);
    --header-border: rgba(15, 23, 42, 0.08);

    --footer-bg: #f8fafc;
    --footer-border: rgba(15, 23, 42, 0.08);
  }
}

/* ============================================
   BACKGROUND SYSTEM - Ambient gradients
   ============================================ */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg-ambient::before {
  content: '';
  position: absolute;
  top: -45%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 820px;
  background: radial-gradient(
    ellipse at center,
    rgba(34, 211, 238, 0.08) 0%,
    rgba(139, 92, 246, 0.05) 38%,
    transparent 70%
  );
  filter: blur(84px);
}

.bg-ambient::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 820px;
  height: 620px;
  background: radial-gradient(
    ellipse at bottom right,
    rgba(239, 68, 68, 0.06) 0%,
    transparent 62%
  );
  filter: blur(72px);
}

/* Noise texture overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.012;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hide ambient backgrounds in light mode */
[data-theme="light"] .bg-ambient,
[data-theme="light"] .noise-overlay {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .bg-ambient,
  :root:not([data-theme="dark"]) .noise-overlay {
    display: none;
  }
}

/* ============================================
   LAYOUT
   ============================================ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

.main-content {
  flex: 1;
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.logo {
  position: relative;
  z-index: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.logo:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.logo:hover .header-logo-img {
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.28))
          drop-shadow(0 0 24px rgba(139, 92, 246, 0.18));
  transform: scale(1.04);
}

/* Header PNG Logo */
.header-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.18))
          drop-shadow(0 0 10px rgba(139, 92, 246, 0.14));
  transition: all 0.25s ease;
  flex-shrink: 0;
}

[data-theme="light"] .header-logo-img {
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.12));
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .header-logo-img {
    filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.12));
  }
}

/* Neon Logo Icon (backward compat) */
.neon-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.18))
          drop-shadow(0 0 16px rgba(139, 92, 246, 0.12));
  transition: all 0.3s ease;
}

.neon-logo svg, .neon-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Logo Text */
.logo-text {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-mc {
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Navigation */
.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Privacy Badge */
.privacy-badge {
  display: none;
}

@media (min-width: 1024px) {
  .privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
  }

  .privacy-badge:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
  }

  .privacy-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
  }
}

/* Mobile Menu Button */
.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--border-default);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: 0.875rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: var(--text-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  padding: 1.5rem 0 2rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding: 2rem 0 3rem;
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* Hero Logo Display */
.hero-logo-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

/* Hero brand PNG logo */
.hero-brand-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius-xl);
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.18))
          drop-shadow(0 0 28px rgba(139, 92, 246, 0.14));
  animation: float 6s ease-in-out infinite;
  display: block;
  margin: 0 auto 1.5rem;
}
@media (min-width: 768px) {
  .hero-brand-img {
    width: 160px;
    height: 160px;
  }
}

[data-theme="light"] .hero-brand-img {
  filter: drop-shadow(0 4px 20px rgba(15, 23, 42, 0.08));
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-brand-img {
    filter: drop-shadow(0 4px 20px rgba(15, 23, 42, 0.08));
  }
}

.hero-neon-logo {
  width: 220px;
  height: 220px;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.18))
          drop-shadow(0 0 32px rgba(139, 92, 246, 0.14));
  animation: float 6s ease-in-out infinite;
}

.hero-neon-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-brand-text {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.hero-brand-text span {
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero-logo-display {
    margin-bottom: 2.5rem;
  }

  .hero-neon-logo {
    width: 280px;
    height: 280px;
  }

  .hero-brand-text {
    font-size: 3rem;
  }
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.78) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 55%, var(--accent-warm) 100%);
  color: white;
  box-shadow:
    0 14px 30px rgba(34, 211, 238, 0.14),
    0 10px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 20px 40px rgba(34, 211, 238, 0.18),
    0 14px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--surface-default);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.card:hover {
  background: var(--card-hover-bg);
  border-color: var(--card-hover-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-body {
  padding: 1.5rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-subtle), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.08);
  border-color: rgba(34, 211, 238, 0.26);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}
[data-theme="light"] .card-description {
  color: #475569;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
  transition: all 0.2s ease;
}

.card:hover .card-arrow {
  gap: 0.625rem;
  color: var(--accent-hover);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-hover);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--surface-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.sidebar-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.feature-check {
  width: 20px;
  height: 20px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-check svg {
  width: 12px;
  height: 12px;
  color: var(--success);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-default);
}

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

.stat-label {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

.stat-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-value.accent {
  color: var(--accent-hover);
}

/* ============================================
   PROFESSIONAL AD SLOTS - Stage 2
   ============================================ */

/* Top Header Ad (728x90) - Sticky */
.ad-header-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
  padding: 0.5rem 1rem;
  text-align: center;
  display: none;
}

.ad-header-top .ad-label {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.ad-header-top .ad-container-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: var(--ad-bg);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .ad-header-top {
    display: block;
  }

  .main-header {
    top: 110px;
  }

  .main-content {
    padding-top: 110px;
  }
}

/* Sub-Header Rectangle Ad (300x250) */
.ad-subheader {
  margin: 1.5rem auto;
  text-align: center;
  max-width: 100%;
}

.ad-subheader .ad-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.ad-subheader .ad-container-rectangle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-bg);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 0.75rem;
  position: relative;
  overflow: hidden;
}

.ad-subheader .ad-container-rectangle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Sidebar Ads (300x600) */
.ad-sidebar-left,
.ad-sidebar-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  width: 300px;
}

.ad-sidebar-left {
  left: 1rem;
}

.ad-sidebar-right {
  right: 1rem;
}

.ad-sidebar-left .ad-label,
.ad-sidebar-right .ad-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-align: center;
}

.ad-sidebar-left .ad-container-skyscraper,
.ad-sidebar-right .ad-container-skyscraper {
  background: var(--ad-bg);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

.ad-sidebar-left .ad-container-skyscraper::before,
.ad-sidebar-right .ad-container-skyscraper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

@media (min-width: 1400px) {
  .ad-sidebar-left,
  .ad-sidebar-right {
    display: block;
  }

  .container {
    max-width: 1100px;
  }
}

/* In-Content Ad (300x250) */
.ad-in-content {
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
}

.ad-in-content .ad-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.ad-in-content .ad-container-rectangle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ad-bg);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 0.75rem;
  position: relative;
}

/* Mobile Anchor Ad (320x50) */
.ad-mobile-anchor {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-default);
  padding: 0.5rem;
  text-align: center;
  display: none;
}

.ad-mobile-anchor .ad-container-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

@media (max-width: 768px) {
  .ad-mobile-anchor {
    display: block;
  }

  body {
    padding-bottom: 70px;
  }
}

/* Legacy Ad Containers */
.ad-container {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-banner {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
}

.ad-sidebar {
  width: 336px;
  height: 280px;
  margin: 0 auto;
}

/* Ad Frame Component */
.ad-frame {
  background: var(--ad-bg);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  text-align: center;
}
.ad-frame .ad-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ad-label-color);
  margin-bottom: 0.5rem;
}

/* ============================================
   BLOG ARTICLES
   ============================================ */
.blog-article {
  padding: 3rem 0 6rem;
}

.article-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

.article-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.article-excerpt {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 3rem 0 1.25rem;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.75rem;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content .note {
  background: var(--surface-default);
  border-left: 3px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.cta-box h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.cta-box--large {
  padding: 3rem 2rem;
  margin: 4rem 0;
}

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 1px solid var(--border-default);
}

.faq-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.faq-item {
  margin-bottom: 2rem;
}

.faq-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.faq-item p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-brand {
    grid-column: auto;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  line-height: 1.7;
  max-width: 280px;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

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

.footer-link {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-default);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--success);
  font-weight: 500;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  background: var(--surface-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.lang-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.lang-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 140px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.lang-switcher.open .lang-dropdown {
  display: block;
  animation: fadeInDown 0.15s ease;
}

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

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.lang-option:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.lang-option.active {
  color: var(--accent-hover);
  background: var(--accent-subtle);
}

.lang-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   SITE FOOTER (theme-aware)
   ============================================ */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 3rem 1rem 1.5rem;
  margin-top: 4rem;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand-name { color: var(--accent-hover); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer-about { color: var(--text-tertiary); font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.75rem; }
.footer-privacy-badge { display: inline-block; padding: 3px 10px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.28); border-radius: 12px; color: var(--success); font-size: 0.75rem; }
.footer-heading { color: var(--text-primary); font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.875rem; }
.footer-links a { color: var(--text-tertiary); font-size: 0.875rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent-hover); }
.footer-tips { padding-left: 1.25rem; color: var(--text-tertiary); font-size: 0.8125rem; line-height: 1.7; margin-bottom: 1.25rem; }
.footer-contact { color: var(--text-tertiary); font-size: 0.8125rem; }
.footer-contact a { color: var(--accent-hover); }
.footer-bottom { border-top: 1px solid var(--border-default); padding-top: 1.25rem; text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8125rem; line-height: 1.6; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-tertiary); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-hover); }
.breadcrumb-sep { color: var(--text-muted); }

/* ============================================
   TOOL ACCORDION
   ============================================ */
.tool-accordion {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
}
.tool-accordion summary {
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-default);
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tool-accordion summary::-webkit-details-marker { display: none; }
.tool-accordion summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.tool-accordion[open] summary::after { content: '\2212'; }
.tool-accordion .accordion-content {
  padding: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   3-COLUMN AD LAYOUT
   ============================================ */
.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 1200px) {
  .page-layout {
    grid-template-columns: 160px 1fr 160px;
    padding: 0 2rem;
  }
}
@media (min-width: 1400px) {
  .page-layout {
    grid-template-columns: 300px 1fr 300px;
  }
}
.ad-rail { display: none; }
@media (min-width: 1200px) {
  .ad-rail {
    display: block;
    position: sticky;
    top: 100px;
    align-self: start;
  }
}
.ad-rail .ad-frame { margin-bottom: 1.5rem; }
.page-center { min-width: 0; }

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Production tool support content for AdSense-readiness P0 pages */
.tool-support-content {
  margin: 2rem auto 0;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  color: var(--text-secondary, #cbd5e1);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-default, rgba(148, 163, 184, 0.22));
  border-radius: var(--radius-lg, 16px);
  line-height: 1.65;
}

.tool-support-content h2,
.tool-support-content h3 {
  color: var(--text-primary, #f8fafc);
  margin: 0 0 0.5rem;
}

.tool-support-content p,
.tool-support-content ul,
.tool-support-content ol {
  margin-top: 0;
}

.tool-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tool-support-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md, 12px);
}

.tool-support-card ul,
.tool-support-card ol {
  padding-left: 1.25rem;
}

.tool-next-step {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-md, 12px);
}

.tool-next-step a {
  color: var(--accent-primary, #22d3ee);
  font-weight: 700;
}

.ad-slot-disabled {
  display: none !important;
}

/* ============================================
   Ad slot reservation - CLS protection
   ============================================ */
.ad-slot,
.ad-slot-container,
.ad-container,
.ad-slot-reserved,
ins.adsbygoogle {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-md, 12px);
}

.ad-slot,
.ad-slot-container,
.ad-container,
.ad-slot-reserved {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--ad-bg), rgba(255, 255, 255, 0.05), var(--ad-bg));
  background-size: 240% 100%;
  border: 1px dashed var(--ad-border);
  animation: nt-ad-placeholder 1.8s ease-in-out infinite;
}

.ad-slot::before,
.ad-slot-container::before,
.ad-container::before {
  content: 'Advertisement';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ad-label-color);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.ad-slot-leaderboard,
.ad-banner,
.ad-banner-container,
[data-ad-format='leaderboard'] {
  min-height: 90px;
}

.ad-slot-rectangle,
.ad-rectangle,
.ad-square,
.ad-rectangle-container,
.ad-square-container,
[data-ad-format='rectangle'] {
  min-height: 250px;
}

.ad-slot-sticky,
.ad-mobile-anchor,
.ad-mobile-anchor-container,
[data-ad-format='sticky'] {
  min-height: 100px;
}

.ad-sidebar,
.ad-sidebar-container,
[data-ad-format='sidebar'] {
  min-height: 600px;
}

@keyframes nt-ad-placeholder {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .ad-slot,
  .ad-slot-container,
  .ad-container,
  .ad-slot-reserved {
    animation: none;
  }
}

/* ============================================
   PUBLIC PRODUCT POLISH LAYER - Premium surfaces
   Shared by production home, category, tool, blog, and public pages.
   ============================================ */
:root {
  --surface-panel: linear-gradient(180deg, rgba(18, 27, 46, 0.88), rgba(8, 12, 22, 0.96));
  --surface-panel-soft: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(7, 10, 18, 0.9));
  --surface-tool: linear-gradient(180deg, rgba(10, 18, 32, 0.92), rgba(6, 9, 16, 0.98));
  --surface-result: linear-gradient(180deg, rgba(16, 185, 129, 0.10), rgba(8, 13, 24, 0.92));
  --surface-warning: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(8, 13, 24, 0.92));
  --focus-ring: 0 0 0 4px rgba(34, 211, 238, 0.22);
  --premium-outline: 1px solid rgba(148, 163, 184, 0.16);
}

body {
  color: var(--text-primary) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.10), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(139, 92, 246, 0.12), transparent 32rem),
    radial-gradient(circle at 50% 100%, rgba(239, 68, 68, 0.055), transparent 34rem),
    linear-gradient(180deg, #05060a 0%, #07101c 46%, #05070c 100%) !important;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.86), transparent 78%);
}

button,
a[href],
[role="button"],
summary,
select,
input[type="file"],
input[type="checkbox"],
input[type="radio"],
.filter-btn,
.tool-card,
.category-card,
.blog-card,
.search-tag,
.related-tool-link,
.quality-option,
.dropzone {
  cursor: pointer;
}

button:disabled,
.btn[aria-disabled="true"],
[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.2);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

.main-header,
.app-header {
  background: rgba(5, 8, 15, 0.78) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.nav-link,
.nav-desktop a,
.mobile-nav-link {
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active,
.nav-desktop a:hover,
.nav-desktop a.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-primary) !important;
}

.language-selector,
.search-box-input,
.search-input,
.input-field,
textarea,
select,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  background: rgba(8, 13, 24, 0.82) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.language-selector:hover,
.search-box-input:hover,
.search-input:hover,
.input-field:hover,
textarea:hover,
select:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover {
  border-color: rgba(34, 211, 238, 0.34) !important;
}

.hero-card,
.value-proof > .container > div,
.panel,
.category-section,
.editorial-panel,
.cta-box,
.feature,
.feature-card,
.stat-card,
.tool-container,
.results-panel,
.file-info-card,
.quality-selector,
.trust-help,
.related-tools,
.blog-card,
.summary-box,
.related-panel,
.article-hero-card,
.premium-card,
.public-page-card,
.page-card,
.content-card,
.contact-card,
.policy-card,
.legal-card,
.request-card,
.mission-card,
.form-card {
  background: var(--surface-panel) !important;
  border: var(--premium-outline) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.045);
}

.hero,
.category-hero,
.page-hero,
.blog-hero,
.premium-hero {
  position: relative;
  isolation: isolate;
}

.hero::after,
.category-hero::after,
.page-hero::after,
.blog-hero::after,
.premium-hero::after {
  content: '';
  position: absolute;
  inset: auto 10% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.42), rgba(139,92,246,0.34), transparent);
  z-index: -1;
}

.hero-title,
.category-title,
.page-title,
.article-hero-card h1,
.blog-hero h1,
.article-title {
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-description,
.category-description,
.section-description,
.article-lede,
.article-excerpt,
.panel p,
.tool-header p,
.blog-card p,
.feature-description {
  color: var(--text-secondary) !important;
  line-height: 1.75;
}

.page-content,
.legal-content,
.policy-content,
.article-content {
  font-size: clamp(1rem, 1.2vw, 1.08rem) !important;
  line-height: 1.78 !important;
}

.section-title,
.blog-section-title,
.panel h2,
.faq-section h2,
.premium-copy h2 {
  text-wrap: balance;
}

.btn,
.search-box-btn,
.download-btn {
  min-height: 44px;
  border-radius: 14px !important;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.search-box-btn:hover,
.download-btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.search-box-btn,
.download-btn {
  background: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 58%, #f43f5e 120%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.16);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.84) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
}

.tool-container {
  max-width: 1040px !important;
  margin-top: 2rem !important;
  border-radius: 28px;
  padding: clamp(1.25rem, 3vw, 2.5rem) !important;
}

.tool-header {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.tool-header h1 {
  font-size: clamp(2rem, 5vw, 3.75rem) !important;
  line-height: 1.05;
}

.dropzone {
  background:
    radial-gradient(circle at top, rgba(34,211,238,0.12), transparent 42%),
    var(--surface-tool) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 20px 50px rgba(0,0,0,0.24);
}

.dropzone:hover,
.dropzone.drag-active,
.dropzone:focus-visible {
  border-color: rgba(34,211,238,0.62) !important;
  background:
    radial-gradient(circle at top, rgba(34,211,238,0.18), transparent 46%),
    var(--surface-tool) !important;
}

.results-panel,
.state-section[data-state="success"],
.success-state,
.alert-success {
  border-color: rgba(34, 197, 94, 0.28) !important;
}

.state-section[data-state="loading"],
.skeleton,
.loading-state {
  position: relative;
  overflow: hidden;
}

.state-section[data-state="loading"]::after,
.skeleton::after,
.loading-state::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: novatoolsShimmer 1.5s infinite;
}

@keyframes novatoolsShimmer { to { transform: translateX(100%); } }

.tool-card,
.category-card,
.blog-card,
.use-case-card,
.feature,
.faq-item,
.article-faq {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tool-card:hover,
.category-card:hover,
.blog-card:hover,
.use-case-card:hover,
.feature:hover,
.faq-item:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.32) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(34,211,238,0.05);
}

.tool-card p::after {
  content: ' When to use: start here when this task is your next visible output.';
  color: var(--text-tertiary);
}

.category-guide-standard .panel::after,
.tools-section .tool-card::after {
  content: 'Task signal: choose this path when it matches the output you need next.';
  display: block;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.main-footer,
.app-footer,
.tool-footer {
  background:
    radial-gradient(circle at 20% 0%, rgba(34,211,238,0.09), transparent 28rem),
    linear-gradient(180deg, rgba(8, 13, 24, 0.94), rgba(4, 6, 10, 0.98)) !important;
  border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.footer-grid {
  gap: clamp(1.25rem, 3vw, 2.5rem) !important;
}

.footer-bottom,
.footer-legal-bar {
  border-top-color: rgba(148, 163, 184, 0.12) !important;
}

.blog-hub .blog-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1.25rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.blog-card {
  display: grid;
  overflow: hidden;
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
}

.blog-card-image {
  min-height: 156px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: radial-gradient(circle at center, rgba(34,211,238,0.22), rgba(139,92,246,0.12) 42%, rgba(8,13,24,0.4));
}

.blog-card-content { padding: 1.25rem; }
.blog-card h3 { font-size: 1.12rem; line-height: 1.35; margin-bottom: 0.65rem; }
.blog-card-support { color: var(--text-tertiary) !important; font-size: 0.92rem; }
.blog-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--text-muted); font-size: 0.82rem; margin-top: 1rem; }
.blog-category, .hero-badge, .tag { color: #a5f3fc !important; }
.featured-card { grid-template-columns: minmax(180px, 0.36fr) 1fr; }
.category-filter { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 2rem 0; }
.filter-btn { padding: 0.7rem 1rem; border-radius: 999px; background: rgba(15,23,42,0.78); border: 1px solid rgba(148,163,184,0.18); color: var(--text-secondary); }
.filter-btn:hover, .filter-btn.active { color: #fff; border-color: rgba(34,211,238,0.45); background: linear-gradient(135deg, rgba(34,211,238,0.24), rgba(139,92,246,0.24)); }
.blog-sections { display: grid; gap: 1.25rem; margin-top: 2rem; }
.category-section { border-radius: 24px; padding: clamp(1rem, 3vw, 1.5rem); }
.category-section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }

.article-layout { max-width: 980px; }
.article-hero-card { border-radius: 30px; padding: clamp(1.5rem, 5vw, 3rem); margin: clamp(2rem, 5vw, 4rem) 0 2rem; }
.article-hero-card h1 { font-size: clamp(2.25rem, 6vw, 4.75rem); line-height: 1.02; margin: 1rem 0; }
.article-back { color: var(--accent-hover); font-weight: 700; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; color: var(--text-tertiary); }
.article-lede { font-size: clamp(1.05rem, 2vw, 1.25rem); }
.summary-box { margin-top: 1.25rem; border-radius: 18px; padding: 1rem 1.15rem; color: var(--text-secondary); }
.article-cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.5rem; }
.premium-copy { max-width: 820px; margin: 0 auto clamp(3rem, 6vw, 5rem); font-size: 1.05rem; line-height: 1.85; }
.premium-copy section { margin: 2rem 0; }
.premium-copy h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin: 2rem 0 0.75rem; line-height: 1.18; }
.premium-copy h3 { margin: 1.25rem 0 0.5rem; }
.premium-copy p, .premium-copy li { color: var(--text-secondary); }
.related-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; border-radius: 18px; padding: 1rem; margin: 1rem 0; }
.related-post-list { list-style: disc; padding-left: 1.2rem; }
.article-faq { background: rgba(15,23,42,0.72); border: 1px solid rgba(148,163,184,0.16); border-radius: 16px; padding: 1rem; margin: 0.75rem 0; }
.article-faq summary { font-weight: 700; color: var(--text-primary); }

@media (max-width: 760px) {
  .featured-card,
  .related-panel { grid-template-columns: 1fr; }
  .category-section-header { align-items: flex-start; flex-direction: column; }
  .tool-card p::after { display: block; margin-top: 0.75rem; }
}

/* Blog production shell and editorial cover system */
.blog-card-image {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  background: rgba(8, 13, 24, 0.74);
}

.blog-card-image img,
.article-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 8, 15, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.featured-card .blog-card-image {
  min-height: 100%;
}

.article-shell .main-content {
  padding-bottom: clamp(2rem, 5vw, 5rem);
}

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(1.25rem, 4vw, 2.25rem);
  align-items: center;
}

.article-visual {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 13, 24, 0.74);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.article-visual img {
  aspect-ratio: 16 / 9;
}

.article-visual figcaption {
  padding: 0.75rem 1rem;
  color: var(--text-tertiary);
  font-size: 0.86rem;
  font-weight: 700;
}

.premium-copy section {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.premium-copy section:last-child {
  border-bottom: 0;
}

.related-panel > div {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.tool-card p::after,
.category-guide-standard .panel::after,
.tools-section .tool-card::after {
  content: none !important;
}

.category-guide-standard .panel,
.tool-support-card,
.related-tools,
.blog-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

@media (max-width: 860px) {
  .article-hero-grid,
  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-card .blog-card-image {
    min-height: 180px;
  }
}

/* ============================================
   Phase 9 revenue surfaces - policy-safe spacing
   ============================================ */
.revenue-card,
.ad-policy-space {
  margin-block: 9.5rem;
}

.ad-leaderboard-safe {
  margin-block: 9.5rem 9.5rem;
}

.tool-workspace + .ad-slot-container,
.tool-card + .ad-slot-container,
.tool-container + .ad-slot-container,
.article-body .ad-slot-container {
  margin-block: 9.5rem;
}

.ad-wrapper,
.ad-frame {
  position: relative;
}

.ad-slot-empty {
  display: none !important;
}

.sponsored-content-card,
.premium-plan-cta {
  padding: clamp(1.25rem, 2vw, 1.75rem);
  border-radius: var(--radius-lg, 18px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.84));
  color: var(--text-primary, #f8fafc);
}

.sponsored-content-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(15, 23, 42, 0.82));
}

.sponsored-content-card__label,
.ad-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  color: var(--text-tertiary, #94a3b8);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nt-affiliate-link::after {
  content: ' sponsored';
  margin-left: 0.35rem;
  color: var(--text-tertiary, #94a3b8);
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
}

.premium-plan-cta {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.1));
}

.ad-mobile-anchor-sticky {
  min-height: 66px;
  padding-right: 3rem !important;
}

.ad-mobile-anchor__close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.ad-mobile-anchor-sticky[data-ad-dismissed='true'] {
  display: none !important;
}

@media (max-width: 768px) {
  .revenue-card,
  .ad-policy-space,
  .ad-leaderboard-safe,
  .article-body .ad-slot-container {
    margin-block: 9.5rem;
  }

  .ad-slot-leaderboard,
  .ad-banner,
  .ad-banner-container,
  [data-ad-format='leaderboard'] {
    min-height: 100px;
  }
}
