/* =========================================================================
   Darbo Rinka — Design System
   Editorial data publication aesthetic. accent blue. Warm off-white.
   Space Grotesk headings · DM Sans body · JetBrains Mono data
   ========================================================================= */

/* -------------------------------------------------------------------------
   CSS Variables
   ------------------------------------------------------------------------- */

:root {
  /* Backgrounds */
  --bg-primary:    #FAFAF7;
  --bg-secondary:  #F2F0EB;
  --bg-elevated:   #FFFFFF;
  --bg-dark:       #1B1D23;
  --bg-dark-secondary: #252830;

  /* Text */
  --text-primary:   #1B1D23;
  --text-secondary: #6B6D73;
  --text-tertiary:  #9B9DA3;
  --text-inverse:   #FAFAF7;

  /* Accent — Accent Blue */
  --accent:       #2D9CDB;
  --accent-light: #D4EDFB;
  --accent-dark:  #1A7AB5;
  --accent-glow:  rgba(45, 156, 219, 0.08);

  /* Functional */
  --positive: #3A7D6A;
  --negative: #C0392B;
  --neutral:  #6B6D73;

  /* Borders */
  --border-light:  #E5E3DE;
  --border-medium: #D1CFC9;
  --border-dark:   #3A3D45;

  /* Chart palette */
  --chart-1: #2D9CDB;
  --chart-2: #3A7D6A;
  --chart-3: #5B6ABF;
  --chart-4: #C0392B;
  --chart-5: #C8962E;
  --chart-6: #8B6DAF;
  --chart-7: #D4854A;
  --chart-8: #9B9DA3;

  /* Typography */
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --content-max:     1140px;
  --content-narrow:  860px;
  --content-padding: 1.5rem;
}

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: 1.625rem; font-weight: 600; line-height: 1.2;  letter-spacing: -0.02em; }
h3 { font-size: 1.25rem;  font-weight: 600; line-height: 1.3;  letter-spacing: -0.01em; }
h4 { font-size: 1rem;     font-weight: 600; line-height: 1.4;  color: var(--text-secondary); }

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-medium);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

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

/* Data typography utilities */
.data-value    { font-family: var(--font-mono); font-weight: 600; }
.data-salary   { font-family: var(--font-mono); font-weight: 600; font-size: 1.125rem; }
.data-large    { font-family: var(--font-mono); font-weight: 700; font-size: 2rem; letter-spacing: -0.02em; }
.data-pct      { font-family: var(--font-mono); font-weight: 500; }
.text-small    { font-size: 0.8125rem; line-height: 1.5; color: var(--text-secondary); }
.text-caption  { font-size: 0.75rem; line-height: 1.4; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-heading); font-weight: 500; }
.text-muted    { color: var(--text-tertiary); }
.text-success  { color: var(--positive); }
.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }

/* -------------------------------------------------------------------------
   Navigation — light, newspaper masthead
   ------------------------------------------------------------------------- */

.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.site-logo:hover {
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.logo-sub {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-heading);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.125rem;
  align-items: center;
}

.nav-link {
  display: block;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  line-height: 56px;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-link:hover {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom-color: var(--border-medium);
}

.nav-link.active,
.nav-link--active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* Admin link */
.nav-admin {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-light);
}

.nav-link--admin {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.nav-link--admin:hover,
.nav-link--admin.active {
  color: var(--text-secondary);
  border-bottom-color: var(--border-medium);
}

.nav-admin--secondary {
  border-left: none;
  margin-left: 0;
  padding-left: 0.25rem;
}

/* -------------------------------------------------------------------------
   Main layout
   ------------------------------------------------------------------------- */

.main-content {
  flex: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  padding: var(--space-xl) var(--content-padding) var(--space-2xl);
}

/* -------------------------------------------------------------------------
   Info banner
   ------------------------------------------------------------------------- */

.info-banner {
  background: var(--accent-light);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--accent-dark);
  margin-bottom: var(--space-lg);
}

.info-banner--warning {
  background: #FEF9C3;
  border-color: #FDE047;
  color: #92400E;
}

/* -------------------------------------------------------------------------
   Page header
   ------------------------------------------------------------------------- */

.page-header {
  margin-bottom: var(--space-xl);
}

.page-header h1,
.page-header .page-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.375rem;
}

/* -------------------------------------------------------------------------
   Headline stats — monospace numbers, accent blue on first
   ------------------------------------------------------------------------- */

.stats-grid,
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-lg);
}

.stats-grid .stat-card:first-child,
.stat-cards .stat-card:first-child {
  border-left: 3px solid var(--accent);
}

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

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.375rem;
}

.stat-value.accent-green  { color: var(--positive); }
.stat-value.accent-red    { color: var(--negative); }
.stat-value.muted         { color: var(--text-tertiary); }
.stat-value--range        { font-size: 1.25rem; }

.stat-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* -------------------------------------------------------------------------
   Section headings
   ------------------------------------------------------------------------- */

.section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
}

/* -------------------------------------------------------------------------
   Charts section — varying widths for visual rhythm
   ------------------------------------------------------------------------- */

.charts-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
}

.charts-row--full  { grid-template-columns: 1fr; }
.charts-row--equal { grid-template-columns: 1fr 1fr; }

.charts-row:has(.chart-card--wide:first-child) { grid-template-columns: 2fr 1fr; }
.charts-row:has(.chart-card--wide:last-child)  { grid-template-columns: 1fr 2fr; }

.chart-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.chart-card--danger { border-color: var(--negative); }

.chart-card-header {
  margin-bottom: var(--space-md);
}

.chart-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.chart-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-container {
  position: relative;
  flex: 1;
}

/* -------------------------------------------------------------------------
   Footer — dark, informational
   ------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--content-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #6B7280;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.footer-meta {
  font-size: 0.75rem;
  color: #6B7280;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.75rem;
  color: #6B7280;
  text-decoration: none;
}

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

.footer-legal {
  font-size: 0.75rem;
  color: #6B7280;
  white-space: nowrap;
}

.footer-legal-link {
  color: #6B7280;
  text-decoration: none;
}

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

/* -------------------------------------------------------------------------
   Filter bar
   ------------------------------------------------------------------------- */

.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  position: sticky;
  top: 56px;
  z-index: 50;
}

.filter-bar-controls {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 500;
}

.filter-select {
  height: 34px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.15s;
  min-width: 180px;
}

.filter-select:hover {
  border-color: var(--border-medium);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-select--active {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 500;
}

.filter-select--sm { min-width: 110px; }

option.city-filter-hint {
  color: var(--text-tertiary);
  font-size: 0.775rem;
  font-style: italic;
}

/* Salary toggle */
.salary-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  padding: 0.1875rem;
  height: 34px;
  align-items: center;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background 0.12s;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: var(--font-body);
}

.toggle-option:has(input:checked) {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 500;
}

.toggle-option input[type="radio"] { display: none; }

/* Compare controls */
.compare-btn {
  height: 34px;
  padding: 0 0.875rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  align-self: flex-end;
}

.compare-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.compare-btn--cancel {
  color: var(--negative);
  border-color: #FCA5A5;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.compare-btn--cancel:hover {
  background: #FEF2F2;
  border-color: var(--negative);
}

.compare-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.compare-label { font-size: 0.8125rem; color: var(--text-secondary); white-space: nowrap; }
.compare-vs    { font-size: 0.8125rem; color: var(--text-tertiary); font-style: italic; }

/* -------------------------------------------------------------------------
   Tables — no zebra, accent glow on hover
   ------------------------------------------------------------------------- */

.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
  max-width: 100%;
  margin-top: var(--space-sm);
}

.table-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Shared table base */
.roles-table,
.listings-table,
.jobs-table,
.salary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.roles-table thead,
.listings-table thead,
.jobs-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
}

.roles-table th,
.listings-table th,
.jobs-table th {
  padding: 0.5rem var(--space-md);
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 500;
  border-bottom: 2px solid var(--border-medium);
  white-space: nowrap;
}

.roles-table td,
.listings-table td,
.jobs-table td {
  padding: 0.5625rem var(--space-md);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-primary);
}

.roles-table tr:last-child td,
.listings-table tr:last-child td,
.jobs-table tr:last-child td { border-bottom: none; }

/* Accent glow on hover — no zebra */
.roles-table    tbody tr:hover td,
.listings-table tbody tr:hover td,
.jobs-table     tbody tr:hover td { background: var(--accent-glow); }

/* Role table specific */
.role-rank  { color: var(--text-tertiary); font-size: 0.75rem; width: 2rem; text-align: right; font-family: var(--font-mono); }
.role-title { color: var(--text-primary); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-salary { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); text-align: right; white-space: nowrap; }
.role-count  { color: var(--text-secondary); text-align: right; font-family: var(--font-mono); width: 3.5rem; }

/* Compare stats table */
.compare-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.compare-stats-table th {
  padding: 0.625rem var(--space-md);
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 500;
  border-bottom: 2px solid var(--border-medium);
}

.compare-stats-table th:nth-child(2) { color: var(--chart-1); }
.compare-stats-table th:nth-child(3) { color: var(--chart-2); }

.compare-stats-table td {
  padding: 0.625rem var(--space-md);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.compare-stats-table tr:last-child td { border-bottom: none; }
.compare-stats-table td:not(:first-child) { font-family: var(--font-mono); font-weight: 500; }

.compare-section-header { margin-bottom: 0.75rem; }

/* -------------------------------------------------------------------------
   Stat range & filter summary
   ------------------------------------------------------------------------- */

.role-directory-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-light);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.role-directory-callout:hover {
  border-color: var(--accent);
}

