/* ═══════════════════════════════════════════════════════════════
   Canada Salary Disclosure — Unified Premium Theme
   Clean, modern, data-focused design inspired by Linear & Stripe
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Surfaces */
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-input: #F1F5F9;
  --bg-hover: #F8FAFC;
  --white: #FFFFFF;

  /* Text */
  --text: #0F172A;
  --text-2: #334155;
  --text-3: #64748B;
  --text-4: #94A3B8;
  --text-5: #CBD5E1;

  /* Brand */
  --accent: #DC2626;
  --accent-hover: #B91C1C;
  --blue: #2563EB;
  --blue-soft: #EFF6FF;
  --indigo: #4F46E5;
  --emerald: #059669;
  --amber: #D97706;
  --rose: #E11D48;
  --violet: #7C3AED;
  --teal: #0D9488;

  /* Borders */
  --border: #E2E8F0;
  --border-2: #CBD5E1;

  /* Typography */
  --ff: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Radii */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-full: 9999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,0.04);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --sh-md: 0 4px 12px rgba(0,0,0,0.06);
  --sh-lg: 0 10px 25px rgba(0,0,0,0.08);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tr: 150ms var(--ease);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--ff);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
button { cursor: pointer; font-family: var(--ff); }
input, select { font-family: var(--ff); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ═══════════════════════════════════════════
   HEADER — Professional top banner
   ═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  height: 56px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; flex-shrink: 0; }
.logo-svg { width: 32px; height: 32px; flex-shrink: 0; }
.logo-text { font-size: 0.9375rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.logo-dot { color: var(--accent); font-weight: 700; }

/* Navigation */
.main-nav {
  display: flex; gap: 2px;
  margin-left: 1rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}
.main-nav a {
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-sm);
  transition: all var(--tr);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--bg-input); }
.main-nav a.active { color: var(--text); font-weight: 600; background: var(--bg-input); }

/* Right side */
.header-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.header-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(220,38,38,0.06);
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-full);
  letter-spacing: -0.01em;
}
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.25rem; padding: 4px; }

/* ═══════════════════════════════════════════
   OLD HERO & TABS — Hidden (replaced by home view)
   ═══════════════════════════════════════════ */
.hero, section.hero { display: none !important; }
.view-tabs, #viewTabs { display: none !important; }

/* ═══════════════════════════════════════════
   HOME HERO
   ═══════════════════════════════════════════ */
#view-home {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-hero {
  text-align: center;
  padding: 4rem 0 2.5rem;
}

.home-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.375rem;
  letter-spacing: -0.03em;
}

.home-hero .subtitle {
  font-size: 0.9375rem;
  color: var(--text-3);
  margin: 0 0 1.5rem;
}

/* ═══════════════════════════════════════════
   MODERN SEARCH
   ═══════════════════════════════════════════ */
.search-wrapper {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-box { position: relative; display: flex; align-items: center; }

.search-icon {
  position: absolute; left: 1rem;
  width: 18px; height: 18px;
  color: var(--text-4);
  pointer-events: none; z-index: 1;
}

.search-box input {
  width: 100% !important;
  padding: 0.8125rem 4rem 0.8125rem 2.75rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  font-size: 0.9375rem !important;
  background: var(--white) !important;
  color: var(--text) !important;
  outline: none !important;
  box-shadow: var(--sh-sm) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.search-box input::placeholder { color: var(--text-4) !important; }
.search-box input:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08), var(--sh-md) !important;
}

.search-kbd {
  position: absolute; right: 0.875rem;
  background: var(--bg-input);
  color: var(--text-4);
  font-size: 0.625rem; font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: inherit;
  pointer-events: none;
}

