/* ═══════════════════════════════════════════════════════════════════
   ExpertStackHub — 2026 Design System
   Part of Stack Network  |  stacknetwork.ai
   ═══════════════════════════════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ─── DESIGN TOKENS ─── */
:root {
  /* Backgrounds */
  --bg: #06080d;
  --bg-2: #0a0e18;
  --bg-card: #0f1420;
  --bg-card-hover: #151c2c;
  --bg-elevated: #1a2236;
  --bg-glass: rgba(15, 20, 32, 0.65);
  --bg-glass-strong: rgba(15, 20, 32, 0.85);

  /* Text */
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --text-4: #475569;

  /* Brand Colors */
  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --indigo-glow: rgba(99, 102, 241, 0.12);
  --indigo-border: rgba(99, 102, 241, 0.2);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.1);
  --cyan-border: rgba(34, 211, 238, 0.2);
  --violet: #a78bfa;
  --violet-glow: rgba(167, 139, 250, 0.1);
  --amber: #f59e0b;
  --emerald: #10b981;
  --rose: #f43f5e;

  /* Borders & Shadows */
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.1);
  --border-3: rgba(255, 255, 255, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  /* Radii */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 140px;

  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.2s;
  --duration-md: 0.35s;
  --duration-lg: 0.5s;

  /* Layout */
  --max-w: 1200px;
  --max-w-narrow: 800px;
  --max-w-wide: 1400px;
  --nav-h: 64px;
}

/* ─── BASE ─── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── TYPOGRAPHY ─── */
.heading-display {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
}

.heading-1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.heading-2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.heading-3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.body-lg { font-size: 18px; line-height: 1.7; color: var(--text-2); }
.body-md { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.body-sm { font-size: 13px; line-height: 1.6; color: var(--text-3); }

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.gradient-text {
  background: linear-gradient(135deg, var(--indigo-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-warm {
  background: linear-gradient(135deg, var(--indigo-light), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── LAYOUT ─── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 24px; }
.container-wide { width: 100%; max-width: var(--max-w-wide); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--space-3xl) 0; position: relative; }
.section-lg { padding: var(--space-4xl) 0; position: relative; }

/* ─── NAV ─── */
.esh-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--nav-h);
  background: rgba(6, 8, 13, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-md) var(--ease);
}

.esh-nav.scrolled {
  background: rgba(6, 8, 13, 0.95);
  border-bottom-color: var(--border-2);
}

.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}

.nav-logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800; font-size: 15px; color: white;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 17px;
  color: var(--text); white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 6px 14px; font-size: 14px; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  border-radius: 8px; transition: color var(--duration), background var(--duration);
}

.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--indigo-light); background: var(--indigo-glow); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; background: var(--indigo);
  color: white; font-size: 13px; font-weight: 600;
  border-radius: 8px; text-decoration: none;
  transition: all var(--duration) var(--ease); white-space: nowrap;
}

.nav-cta:hover {
  background: var(--indigo-light);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.nav-expert-link {
  font-size: 14px; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  padding: 6px 12px; border-radius: 7px;
  transition: color var(--duration); white-space: nowrap;
}

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

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}

.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-2); border-radius: 2px; transition: all 0.3s;
}

.mobile-menu {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(6, 8, 13, 0.98);
  backdrop-filter: blur(24px); padding: 24px;
  z-index: 199; flex-direction: column; gap: 4px; overflow-y: auto;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 14px 16px; font-size: 16px; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  border-radius: 10px; transition: all 0.2s;
}

.mobile-menu a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.mobile-menu .mobile-cta {
  margin-top: 12px; background: var(--indigo); color: white;
  text-align: center; font-weight: 600; font-size: 15px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--indigo), #7c3aed);
  color: white; font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  border: none; border-radius: 12px; cursor: pointer;
  transition: all var(--duration) var(--ease); text-decoration: none; white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text); font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-2); border-radius: 12px;
  cursor: pointer; transition: all var(--duration) var(--ease); text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-3); transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: transparent;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  border: none; border-radius: 8px; cursor: pointer;
  transition: color var(--duration), background var(--duration); text-decoration: none;
}