.role-directory-callout-desc {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.role-directory-callout-link {
  white-space: nowrap;
  font-size: 1.125rem;
  color: var(--accent);
  padding-left: var(--space-lg);
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.btn-primary {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.6875rem 1.5rem;
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: var(--bg-dark);
  text-decoration: none;
}

.btn-secondary {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.6875rem 1.5rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

/* -------------------------------------------------------------------------
   Tags / Badges — 2px radius, no borders, categorical backgrounds
   ------------------------------------------------------------------------- */

.tag,
.industry-badge,
.seniority-badge,
.remote-badge,
.status-badge,
.source-board-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Industry badge */
.industry-badge {
  background: var(--accent-light);
  color: var(--accent-dark);
}

/* Seniority badges */
.seniority-badge--intern    { background: #F0FDF4; color: #166534; }
.seniority-badge--junior    { background: var(--accent-light); color: var(--accent-dark); }
.seniority-badge--mid       { background: #EFF6FF; color: #1D4ED8; }
.seniority-badge--senior    { background: #F5F3FF; color: #6D28D9; }
.seniority-badge--lead      { background: #FFF7ED; color: #C2410C; }
.seniority-badge--manager   { background: #FEF2F2; color: #991B1B; }
.seniority-badge--director  { background: var(--bg-dark); color: var(--text-inverse); }
.seniority-badge--executive { background: var(--text-primary); color: var(--text-inverse); }

/* Remote badges */
.remote-badge--remote  { background: #ECFDF5; color: var(--positive); }
.remote-badge--hybrid  { background: #FFFBEB; color: #B45309; }
.remote-badge--onsite  { background: var(--bg-secondary); color: var(--text-secondary); }

/* Status badges */
.status-badge--active  { background: #ECFDF5; color: var(--positive); }
.status-badge--expired { background: var(--bg-secondary); color: var(--text-tertiary); }

/* Source board tags */
.source-board-tag { background: var(--bg-secondary); color: var(--text-secondary); }

/* Source links */
.source-link {
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: border-color 0.12s;
  font-family: var(--font-heading);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.source-link:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

/* Inline company + source badge container */
.listing-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm, 6px);
  flex-wrap: wrap;
}

/* Source board badges — full names, used on match cards and job tables */
.source-badges {
  display: inline-flex;
  gap: var(--space-xs, 4px);
  flex-wrap: wrap;
  margin-top: 0;
}

.source-badge {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  color: var(--text-tertiary);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

a.source-badge:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

@media (max-width: 768px) {
  .source-badges {
    margin-left: 0;
  }
}

/* Save/remove text-link toggle — appears on match cards, company profile, salary pages */
.save-toggle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.save-toggle:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.save-toggle--saved {
  color: var(--positive);
}

.save-toggle--saved:hover {
  color: var(--negative);
}

/* Column used for save toggle in tables */
.col-save {
  text-align: right;
  white-space: nowrap;
  width: 6rem;
}

/* net badge */
.salary-net-badge,
.badge-net {
  display: inline-block;
  font-size: 0.6125rem;
  font-weight: 600;
  padding: 0.0625rem 0.3125rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 2px;
  margin-left: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
  font-family: var(--font-heading);
}

/* -------------------------------------------------------------------------
   Pagination — simple editorial style
   ------------------------------------------------------------------------- */

.pagination,
.jobs-pagination {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  align-items: center;
}

.page-btn,
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-elevated);
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
  font-family: var(--font-body);
}

.page-btn:hover:not(.page-btn--disabled):not(.page-btn--ellipsis),
.page-link:hover:not(.page-link--disabled):not(.page-link--ellipsis) {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

.page-btn--active,
.page-link--active {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
  font-weight: 600;
  cursor: default;
}

.page-btn--disabled,
.page-link--disabled { color: var(--text-tertiary); cursor: default; pointer-events: none; }

.page-btn--ellipsis,
.page-link--ellipsis {
  border-color: transparent;
  background: transparent;
  color: var(--text-tertiary);
  cursor: default;
  min-width: 1.5rem;
}

.page-link--prev,
.page-link--next { padding: 0 0.875rem; }

/* =========================================================================
   Company Directory
   ========================================================================= */

.company-summary-line {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.company-search-input { min-width: 200px; }

.company-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (max-width: 1100px) { .company-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .company-grid { grid-template-columns: 1fr; } }

.company-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
  cursor: pointer;
}

.company-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.company-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.company-card-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.company-card-stats { font-size: 0.8125rem; }

.company-listings-indicator {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-tertiary);
}

.company-listings-indicator.has-active { color: var(--positive); }

.company-listings-indicator.has-active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--positive);
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.company-total-listings { color: var(--text-tertiary); font-size: 0.8125rem; }

.company-card-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.375rem;
  align-items: baseline;
}

.company-meta-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

.company-card-footer {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 0.375rem;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================================================
   Company Profile
   ========================================================================= */

.company-back-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.company-back-link a,
.company-view-listings-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.company-back-link a:hover,
.company-view-listings-link:hover {
  color: var(--text-primary);
  text-decoration-color: var(--accent);
}

.company-header { margin-bottom: var(--space-lg); }

.company-header-name {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.company-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.company-header-cities { font-size: 0.875rem; color: var(--text-secondary); }
.company-header-since  { font-size: 0.8125rem; color: var(--text-tertiary); }

.company-header-boards {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Company profile — SEO description */
.company-seo-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-lg);
  max-width: 72ch;
}

/* Company profile — top skills list */
.company-skills-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.25rem;
}

.company-skills-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.company-skills-item:last-child { border-bottom: none; }

.company-skills-name {
  color: var(--text-primary);
  flex: 1;
}

.company-skills-count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Company profile — market median note below histogram */
.market-median-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0.375rem 0 0.25rem;
}

.market-median-line-preview {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 1.5px dashed #888;
  flex-shrink: 0;
}

/* Company profile — related companies row */
.related-companies-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: 0.25rem 0;
}

.related-company-card {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  background: var(--bg-primary);
  transition: border-color 0.15s, background 0.15s;
  min-width: 140px;
}

.related-company-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.related-company-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.related-company-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* Company profile — work mode compact bar */
.work-mode-bar {
  display: flex;
  height: 26px;
  border-radius: 2px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 0.5rem;
}

.work-mode-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
  transition: flex 0.2s;
}

.work-mode-segment--onsite { background: var(--accent); }
.work-mode-segment--hybrid  { background: var(--positive); }
.work-mode-segment--remote  { background: #5B6ABF; }

.work-mode-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  padding: 0 0.375rem;
}

.work-mode-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.375rem;
}

.work-mode-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.work-mode-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.work-mode-dot--onsite { background: var(--accent); }
.work-mode-dot--hybrid  { background: var(--positive); }
.work-mode-dot--remote  { background: #5B6ABF; }

/* Listing filter toggle */
.listings-filter-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 0.1875rem;
  align-items: center;
}

/* Listings table */
.listings-table { table-layout: fixed; }
.listings-table-wrapper { overflow-x: hidden; }

/* Column widths — fixed columns, title takes remaining space */
.listings-table .col-city     { width: 120px; }
.listings-table .col-salary   { width: 130px; }
.listings-table .col-seniority { width: 80px; }
.listings-table .col-date     { width: 100px; }
.listings-table .col-match    { width: 70px; text-align: right; font-family: var(--font-mono); }
.listings-table .col-save     { width: 70px; }

.listing-row--removed td { color: var(--text-tertiary); }
.listing-title {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
}
.listing-row--removed .listing-title { color: var(--text-tertiary); }

.listing-title-orig {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-top: 1px;
}

.listing-location {
  color: var(--text-secondary);
  overflow: hidden;
}
.listing-city-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-remote-tag {
  display: block;
  margin-top: 2px;
}

.listing-salary {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-primary);
}

.salary-type {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-left: 2px;
}

.listing-date {
  white-space: nowrap;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.listing-links {
  white-space: nowrap;
  display: flex;
  gap: 0.375rem;
}

/* =========================================================================
   Jobs Browse Page
   ========================================================================= */

.jobs-filter-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
}

.jobs-search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.jobs-search-input {
  flex: 1;
  padding: 0.625rem var(--space-md);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  outline: none;
  transition: border-color 0.15s;
}

.jobs-search-input:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.jobs-search-btn {
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.jobs-search-btn:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.jobs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: flex-end;
}

.filter-group--inline {
  display: flex;
  align-items: center;
  padding-bottom: 2px;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-family: var(--font-body);
}

.filter-checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}

.jobs-results-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.jobs-results-count strong { color: var(--text-primary); }

/* Table wrapper */
.jobs-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  background: var(--bg-elevated);
  margin-bottom: var(--space-md);
}

/* Column widths */
.jobs-table .col-title    { min-width: 220px; }
.jobs-table .col-location { width: 100px; }
.jobs-table .col-salary   { width: 130px; white-space: nowrap; text-align: right; }
.jobs-table .col-type     { width: 100px; }
.jobs-table .col-seniority { width: 80px; }
.jobs-table .col-posted   { width: 70px;  white-space: nowrap; }

.job-title {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.job-title-orig {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Title as clickable link (merged title cell) */
.job-title-link {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  text-decoration: none;
}

.job-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.job-title-link--plain {
  cursor: default;
}

.job-title-link--plain:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Company name inside title cell */
.job-company-inline {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 400;
}

.job-company-inline:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.job-company-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 170px;
}

.job-company-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Contract type tag (non-full-time) */
.tag-contract {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.job-location {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 125px;
}

.job-salary {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-primary);
}

.salary-inferred {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--text-secondary);
  font-style: italic;
  cursor: help;
  border-bottom: 1px dotted var(--text-tertiary);
}
.salary-inferred::after {
  content: " est.";
  font-size: 0.75em;
  color: var(--text-tertiary);
}