/* Dropdown */
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  z-index: 200; overflow: hidden;
  max-height: 400px; overflow-y: auto;
}
.search-dropdown:empty { display: none; }
.dd-section {
  padding: 0.625rem 0.875rem 0.25rem;
  font-size: 0.5625rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-4);
  border-top: 1px solid var(--border);
}
.dd-section:first-child { border-top: none; }
.dd-item {
  display: block; padding: 0.5rem 0.875rem;
  text-decoration: none; color: inherit;
  cursor: pointer; transition: background 0.1s;
  border-left: 3px solid transparent;
}
.dd-item:hover, .dd-item.dd-active { background: var(--bg); border-left-color: var(--accent); }
.dd-name { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.dd-meta { font-size: 0.6875rem; color: var(--text-4); margin-top: 1px; }
.dd-action {
  padding: 0.625rem 0.875rem; font-size: 0.8125rem; font-weight: 600;
  color: var(--blue); border-top: 1px solid var(--border);
  cursor: pointer; background: var(--bg);
  transition: background 0.1s;
}
.dd-action:hover, .dd-action.dd-active { background: var(--blue-soft); }
.dd-action-icon { opacity: 0.4; margin-right: 0.25rem; }

/* Suggestions */
.search-suggestions { display: flex; justify-content: center; gap: 0.375rem; margin-top: 0.875rem; flex-wrap: wrap; align-items: center; }
.suggestion-label { font-size: 0.75rem; color: var(--text-4); }
.suggestion-chip {
  font-size: 0.75rem; font-weight: 500;
  color: var(--blue); background: var(--blue-soft);
  border: none; padding: 0.1875rem 0.5rem;
  border-radius: 100px; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.suggestion-chip:hover { background: var(--blue); color: #fff; }

/* Chips */
.home-chips { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.chip { font-size: 0.6875rem; font-weight: 600; color: var(--text-3); background: var(--bg-input); padding: 0.1875rem 0.625rem; border-radius: 100px; }

/* ═══════════════════════════════════════════
   HOME LISTS — 3-column ranked lists
   ═══════════════════════════════════════════ */
.home-lists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.home-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.home-list-header {
  padding: 0.75rem 0.875rem;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}
.header-note {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-4);
  text-transform: none;
  letter-spacing: normal;
}

.home-list-body { padding: 0.125rem 0; }
.list-empty { padding: 1.5rem 1rem; text-align: center; font-size: 0.8125rem; color: var(--text-4); }

.list-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  text-decoration: none; color: inherit;
  transition: background var(--tr);
}
a.list-row { cursor: pointer; }
.list-row:hover { background: var(--bg-hover); }
.list-rank { width: 20px; font-size: 0.6875rem; font-weight: 700; color: var(--text-4); text-align: center; flex-shrink: 0; }
.list-info { flex: 1; min-width: 0; }
.list-name { font-size: 0.8125rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-detail { font-size: 0.6875rem; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-val { font-size: 0.8125rem; font-weight: 700; color: var(--text); flex-shrink: 0; font-variant-numeric: tabular-nums; text-align: right; }
.list-val-label { display: block; font-size: 0.5625rem; font-weight: 500; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.04em; }

/* ═══════════════════════════════════════════
   VIEWS — Fade in animation
   ═══════════════════════════════════════════ */
.app-view { display: none; }
.app-view.active { display: block; animation: fadeUp 0.25s var(--ease); }

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

/* ═══════════════════════════════════════════
   PROFILE PAGES — Employer, Person, Job
   ═══════════════════════════════════════════ */
.profile-page { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* Breadcrumb */
.profile-breadcrumb {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; color: var(--text-4); margin-bottom: 1.5rem;
}
.profile-breadcrumb a {
  color: var(--text-3); text-decoration: none; transition: color var(--tr);
}
.profile-breadcrumb a:hover { color: var(--text); }
.profile-breadcrumb .sep { color: var(--text-4); }

/* Hero card */
.profile-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.profile-badge {
  display: inline-block;
  font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--r-full);
  background: rgba(220,38,38,0.08);
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.profile-hero h1 {
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  margin: 0 0 0.375rem; letter-spacing: -0.03em; line-height: 1.2;
}
.profile-hero .profile-subtitle {
  font-size: 0.875rem; color: var(--text-3); margin: 0; line-height: 1.5;
}
.profile-hero .profile-subtitle a {
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.profile-hero .profile-subtitle a:hover { text-decoration: underline; }

/* Stat grid */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.profile-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
}
.profile-stat-value {
  font-size: 1.25rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.profile-stat-label {
  font-size: 0.6875rem; font-weight: 500; color: var(--text-4);
  margin-top: 0.125rem;
}

/* Section headers */
.profile-section-title {
  font-size: 0.8125rem; font-weight: 700; color: var(--text);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem;
}
.profile-section-title .count {
  font-size: 0.6875rem; font-weight: 600; color: var(--text-4);
  background: var(--bg); padding: 0.125rem 0.5rem;
  border-radius: var(--r-full);
}

/* Profile tables */
.profile-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.profile-table {
  width: 100%; border-collapse: collapse; font-size: 0.8125rem;
}
.profile-table thead th {
  text-align: left; padding: 0.625rem 0.875rem;
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-4); background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.profile-table tbody td {
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.profile-table tbody tr:last-child td { border-bottom: none; }
.profile-table tbody tr:hover { background: var(--bg); }
.profile-table .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-table .link {
  color: var(--text); text-decoration: none;
  border-bottom: 1px dotted var(--text-4);
  transition: all var(--tr);
}
.profile-table .link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.profile-table .year-badge {
  display: inline-block; font-size: 0.6875rem; font-weight: 700;
  background: var(--bg-input); padding: 0.125rem 0.375rem;
  border-radius: var(--r-sm); color: var(--text-3);
}

/* Loading state */
.profile-loading {
  padding: 4rem 2rem; text-align: center;
}
.profile-loading h2 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.profile-loading p { font-size: 0.8125rem; color: var(--text-3); margin-bottom: 1.5rem; }
.profile-progress-bar {
  max-width: 300px; margin: 0 auto; background: var(--bg-input);
  height: 6px; border-radius: var(--r-full); overflow: hidden;
}
.profile-progress-fill {
  background: var(--accent); width: 0%; height: 100%;
  transition: width 0.3s ease; border-radius: var(--r-full);
}

/* Error/empty state */
.profile-error {
  padding: 4rem 2rem; text-align: center;
}
.profile-error h2 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.profile-error p { font-size: 0.8125rem; color: var(--text-3); margin-bottom: 1.5rem; max-width: 400px; margin-left: auto; margin-right: auto; }
.profile-error .btn-back {
  display: inline-block; padding: 0.5rem 1.25rem;
  background: var(--text); color: var(--white);
  border-radius: var(--r-md); font-size: 0.8125rem; font-weight: 600;
  text-decoration: none; transition: opacity var(--tr);
}
.profile-error .btn-back:hover { opacity: 0.85; }

/* JSON-LD (hidden, for SEO) */
.profile-jsonld { display: none; }

/* ═══════════════════════════════════════════
   SEARCH PANEL & FILTERS
   ═══════════════════════════════════════════ */
.search-panel { padding: 1.25rem; margin-bottom: 0.75rem; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-bottom: 0.75rem; }

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
  transition: all var(--tr);
}
.search-input:focus { border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 3px rgba(37,99,235,0.06); }
.search-input::placeholder { color: var(--text-5); }

.btn-primary {
  padding: 0.5rem 1.25rem;
  background: var(--text);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--tr);
}
.btn-primary:hover { background: #1E293B; }

.filters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 0.75rem; }

.filter-group label {
  display: block; font-size: 0.625rem; font-weight: 700;
  color: var(--text-4); margin-bottom: 3px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.filter-group select, .filter-group input {
  width: 100%; padding: 0.4375rem 0.625rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  color: var(--text);
  outline: none; transition: all var(--tr);
}
.filter-group select:focus, .filter-group input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.06); background: var(--white); }

.filter-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 0.625rem; border-top: 1px solid var(--border); }

.btn-ghost {
  padding: 0.375rem 0.75rem; background: transparent;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-3); font-size: 0.75rem; font-weight: 600; transition: all var(--tr);
}
.btn-ghost:hover { border-color: var(--text-3); color: var(--text); }

.btn-outline {
  padding: 0.375rem 0.75rem;
  background: rgba(5,150,105,0.06); border: 1px solid var(--emerald);
  border-radius: var(--r-sm); color: var(--emerald);
  font-size: 0.75rem; font-weight: 600; transition: all var(--tr);
}
.btn-outline:hover { background: var(--emerald); color: white; }

.result-count { font-size: 0.8125rem; color: var(--text-3); }
.result-count strong { color: var(--text); font-weight: 700; }

/* ═══════════════════════════════════════════
   DATA TABLE
   ═══════════════════════════════════════════ */
.table-wrapper {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  background: var(--white);
}

.data-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }

.data-table thead { background: var(--bg); }
.data-table thead th {
  padding: 0.625rem 0.75rem; text-align: left;
  color: var(--text-3); font-weight: 600;
  font-size: 0.6875rem; text-transform: uppercase;
  letter-spacing: 0.05em; cursor: pointer;
  user-select: none; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table thead th:hover { color: var(--text); }
.data-table thead th.sorted { color: var(--text); }
.data-table thead th .sort-icon { margin-left: 3px; font-size: 0.6rem; opacity: 0.5; }
.data-table thead th.sorted .sort-icon { opacity: 1; }

.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--tr); }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody td { padding: 0.5rem 0.75rem; vertical-align: middle; }