.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.btn-sm { padding: 8px 18px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 18px 40px; font-size: 16px; border-radius: 14px; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--duration-md) var(--ease);
}

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

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--duration-md) var(--ease);
}

.card-glass:hover {
  border-color: var(--indigo-border);
  box-shadow: var(--shadow-glow);
}

.card-flat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--indigo-glow);
  border: 1px solid var(--indigo-border);
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  color: var(--indigo-light);
  letter-spacing: 0.04em; text-transform: uppercase;
}

.badge-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── INPUTS ─── */
.input {
  width: 100%; padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px; font-family: var(--font-body);
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color var(--duration), box-shadow var(--duration);
}

.input:focus {
  border-color: var(--indigo-border);
  box-shadow: 0 0 0 3px var(--indigo-glow);
}

.input::placeholder { color: var(--text-3); }
.input-lg { padding: 18px 24px; font-size: 17px; border-radius: 16px; }

.input-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-2); margin-bottom: 8px;
}

/* ─── GRID ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ─── HERO PATTERNS ─── */
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 800px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px; pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 0%, transparent 100%);
}

/* ─── SECTION BACKGROUNDS ─── */
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-glow { position: relative; }

.section-glow::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, var(--indigo-glow) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── FOOTER ─── */
.esh-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px; margin-bottom: 48px;
}

.footer-brand p { color: var(--text-3); font-size: 14px; line-height: 1.7; margin-top: 12px; }

.footer-heading {
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 16px;
}

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

.footer-links a {
  font-size: 14px; color: var(--text-3); transition: color var(--duration);
}

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

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-4);
}

.footer-network-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3);
}

.footer-network-badge .dot {
  width: 4px; height: 4px; background: var(--indigo); border-radius: 50%;
}

/* clickable version of the badge */
.footer-network-badge-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 6px 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; font-size: 11px; color: var(--text-3);
  text-decoration: none; transition: all 0.25s;
  letter-spacing: 0.03em;
}

.footer-network-badge-link:hover {
  border-color: var(--indigo-border); color: var(--text-2);
}

/* cross-site referral banner — shown on vertical/category pages */
.crosssite-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(34,211,238,0.05));
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: var(--radius);
  text-decoration: none; color: var(--text-2);
  font-size: 14px; transition: all 0.25s;
}

.crosssite-banner:hover {
  border-color: var(--indigo-border);
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(34,211,238,0.08));
  color: var(--text);
}

.crosssite-banner-icon {
  font-size: 22px; flex-shrink: 0;
}

.crosssite-banner-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--indigo-light); margin-bottom: 2px;
}

.crosssite-banner-desc {
  font-size: 13px; color: var(--text-3); margin-top: 2px;
}

.crosssite-banner-arrow {
  margin-left: auto; font-size: 18px; opacity: 0.5; flex-shrink: 0;
  transition: transform 0.2s;
}

.crosssite-banner:hover .crosssite-banner-arrow {
  opacity: 0.9; transform: translateX(3px);
}

/* ─── STACK NETWORK BANNER ─── */
.stack-network-bar {
  text-align: center; padding: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(34, 211, 238, 0.04));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.stack-network-bar a {
  color: var(--text-3); font-size: 13px; transition: color var(--duration);
}

.stack-network-bar a:hover { color: var(--indigo-light); }

/* ─── ANIMATIONS ─── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.4); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── STAT COUNTER ─── */
.stat-row { display: flex; justify-content: center; gap: 48px; padding: 40px 0; }
.stat-item { text-align: center; }

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; color: var(--text); letter-spacing: -0.03em;
}

.stat-label { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ─── NEWSLETTER ─── */
.newsletter-form {
  display: flex; gap: 12px; max-width: 480px; margin: 0 auto;
}

.newsletter-form input {
  flex: 1; padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-2); border-radius: 12px;
  font-family: var(--font-body); font-size: 15px;
  color: var(--text); outline: none; transition: border-color var(--duration);
}