.job-date {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.job-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.job-row--expired td { opacity: 0.55; }

.badge-removed {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--negative);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-family: var(--font-heading);
}

.jobs-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  margin-bottom: var(--space-md);
}

.jobs-clear-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--accent-dark);
  text-decoration: underline;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------------------
   Nav — Upload CV button
   ------------------------------------------------------------------------- */

.btn-nav-upload {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.btn-nav-upload:hover,
.btn-nav-upload.active {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* -------------------------------------------------------------------------
   Jobs table — extra columns
   ------------------------------------------------------------------------- */

.jobs-table .col-match { width: 60px; text-align: right; font-family: var(--font-mono); }

/* Sort-able column headers */
.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-sort:hover { color: var(--accent); }

.th-sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

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

.th-sort-icon {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-tertiary);
  vertical-align: middle;
}

.th-sort.active-sort .th-sort-icon { color: var(--accent); }

/* -------------------------------------------------------------------------
   Company profile — source link badges stacked vertically
   ------------------------------------------------------------------------- */

.listing-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.listing-links .source-link {
  font-size: 0.6875rem;
  padding: 1px 6px;
}

/* =========================================================================
   Landing Page
   ========================================================================= */

.landing-body {
  background: var(--bg-primary);
}

/* Nav on landing */
.landing-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Shared container */
.landing-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* Hero — warm bg, left-aligned, data-forward */
.hero {
  background: var(--bg-primary);
  padding: var(--space-2xl) var(--content-padding) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-xl);
  max-width: 800px;
}

.hero-headline em {
  font-style: normal;
  color: var(--accent);
}

/* Hero stat cards (4 in a row) */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.landing-stat-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-lg);
}

.hero-stats .landing-stat-item:first-child {
  border-left: 3px solid var(--accent);
}

.landing-stat-label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.landing-stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Hero chart */
.hero-chart-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-lg);
}

.hero-chart-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.hero-chart-subtitle {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

/* Old stats bar compatibility */
.stats-bar-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: none; /* replaced by hero-stats */
}

.stats-bar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.landing-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

/* How it works (kept for compatibility, hidden in new design) */
.how-it-works-section { display: none; }

/* Feature section */
.feature-section {
  padding: var(--space-2xl) var(--content-padding);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.feature-section-heading {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xl);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
  text-align: left;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.feature-card:hover { border-color: var(--accent); }

.feature-card-icon { display: none; } /* No icons */

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.625rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--space-lg);
}

.feature-card-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  align-self: flex-start;
}

.feature-card-link:hover {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom-color: var(--accent-dark);
}

/* How card compatibility */
.how-it-works { display: none; }
.how-card { display: none; }

/* Sources strip */
.sources-section {
  padding: var(--space-lg) var(--content-padding);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
}

.sources-strip {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.sources-label { font-size: 0.8125rem; color: var(--text-tertiary); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.04em; }
.sources-list  { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 500; letter-spacing: 0.01em; }

/* CTA buttons */
.cta-buttons {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

/* =========================================================================
   SEO Salary Pages — editorial, content-narrow
   ========================================================================= */

.seo-content { flex: 1; background: var(--bg-primary); }

.seo-inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: var(--space-xl) var(--content-padding) var(--space-2xl);
}

.seo-page-header { margin-bottom: var(--space-xl); }

.seo-page-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.seo-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.seo-section { margin-bottom: var(--space-xl); }

.seo-section h2 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: none !important;
  margin-bottom: 0.75rem !important;
  padding-bottom: 0 !important;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.breadcrumb-sep { color: var(--border-medium); }

/* Salary hero */
.salary-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-xl);
}

.salary-range-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.range-segment {
  background: var(--bg-primary);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.range-segment--median {
  background: var(--accent-light);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.range-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.range-segment--median .range-value { color: var(--accent-dark); }

.range-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-top: 0.375rem;
}

.salary-max-note { font-size: 0.8125rem; color: var(--text-secondary); margin-top: var(--space-md); }

/* SEO Tables */
.salary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.salary-table th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border-medium);
}

.salary-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.salary-table tr.highlight td { background: var(--accent-glow); }

.salary-table .median-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-dark);
}

.salary-table .count-val {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-align: right;
}

.salary-table a {
  color: var(--text-primary);
  text-decoration: none;
}

.salary-table a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.table-link {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  color: var(--accent-dark);
  text-decoration: none;
  white-space: nowrap;
}

.table-link:hover { text-decoration: underline; }
.seniority-label { font-weight: 500; text-transform: capitalize; }

/* Company list */
.company-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: company-counter;
}

.company-list-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  counter-increment: company-counter;
}

.company-list-item::before {
  content: counter(company-counter) ".";
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  min-width: 1.5rem;
  flex-shrink: 0;
}

.company-list-name {
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  flex: 1;
}

.company-list-name:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.company-list-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Sample listings */
.sample-listings td:first-child {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-link { color: var(--text-primary); text-decoration: none; }
.listing-link:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.date-val {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Related roles */
.related-roles { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.related-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s;
}

.related-role-chip:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.related-role-salary {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-dark);
  font-weight: 600;
}

/* Explore more */
.explore-more h2 { border-bottom: 1px solid var(--border-light); }

.explore-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }

.explore-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s;
}

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

/* Alphabetical index */
.alpha-filter-bar { margin-bottom: var(--space-xl); }

.alpha-search {
  width: 100%;
  max-width: 400px;
  padding: 0.625rem var(--space-md);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  outline: none;
  transition: border-color 0.15s;
}

.alpha-search:focus { border-color: var(--accent); }

.alpha-index { display: flex; flex-direction: column; gap: 0; }
.alpha-section { margin-bottom: var(--space-xl); }

.alpha-letter {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.role-card {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-secondary);
}

.role-card-main {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.role-card-title {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-primary);
  text-decoration: none;
}

.role-card-title:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.role-card-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.role-card-cities { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.375rem; }

.city-chip {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: border-color 0.12s;
}

.city-chip:hover { border-color: var(--accent); color: var(--text-primary); text-decoration: none; }

.no-results { color: var(--text-tertiary); font-size: 0.9375rem; padding: var(--space-xl) 0; text-align: center; }

/* Function family cards (salary index) */
.function-families-section { margin-bottom: var(--space-2xl); }

.function-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

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

@media (max-width: 540px) {
  .function-grid { grid-template-columns: 1fr; }
}

.function-card {
  display: block;
  padding: var(--space-md);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-elevated);
  transition: border-color 0.15s, background 0.15s;
}

.function-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  text-decoration: none;
}

.function-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}

.function-card-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.function-card-count {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.function-card-salary {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: baseline;
}

.function-card-median {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.function-card-roles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.function-card-roles li {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A–Z heading separating function cards from alpha list */
.alpha-families-section { margin-top: var(--space-2xl); }

.alpha-families-heading {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* Function family role list (function.html) */
.function-role-list { display: flex; flex-direction: column; margin-bottom: var(--space-xl); }

.function-role-card {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-secondary);
}

.function-role-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.function-role-title {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-primary);
  text-decoration: none;
}

.function-role-title:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.function-role-salary {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.function-role-meta {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.125rem;
}

/* =========================================================================
   Admin Panel
   ========================================================================= */

.admin-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--content-padding) var(--space-2xl);
}

/* .admin-header base styles defined below in the badges section */

.admin-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.admin-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 0.375rem;
}

.admin-section { margin-bottom: var(--space-xl); }

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.section-header-row .section-title { margin-bottom: 0; }

/* Grid layouts */
.admin-grid { display: grid; gap: var(--space-md); }
.admin-grid--2col { grid-template-columns: repeat(2, 1fr); }
.admin-grid--1col { grid-template-columns: 1fr; }
.admin-grid--4col { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) { .admin-grid--4col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .admin-grid--2col, .admin-grid--4col { grid-template-columns: 1fr; } }

/* Admin cards */
.admin-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-lg);
  border-left: 3px solid var(--border-light);
}

.admin-card.success { border-left-color: var(--positive); }
.admin-card.error   { border-left-color: var(--negative); }
.admin-card.running { border-left-color: var(--accent); animation: pulse-border 2s ease-in-out infinite; }

@keyframes pulse-border {
  0%, 100% { border-left-color: var(--accent); }
  50%       { border-left-color: var(--accent-light); }
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: 0.5rem;
}

.admin-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-card-empty { color: var(--text-tertiary); font-size: 0.875rem; margin: 0.5rem 0; }

/* Action buttons */
.run-btn {
  padding: 0.375rem 0.875rem;
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.run-btn:hover { background: var(--accent-dark); }
.run-btn:disabled,
.run-btn--running { background: var(--text-tertiary); cursor: not-allowed; }

.pipeline-btn {
  padding: 0.5rem 1.25rem;
  background: var(--text-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.pipeline-btn:hover  { background: var(--bg-dark-secondary); }
.pipeline-btn:disabled { background: var(--text-tertiary); cursor: not-allowed; }

/* Stat rows */
.stat-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.875rem;
  border-top: 1px solid var(--bg-secondary);
}

.stat-row--indented  { padding-left: 1.25rem; }
.stat-row--footer    { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-light); font-size: 0.8125rem; color: var(--text-secondary); }
.stat-row-label      { color: var(--text-secondary); min-width: 150px; flex-shrink: 0; }
.stat-row-value      { color: var(--text-primary); font-weight: 500; font-family: var(--font-mono); }
.stat-row-sep        { color: var(--border-medium); margin: 0 0.25rem; }

.error-row           { margin-top: 0.5rem; }
.error-text          { color: var(--negative); font-size: 0.8125rem; font-family: var(--font-mono); white-space: pre-wrap; word-break: break-all; }

/* Progress bar */
.progress-bar-wrapper { display: flex; align-items: center; gap: 0.875rem; margin: 0.75rem 0 var(--space-md); }

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-dark);
  min-width: 90px;
  text-align: right;
}

