/* ==========================================================================
   AFFILIHUB - BASELINE & INP OPTIMIZED STYLESHEET
   100% Vanilla Modern CSS - Zero Frameworks - Baseline Compliant
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties (Baseline Widely Available)
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Light Theme */
  --color-bg-primary: #f8fafc;
  --color-bg-surface: #ffffff;
  --color-bg-surface-elevated: #ffffff;
  --color-bg-subtle: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-subtle: #cbd5e1;

  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;

  --color-brand-primary: #2563eb;
  --color-brand-primary-hover: #1d4ed8;
  --color-brand-accent: #0ea5e9;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --max-width: 1200px;
  --header-height: 72px;

  /* Baseline color-scheme */
  color-scheme: light dark;
}

/* Automatic Dark Mode & Class-based Toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg-primary: #090d16;
    --color-bg-surface: #111827;
    --color-bg-surface-elevated: #1f2937;
    --color-bg-subtle: #1e293b;
    --color-border: #334155;
    --color-border-subtle: #475569;

    --color-text-primary: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #0f172a;

    --color-brand-primary: #3b82f6;
    --color-brand-primary-hover: #60a5fa;
    --color-brand-accent: #38bdf8;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  }
}

:root[data-theme='dark'] {
  --color-bg-primary: #090d16;
  --color-bg-surface: #111827;
  --color-bg-surface-elevated: #1f2937;
  --color-bg-subtle: #1e293b;
  --color-border: #334155;
  --color-border-subtle: #475569;

  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #0f172a;

  --color-brand-primary: #3b82f6;
  --color-brand-primary-hover: #60a5fa;
  --color-brand-accent: #38bdf8;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* --------------------------------------------------------------------------
   2. Modern Reset & Baseline Defaults
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Accessible focus outline */
:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 3px;
}

/* Images & Media baseline */
img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation; /* INP Optimization: avoids 300ms tap delay */
}

/* --------------------------------------------------------------------------
   3. Layout & Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* --------------------------------------------------------------------------
   4. Header & Navigation (Compositor-only animations)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgb(from var(--color-bg-surface) r g b / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-accent));
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgb(37 99 235 / 0.35);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-brand-primary);
  margin-left: 0.25rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

@media (max-width: 840px) {
  .main-nav {
    display: none;
  }
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn, .mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-surface);
  color: var(--color-text-secondary);
  transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), background-color 0.15s ease;
}

.theme-toggle-btn:hover, .mobile-menu-btn:hover {
  background-color: var(--color-bg-subtle);
  color: var(--color-text-primary);
}

.theme-toggle-btn:active, .mobile-menu-btn:active {
  transform: scale(0.94); /* Compositor-accelerated feedback */
}

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

/* Mobile Navigation Drawer (Compositor-only transform/opacity) */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0, 0, 0.2, 1), opacity 0.18s ease;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  padding-block: 0.4rem;
}

@media (min-width: 841px) {
  .mobile-nav {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgb(37 99 235 / 0.08), transparent 70%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-brand-primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
  display: inline-block;
  box-shadow: 0 0 0 2px rgb(16 185 129 / 0.25);
}

.hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 840px;
  margin-inline: auto;
}

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

.hero-description {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--color-text-secondary);
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 2.25rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97); /* Fast visual feedback for low INP */
}