.year-badge { display: inline-flex; padding: 1px 6px; font-size: 0.6875rem; font-weight: 700; background: var(--bg-input); color: var(--text-3); border-radius: var(--r-xs); }
.col-salary { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--emerald); }

.province-badge { display: inline-block; padding: 1px 6px; font-size: 0.625rem; font-weight: 700; background: var(--bg-input); color: var(--text-3); border-radius: var(--r-xs); }
.sector-badge { display: inline-block; padding: 1px 6px; font-size: 0.625rem; font-weight: 600; border-radius: var(--r-xs); white-space: nowrap; background: var(--bg-input); color: var(--text-4); }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}

/* ═══════════════════════════════════════════
   SECTION HEADERS — Colored left bars
   ═══════════════════════════════════════════ */
.section-header { margin-bottom: 1.5rem; padding-left: 14px; position: relative; }
.section-header::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--text-4); }

#view-employers .section-header::before { background: var(--violet); }
#view-jobs .section-header::before { background: var(--blue); }
#view-compare .section-header::before { background: var(--teal); }
#view-sectors .section-header::before { background: var(--amber); }
#view-provinces .section-header::before { background: var(--rose); }
#view-stats .section-header::before { background: var(--emerald); }

.section-header h2 { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.125rem; }
.section-header p { color: var(--text-3); font-size: 0.8125rem; }
.section-header .hl-violet { color: var(--violet); }
.section-header .hl-blue { color: var(--blue); }
.section-header .hl-teal { color: var(--teal); }
.section-header .hl-amber { color: var(--amber); }
.section-header .hl-rose { color: var(--rose); }
.section-header .hl-emerald { color: var(--emerald); }