/* Industry mini-bars */
.industry-breakdown { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--border-light); }

.industry-breakdown-title {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.industry-row {
  display: grid;
  grid-template-columns: 160px 1fr 60px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
}

.industry-name { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mini-bar-wrap { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }

.mini-bar { height: 100%; background: var(--accent-light); border-radius: 3px; min-width: 2px; }

.industry-count { font-family: var(--font-mono); color: var(--text-secondary); text-align: right; }

/* Planned feature cards */
.planned-card {
  background: var(--bg-secondary);
  border: 1.5px dashed var(--border-medium);
  border-radius: 2px;
  padding: var(--space-lg);
  opacity: 0.75;
  position: relative;
}

.planned-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.1875rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.6125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.planned-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-right: 5rem;
}

.planned-desc {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

/* Extraction stats */
.extraction-stats {}

/* =========================================================================
   Responsive
   ========================================================================= */

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

  .charts-row,
  .charts-row:has(.chart-card--wide:first-child),
  .charts-row:has(.chart-card--wide:last-child),
  .charts-row--equal { grid-template-columns: 1fr; }

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

@media (max-width: 768px) {
  .main-content { padding: var(--space-lg) var(--content-padding) var(--space-xl); }

  .stats-grid,
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  .stat-value { font-size: 1.5rem; }

  .footer-inner { flex-direction: column; gap: 0.375rem; }

  .nav-links { display: none; }

  .feature-cards { grid-template-columns: 1fr; }

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

  .hero-headline { font-size: 2.125rem; }

  .salary-range-bar { grid-template-columns: 1fr; }

  .range-segment--median {
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
  }

  .salary-table th,
  .salary-table td { padding: 0.5rem 0.4rem; font-size: 0.8125rem; }

  .sample-listings td:first-child { max-width: 140px; }

  .explore-links { flex-direction: column; }
  .explore-link  { text-align: center; }

  .seo-page-header h1 { font-size: 1.625rem; }
}

@media (max-width: 600px) {
  .hero { padding: var(--space-xl) var(--content-padding) var(--space-lg); }
  .hero-headline { font-size: 1.875rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .landing-stat-value { font-size: 1.625rem; }
}

/* =========================================================================
   Match Scores & Match Cards
   ========================================================================= */

/* ==================== Match Scores (jobs table badge) ==================== */
.match-badge { text-align: center; white-space: nowrap; }
.match-score { font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; }
.match-score--high   { color: var(--positive); }
.match-score--medium { color: var(--accent); }
.match-score--low    { color: var(--text-tertiary); }
.match-score--none   { color: var(--text-tertiary); }

/* ==================== Match Filters ==================== */
.matches-filters {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  background: var(--bg-elevated);
}
.matches-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.filter-select { min-width: 180px; padding: 0.375rem 0.625rem; }
.filter-input  { width: 130px; padding: 0.375rem 0.625rem; }
.filter-actions { display: flex; gap: var(--space-sm); align-items: center; }

/* ==================== Match Cards (matches page) ==================== */
.matches-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.match-card {
  border: 1px solid var(--border-light);
  padding: var(--space-lg);
  border-radius: 2px;
  background: var(--bg-elevated);
  transition: border-color 0.15s;
}
.match-card:hover { border-color: var(--accent); }

.match-card-header { display: flex; gap: var(--space-lg); align-items: stretch; }
.match-card-info { flex: 1; min-width: 0; }

.match-card-title { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; margin-bottom: var(--space-xs); }
.match-title-link { color: var(--text-primary); text-decoration: none; }
.match-title-link:hover { color: var(--accent); }

.match-card-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.25rem; font-size: 0.8125rem; color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}
.match-meta-salary { font-family: var(--font-mono); }
.match-meta-sep { color: var(--text-tertiary); }

.match-explanation { font-size: 0.8rem; color: var(--text-secondary); margin-top: var(--space-xs); }

.match-card-scores {
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: space-between;
  gap: 0; flex-shrink: 0; min-width: 5rem; text-align: right;
}
.match-card-score {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
  line-height: 1.1;
}
.match-card-interview {
  font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 600;
  margin-top: var(--space-sm);
}
.match-card-label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary); font-family: var(--font-heading);
}

.match-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--space-md); padding-top: var(--space-sm);
  border-top: 1px solid var(--border-light);
}
.match-card-sources { display: flex; gap: var(--space-md); }
.match-card-actions { display: flex; gap: var(--space-sm); }

/* ==================== Sort Toggle ==================== */
.sort-toggle {
  display: flex; gap: var(--space-lg); margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-light); padding-bottom: 0;
}
.sort-toggle a {
  font-family: var(--font-heading); font-weight: 500;
  text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--text-secondary); padding-bottom: var(--space-sm);
  text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.sort-toggle a:hover { color: var(--text-primary); }
.sort-toggle a.active {
  color: var(--text-primary); border-bottom-color: var(--accent);
}

/* ==================== Matches empty state ==================== */
.matches-empty {
  padding: var(--space-2xl) 0;
  max-width: 480px;
}
.matches-empty-lead {
  font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: var(--space-sm);
}
.matches-empty-sub { color: var(--text-secondary); margin-bottom: var(--space-lg); }
.matches-empty-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }

/* ==================== Page header with actions ==================== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-lg); gap: var(--space-md); flex-wrap: wrap; }
.page-header-main { flex: 1; }
.page-header-actions { flex-shrink: 0; display: flex; gap: var(--space-sm); align-items: center; }

/* ==================== Accent buttons ==================== */
.btn-accent {
  display: inline-block; background: var(--accent); color: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem;
  padding: 0.5rem 1.25rem; border-radius: 2px; text-decoration: none;
  border: 1px solid var(--accent); transition: background 0.15s, border-color 0.15s;
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-outline-accent {
  display: inline-block; background: transparent; color: var(--accent);
  font-family: var(--font-heading); font-weight: 500; font-size: 0.875rem;
  padding: 0.5rem 1.25rem; border-radius: 2px; text-decoration: none;
  border: 1px solid var(--accent); transition: background 0.15s, color 0.15s;
}
.btn-outline-accent:hover { background: var(--accent-glow); }

/* ==================== Jobs meta row (results + For You link) ==================== */
.jobs-results-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin: var(--space-md) 0;
}
.for-you-link {
  font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); text-decoration: none;
}
.for-you-link:hover { color: var(--accent-dark); }

/* ==================== CV Upload ==================== */
.cv-upload-wrapper { max-width: 500px; margin: 0 auto; padding: var(--space-xl) 0; }
.cv-upload-heading { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin-bottom: var(--space-xs); }
.cv-upload-sub { color: var(--text-secondary); margin-bottom: var(--space-xl); }

.cv-upload-area {
  border: 1px dashed var(--border-medium); padding: var(--space-2xl);
  text-align: center; border-radius: 2px; margin-bottom: var(--space-lg);
  transition: border-color 0.15s;
}
.cv-upload-area:hover { border-color: var(--accent); }
.cv-upload-label { display: block; cursor: pointer; }
.cv-upload-icon { font-size: 2rem; color: var(--text-tertiary); margin-bottom: var(--space-sm); }
.cv-upload-prompt { font-family: var(--font-heading); font-size: 0.9375rem; margin-bottom: var(--space-xs); }
.cv-upload-hint { font-size: 0.8rem; color: var(--text-tertiary); }
.cv-file-input { display: none; }

.upload-area--selected {
  border: 2px solid var(--positive);
  border-style: solid;
  background: rgba(58, 125, 106, 0.04);
}
.upload-success-icon { font-size: 2rem; color: var(--positive); margin-bottom: var(--space-sm); }
.upload-success-filename { font-weight: 600; font-size: 1rem; color: var(--text-primary); margin-bottom: var(--space-xs); word-break: break-all; }
.upload-success-message { font-size: 0.8125rem; color: var(--positive); margin-bottom: var(--space-sm); }
.upload-change-link { font-size: 0.8125rem; color: var(--text-tertiary); cursor: pointer; text-decoration: none; }
.upload-change-link:hover { color: var(--text-primary); }

.cv-submit-btn {
  width: 100%; background: var(--accent); color: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
  padding: 0.75rem; border: none; border-radius: 2px; cursor: pointer;
  transition: background 0.15s;
}
.cv-submit-btn:hover { background: var(--accent-dark); }
.cv-privacy-note { font-size: 0.75rem; color: var(--text-tertiary); text-align: center; margin-top: var(--space-md); }

/* ==================== CV Results ==================== */
.cv-results-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); margin-top: var(--space-lg); }
.cv-extracted-heading, .cv-matches-heading {
  font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-light);
}
.cv-field { margin-bottom: var(--space-md); }
.cv-field-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary); font-family: var(--font-heading); margin-bottom: 0.25rem;
}
.cv-field-value { font-size: 0.9375rem; color: var(--text-primary); }
.cv-skills-group { margin-bottom: var(--space-sm); }
.cv-skills-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-tertiary); font-family: var(--font-heading); margin-bottom: 0.25rem;
}
.cv-skill-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.cv-skill-tag {
  background: var(--accent-light); color: var(--accent-dark);
  font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 2px;
  font-family: var(--font-mono);
}
.cv-skill-tag--domain {
  border: 1px solid var(--accent);
}
.cv-skill-tag--tier-core {
  background: var(--accent-light); border: 1px solid var(--accent); font-weight: 600;
}
.cv-skill-tag--tier-supporting {
  background: var(--surface); border: 1px solid var(--border);
}
.cv-skill-tag--tier-generic {
  background: var(--surface); border: 1px solid var(--border); opacity: 0.6; font-size: 0.7rem;
}
.cv-skills-collapse summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--accent);
  user-select: none;
  display: inline-flex;
  align-items: center;
}
.cv-skills-collapse summary::-webkit-details-marker { display: none; }
.cv-skills-collapse summary::after { content: ' ▾'; }
.cv-skills-collapse[open] summary::after { content: ' ▴'; }

