/* ═══════════════════════════════════════════════════════════════════════════ */
/* UNIFIED DESIGN SYSTEM - Eagle Removal Network                              */
/* ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Inter:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Heading Font */
  --font-heading: 'Playfair Display', Georgia, serif;

  /* Brand Colors */
  --primary: #2d5f4f;           /* Forest Green */
  --primary-dark: #1a2e26;      /* Deep Forest */
  --primary-light: #4a8c6f;     /* Light Forest */
  --primary-lighter: #7aab8f;   /* Even Lighter */
  --accent: #b8882a;            /* Aged Gold */
  --accent-light: #d4a84a;      /* Light Gold */
  --accent-lighter: #e8c060;    /* Bright Gold */

  /* Status Colors */
  --success: #3dba5c;
  --warning: #f59e0b;
  --danger: #d64545;
  --info: #3b82f6;

  /* Text Colors */
  --text-primary: #1f2937;      /* Dark gray/black */
  --text-secondary: #4b5563;    /* Medium gray — darkened for readability */
  --text-tertiary: #9ca3af;     /* Light gray */
  --text-light: #f9f7f4;        /* Cream/Off-white */

  /* Background Colors */
  --bg-primary: #ffffff;        /* Pure white */
  --bg-secondary: #f8f4ee;      /* Warm cream */
  --bg-tertiary: #fdfaf5;       /* Off-white */

  /* Border & Dividers */
  --border-primary: #e5dfd6;    /* Warm border */
  --border-secondary: #d1c9bd;  /* Darker border */
  --border-light: #f0ebe3;      /* Very light border */

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;

  /* Spacing Scale */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

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

  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* BASE STYLES                                                               */
/* ───────────────────────────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-family);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* NAVIGATION — .site-nav                                                    */
/* ───────────────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-primary);
  box-shadow: none;
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 64px;
}

.nav-logo {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 0.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.nav-link {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #374151;
  font-size: 0.835rem;
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-link.nav-active {
  background: var(--bg-secondary);
  color: var(--primary-dark) !important;
  border-bottom: none;
  padding-bottom: 0.5rem;
}

.nav-highlight {
  background: rgba(184, 136, 42, 0.1);
  color: var(--accent) !important;
  font-weight: 700;
}

.nav-highlight:hover {
  background: var(--accent) !important;
  color: white !important;
}

.nav-danger {
  background: rgba(214, 69, 69, 0.08);
  color: var(--danger) !important;
  font-weight: 700;
}

.nav-danger:hover {
  background: var(--danger) !important;
  color: white !important;
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

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

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1200px) {
  .nav-inner { padding: 0 1.25rem; min-height: 64px; position: relative; }
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-primary);
    box-shadow: 0 12px 32px rgba(26, 46, 38, 0.1);
    z-index: 199;
    max-height: calc(100vh - 64px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    width: 100%;
  }
}

/* ───────────────────────────────────────────────────────────────────────── */
/* DROPDOWN NAVIGATION                                                       */
/* ───────────────────────────────────────────────────────────────────────── */

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

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  padding: 0.5rem;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(26, 46, 38, 0.12);
  z-index: 300;
  flex-direction: column;
}

.nav-dropdown-menu.open {
  display: flex;
  animation: dropdown-in 0.18s cubic-bezier(0.22,1,0.36,1) both;
}

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

.nav-dropdown-item {
  display: block;
  padding: 0.55rem 0.85rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-family);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}

.nav-dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-dropdown-item.nav-active {
  background: var(--bg-secondary);
  color: var(--primary-dark);
}

.nav-dropbtn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
}

.nav-dropbtn:hover, .nav-dropbtn.nav-active {
  background: var(--bg-secondary);
  color: var(--primary-dark);
}

@media (max-width: 1300px) {
  .nav-dropdown { width: 100%; }

  .nav-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    border-radius: 6px;
    background: rgba(26, 46, 38, 0.04);
    margin: 0.15rem 0 0.3rem 0.75rem;
    padding: 0.25rem 0;
    min-width: 0;
  }

  .nav-dropdown-menu.open {
    display: flex;
    animation: none;
  }

  .nav-dropbtn {
    width: 100%;
    text-align: left;
  }

  .nav-dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* ───────────────────────────────────────────────────────────────────────── */