.newsletter-form input:focus { border-color: var(--indigo-border); }
.newsletter-form input::placeholder { color: var(--text-3); }

.newsletter-form button {
  padding: 14px 28px; background: var(--indigo);
  color: white; font-size: 14px; font-weight: 600;
  border: none; border-radius: 12px; cursor: pointer;
  white-space: nowrap; transition: all var(--duration);
}

.newsletter-form button:hover {
  background: var(--indigo-light);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
}

/* ─── TRUST SIGNALS ─── */
.trust-row {
  display: flex; justify-content: center; align-items: center;
  gap: 32px; padding: 24px 0; flex-wrap: wrap;
}

.trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-3);
}

.trust-item .icon { font-size: 18px; }

/* ─── TABLE ─── */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  padding: 12px 16px; font-size: 11px; font-weight: 600;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.06em; text-align: left;
  border-bottom: 1px solid var(--border-2);
}

.data-table td {
  padding: 14px 16px; font-size: 14px;
  color: var(--text-2); border-bottom: 1px solid var(--border);
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ─── TABS ─── */
.tab-bar {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px; border: 1px solid var(--border);
}

.tab-btn {
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: var(--text-3); background: transparent;
  border: none; border-radius: 8px; cursor: pointer;
  transition: all var(--duration);
}

.tab-btn:hover { color: var(--text-2); }

.tab-btn.active {
  background: var(--indigo); color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ─── ALERT BANNER ─── */
.alert-banner {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 12px; padding: 14px 18px;
  font-size: 14px; color: #f87171; margin-bottom: 20px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald);
}

/* ─── UTILITIES ─── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
  .esh-nav { padding: 0 16px; }
  .nav-links, .nav-right .nav-expert-link { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  .stat-row { flex-direction: column; gap: 24px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
  .trust-row { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .container, .container-narrow, .container-wide { padding: 0 16px; }
  .card, .card-glass { padding: 24px; }
  .btn-primary, .btn-secondary { padding: 12px 24px; font-size: 14px; }
}

@media print {
  .esh-nav, .esh-footer, .hamburger, .mobile-menu { display: none \!important; }
  body { background: white; color: #111; }
  .card, .card-glass { border: 1px solid #ddd; background: #f9f9f9; }
}

/* ═══════════════════════════════════════════════════════════════════
   DATA INTEGRITY — Trust Labels, Freshness Indicators, AI Badges
   2026 Design System Extension
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Source Badge ─────────────────────────────────────────────────
   A subtle inline label attached to a data point.
   Usage: <span class="source-badge" data-label="sourced">Source: BLS, Q1 2026</span>
   ─────────────────────────────────────────────────────────────────── */

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-3);
  cursor: default;
  transition: color var(--duration) var(--ease);
  white-space: nowrap;
}

.source-badge svg {
  width: 10px; height: 10px;
  flex-shrink: 0;
  opacity: 0.6;
}

.source-badge:hover {
  color: var(--text-2);
}

/* Label variants */
.source-badge[data-label="sourced"]      { color: var(--text-3); }
.source-badge[data-label="estimated"]    { color: var(--amber); opacity: 0.8; }
.source-badge[data-label="projected"]    { color: var(--cyan); opacity: 0.8; }
.source-badge[data-label="calculated"]   { color: var(--emerald); opacity: 0.8; }
.source-badge[data-label="ai_generated"] { color: var(--violet); opacity: 0.8; }

/* ─── Tooltip wrapper for source badges ─────────────────────────── */
.data-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.data-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  z-index: 100;
  box-shadow: var(--shadow);
  max-width: 280px;
  white-space: normal;
  text-align: left;
}

.data-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border-2);
}

.data-tooltip-wrap:hover .data-tooltip {
  opacity: 1;
}