.cv-save-form { margin-top: var(--space-lg); }
.cv-see-all { display: block; text-align: center; margin-top: var(--space-md); font-size: 0.875rem; color: var(--accent); }

/* Compact match cards for CV results */
.match-card--compact { padding: var(--space-md); margin-bottom: var(--space-sm); }
.match-card--compact .match-card-score { font-size: 1.1rem; }
.match-card--compact .match-card-interview { font-size: 0.8125rem; }

/* "Also in City1 · City2" on match cards */
.also-in {
  font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem;
  font-family: var(--font-body);
}

/* CV results filter bar */
.cv-filter-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 0.75rem;
  margin-bottom: var(--space-md);
}
.cv-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-md);
}
.cv-filter-grid .filter-group { gap: 0.3rem; }
.cv-filter-grid .filter-select,
.cv-filter-grid .filter-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.cv-matches-count {
  font-size: 0.85rem; color: var(--text-muted, var(--text-secondary));
  margin-bottom: var(--space-sm); font-family: var(--font-body);
}
.cv-matches-count .mono { font-family: var(--font-mono); }
.cv-matches-count-total { color: var(--text-tertiary); }
.cv-matches-more-link { color: var(--accent); text-decoration: none; }
.cv-matches-more-link:hover { text-decoration: underline; }
.cv-filter-empty {
  font-size: 0.9rem; color: var(--text-secondary); padding: var(--space-md) 0;
}
.cv-matches-heading {
  font-family: var(--font-heading); font-size: 1rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: var(--space-md);
}

/* Secondary meta row: salary + remote type */
.match-card-meta--secondary {
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 860px) {
  .cv-results-layout { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .match-card-header { flex-direction: column; }
  .match-card-scores { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: var(--space-md); min-width: auto; }
  .match-card-score { font-size: 1.1rem; }
}

@media (max-width: 768px) {
  .cv-filter-grid { grid-template-columns: 1fr; }
  .cv-filter-grid .filter-select,
  .cv-filter-grid .filter-input { min-width: 0; width: 100%; }
}

/* ==================== Landing CV CTA ==================== */
.cv-cta-section { padding: var(--space-xl) 0; background: var(--bg-primary); }
.cv-cta-card {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-xl);
  border: 1px solid var(--accent); border-left: 3px solid var(--accent);
  border-radius: 2px; padding: var(--space-xl) var(--space-xl);
  background: #FDFBF6;
}
.cv-cta-heading {
  font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: var(--space-sm);
}
.cv-cta-sub { font-size: 0.9375rem; color: var(--text-secondary); max-width: 560px; }
.cv-cta-btn {
  flex-shrink: 0;
  display: inline-block; padding: 0.75rem 1.75rem;
  background: var(--accent); color: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.9375rem;
  border-radius: 2px; text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.cv-cta-btn:hover { background: var(--accent-dark); color: #fff; }

@media (max-width: 700px) {
  .cv-cta-card { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   Review System — Phase 4
   ========================================================================= */

/* ---- Review card -------------------------------------------------------- */

.review-card {
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-elevated);
}
.review-card--compact { padding: 1rem 1.25rem; }
.review-card:hover { border-color: var(--border-medium); }

.review-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.review-card__stars { display: inline-flex; align-items: center; gap: 2px; }
.star-icon { color: var(--border-medium); font-size: 1rem; }
.star-icon--filled { color: var(--accent); }
.review-card__score { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); margin-left: 0.25rem; }

.review-card__recommend {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 500;
}
.review-card__recommend--yes  { background: var(--positive); color: #fff; }
.review-card__recommend--no   { background: var(--negative); color: #fff; }

.review-card__employment {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.review-card__section { padding-left: 1rem; margin-top: 0.75rem; }
.review-card__section--pros   { border-left: 2px solid var(--positive); }
.review-card__section--cons   { border-left: 2px solid var(--negative); }
.review-card__section--advice { border-left: 2px solid var(--accent); }

.review-card__section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.review-card__section-text { font-size: 0.9rem; line-height: 1.6; }

.review-card__footer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 1rem;
}
.review-card__date { font-family: var(--font-mono); }
.review-card__preview-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ---- Star selector (form) ---------------------------------------------- */

.star-selector { display: inline-flex; gap: 4px; }
.star-selector .star {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--border-medium);
  transition: color 0.1s;
  user-select: none;
}
.star-selector .star.filled { color: var(--accent); }
.star-selector .star:hover  { color: var(--accent-dark); }

/* ---- Rating bars ------------------------------------------------------- */

.rating-bars-list { display: flex; flex-direction: column; gap: 0.6rem; max-width: 500px; }
.rating-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 2.5rem;
  align-items: center;
  gap: 0.75rem;
}
.rating-bar-row--compact { grid-template-columns: 120px 1fr 2.5rem; }

.rating-bar-track { flex: 1; }
.rating-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}
.rating-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.rating-bar__label { font-size: 0.8rem; color: var(--text-secondary); }
.rating-bar__value { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-primary); text-align: right; }

/* ---- Review form ------------------------------------------------------- */

.review-form-page { max-width: 640px; }
.review-form-header { margin-bottom: 2rem; }
.review-form-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem; }
.review-form-company { font-size: 1rem; color: var(--text-secondary); margin: 0 0 0.5rem; }
.review-form-note { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

.review-form .form-section { margin-bottom: 2rem; }
.review-form .form-section__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.review-form .form-group { margin-bottom: 1rem; }
.review-form .form-group--row { display: flex; gap: 1rem; }
.review-form .form-group--checkbox { display: flex; align-items: center; gap: 0.5rem; }
.review-form .form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }
.review-form .form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-sizing: border-box;
}
.review-form .form-input:focus { outline: none; border-color: var(--accent); }
.review-form .form-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.review-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-sizing: border-box;
}
.review-textarea:focus { outline: none; border-color: var(--accent); }
.review-form__char-count { font-size: 0.75rem; color: var(--text-secondary); text-align: right; margin-top: 0.25rem; }

.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rating-required { font-size: 0.75rem; color: var(--negative); font-weight: 400; }
.rating-optional { font-size: 0.75rem; color: var(--text-secondary); font-weight: 400; }

.review-submit-btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}
.form-submit-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* ---- Pill radio -------------------------------------------------------- */

.pill-radio { display: inline-flex; gap: 0.5rem; }
.pill-radio input[type="radio"] { display: none; }
.pill-radio label {
  padding: 0.4rem 1.25rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pill-radio input[type="radio"]:checked + label {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-dark);
}
.pill-radio--recommend .pill-radio__yes { border-color: var(--border-medium); }
.pill-radio--recommend input[type="radio"]:checked + .pill-radio__yes {
  border-color: var(--positive);
  background: rgba(58,125,106,0.08);
  color: var(--positive);
}
.pill-radio--recommend .pill-radio__no { border-color: var(--border-medium); }
.pill-radio--recommend input[type="radio"]:checked + .pill-radio__no {
  border-color: var(--negative);
  background: rgba(192,57,43,0.07);
  color: var(--negative);
}