/* HOMEPAGE — MISSION STRIP & USER PATHS                                     */
/* ───────────────────────────────────────────────────────────────────────── */

.mission-strip {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
}

.mission-text {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 820px;
}

.user-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 700px) {
  .user-paths { grid-template-columns: 1fr; }
}

.user-path {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  text-decoration: none;
  border: 1px solid var(--border-primary);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  background: var(--bg-secondary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.user-path:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.user-path-icon { font-size: 2.2rem; flex-shrink: 0; line-height: 1; }

.user-path-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

.user-path-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.user-path-cta {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* HEAT MAP — CONTEXT BANNER & HOW-TO                                        */
/* ───────────────────────────────────────────────────────────────────────── */

.map-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: linear-gradient(135deg, rgba(45,95,79,0.06), rgba(196,160,64,0.06));
  border: 1px solid var(--border-primary);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.map-context-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
}

.map-report-btn {
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: var(--font-size-sm);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}

.map-report-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

.map-howto {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  overflow: hidden;
}

.map-howto summary {
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  user-select: none;
}

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

.map-howto summary::before {
  content: '▸';
  font-size: 0.7rem;
  color: var(--accent);
  transition: transform 0.2s;
}

.map-howto[open] summary::before { transform: rotate(90deg); }

.map-howto-body {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-light);
}

.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}

.howto-grid ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
}

.howto-grid li {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  padding: 0.25rem 0;
  line-height: 1.5;
}

.howto-grid strong {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

/* ───────────────────────────────────────────────────────────────────────── */
/* DATA TABLE — INTERPRETATION CALLOUTS                                      */
/* ───────────────────────────────────────────────────────────────────────── */

.data-interpretation {
  background: rgba(45,95,79,0.04);
  border: 1px solid var(--border-primary);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.35rem 1.6rem;
  margin-bottom: var(--space-5);
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.data-interpretation strong {
  color: var(--primary);
  font-weight: 700;
}

.data-crossref {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.data-crossref:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* TRUST MARKERS                                                             */
/* ───────────────────────────────────────────────────────────────────────── */

.trust-marker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--text-tertiary);
  font-weight: 500;
}

.trust-marker + .trust-marker::before {
  content: '·';
  margin: 0 var(--space-1);
}

/* ───────────────────────────────────────────────────────────────────────── */
/* CARD HOVER UTILITY                                                        */
/* ───────────────────────────────────────────────────────────────────────── */

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--accent) !important;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* CONTAINERS & SECTIONS                                                     */
/* ───────────────────────────────────────────────────────────────────────── */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-8);
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1.25rem 2rem;
  }
  .card {
    padding: 1.5rem;
  }
}

.section {
  padding: 5rem 2rem;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 1.25rem;
  }
}

/* ───────────────────────────────────────────────────────────────────────── */
/* TYPOGRAPHY                                                                */
/* ───────────────────────────────────────────────────────────────────────── */

h1 {
  font-family: var(--font-heading);
  font-size: var(--font-size-5xl);
  font-weight: 900;
  line-height: 1.15;
  color: var(--primary);
  margin-bottom: var(--space-4);
  letter-spacing: -0.5px;
}

h2 {
  font-family: var(--font-heading);
  font-size: var(--font-size-4xl);
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: var(--space-4);
  letter-spacing: -0.4px;
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.2px;
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  line-height: 1.8;
}

p:last-child {
  margin-bottom: 0;
}

.subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.text-sm {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

/* ───────────────────────────────────────────────────────────────────────── */
/* BUTTONS                                                                   */
/* ───────────────────────────────────────────────────────────────────────── */

button, .btn {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  padding: 0.8rem 1.65rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.1px;
}

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

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 20px rgba(45, 95, 79, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--accent);
  color: white;
}