/* ─── Freshness Dot ───────────────────────────────────────────────
   A single colored dot that conveys data freshness at a glance.
   Usage: <span class="freshness-dot" data-freshness="current"></span>
   ─────────────────────────────────────────────────────────────────── */

.freshness-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.freshness-dot[data-freshness="current"] {
  background: var(--emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.freshness-dot[data-freshness="recent"] {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.freshness-dot[data-freshness="aging"] {
  background: var(--rose);
  opacity: 0.7;
}

.freshness-dot[data-freshness="stale"] {
  background: var(--text-4);
}

/* ─── Freshness Badge (text variant) ────────────────────────────── */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-3);
  padding: 3px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
}

.freshness-badge[data-freshness="current"] {
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.06);
}

.freshness-badge[data-freshness="recent"] {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.06);
}

.freshness-badge[data-freshness="aging"] {
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.06);
  opacity: 0.85;
}

.freshness-badge[data-freshness="stale"] {
  color: var(--text-4);
  border-color: var(--border);
}

/* ─── AI Content Label ────────────────────────────────────────────
   Tasteful, non-intrusive AI disclosure.
   Usage:
     inline: <span class="ai-label">✦ AI-assisted</span>
     block footer: <div class="ai-block-label">✦ AI-generated analysis</div>
   ─────────────────────────────────────────────────────────────────── */

.ai-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--violet);
  opacity: 0.75;
  cursor: default;
  transition: opacity var(--duration) var(--ease);
}

.ai-label:hover {
  opacity: 1;
}

.ai-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--violet);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(167, 139, 250, 0.06);
  cursor: default;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.ai-label-pill:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.3);
}

.ai-block-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-3);
  padding: 8px 12px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(167, 139, 250, 0.04);
  border-top: 1px solid rgba(167, 139, 250, 0.1);
  margin-top: auto;
}

.ai-block-label .ai-sparkle {
  color: var(--violet);
  font-style: normal;
}

/* ─── Data Attribution Row ────────────────────────────────────────
   A full-width attribution row for benchmark/report pages.
   Usage: <div class="data-attribution">...</div>
   ─────────────────────────────────────────────────────────────────── */

.data-attribution {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
}

.data-attribution .attr-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.data-attribution .attr-sep {
  color: var(--text-4);
  opacity: 0.5;
}

.data-attribution a {
  color: var(--indigo-light);
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(129, 140, 248, 0.3);
}

.data-attribution a:hover {
  opacity: 1;
}

/* ─── Data Quality Card Section ─────────────────────────────────
   Used on benchmark/rate pages to display methodology block.
   ─────────────────────────────────────────────────────────────────── */

.data-quality-block {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
}

.data-quality-block .dqb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.data-quality-block .dqb-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.data-quality-block .dqb-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 9px;
  cursor: default;
}

.data-quality-block .dqb-source-tag .tag-score {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  color: var(--amber);
  margin-left: 4px;
}

/* ─── Confidence Badge ────────────────────────────────────────────
   High / Medium / Low confidence indicators.
   ─────────────────────────────────────────────────────────────────── */

.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.confidence-badge[data-confidence="high"] {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.confidence-badge[data-confidence="medium"] {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.confidence-badge[data-confidence="low"] {
  color: var(--text-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

/* ─── Inline Data Row (for tool outputs) ─────────────────────────
   A labeled data value row with trust meta.
   ─────────────────────────────────────────────────────────────────── */

.data-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.data-value-row .dvr-label {
  font-size: 13px;
  color: var(--text-2);
  flex: 1 1 auto;
}

.data-value-row .dvr-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.data-value-row .dvr-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

/* ─── Minimal Page Footer Attribution ────────────────────────────
   For pages with significant data output.
   ─────────────────────────────────────────────────────────────────── */

.page-data-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-4);
  line-height: 1.6;
}

.page-data-footer a {
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-data-footer a:hover {
  color: var(--text-2);
}

/* ─── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .data-attribution { padding: 8px 12px; font-size: 10px; }
  .data-quality-block .dqb-sources { flex-direction: column; }
}