/* ---- Reviews page header ----------------------------------------------- */

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.reviews-header-title { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 700; margin: 0; }
.reviews-header-company { color: var(--text-secondary); font-size: 1rem; margin: 0.25rem 0 0; }
.reviews-overall-score { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 700; color: var(--text-primary); }
.reviews-star-large { color: var(--accent); font-size: 2rem; }
.reviews-header-score { display: flex; align-items: center; gap: 0.5rem; }
.reviews-header-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.reviews-count { font-size: 0.875rem; color: var(--text-secondary); font-family: var(--font-mono); }
.reviews-recommend { font-size: 0.875rem; color: var(--positive); }
.reviews-submitted-banner {
  background: rgba(58,125,106,0.1);
  border: 1px solid var(--positive);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: var(--positive);
  font-size: 0.875rem;
}
.reviews-breakdown { margin-bottom: 2rem; }
.reviews-list-section { margin-top: 1.5rem; }
.reviews-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.reviews-empty { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.reviews-empty p { margin-bottom: 1rem; }

/* ---- Company profile reviews summary ----------------------------------- */

.review-summary-row { display: flex; gap: 2rem; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; }
.review-summary-score { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.review-summary-number { font-family: var(--font-mono); font-size: 2.25rem; font-weight: 700; line-height: 1; }
.review-summary-star { color: var(--accent); font-size: 1.75rem; }
.review-summary-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.review-count-label { font-size: 0.85rem; color: var(--text-secondary); font-family: var(--font-mono); }
.review-recommend-label { font-size: 0.8rem; color: var(--positive); }
.review-summary-bars { flex: 1; min-width: 240px; }
.review-preview-list { display: flex; flex-direction: column; gap: 0.75rem; }
.review-see-all-row { margin-top: 1rem; }
.review-see-all-link { font-size: 0.875rem; color: var(--accent); text-decoration: none; }
.review-see-all-link:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.review-empty-state { padding: 1.5rem 0; }
.review-empty-text { color: var(--text-secondary); margin: 0 0 0.25rem; font-size: 0.9rem; }
.review-empty-cta { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }

/* Compact review snippet (company profile upper section) */
.review-snippet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}
.review-snippet-stars { color: var(--accent); font-weight: 600; font-family: var(--font-mono); white-space: nowrap; }
.review-snippet-text { font-style: italic; color: var(--text-secondary); }
.review-snippet-sep { color: var(--text-tertiary); }
.review-snippet-link { color: var(--accent); text-decoration: none; white-space: nowrap; }
.review-snippet-link:hover { text-decoration: underline; }
.review-snippet-empty { color: var(--text-tertiary); }

/* ---- Admin moderation -------------------------------------------------- */

.admin-pending-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
}
.admin-empty { padding: 2rem; color: var(--text-secondary); }
.admin-card--highlight { border-left: 3px solid var(--accent); }
.admin-review-card {
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-elevated);
}
.admin-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-review-company { font-weight: 600; font-size: 1rem; }
.admin-review-company a { color: var(--text-primary); text-decoration: none; }
.admin-review-company a:hover { color: var(--accent); }
.admin-review-submitted { display: block; font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-mono); }
.admin-review-stars { display: inline-flex; align-items: center; gap: 2px; }
.admin-review-identity { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.admin-review-context { font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--text-secondary); font-family: var(--font-mono); }
.admin-review-label { font-weight: 600; }
.admin-review-value { margin-right: 0.75rem; }
.admin-review-ratings { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.admin-rating-chip { font-size: 0.75rem; font-family: var(--font-mono); background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 2px; padding: 2px 8px; }
.admin-review-actions { display: flex; gap: 0.75rem; align-items: flex-start; margin-top: 1rem; flex-wrap: wrap; }
.admin-review-btn-approve { padding: 0.4rem 1.25rem; }
.admin-review-btn-reject { padding: 0.4rem 1.25rem; color: var(--negative); border-color: var(--negative); }
.admin-review-btn-reject:hover { background: rgba(192,57,43,0.07); }
.admin-reject-reason { width: 100%; }

/* Admin header badges */
.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-header-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-board-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-section-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.admin-card-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

/* Data freshness */
.admin-freshness {
  margin-top: 1.5rem;
}

.admin-freshness-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.admin-freshness-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.freshness-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  font-size: 0.8125rem;
}

.freshness-item--green {
  border-color: var(--positive);
  background: rgba(58, 125, 106, 0.06);
}

.freshness-item--amber {
  border-color: #C8962E;
  background: rgba(200, 150, 46, 0.06);
}

.freshness-item--red {
  border-color: var(--negative);
  background: rgba(192, 57, 43, 0.06);
}

.freshness-board {
  font-weight: 500;
  color: var(--text-primary);
}

.freshness-time {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.freshness-item--green .freshness-time { color: var(--positive); }
.freshness-item--amber .freshness-time { color: #C8962E; }
.freshness-item--red .freshness-time { color: var(--negative); }

/* =========================================================================
   Skill Gap Analysis
   ========================================================================= */

/* Two-column matches layout: skill gap sidebar + match cards */
.matches-layout {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.skill-gap-sidebar {
  width: 280px;
  min-width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
}

.matches-main {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .matches-layout {
    flex-direction: column;
  }
  .skill-gap-sidebar {
    width: 100%;
    min-width: 0;
    position: static;
  }
}

.skill-gap-card {
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  padding: var(--space-lg);
  margin-bottom: 0;
  border-radius: 2px;
}

.skill-gap-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-xs);
}

.skill-gap-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0 0 var(--space-md);
}

.skill-gap-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.skill-gap-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.skill-gap-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}

.skill-gap-name {
  font-weight: 600;
  color: var(--text-primary);
}

.skill-gap-count {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: nowrap;
  margin-left: var(--space-sm);
}