.btn-secondary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 20px rgba(184, 136, 42, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #2aa84a;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c23333;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* FORMS                                                                     */
/* ───────────────────────────────────────────────────────────────────────── */

label {
  display: block;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

input, textarea, select {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-primary);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 160, 64, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-hint {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

/* ───────────────────────────────────────────────────────────────────────── */
/* CARDS & SURFACES                                                          */
/* ───────────────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 36px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.card-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

.card-body {
  margin-bottom: var(--space-4);
}

.card-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--space-4);
  justify-content: flex-end;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* TABLES                                                                    */
/* ───────────────────────────────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
}

th {
  background: var(--bg-secondary);
  color: var(--primary);
  font-weight: 700;
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-primary);
  font-size: 0.875rem;
  letter-spacing: 0.2px;
}

td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9375rem;
  line-height: 1.5;
}

tr:hover {
  background: var(--bg-secondary);
}

/* ───────────────────────────────────────────────────────────────────────── */
/* BADGES & TAGS                                                             */
/* ───────────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-secondary);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #7f1d1d;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* UTILITY CLASSES                                                           */
/* ───────────────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: var(--space-8);
}

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

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

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

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

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

.flex {
  display: flex;
  gap: var(--space-4);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt { margin-top: var(--space-4); }
.mb { margin-bottom: var(--space-4); }
.mt-2 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-8); }

.pt { padding-top: var(--space-4); }
.pb { padding-bottom: var(--space-4); }
.pt-2 { padding-top: var(--space-8); }
.pb-2 { padding-bottom: var(--space-8); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
}

/* ── Responsive Typography (clamp) ──────────────────────────────────────── */
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.3rem, 3.2vw, 2rem); font-weight: 800; letter-spacing: -0.3px; }
h3 { font-size: clamp(1.05rem, 2.6vw, 1.4rem); }

/* ── Page Hero ───────────────────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1a4035 100%);
  color: white;
  padding: 4rem 2rem 5rem;
  border-bottom: 3px solid var(--accent);
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero-icon {
  font-size: 3rem;
  margin-bottom: var(--space-5);
  display: block;
  opacity: 0.9;
}

.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 900;
  color: white;
  margin-bottom: var(--space-4);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.page-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
  line-height: 1.75;
}

/* ── Site Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.5rem 2rem 3rem;
  margin-top: 5rem;
  font-size: var(--font-size-sm);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: start;
}

.site-footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-2);
}

.site-footer-copy {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-xs);
  margin-top: var(--space-2);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: flex-end;
}

.site-footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

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

.site-footer-link {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.18s;
  white-space: nowrap;
}

.site-footer-link:hover {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 640px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
  .site-footer-links {
    justify-content: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM UPGRADES — Eagle Exchange Hub Design System v2
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Page entrance fade ────────────────────────────────────────────────── */
body {
  animation: page-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── 2. Scroll-triggered entrance animations ─────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}
[data-animate="delay-1"] { transition-delay: 0.06s; }
[data-animate="delay-2"] { transition-delay: 0.12s; }
[data-animate="delay-3"] { transition-delay: 0.18s; }
[data-animate="delay-4"] { transition-delay: 0.24s; }
[data-animate="delay-5"] { transition-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* ── 3. Scroll progress bar ──────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f0c040, var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── 4. Nav active state ─────────────────────────────────────────────────── */
.nav-link.nav-active {
  background: var(--bg-secondary) !important;
  color: var(--primary-dark) !important;
  border-bottom: none;
  box-shadow: none;
}

/* ── 5. Button ripple effect ─────────────────────────────────────────────── */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-expand 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(1); opacity: 0; }
}

/* ── 6. Gradient stat chips ──────────────────────────────────────────────── */
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-chip.up {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}
.stat-chip.down {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}
.stat-chip.warn {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}
.stat-chip.neutral {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #3730a3;
}
.stat-chip::before {
  content: attr(data-arrow);
  font-size: 0.85em;
}

/* ── 7. Sticky frosted section headers ───────────────────────────────────── */
.sticky-section-head {
  position: sticky;
  top: 64px;
  z-index: 10;
  background: rgba(253, 251, 248, 0.92);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 2rem;
  margin-top: 3rem;
}
.sticky-section-head h2 {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.4px;
}

/* ── 8. Premium table micro-interactions ─────────────────────────────────── */
td, th {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

table tbody tr {
  position: relative;
  transition: background 0.18s ease;
}
table tbody tr::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
  border-radius: 0 2px 2px 0;
}
table tbody tr:hover::before {
  transform: scaleY(1);
}
table tbody tr td:first-child {
  transition: padding-left 0.18s ease;
}

@keyframes row-pulse {
  0%, 100% { background: transparent; }
  45%       { background: rgba(196, 160, 64, 0.12); }
}
tr.flagged {
  animation: row-pulse 2s ease 0.6s both;
}
tr.flagged td:first-child {
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE FIXES — applied at 640px and below
   ═══════════════════════════════════════════════════════════════════════════ */

/* Scrollable table wrapper — add class="table-scroll" around any wide table */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}
.table-scroll table {
  min-width: 600px;
}