/* ═══════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.625rem; margin-bottom: 1.25rem; }
.stat-card { padding: 1rem; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.stat-card:nth-child(1)::before { background: var(--violet); }
.stat-card:nth-child(2)::before { background: var(--blue); }
.stat-card:nth-child(3)::before { background: var(--teal); }
.stat-card:nth-child(4)::before { background: var(--rose); }
.stat-card .sc-val { font-size: 1.25rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; margin-bottom: 1px; }
.stat-card .sc-label { font-size: 0.625rem; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

/* ═══════════════════════════════════════════
   RANKING LISTS
   ═══════════════════════════════════════════ */
.ranking-card { margin-bottom: 1rem; }
.ranking-header { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ranking-header h3 { font-size: 0.875rem; font-weight: 700; }
.ranking-sub { font-size: 0.6875rem; color: var(--text-4); }
.ranking-body { padding: 0.25rem 0.75rem; }
.rank-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 0.625rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: var(--bg-hover); margin: 0 -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; border-radius: var(--r-sm); }
.rank-num { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-full); font-size: 0.6875rem; font-weight: 800; flex-shrink: 0; background: var(--bg-input); color: var(--text-4); }
.rank-num.gold { background: #FEF3C7; color: #92400E; }
.rank-num.silver { background: var(--bg-input); color: var(--text-3); }
.rank-num.bronze { background: #FFEDD5; color: #9A3412; }
.rank-num.normal { background: var(--bg-input); color: var(--text-4); }
.rank-info h4 { font-size: 0.8125rem; font-weight: 600; color: var(--text); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info p { font-size: 0.6875rem; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-value { text-align: right; }
.rank-value .rv-main { font-size: 0.875rem; font-weight: 700; color: var(--text); display: block; font-variant-numeric: tabular-nums; }
.rank-value .rv-sub { font-size: 0.5625rem; color: var(--text-4); text-transform: uppercase; }
#view-employers .rank-value .rv-main { color: var(--violet); }
#view-jobs .rank-value .rv-main { color: var(--blue); }
#view-stats .rank-value .rv-main { color: var(--emerald); }

/* ═══════════════════════════════════════════
   BAR CHARTS
   ═══════════════════════════════════════════ */
.chart-card { margin-bottom: 1rem; }
.chart-header { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.chart-header h3 { font-size: 0.875rem; font-weight: 700; }
.chart-body { padding: 0.75rem 1rem; }
.hbar-row { display: flex; align-items: center; margin-bottom: 0.5rem; gap: 0.625rem; }
.hbar-row:last-child { margin-bottom: 0; }
.hbar-label { min-width: 120px; font-size: 0.75rem; font-weight: 600; color: var(--text-2); text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 26px; background: var(--bg-input); border-radius: var(--r-sm); overflow: hidden; position: relative; }
.hbar-fill { height: 100%; border-radius: var(--r-sm); transition: width 0.8s cubic-bezier(0.22,1,0.36,1); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; min-width: 2px; }
.hbar-fill span { font-size: 0.625rem; font-weight: 700; color: white; white-space: nowrap; }
.hbar-fill.narrow span { position: absolute; left: calc(100% + 6px); color: var(--text-3); }
.c0 { background: var(--blue); } .c1 { background: var(--emerald); }
.c2 { background: var(--amber); } .c3 { background: var(--rose); }
.c4 { background: var(--violet); } .c5 { background: var(--teal); }
.c6 { background: var(--indigo); } .c7 { background: #0EA5E9; }

/* ═══════════════════════════════════════════
   COMPARE GRID
   ═══════════════════════════════════════════ */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.625rem; margin-bottom: 1.25rem; }
.compare-card { padding: 1rem; }
.compare-card .cc-title { font-size: 0.8125rem; font-weight: 700; color: var(--text); margin-bottom: 0.375rem; }
.compare-card .cc-val { font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 0.125rem; color: var(--blue); }
.compare-card .cc-detail { font-size: 0.6875rem; color: var(--text-4); line-height: 1.5; }
.compare-card .cc-bar { margin-top: 0.5rem; height: 4px; background: var(--bg-input); border-radius: 2px; overflow: hidden; }
.cc-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s cubic-bezier(0.22,1,0.36,1); background: var(--blue); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }

/* ═══════════════════════════════════════════
   JOB SELECTOR
   ═══════════════════════════════════════════ */
.job-selector { margin-bottom: 0.75rem; display: flex; gap: 0.5rem; align-items: end; }
.job-selector .filter-group { flex: 1; max-width: 400px; }

/* ═══════════════════════════════════════════
   TOP EARNERS
   ═══════════════════════════════════════════ */
.top-earners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.5rem; }
.earner-card { padding: 0.875rem; display: flex; gap: 0.625rem; align-items: flex-start; }
.earner-rank { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-full); font-weight: 800; font-size: 0.6875rem; flex-shrink: 0; background: var(--bg-input); color: var(--text-3); }
.earner-info { flex: 1; min-width: 0; }
.earner-info h4 { font-size: 0.8125rem; font-weight: 700; color: var(--text); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earner-info p { font-size: 0.6875rem; color: var(--text-4); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.earner-salary { font-size: 0.875rem; font-weight: 800; color: var(--emerald); margin-top: 2px; }

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.pagination { display: flex; justify-content: center; padding: 1rem 0; }
.pagination button, .load-more-btn {
  padding: 0.5rem 1rem;
  background: var(--text);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all var(--tr);
  width: 100%;
}
.pagination button:hover, .load-more-btn:hover { background: #1E293B; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.5);
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.footer-brand h3 { font-size: 0.9375rem; font-weight: 800; margin-bottom: 0.5rem; color: #fff; }
.footer-brand p { font-size: 0.8125rem; line-height: 1.6; max-width: 340px; }
.footer-links h4 { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.25); margin-bottom: 0.5rem; font-weight: 700; }
.footer-links a { display: block; color: rgba(255,255,255,0.4); font-size: 0.8125rem; padding: 2px 0; transition: color var(--tr); }
.footer-links a:hover { color: rgba(255,255,255,0.9); }
.footer-disclaimer { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-md); padding: 0.625rem 1rem; font-size: 0.6875rem; color: rgba(255,255,255,0.3); line-height: 1.6; margin-bottom: 0.75rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 0.75rem; display: flex; justify-content: space-between; font-size: 0.625rem; color: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════ */
.loading-overlay { position: fixed; inset: 0; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.3s; }
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; margin-bottom: 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.8125rem; color: var(--text-3); }

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .filters-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main-nav {
    display: none; width: 100%; flex-direction: column;
    padding: 0.75rem 0.5rem; border-left: none; margin-left: 0;
    position: absolute; top: 56px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-md); z-index: 100;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-badge { display: none; }
  .header-inner { position: relative; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .filters-grid { grid-template-columns: 1fr; }
  .search-row { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .data-table .col-sector, .data-table .col-employer { display: none; }
  .container { padding: 0 1rem; }
  .hbar-label { min-width: 70px; font-size: 0.6875rem; }
  .home-hero h1 { font-size: 1.5rem; }
  .home-leaderboards { grid-template-columns: 1fr; }
  .feature-cards { grid-template-columns: 1fr; }
  .hero-stats-row { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   REDESIGNED HOMEPAGE COMPONENTS
   ═══════════════════════════════════════════ */

/* ── Hero Badge ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #FEF2F2, #FFF7ED);
  border: 1px solid #FECACA;
  color: #B91C1C;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: var(--r-full);
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}
.hero-badge-dot {
  width: 8px; height: 8px;
  background: #DC2626;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #DC2626, #EA580C, #D97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Home Hero Overrides ── */
.home-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.home-hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.home-hero .subtitle {
  font-size: 1.0625rem;
  color: var(--text-3);
  max-width: 600px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

/* ── Stat Chips Row ── */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 640px;
  margin: 1.75rem auto 0;
}
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.75rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: var(--tr);
}
.stat-chip:hover { border-color: var(--border-2); box-shadow: var(--sh-sm); }
.stat-chip-val {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-chip-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Leaderboard Cards ── */
.home-leaderboards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem auto;
  max-width: 1200px;
  padding: 0 1.5rem;
}
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: var(--tr);
}
.leaderboard-card:hover {
  box-shadow: var(--sh-md);
  border-color: var(--border-2);
}
.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0.75rem;
}
.leaderboard-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}
.leaderboard-header h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.leaderboard-meta {
  font-size: 0.75rem;
  color: var(--text-4);
  font-weight: 500;
}
.leaderboard-body {
  padding: 0 0.5rem;
}
.leaderboard-cta {
  display: block;
  text-align: center;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  transition: var(--tr);
}
.leaderboard-cta:hover {
  background: var(--blue-soft);
  color: var(--indigo);
}

/* ── Leaderboard Rows ── */
.lb-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-sm);
  transition: var(--tr);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.lb-row:hover {
  background: var(--bg-hover);
}
.lb-rank {
  width: 28px;
  text-align: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.lb-row:not(.medal-1):not(.medal-2):not(.medal-3) .lb-rank {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-4);
}
.lb-info {
  flex: 1;
  min-width: 0;
}
.lb-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-detail {
  font-size: 0.6875rem;
  color: var(--text-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-val {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--emerald);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.lb-val small {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Medal backgrounds */
.lb-row.medal-1 {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1px solid #FDE68A;
}
.lb-row.medal-2 {
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
  border: 1px solid #E2E8F0;
}
.lb-row.medal-3 {
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  border: 1px solid #FED7AA;
}

/* ── Feature Cards ── */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all 200ms var(--ease);
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-lg);
  border-color: var(--accent);
}
.feature-card-icon {
  font-size: 1.75rem;
}
.feature-card h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.feature-card p {
  font-size: 0.8125rem;
  color: var(--text-3);
  line-height: 1.55;
  margin: 0;
}

/* ── Responsive: Leaderboards & Features ── */
@media (max-width: 900px) {
  .home-leaderboards { grid-template-columns: 1fr; max-width: 480px; }
  .feature-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .feature-cards { grid-template-columns: 1fr; }
  .hero-stats-row { grid-template-columns: 1fr 1fr; }
  .home-hero h1 { font-size: 1.75rem; }
  .home-hero .subtitle { font-size: 0.9375rem; }
}

/* ═══════════════════════════════════════════
   JOB PROFILE PAGE COMPONENTS
   ═══════════════════════════════════════════ */

.jp-chart-card {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
}

/* Analysis table enhancements */
.jp-analysis-table th.num,
.jp-analysis-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.jp-analysis-table .total-row {
  background: var(--bg-hover);
  border-bottom: 2px solid var(--border-2);
  position: sticky;
  top: 0;
}
.jp-analysis-table .total-row td {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Positive/Negative change indicators */
.pos { color: #16a34a; }
.neg { color: #dc2626; }

/* Rank cell */
.rank-cell {
  text-align: center;
  font-weight: 800;
  color: var(--text-4);
  min-width: 2rem;
}

/* Similar positions chips */
.jp-similar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding: 0.5rem 0 2rem;
}
.jp-similar-chip {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: all 180ms var(--ease);
  min-width: 0;
}
.jp-similar-chip:hover {
  border-color: var(--accent);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}
.jp-chip-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.jp-chip-meta {
  font-size: 0.6875rem;
  color: var(--text-4);
}

/* Profile table numeric columns */
.profile-table th.num,
.profile-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.profile-table td.val {
  font-weight: 700;
  color: var(--emerald);
}

/* Responsive job profile */
@media (max-width: 768px) {
  .jp-analysis-table { font-size: 0.75rem; }
  .jp-analysis-table th, .jp-analysis-table td { padding: 0.375rem 0.5rem; }
  .jp-similar-chips { gap: 0.5rem; }
  .jp-similar-chip { padding: 0.5rem 0.75rem; }
  .jp-chip-name { max-width: 180px; }
}