.btn-primary {
  background-color: var(--color-brand-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgb(37 99 235 / 0.3);
}

.btn-primary:hover {
  background-color: var(--color-brand-primary-hover);
  box-shadow: 0 6px 16px rgb(37 99 235 / 0.4);
}

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

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding: 1.75rem;
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-brand-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   6. Live INP & Core Web Vitals Telemetry HUD
   -------------------------------------------------------------------------- */
.inp-hud-banner {
  background: linear-gradient(90deg, #10b98115, #0ea5e915);
  border: 1px solid #10b98140;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hud-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.hud-metrics {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.metric-pill {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.metric-pill.good {
  border-color: #10b981;
  color: #059669;
}

.metric-pill strong {
  font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   7. Filter & Search Controls (Optimized for Sub-16ms INP)
   -------------------------------------------------------------------------- */
.catalog-controls {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-and-sort {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.sort-select {
  padding: 0.75rem 2rem 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-size: 0.9375rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

.tab-btn:hover {
  border-color: var(--color-border-subtle);
  color: var(--color-text-primary);
}

.tab-btn.active, .tab-btn[aria-selected="true"] {
  background-color: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   8. Product Grid & Cards (CSS Containment & INP Isolation)
   -------------------------------------------------------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

/* Performance Guidance: content-visibility & contain for rapid reflow isolation */
.product-card {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s cubic-bezier(0, 0, 0.2, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  contain: layout style paint; /* Isolates mutations from entire document */
}

/* Below-the-fold content optimization */
.product-card.deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 420px;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-brand-primary);
}

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

.product-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-bg-subtle);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-brand-primary);
  border: 1px solid var(--color-border);
}

.brand-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

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

.product-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: #fef3c7;
  color: #b45309;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.rating-stars {
  color: #f59e0b;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.rating-score {
  font-weight: 700;
  font-size: 0.875rem;
}

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

.product-summary {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.pros-cons-box {
  background-color: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.pro-item, .con-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.pro-item:last-child, .con-item:last-child {
  margin-bottom: 0;
}

.pro-bullet { color: var(--color-success); font-weight: 700; }
.con-bullet { color: var(--color-danger); font-weight: 700; }

.pricing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  margin-bottom: 1rem;
}

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

.price-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-brand-primary);
}

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

.coupon-code {
  flex: 1;
  background-color: var(--color-bg-subtle);
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-brand-primary);
  text-align: center;
}

.copy-btn {
  padding: 0.4rem 0.75rem;
  background-color: var(--color-bg-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.copy-btn:active {
  transform: scale(0.95);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.btn-affiliate {
  width: 100%;
  background-color: var(--color-brand-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 2px 6px rgb(37 99 235 / 0.25);
}

.btn-affiliate:hover {
  background-color: var(--color-brand-primary-hover);
}

/* --------------------------------------------------------------------------
   9. Comparison Matrix Table (Responsive & Baseline)
   -------------------------------------------------------------------------- */
.comparison-section {
  padding-block: 4rem;
  border-top: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-surface);
  box-shadow: var(--shadow-sm);
}

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

.comparison-table th, .comparison-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  background-color: var(--color-bg-subtle);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

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

.check-icon { color: var(--color-success); font-weight: 700; }
.cross-icon { color: var(--color-text-muted); }

/* --------------------------------------------------------------------------
   10. Native FAQ Accordion (Baseline Widely Available details/summary)
   -------------------------------------------------------------------------- */
.faq-section {
  padding-block: 4rem;
  border-top: 1px solid var(--color-border);
}

.faq-list {
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-surface);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--color-brand-primary);
}

.faq-summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: '+';
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(45deg);
  color: var(--color-brand-primary);
}

.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. Newsletter & Lead Form (Native HTML5 validation)
   -------------------------------------------------------------------------- */
.newsletter-card {
  background: linear-gradient(135deg, var(--color-bg-surface), var(--color-bg-subtle));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-md);
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 1.5rem auto 0;
  flex-wrap: wrap;
}

.newsletter-input {
  flex: 1;
  min-width: 240px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-surface);
  color: var(--color-text-primary);
}

/* Baseline :user-valid and :user-invalid pseudo-classes */
.newsletter-input:user-invalid {
  border-color: var(--color-danger);
}

.newsletter-input:user-valid {
  border-color: var(--color-success);
}

/* --------------------------------------------------------------------------
   12. Footer & Affiliate Disclosure
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding-block: 3.5rem 2rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

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

.footer-disclosure {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   13. Toast Notification (Compositor-only transform/opacity)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background-color: #0f172a;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.18s cubic-bezier(0, 0, 0.2, 1), transform 0.18s cubic-bezier(0, 0, 0.2, 1);
}

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