/* All bare tables scroll horizontally on small screens instead of overflowing */
@media (max-width: 640px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
  }
  th, td {
    padding: var(--space-2) var(--space-3);
    white-space: nowrap;
  }

  /* Minimum 44px touch targets for all interactive elements */
  input, select, textarea {
    min-height: 44px;
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }
  button, .btn {
    min-height: 44px;
  }

  /* Reduce massive h1 on small screens */
  h1 { font-size: clamp(1.25rem, 5vw, 1.75rem); }
  h2 { font-size: clamp(1.1rem, 4vw, 1.4rem); }

  /* Map height: 700px is unusable on a phone */
  #map { height: 320px !important; }

  /* Filter button rows: ensure they wrap and are tap-friendly */
  .filter-buttons {
    gap: 0.4rem;
  }
  .filter-btn {
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
    min-height: 36px;
  }

  /* Stat grids collapse to single column */
  .stats-grid, .kpi-grid, .stat-row {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-3) !important;
  }

  /* Cards: reduce padding on small screens */
  .card {
    padding: var(--space-4);
  }

  /* Footer: already stacks via existing rule, just tighten spacing */
  .site-footer {
    padding: var(--space-6) var(--space-4);
    margin-top: var(--space-8);
  }
  .site-footer-links {
    gap: var(--space-2) var(--space-4);
    font-size: 0.8rem;
  }

  /* Page headers: reduce excess padding */
  .page-header {
    padding: var(--space-4) !important;
    margin-bottom: var(--space-4) !important;
  }
  .page-header h1 {
    font-size: 1.3rem !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM v3 — Editorial / Premium Upgrades
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Eyebrow / Section Tag ─────────────────────────────────────────────── */
.section-tag {
  display: inline-block;
  font-family: var(--font-family);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(184, 136, 42, 0.1);
  border: 1px solid rgba(184, 136, 42, 0.25);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.section-tag-green {
  color: var(--primary);
  background: rgba(45, 95, 79, 0.08);
  border-color: rgba(45, 95, 79, 0.2);
}

/* ── Gold Rule Divider ─────────────────────────────────────────────────── */
.gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.3;
  border: none;
  margin: 0;
}

/* ── Announcement Bar ──────────────────────────────────────────────────── */
.site-announce {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  padding: 0.55rem 1rem;
  letter-spacing: 0.3px;
}
.site-announce a {
  color: var(--accent-light);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 168, 74, 0.4);
}
.site-announce a:hover {
  border-bottom-color: var(--accent-light);
}

/* ── Partners Strip ────────────────────────────────────────────────────── */
.partners-strip {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  padding: 1.25rem 2rem;
}
.partners-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.partners-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.partners-list {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.partner-item {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Hero Stat Shelf (floating white cards) ────────────────────────────── */
.hero-shelf {
  display: flex;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.15);
}
.hero-shelf-card {
  flex: 1;
  padding: 1.35rem 2rem;
  text-align: left;
  border-right: 1px solid var(--border-primary);
}
.hero-shelf-card:last-child { border-right: none; }
.hero-shelf-num {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.hero-shelf-lbl {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 0.3rem;
}

/* ── Scroll Reveal ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ── Inner page headers — dark premium treatment ───────────────────────── */
/* Overrides inline page-header styles on all tool/data pages              */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2d4a3e 100%) !important;
  border-bottom: 3px solid var(--accent) !important;
  color: white !important;
}
.page-header h1, .page-header .page-title {
  font-family: var(--font-heading) !important;
  color: white !important;
}
.page-header p, .page-header .subtitle {
  color: rgba(255, 255, 255, 0.7) !important;
}
.page-header .page-hero-icon { color: rgba(255,255,255,0.85); }

/* Ensure page-hero also gets the gold border */
.page-hero {
  border-bottom: 3px solid var(--accent);
}

/* ── Refined footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark) !important;
  border-top: 3px solid rgba(184, 136, 42, 0.3);
}
.site-footer-brand { font-family: var(--font-heading); font-size: 1.15rem; }
.site-footer-links a:hover { color: var(--accent-light); }