.skill-gap-bar-bg {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.skill-gap-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.skill-gap-footer {
  margin: var(--space-md) 0 0;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* Blurred teaser variant (logged-out landing page) */
.skill-gap-blurred {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.8;
}

.skill-gap-teaser {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.skill-gap-teaser-items {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-gap-teaser-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.skill-gap-teaser-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.skill-gap-teaser-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-gap-teaser-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.skill-gap-teaser-bar {
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.6;
}

.skill-gap-teaser-overlay {
  display: none;
}

.skill-gap-cta {
  display: block;
  text-align: center;
  margin-top: var(--space-md);
  padding: 0.6rem var(--space-lg);
  background: var(--accent);
  color: #fff;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.skill-gap-cta:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.skill-gap-teaser-section {
  padding: var(--space-xl) 0;
}

/* stat-value small variant */
.stat-value--sm {
  font-size: 1rem;
}

/* ---- Form errors ------------------------------------------------------- */

.form-errors { background: rgba(192,57,43,0.07); border: 1px solid var(--negative); border-radius: 2px; padding: 0.75rem 1rem; margin-bottom: 1.5rem; }
.form-error { color: var(--negative); font-size: 0.875rem; margin: 0; }

/* =========================================================================
   Nav auth area
   ========================================================================= */

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.nav-auth .nav-link {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout-form { margin: 0; padding: 0; }

.nav-logout-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.nav-logout-btn:hover { color: var(--negative); }

/* =========================================================================
   Language switcher
   ========================================================================= */

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.lang-switcher__link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.15s;
}

.lang-switcher__link:hover {
  color: var(--text-secondary);
}

.lang-switcher__link--active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switcher__sep {
  font-size: 0.75rem;
  color: var(--border-medium);
  user-select: none;
}

/* Compact nav for medium desktop widths — prevents Lithuanian label overflow */
@media (max-width: 1280px) {
  .nav-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .nav-auth { gap: 0.25rem; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .nav-link {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    font-size: 0.8125rem;
  }
  .nav-logout-btn { font-size: 0.8125rem; }
  .btn-nav-upload { padding-left: 0.5rem; padding-right: 0.5rem; font-size: 0.8125rem; }
}

/* =========================================================================
   Auth Pages — login, register
   ========================================================================= */

.auth-page {
  display: flex;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.auth-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-top: 0;
}

.auth-error {
  padding: 0.75rem;
  border: 1px solid var(--negative);
  border-radius: 2px;
  color: var(--negative);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: rgba(192, 57, 43, 0.05);
}

.auth-success {
  padding: 0.75rem;
  border: 1px solid var(--positive);
  border-radius: 2px;
  color: var(--positive);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: rgba(58, 125, 106, 0.07);
}

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-switch a { color: var(--accent); }
.auth-switch a:hover { color: var(--accent-dark); }

.auth-legal-note {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.auth-legal-note a { color: var(--text-secondary); }
.auth-legal-note a:hover { color: var(--accent); }

/* =========================================================================
   Form system — shared components
   ========================================================================= */

.form-field { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-required { color: var(--negative); margin-left: 0.1rem; }
.form-optional { color: var(--text-tertiary); font-weight: 400; text-transform: none; letter-spacing: 0; }
.form-hint { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 0.3rem; display: block; }

.form-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--accent);
  outline: none;
}

.form-input--readonly,
.form-input[readonly],
.form-input:disabled {
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: default;
}

.form-select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.form-select:focus {
  border-color: var(--accent);
  outline: none;
}

.form-field--inline { margin-top: 0.5rem; }

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.5;
}

.form-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
  cursor: pointer;
  width: 15px;
  height: 15px;
}

.form-checkbox-label a { color: var(--accent); }

.auth-consent-text {
  display: inline;
}

.auth-consent-text a {
  color: var(--accent);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.4;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn--ghost:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

.btn--full {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
}

.btn--danger {
  background: var(--negative);
  color: #fff;
  border: 1px solid var(--negative);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn--danger:hover {
  background: #a93226;
  border-color: #a93226;
  color: #fff;
  text-decoration: none;
}

/* =========================================================================
   FIX 5 — Reusable form utility classes
   ========================================================================= */

.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.form-group { margin-bottom: 1.25rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-checkbox { accent-color: var(--accent); }

.form-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.form-pill {
  display: inline-flex;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.form-pill.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.form-auth {
  max-width: 420px;
  margin: 0 auto;
  padding-top: 4rem;
}

.form-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent-light);
  border-radius: 2px;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
}

.skill-tag__remove {
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
}

.skill-tag__remove:hover { color: var(--negative); }

/* =========================================================================
   Profile Page
   ========================================================================= */

.profile-form { max-width: 720px; }

.profile-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.profile-section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.profile-section-hint {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

.profile-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.profile-row--checkboxes { grid-template-columns: 1fr; }

.form-field--wide { grid-column: 1 / -1; }

/* Pill-style checkbox toggles */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.checkbox-grid .form-checkbox-label {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  font-size: 0.85rem;
  cursor: pointer;
  margin: 0;
  gap: 0;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.checkbox-grid .form-checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-grid .form-checkbox-label:has(input:checked) {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Tag input widget */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  background: var(--bg-elevated);
  cursor: text;
  min-height: 42px;
  transition: border-color 0.15s;
}

.tag-input:focus-within { border-color: var(--accent); }

.tag-list { display: contents; }

/* Override base .tag styles inside tag-input */
.tag-input .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent-light);
  color: var(--accent-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem 0.2rem 0.6rem;
  border-radius: 2px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.tag-remove {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  transition: color 0.12s;
}

.tag-remove:hover { color: var(--negative); }

.tag-text-input {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0;
}

.tag-text-input::placeholder { color: var(--text-tertiary); }

.profile-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* =========================================================================
   FIX 6 — Jobs table horizontal overflow additions
   ========================================================================= */

/* Ensure seniority/remote columns don't wrap on small screens */
.jobs-table .col-seniority,
.jobs-table .col-remote { white-space: nowrap; font-size: 0.85rem; }

/* =========================================================================
   Match Feedback Buttons
   ========================================================================= */

.match-feedback {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.feedback-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  line-height: 1;
}

.feedback-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.feedback-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-dark);
}

.feedback-btn.active[title="Bad match"],
.feedback-btn.active.feedback-dismiss {
  border-color: var(--negative);
  background: rgba(192, 57, 43, 0.08);
  color: var(--negative);
}

.feedback-btn.feedback-dismiss:hover {
  border-color: var(--negative);
  color: var(--negative);
}

/* Fade out on HTMX swap */
.match-card.htmx-swapping {
  opacity: 0;
  transition: opacity 0.3s;
}

/* ---------------------------------------------------------------------------
   Chart modal — full-size chart overlay (shared by salary and overview pages)
   --------------------------------------------------------------------------- */

.chart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.chart-modal-content {
  background: var(--bg-primary, #fff);
  border-radius: 2px;
  padding: 1.5rem;
  width: 90vw;
  max-width: 1000px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.chart-modal-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-right: 2rem;
}

.chart-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0;
}

.chart-modal-close:hover {
  color: var(--text-primary);
}

.chart-view-full {
  display: block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: none;
}

.chart-view-full:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* 6-card stats grid (3x2 layout for Market Overview) */
.stats-grid--6 {
  grid-template-columns: repeat(3, 1fr);
}

/* =========================================================================
   Roles tables (Highest / Lowest Paying — salary page)
   ========================================================================= */

.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}

.roles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.roles-table th,
.roles-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.roles-table th {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  white-space: nowrap;
}

.role-rank {
  width: 2rem;
  color: var(--text-tertiary);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.role-title {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-title-link {
  color: var(--text-primary);
  text-decoration: none;
}

.role-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.role-salary {
  white-space: nowrap;
  text-align: right;
  font-family: var(--font-mono);
}

.role-count {
  white-space: nowrap;
  text-align: right;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

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

@media (max-width: 768px) {
  .stats-grid--6 { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   Mobile Responsive Additions
   ========================================================================= */

/* Nav toggle — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem 0.5rem;
  color: var(--text-primary);
  font-size: 1.375rem;
  line-height: 1;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  /* ---- Navigation ---- */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }

  .nav-container {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    align-items: center;
  }

  .site-logo { order: 1; flex: 1; }
  .nav-auth   { order: 3; flex-shrink: 0; }

  /* Overrides the display:none in the earlier 768px block — shows when toggled */
  .nav-links.nav-open {
    display: flex;
    order: 10;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border-light);
    padding: 0.5rem 0;
    margin-top: 0.25rem;
  }

  .nav-links.nav-open li {
    width: 100%;
  }

  .nav-links.nav-open .nav-link {
    line-height: 1.5;
    padding: 0.6rem 0.5rem;
    border-bottom: none;
    border-left: 2px solid transparent;
  }

  .nav-links.nav-open .nav-link.active,
  .nav-links.nav-open .nav-link--active {
    border-left-color: var(--accent);
    border-bottom: none;
  }

  .nav-links.nav-open .nav-admin {
    margin-left: 0;
    padding-left: 0.5rem;
    border-left: none;
  }

  /* ---- Typography ---- */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .page-header h1,
  .page-header .page-title { font-size: 1.5rem; }
  .company-header-name { font-size: 1.375rem; }

  /* ---- Filter selects — prevent overflow ---- */
  .filter-select,
  .filter-select--sm { min-width: 0; }

  /* ---- Salary filter bar — stack on mobile ---- */
  .filter-bar-controls { flex-direction: column; align-items: stretch; }
  .filter-bar-controls .filter-group { width: 100%; }
  .filter-bar-controls .filter-select { width: 100%; }
  .compare-btn { align-self: auto; }

  /* ---- Jobs filter — 2-column grid ---- */
  .jobs-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .jobs-filters .filter-select { min-width: 0; width: 100%; }
  .jobs-filters .filter-group--inline { grid-column: span 2; }

  /* ---- Jobs search ---- */
  .jobs-search-row { flex-wrap: wrap; }
  .jobs-search-btn { width: 100%; }

  /* ---- Jobs table — hide less-critical columns to reduce horizontal scroll ---- */
  .jobs-table th.col-seniority,
  .jobs-table td.col-seniority,
  .jobs-table th.col-type,
  .jobs-table td.col-type,
  .jobs-table th.col-posted,
  .jobs-table td.col-posted { display: none; }

  /* ---- Jobs results meta row ---- */
  .jobs-results-meta {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  /* ---- Matches filter row ---- */
  .matches-filter-row {
    flex-direction: column;
    gap: 0.625rem;
  }
  .matches-filter-row .filter-group { width: 100%; }
  .matches-filter-row .filter-select,
  .matches-filter-row .filter-input { min-width: 0; width: 100%; }

  /* ---- Match card footer ---- */
  .match-card-footer { flex-wrap: wrap; gap: 0.625rem; }
  .match-card-sources { flex-wrap: wrap; }

  /* ---- Company back link ---- */
  .company-back-link { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* ---- Profile / form sections — tighter padding ---- */
  .profile-section { padding: 1.25rem; }
  .form-card { padding: 1.25rem; }

  /* ---- Auth form ---- */
  .form-auth { padding-top: 2rem; }

  /* ---- Chart modal ---- */
  .chart-modal { padding: 0.75rem; }
  .chart-modal-content { width: 100%; padding: 1rem; }

  /* ---- Pagination ---- */
  .page-btn, .page-link {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
    padding: 0 0.375rem;
  }

  /* ---- Register layout — stack on mobile ---- */
  .register-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .register-benefits { order: -1; padding: 1.5rem; }

  /* ---- Auth page padding — reduce on mobile ---- */
  .auth-page--register,
  .auth-page--login { padding: 2rem var(--content-padding); }

  /* ---- Match cards — word wrap on mobile ---- */
  .match-card { width: 100%; box-sizing: border-box; }
  .match-card-title,
  .match-card-title a,
  .match-explanation {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* ---- Match page header actions — stack on mobile ---- */
  .page-header-actions {
    flex-wrap: wrap;
    width: 100%;
    gap: 0.5rem;
  }
  .page-header-actions .btn-outline-accent,
  .page-header-actions form,
  .page-header-actions form button { width: 100%; box-sizing: border-box; }

  /* ---- Salary tables — hide listings count on mobile ---- */
  .salary-table .count-val,
  .salary-table .col-count { display: none; }
  .salary-table td:first-child,
  .salary-table th:first-child { white-space: normal; word-break: break-word; }
  .salary-table .sample-listings td:first-child { min-width: 0; }

  /* ---- Chart modal canvas — prevent overflow ---- */
  .chart-modal { padding: 0.5rem; }
  .chart-modal-content {
    width: 100%;
    max-width: calc(100vw - 1rem);
    box-sizing: border-box;
    padding: 0.75rem;
  }
  .chart-modal-content canvas,
  #ba-fullview-canvas { max-width: 100% !important; }

  /* ---- Delete/danger button — full width on mobile ---- */
  .btn--danger { display: block; width: 100%; box-sizing: border-box; }
}

/* =========================================================================
   Engagement — Batch 1
   ========================================================================= */

/* Nav register ghost button */
.nav-register-btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.nav-register-btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* Landing social proof strip */
.social-proof-strip {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 1rem var(--content-padding);
  font-family: var(--font-heading);
  text-transform: uppercase;
}

/* Standalone chart section (below CTA on landing) */
.landing-chart-section {
  padding: var(--space-xl) var(--content-padding);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
}
.landing-chart-section .hero-chart-section { margin-top: 0; }

/* Register page 2-column layout */
.auth-page--register {
  display: block;
  padding: 4rem var(--content-padding);
}

/* Login page — centered single-column form */
.auth-page--login {
  display: flex;
  justify-content: center;
  padding: 4rem var(--content-padding);
}

.register-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
  align-items: start;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.register-benefits {
  padding: 2rem 1.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
}

.register-benefits__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.register-benefits__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.register-benefits__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
}

.register-benefits__check {
  color: var(--positive);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 0.1em;
}

.register-benefits__free {
  font-weight: 600;
  margin-top: 1.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-heading);
}

.register-social-proof {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Batch 2 Engagement — Match Screenshot, Teaser Banner, Scroll Banner,
   Job Alert CTA
   ------------------------------------------------------------------------- */

/* Feature card screenshot (benefit card 1 on landing page) */
.feature-card-screenshot-link {
  display: block;
  margin: var(--space-md) 0;
  text-decoration: none;
}

.feature-card-screenshot {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  display: block;
}

/* Match teaser banner on jobs page (anonymous users) */
.match-teaser-banner {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
}

.match-teaser-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.match-teaser-text {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.match-teaser-cta {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.match-teaser-cta:hover {
  text-decoration: underline;
}

/* Landing page decorative chart */
.landing-chart-preview {
  flex: 1;
  display: flex;
  align-items: center;
}

.landing-chart-area {
  position: relative;
  width: 100%;
  padding: 12px 0 8px 0;
  border-left: 2px solid #999;
  border-bottom: 2px solid #999;
}

.landing-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 6px;
  padding-right: 60px;
}

.landing-chart-bar {
  height: 10px;
  border-radius: 1px;
  opacity: 0.85;
}

/* Legend box — top-right corner of chart area */
.landing-chart-legend {
  position: absolute;
  top: 4px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-light, #E5E3DE);
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 0.5625rem;
  color: var(--text-secondary, #6B6D73);
}

.landing-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.landing-chart-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  flex-shrink: 0;
}

/* Job alert CTA on jobs page (after 5 page views, anonymous only) */
.job-alert-cta {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.job-alert-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.job-alert-link {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.job-alert-link:hover {
  text-decoration: underline;
}

/* =========================================================================
   Board Analytics Dashboard
   ========================================================================= */

/* Filter bar — sticky top below nav */
.ba-filter-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
  padding: 0.625rem var(--content-padding);
}

.ba-filter-bar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.ba-filter-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.ba-filter-group--pills {
  flex-wrap: wrap;
}

.ba-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Board pills */
.ba-board-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--pill-color, var(--border-medium));
  border-radius: 2px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, opacity 0.15s;
  white-space: nowrap;
}

.ba-board-pill:hover {
  background: color-mix(in srgb, var(--pill-color) 12%, transparent);
  color: var(--text-primary);
}

.ba-board-pill--active {
  background: var(--pill-color);
  color: white;
  border-color: var(--pill-color);
}

/* Seniority pills */
.ba-seniority-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, opacity 0.15s;
}

.ba-seniority-pill:hover {
  background: var(--accent-glow);
  color: var(--text-primary);
}

.ba-seniority-pill--active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Filter select */
.ba-filter-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  min-width: 110px;
  max-width: 160px;
}

.ba-filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Reset button */
.ba-reset-btn {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: auto;
}

.ba-reset-btn:hover {
  border-color: var(--negative);
  color: var(--negative);
}

/* Multi-select dropdown component (Board Analytics filter bar) */
.multi-dropdown {
  position: relative;
}
.multi-dropdown__trigger {
  min-width: 150px;
  height: 34px;
  padding: 0 0.625rem;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  white-space: nowrap;
}
.multi-dropdown__trigger:hover {
  border-color: var(--border-medium);
}
.multi-dropdown__trigger--active {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.multi-dropdown__panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 300;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.multi-dropdown__actions {
  display: flex;
  gap: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
}
.multi-dropdown__select-all,
.multi-dropdown__select-none {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.multi-dropdown__select-all:hover,
.multi-dropdown__select-none:hover {
  text-decoration: underline;
}
.multi-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  white-space: nowrap;
}
.multi-dropdown__item:hover {
  background: var(--accent-glow);
}
.multi-dropdown__item input[type=checkbox] {
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* Analytics sections */
.analytics-section {
  margin-bottom: var(--space-2xl);
}
.analytics-section .section-heading { margin-top: 0; }
.analytics-section + .analytics-section .section-heading { margin-top: 3rem; }

/* 5-column stats grid */
.stats-grid--5 {
  grid-template-columns: repeat(5, 1fr);
}
.stats-grid--5 .stat-card { padding: var(--space-md); }

@media (max-width: 900px) {
  .stats-grid--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .stats-grid--5 { grid-template-columns: repeat(2, 1fr); }
}

/* Download button — compact accent style matching Upload CV */
.ba-download-btn {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

.ba-download-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

/* Full-view chart modal — canvas container */
#ba-fullview-canvas-wrap {
  position: relative;
  height: 75vh;
  min-height: 400px;
}

/* Count/% toggle */
.ba-toggle {
  display: inline-flex;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.ba-toggle-btn {
  padding: 0.2rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-body);
  cursor: pointer;
  border-right: 1px solid var(--border-medium);
}

.ba-toggle-btn:last-child { border-right: none; }

.ba-toggle-btn--active {
  background: var(--accent);
  color: white;
}

.ba-toggle-btn:hover:not(.ba-toggle-btn--active) {
  background: var(--accent-glow);
}

/* Heatmap table */
.ba-heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.ba-heatmap-table th {
  padding: 0.4rem 0.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.ba-heatmap-table th:first-child { text-align: left; }

.ba-heatmap-cell {
  padding: 0.4rem 0.5rem;
  text-align: center;
  border: 1px solid var(--border-light);
  cursor: default;
  transition: background 0.15s;
}

.ba-heatmap-cell--diag {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-tertiary);
}

/* Heatmap color legend */
.ba-heatmap-legend {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.ba-heatmap-legend::before {
  content: 'Overlap scale:';
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.ba-heatmap-legend-cell {
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Data tables */
.ba-table-wrap {
  overflow-x: auto;
  max-height: 480px;
  overflow-y: auto;
}

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

.ba-data-table th {
  padding: 0.5rem 0.625rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-medium);
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.ba-data-table td {
  padding: 0.4rem 0.625rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.ba-data-table tr:hover td {
  background: var(--accent-glow);
}

.ba-rank {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  width: 2rem;
}

.ba-num {
  font-family: var(--font-mono);
  text-align: right;
}

/* Scale badges */
.ba-scale-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.9;
}

.ba-scale-badge--unknown {
  color: var(--text-tertiary);
  border-color: var(--border-light);
  background: var(--bg-secondary);
}

/* Board badges (in tables) */
.ba-board-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  margin-right: 0.2rem;
}

/* Data quality table color cells */
.ba-quality-table td.ba-quality-cell {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.quality-good    { color: var(--positive); background: rgba(58,125,106,0.08); }
.quality-warning { color: #A67C20;         background: rgba(200,150,46,0.10); }
.quality-bad     { color: var(--negative); background: rgba(192,57,43,0.08); }

/* Freshness stat cards */
.ba-freshness-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.ba-freshness-card {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
}

.ba-freshness-card__name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.ba-freshness-card__val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ba-freshness-card__sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
}

/* Empty / error states */
.ba-empty {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  padding: var(--space-md) 0;
}

.ba-empty--error {
  color: var(--negative);
}

.ba-quality-table { width: 100%; }
.ba-quality-table td, .ba-quality-table th { padding: 0.625rem 0.75rem; font-size: 0.875rem; }

.ba-chart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.chart-view-full {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: none;
}
.chart-view-full:hover {
  color: var(--accent);
}


/* ── Email confirmation nudge banner ── */
.email-confirm-banner {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.email-confirm-resend {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.email-confirm-resend:hover {
  background: rgba(255, 255, 255, 0.15);
}

.email-confirm-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
  line-height: 1;
}

.email-confirm-dismiss:hover {
  color: #fff;
}


/* ── About page ── */
.about-sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

@media (max-width: 768px) {
  .about-sources-grid {
    grid-template-columns: 1fr;
  }
}

.about-source-card {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  padding: var(--space-lg);
  border-radius: 2px;
}

.about-source-card h3 {
  margin: 0 0 var(--space-xs) 0;
  font-size: 1rem;
}

.about-source-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.about-source-card h3 a:hover {
  text-decoration: underline;
}

.about-source-card .source-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 var(--space-sm) 0;
}

.about-source-card .source-count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* =========================================================================
   480px — Very narrow mobile (375–480px viewport)
   Supplements the 768px breakpoint for phones like iPhone SE / mini.
   All fixes here are additive and do NOT affect desktop layout.
   ========================================================================= */

@media (max-width: 480px) {

  /* ── Navigation ──────────────────────────────────────────────────────── */
  /* At 375px inner width (~327px), logo + burger + login + register + lang
     totals ≈400px — causes page overflow. Hide register; login + lang (~155px)
     fits. Users reach register via the landing CTA instead. */
  .nav-register-btn { display: none; }

  /* ── Stat grids ───────────────────────────────────────────────────────── */
  /* 3-column grid (company profile) gives 109px per card after gutters.
     Salary-range values like "€2.500 — €3.500" overflow at that width. */
  .stats-grid--3 { grid-template-columns: 1fr; }

  /* ── Jobs table ───────────────────────────────────────────────────────── */
  /* After 768px hides seniority/type/posted, visible cols are:
     title(≥220) + location(100) + salary(130) = 450px > 327px.
     Hiding location brings it to 350px — barely overflows in the
     overflow:auto wrapper but is far more usable (23px vs 123px scroll). */
  .jobs-table th.col-location,
  .jobs-table td.col-location { display: none; }

  /* Reduce salary column to leave more room for title */
  .jobs-table .col-salary { width: 100px; }

  /* ── Company profile listings table ──────────────────────────────────── */
  /* Default overflow:hidden clips content on narrow viewports — switch to
     auto so users can scroll rather than losing information. Also hide the
     seniority column (80px) to keep the table close to viewport width. */
  .listings-table-wrapper { overflow-x: auto; }
  .listings-table th.col-seniority,
  .listings-table td.col-seniority { display: none; }

  /* ── Salary / SEO tables ─────────────────────────────────────────────── */
  /* sample-listings has 6 cols with white-space:nowrap cells; by_city has 5.
     Both can exceed 327px. Making the section a scroll container localises
     the overflow inside the table rather than spilling to the page edge. */
  .seo-section { overflow-x: auto; }

  /* Tighten sample-listings title cell so remaining cols have more room */
  .sample-listings td:first-child { max-width: 110px; }

  /* ── Role directory callout ──────────────────────────────────────────── */
  /* Flex row with space-between looks cramped at 375px; stack vertically. */
  .role-directory-callout {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }
  .role-directory-callout-link { padding-left: 0; }

  /* ── Company salary list (role pages) ────────────────────────────────── */
  /* company-list-meta has white-space:nowrap. On narrow screens a long
     company name + nowrap meta overflows the flex row. Allow wrapping. */
  .company-list-item { flex-wrap: wrap; }
  .company-list-meta { white-space: normal; }

  /* ── Reduce horizontal padding on very narrow screens ───────────────── */
  /* Gains 16px (0.5rem × 2) of usable width without hurting readability. */
  .main-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .seo-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Landing page uses its own container — reduce hero padding too */
  .hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
