/* ============================================================
   GradFind — Design System v2
   Mobile-first. White base. Brand blue #2D6BE4.
   Inspired by Notion / Linear — clean, minimal, trustworthy.
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --blue:         #2D6BE4;
  --blue-dark:    #1E54C8;
  --blue-light:   #EEF3FD;
  --blue-mid:     #BFCFEF;
  --text:         #0F1117;
  --text-2:       #4B5563;
  --text-3:       #9CA3AF;
  --bg:           #F7F8FC;
  --white:        #FFFFFF;
  --border:       #E8EAF0;
  --border-2:     #D1D5DB;
  --green:        #22C55E;
  --green-bg:     #F0FDF4;
  --green-text:   #15803D;
  --red:          #EF4444;
  --red-bg:       #FEF2F2;
  --red-text:     #DC2626;
  --amber-bg:     #FFFBEB;
  --amber-text:   #92400E;
  --purple-bg:    #F5F3FF;
  --purple-text:  #6D28D9;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;
  --radius-pill:  100px;
  --shadow-xs:    0 1px 2px rgba(15,17,23,.04);
  --shadow-sm:    0 1px 3px rgba(15,17,23,.08), 0 1px 2px rgba(15,17,23,.04);
  --shadow:       0 4px 8px rgba(15,17,23,.06), 0 1px 3px rgba(15,17,23,.04);
  --shadow-md:    0 8px 20px rgba(15,17,23,.08), 0 3px 6px rgba(15,17,23,.04);
  --shadow-lg:    0 20px 40px rgba(15,17,23,.1), 0 6px 12px rgba(15,17,23,.05);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
}

/* ── Reset / base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Typography: display font (Space Grotesk) ──────────────────────────────── */
/* Applied to all headings, the logo, job titles, and large display text.       */
h1, h2, h3, h4,
.nav-logo,
.auth-logo,
.job-title,
.detail-title,
.auth-title,
.tracker-title,
.account-title,
.privacy-title,
.faq-title,
.error-code,
.error-title,
.signup-wall h2,
.bottom-sheet h3,
.empty-state h3,
.tracker-zero-state h3 {
  font-family: var(--font-display);
}

/* ── Typography: body font (Inter) ────────────────────────────────────────── */
/* Explicit declarations for key body/UI elements — the rest inherit via body. */
body,
p,
input,
select,
textarea,
button,
.company-name,
.tag,
.filter-pill,
.footer,
.form-group label,
.nav-link,
.btn-nav-signup,
.hero-sub,
.trust-item,
.flash,
.cookie-text,
.detail-description,
.auth-sub,
.toggle-text {
  font-family: var(--font-body);
}

/* ── Company avatar colour variants ─────────────────────────────────────── */
/* Generated deterministically from company name via the company_color filter */
.avatar-blue   { background: #2D6BE4; }
.avatar-purple { background: #7C3AED; }
.avatar-green  { background: #059669; }
.avatar-orange { background: #D97706; }
.avatar-teal   { background: #0891B2; }
.avatar-red    { background: #DC2626; }
.avatar-indigo { background: #4F46E5; }
.avatar-pink   { background: #DB2777; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
/* Elevated on scroll — class toggled by initNavbarScroll() */
.navbar.is-scrolled {
  box-shadow: 0 2px 20px rgba(15,17,23,.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,.96);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-logo {
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}
.logo-grad { color: var(--text); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }
.logo-find { color: var(--blue); font-size: 20px; font-weight: 500; letter-spacing: 0; }

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

.nav-link {
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background .15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover { background: var(--blue-light); }

/* Logout uses a <button> instead of <a> so CSRF token can be POSTed */
.nav-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.nav-email {
  font-size: 0.8rem;
  color: var(--text-2);
  padding: 8px 10px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-nav-signup {
  background: var(--blue);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background .15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.btn-nav-signup:hover { background: var(--blue-dark); }

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: var(--text);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.nav-hamburger:hover { background: var(--bg); }

/* Mobile drawer — shown below navbar when open */
.nav-drawer {
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
  flex-direction: column;
  gap: 4px;
}
.nav-drawer.open { display: flex; }
.nav-drawer .nav-link,
.nav-drawer .btn-nav-signup {
  width: 100%;
  justify-content: center;
  text-align: center;
  border-radius: var(--radius-sm);
}
.nav-drawer .nav-email { max-width: 100%; }

/* ── Main content ───────────────────────────────────────────────────────── */
.main-content { flex: 1; }

/* ── Flash messages ─────────────────────────────────────────────────────── */
.flash-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px 0;
}
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  cursor: pointer;
}
.flash-success { background: var(--green-bg);  color: var(--green-text); border: 1px solid #BBF7D0; }
.flash-error   { background: var(--red-bg);    color: var(--red-text);   border: 1px solid #FECACA; }
.flash-info    { background: var(--blue-light); color: var(--blue);      border: 1px solid var(--blue-mid); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(45,107,228,.06) 0%, transparent 55%),
    var(--white);
  padding: 40px 16px 36px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .1px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  animation: heroFadeUp 0.55s ease both;
  animation-delay: 200ms;
}
.hero-badge-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem); /* 36px mobile → 56px desktop */
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
  animation: heroFadeUp 0.55s ease both;
  animation-delay: 0ms;
}
.hero-accent {
  color: var(--blue);
  font-style: italic;
  font-size: 1.07em; /* fractionally larger than surrounding text */
}

.hero-sub {
  font-size: 1.125rem; /* 18px */
  font-weight: 400;
  color: #6B7280;
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.65;
  animation: heroFadeUp 0.55s ease both;
  animation-delay: 100ms;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
  animation: heroFadeUp 0.55s ease both;
  animation-delay: 300ms;
}
.hero-search-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-height: 48px;
}
.hero-search-input::placeholder { color: var(--text-3); }
.hero-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,107,228,.12);
}
.hero-search-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  min-height: 48px;
}
.hero-search-btn:hover { background: var(--blue-dark); }

/* ── Trust strip ─────────────────────────────────────────────────────────── */
.trust-strip {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
}
.trust-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem; /* 13px */
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.trust-item svg { color: var(--blue); flex-shrink: 0; }
/* Animation — initial state applied once JS adds .js-animations to body */
.js-animations .trust-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.js-animations .trust-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sector filter pills ────────────────────────────────────────────────── */
.filter-pills-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px;
  z-index: 100;
  /* Desktop: pills + secondary filters on one row */
  display: flex;
  align-items: center;
}

.filter-pills-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-pills-scroll::-webkit-scrollbar { display: none; }

.filter-pills {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: max-content;
  min-width: 100%;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--white);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
  min-height: 36px;
  cursor: pointer;
}
.filter-pill:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}
.filter-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* Secondary filters row — stacks on mobile, inline on desktop */
.secondary-filters-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.secondary-filters {
  /* Mobile default: stacked below pills */
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 16px 10px;
  max-width: none;
  margin: 0;
}

.filter-input-sm {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
  min-height: 36px;
  min-width: 150px;
}
.filter-input-sm:focus { border-color: var(--blue); }
.filter-input-sm::placeholder { color: var(--text-3); }

.filter-select-sm {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  cursor: pointer;
  min-height: 36px;
  transition: border-color .15s;
}
.filter-select-sm:focus { border-color: var(--blue); }

.filter-apply-btn {
  padding: 8px 16px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: background .15s;
  white-space: nowrap;
}
.filter-apply-btn:hover { background: var(--blue-dark); }

.filter-clear-btn {
  font-size: 0.8125rem;
  color: var(--text-3);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: color .15s;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.filter-clear-btn:hover { color: var(--text); }

/* ── Jobs section ───────────────────────────────────────────────────────── */
.jobs-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.jobs-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.jobs-count       { font-size: 0.875rem; font-weight: 700; color: var(--text); }
.jobs-filter-note { font-size: 0.875rem; color: var(--text-3); }

/* ── New jobs banner ────────────────────────────────────────────────────── */
.new-jobs-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--blue);
  font-weight: 500;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Job grid ───────────────────────────────────────────────────────────── */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ── Job card ───────────────────────────────────────────────────────────── */
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  /* Entry animation state — hidden until .js-animations body class is set */
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* JS-enhanced: start hidden, transition in via IO */
.js-animations .job-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease,
              border-color .2s ease, box-shadow .2s ease;
}
.js-animations .job-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  /* Switch to snappy hover transitions once visible */
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.job-card:hover,
.js-animations .job-card.is-visible:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 32px rgba(45,107,228,.13);
  transform: translateY(-3px);
}
.job-card:active,
.js-animations .job-card.is-visible:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.job-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-info { min-width: 0; }

.company-name {
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}
.source-greenhouse { background: var(--green-bg);   color: var(--green-text); }
.source-lever      { background: var(--purple-bg);  color: var(--purple-text); }

.job-title {
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-top: 2px; /* extra breathing room below company row */
}

/* ── Tags ───────────────────────────────────────────────────────────────── */
.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
}
.tag-sector   { background: var(--blue-light); color: var(--blue); }
.tag-type     { background: var(--amber-bg);   color: var(--amber-text); }
.tag-location { background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  gap: 8px;
}
.job-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.job-date { font-size: 0.77rem; color: var(--text-3); white-space: nowrap; }

/* "View role →" outlined button on card footer */
.job-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  border: 1.5px solid var(--blue-mid);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.job-card:hover .job-cta-btn {
  background: var(--blue-light);
  border-color: var(--blue);
}

/* ── Freshness badges on job cards ──────────────────────────────────────── */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.5;
  flex-shrink: 0;
}
/* "New" stays bold/green; "Just in" is subtle/muted */
.freshness-new     { background: var(--green-bg);  color: var(--green-text); text-transform: uppercase; font-weight: 700; letter-spacing: .4px; }
.freshness-just-in { background: var(--bg);        color: var(--text-3);     border: 1px solid var(--border); }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-2);
}
.empty-state svg   { opacity: .25; margin-bottom: 18px; color: var(--text-3); }
.empty-state h3    { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p     { font-size: 0.9rem; color: var(--text-2); margin-bottom: 20px; }

/* ── Back link ──────────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color .15s;
  min-height: 44px;
}
.back-link:hover { color: var(--text); }

/* ── Job detail ─────────────────────────────────────────────────────────── */
.detail-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.detail-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.detail-header-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.company-avatar-lg {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 14px;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-meta { flex: 1; min-width: 0; }

.detail-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.detail-title {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.detail-date { font-size: 0.875rem; color: var(--text-3); }

.btn-apply {
  font-size: 0.9375rem;
  padding: 12px 24px;
  min-height: 48px;
}

.detail-description {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.detail-description h1,
.detail-description h2,
.detail-description h3,
.detail-description h4 { font-weight: 700; color: var(--text); margin: 1.4em 0 .5em; line-height: 1.3; }
.detail-description h2 { font-size: 1.1rem; }
.detail-description h3 { font-size: 1rem; }
.detail-description p  { margin-bottom: .9em; }
.detail-description ul,
.detail-description ol { padding-left: 1.4em; margin-bottom: .9em; }
.detail-description li { margin-bottom: .3em; }
.detail-description strong { color: var(--text); }
.no-description { font-size: 0.9rem; color: var(--text-3); font-style: italic; }

/* ── Sign-up wall (desktop job detail page) ─────────────────────────────── */
.signup-wall {
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: 0 0 0 4px rgba(45,107,228,.07);
  overflow: hidden;
}
.signup-wall-inner {
  padding: 44px 28px;
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
}
.lock-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--blue);
}
.signup-wall h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
  margin-bottom: 10px;
}
.signup-wall p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 24px;
}
.wall-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.wall-benefits { list-style: none; text-align: left; display: inline-block; font-size: 0.875rem; color: var(--text-2); }
.wall-benefits li { padding: 3px 0 3px 22px; position: relative; }
.wall-benefits li::before { content: '✓'; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

/* ── Bottom sheet modal ─────────────────────────────────────────────────── */
.bs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,17,23,.5);
  z-index: 400;
  display: flex;
  align-items: flex-end;
}
.bs-overlay[hidden] { display: none; }

.bottom-sheet {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 12px 24px 40px;
  width: 100%;
  text-align: center;
  animation: bsSlideUp .28s cubic-bezier(.32,.72,0,1);
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes bsSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.bs-handle {
  width: 36px;
  height: 4px;
  background: var(--border-2);
  border-radius: 2px;
  margin: 0 auto 22px;
}
.bottom-sheet h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
  margin-bottom: 8px;
}
.bottom-sheet p {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-bottom: 22px;
  line-height: 1.6;
}
.bs-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-page,
.auth-container {
  background: var(--bg);
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 64px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}
.auth-card-wide { max-width: 560px; }

.auth-logo {
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  display: block;
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  margin-bottom: 6px;
  text-align: center;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-bottom: 28px;
  text-align: center;
  line-height: 1.55;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.label-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-3);
  margin-left: 6px;
  font-size: 0.75rem;
}

.form-input {
  padding: 11px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-height: 44px;
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,107,228,.1);
}

/* Sector checkboxes */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--white);
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
  min-height: 44px;
}
.checkbox-label:hover,
.checkbox-label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle-row input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.toggle-text { font-size: 0.875rem; color: var(--text-2); font-weight: 500; }

/* Privacy checkbox */
.privacy-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color .15s, background .15s;
  min-height: 44px;
}
.privacy-checkbox-label:hover,
.privacy-checkbox-label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-light);
}
.privacy-checkbox-label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.privacy-link { color: var(--blue); font-weight: 600; }
.privacy-link:hover { text-decoration: underline; }

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--text-2);
}
.auth-switch a { color: var(--blue); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
  font-family: inherit;
  white-space: nowrap;
  min-height: 48px;
}
.btn-primary:hover  { background: var(--blue-dark); }
.btn-primary:active { transform: scale(.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
  min-height: 48px;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
  font-family: inherit;
  min-height: 48px;
}
.btn-danger:hover  { background: #DC2626; }
.btn-danger:active { transform: scale(.98); }

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, transform .1s;
  font-family: inherit;
  min-height: 48px;
}
.btn-danger-outline:hover  { background: var(--red); color: var(--white); }
.btn-danger-outline:active { transform: scale(.98); }

.btn-full { width: 100%; }

/* ── Cookie banner ──────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  z-index: 500;
  box-shadow: 0 -4px 24px rgba(15,17,23,.1);
  animation: bsSlideUp .3s ease;
}
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cookie-text {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.5;
}
.cookie-text a { color: var(--blue); }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-cookie-reject,
.btn-cookie-accept {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
  min-height: 44px;
}
.btn-cookie-reject {
  background: var(--bg);
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
}
.btn-cookie-reject:hover { border-color: var(--border-2); color: var(--text); }
.btn-cookie-accept {
  background: var(--blue);
  color: var(--white);
  border: none;
}
.btn-cookie-accept:hover { background: var(--blue-dark); }

/* ── Privacy / Terms / Delete pages ────────────────────────────────────── */
.privacy-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

.privacy-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
}

.privacy-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.privacy-meta {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 28px;
}
.privacy-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 2em 0 .6em;
  padding-top: .5em;
  border-top: 1px solid var(--border);
}
.privacy-card h2:first-of-type { border-top: none; }
.privacy-card p  { color: var(--text-2); margin-bottom: .9em; font-size: 0.9375rem; }
.privacy-card ul { padding-left: 1.4em; margin-bottom: .9em; color: var(--text-2); font-size: 0.9375rem; }
.privacy-card li { margin-bottom: .4em; }
.privacy-card a  { color: var(--blue); }
.privacy-card a:hover { text-decoration: underline; }

.privacy-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.privacy-actions-label { font-size: 0.875rem; color: var(--text-2); margin-bottom: 14px; }

/* Delete account page */
.delete-icon {
  width: 56px;
  height: 56px;
  background: var(--red-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
  color: var(--red);
}
.delete-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0 22px;
}
.delete-summary-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.delete-summary ul  { padding-left: 1.2em; color: var(--text-2); font-size: 0.875rem; }
.delete-summary li  { margin-bottom: 4px; }
.delete-actions { display: flex; flex-direction: column; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-links { margin-top: 6px; }
.footer-links a { color: var(--text-3); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--text-2); text-decoration: none; }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .55; transform: scale(1.35); }
}

/* Hero elements fade-slide up on page load */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Generic scroll-triggered fade-up — class toggled by initScrollAnimations() */
.js-animations .anim-fade-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.js-animations .anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Bookmark button (job cards) ────────────────────────────────────────── */
.bookmark-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 4px 5px;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: color .15s, background .15s;
  min-width: 30px;
  min-height: 30px;
}
.bookmark-btn:hover  { color: var(--blue); background: var(--blue-light); }
.bookmark-btn.saved  { color: var(--blue); }
.bookmark-btn.saving { opacity: .45; pointer-events: none; }

/* ── Status pill on job cards ────────────────────────────────────────────── */
.card-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.5;
  flex-shrink: 0;
}
.card-status-saved   { background: var(--blue-light); color: var(--blue); }
.card-status-applied { background: var(--amber-bg);   color: var(--amber-text); }
.card-status-done    { background: var(--green-bg);   color: var(--green-text); }

/* ── Detail page save section ────────────────────────────────────────────── */
.detail-save-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-save-job {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--white);
  color: var(--text-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  font-family: inherit;
  min-height: 40px;
  width: fit-content;
}
.btn-save-job:hover    { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.btn-save-job:disabled { opacity: .5; pointer-events: none; }

.detail-saved-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
}
.detail-tracker-link {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.detail-tracker-link:hover { text-decoration: underline; }

.detail-status-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-status-pill {
  padding: 5px 16px;
  background: var(--white);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  min-height: 34px;
}
.detail-status-pill:hover { border-color: var(--blue); color: var(--blue); }
.detail-status-pill[data-status="saved"].active   { background: var(--blue-light); border-color: var(--blue);       color: var(--blue); }
.detail-status-pill[data-status="applied"].active { background: var(--amber-bg);   border-color: var(--amber-text); color: var(--amber-text); }
.detail-status-pill[data-status="done"].active    { background: var(--green-bg);   border-color: var(--green-text); color: var(--green-text); }

.detail-save-notes {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--white);
  resize: vertical;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  line-height: 1.5;
}
.detail-save-notes:focus { border-color: var(--blue); }
.detail-save-notes::placeholder { color: var(--text-3); }

/* ── Tracker page ────────────────────────────────────────────────────────── */
.tracker-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
.tracker-page-header { margin-bottom: 20px; }
.tracker-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  margin-bottom: 4px;
}
.tracker-subtitle { font-size: 0.875rem; color: var(--text-3); }

/* Tab bar */
.tracker-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}
.tracker-tab {
  flex: 1;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
}
.tracker-tab:hover     { color: var(--text); background: var(--bg); }
.tracker-tab.active    { background: var(--blue); color: var(--white); }
.tab-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-3);
  min-width: 18px;
  text-align: center;
}
.tracker-tab.active .tab-badge { background: rgba(255,255,255,.25); color: var(--white); }

/* Board */
.tracker-board { display: flex; gap: 16px; align-items: flex-start; }
.tracker-col   { flex: 1; min-width: 0; }

.tracker-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}
.col-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-2);
}
.col-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.col-badge-saved   { background: var(--blue-light); color: var(--blue); }
.col-badge-applied { background: var(--amber-bg);   color: var(--amber-text); }
.col-badge-done    { background: var(--green-bg);   color: var(--green-text); }

.tracker-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tracker-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
.tracker-card:hover { border-color: var(--blue-mid); box-shadow: var(--shadow-sm); }

.tracker-card-header { display: flex; align-items: flex-start; gap: 8px; }
.tracker-card-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
}
.tracker-card-title:hover { color: var(--blue); text-decoration: underline; }

.tc-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
  transition: color .15s;
}
.tc-remove-btn:hover { color: var(--red); }

.tracker-card-company { font-size: 0.78rem; color: var(--text-3); line-height: 1.4; }

.tc-notes {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg);
  resize: none;
  outline: none;
  transition: border-color .15s, background .15s;
  font-family: inherit;
  line-height: 1.5;
}
.tc-notes:focus         { border-color: var(--blue); background: var(--white); }
.tc-notes::placeholder  { color: var(--text-3); }

.tc-status-pills { display: flex; gap: 4px; }
.tc-pill {
  flex: 1;
  padding: 4px 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  text-align: center;
  min-height: 28px;
}
.tc-pill:hover { border-color: var(--border-2); color: var(--text-2); }
.tc-pill[data-status="saved"].active   { background: var(--blue-light); border-color: var(--blue);       color: var(--blue); }
.tc-pill[data-status="applied"].active { background: var(--amber-bg);   border-color: var(--amber-text); color: var(--amber-text); }
.tc-pill[data-status="done"].active    { background: var(--green-bg);   border-color: var(--green-text); color: var(--green-text); }

.tracker-empty-col {
  padding: 20px 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
  background: var(--white);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-sm);
}

/* Zero-state */
.tracker-zero-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  color: var(--text-2);
}
.tracker-zero-state svg { opacity: .2; margin-bottom: 18px; color: var(--text-3); }
.tracker-zero-state h3  { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.tracker-zero-state p   { font-size: 0.9rem; color: var(--text-2); margin-bottom: 4px; max-width: 300px; }

/* Nav tracker badge */
.nav-tracker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}
/* In the nav (blue link on white bg) the badge needs a slight border to stand out */
.nav-link .nav-tracker-badge { background: var(--blue); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Tablet: 2-col grid */
@media (min-width: 600px) {
  .nav-container     { padding: 0 24px; }
  .hero              { padding: 52px 24px 44px; }
  .filter-pills      { padding: 10px 24px; }
  .jobs-section      { padding: 24px 24px 64px; }
  .jobs-grid         { grid-template-columns: repeat(2, 1fr); }
  .privacy-container { padding: 36px 24px 64px; }
  .cookie-banner-inner { padding: 16px 24px; }
}

/* Filter bar: inline one-row layout on wider screens */
@media (min-width: 768px) {
  .secondary-filters {
    flex-wrap: nowrap;
    border-left: 1px solid var(--border);
    padding: 6px 16px;
    flex-shrink: 0;
  }
  .filter-input-sm  { min-width: 130px; }
}

/* Desktop: 3-col grid, taller nav */
@media (min-width: 1024px) {
  .nav-container         { height: 60px; }
  .filter-pills-section  { top: 60px; }
  .jobs-grid             { grid-template-columns: repeat(3, 1fr); }
}

/* Tracker responsive: tablet+ — hide tab bar, show all cols */
@media (min-width: 768px) {
  .tracker-tabs { display: none; }
  .tracker-col  { display: block !important; }
}

/* Tracker responsive: mobile — flex column, col-header still visible */
@media (max-width: 767px) {
  .tracker-board { flex-direction: column; }
  .tracker-col   { width: 100%; }
}

/* Mobile-only overrides (< 600px) */
@media (max-width: 599px) {
  /* Hamburger shows, desktop nav links hide */
  .nav-links     { display: none; }
  .nav-hamburger { display: inline-flex; }

  /* Hero subtitle 16px on mobile */
  .hero-sub { font-size: 1rem; }

  /* Auth cards go full-width */
  .auth-card, .auth-card-wide { padding: 28px 20px; max-width: 100%; }

  /* Forms go single column */
  .form-row       { grid-template-columns: 1fr; }
  .checkbox-grid  { grid-template-columns: repeat(2, 1fr); }

  /* Detail page */
  .detail-header-top  { flex-direction: column; }
  .wall-actions       { flex-direction: column; align-items: stretch; }
  .signup-wall-inner  { padding: 32px 18px; }

  /* Cookie banner stacks */
  .cookie-banner-inner   { flex-direction: column; gap: 12px; }
  .cookie-actions        { width: 100%; }
  .btn-cookie-reject,
  .btn-cookie-accept     { flex: 1; text-align: center; }

  /* Privacy page */
  .privacy-card { padding: 24px 18px; }
}

/* ── Error pages (404 / 500) ─────────────────────────────────────────────── */
.error-page {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.error-inner {
  text-align: center;
  max-width: 480px;
}
.error-code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -4px;
  line-height: 1;
  margin-bottom: 16px;
  opacity: .15;
}
.error-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
  margin-bottom: 10px;
}
.error-sub {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 28px;
}

/* ── Auth extras (forgot password link) ─────────────────────────────────── */
.auth-forgot {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-3);
}
.auth-forgot a { color: var(--text-2); }
.auth-forgot a:hover { color: var(--blue); text-decoration: underline; }

/* ── FAQ page ───────────────────────────────────────────────────────────── */
.faq-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 80px;
}
.faq-inner {}
.faq-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
  margin-bottom: 8px;
}
.faq-sub {
  font-size: 0.9375rem;
  color: var(--text-2);
  margin-bottom: 40px;
}
.faq-sub a { color: var(--blue); }
.faq-sub a:hover { text-decoration: underline; }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .15s;
}
.faq-item[open] { border-color: var(--blue-mid); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 12px;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
  color: var(--blue);
}
.faq-answer {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
}
.faq-answer a { color: var(--blue); }
.faq-answer a:hover { text-decoration: underline; }
@media (min-width: 600px) {
  .faq-page { padding-top: 64px; }
  .faq-title { font-size: 2.25rem; }
}

/* ── Account page ───────────────────────────────────────────────────────── */
.account-page {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.account-inner { display: flex; flex-direction: column; gap: 0; }
.account-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 32px;
  letter-spacing: -0.5px;
}
.account-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.account-section:first-of-type { padding-top: 0; }
.account-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin: 0 0 8px;
}
.account-value {
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0;
}
.account-empty {
  font-size: 0.9375rem;
  color: var(--text-3);
  font-style: italic;
  margin: 0;
}
.account-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.account-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 28px;
}
@media (min-width: 600px) {
  .account-page { padding-top: 64px; }
  .account-title { font-size: 2rem; }
}

/* ── Settings page (account redesign) ───────────────────────────────────── */
.settings-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

.settings-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 24px;
}

/* ── Settings card ── */
.settings-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.settings-card-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.settings-card-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 22px;
}

/* ── Detail rows (email, member since) ── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:first-of-type { padding-top: 4px; }
.settings-row-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.settings-row-value {
  font-size: 0.9375rem;
  color: var(--text);
  text-align: right;
  word-break: break-all;
  min-width: 0;
}
.settings-row-footer {
  padding-top: 18px;
}

/* ── Preferences form ── */
.settings-pref-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-pref-form .form-group { margin: 0; }

/* ── Danger zone card ── */
.settings-card--danger {
  border-color: rgba(239,68,68,.22);
}
.settings-card--danger .settings-card-heading {
  color: var(--red-text);
  border-bottom-color: rgba(239,68,68,.14);
}
.settings-danger-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Small button modifier ── */
.btn-outline.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  min-height: 36px;
}

@media (min-width: 600px) {
  .settings-page { padding-top: 48px; }
  .settings-page-title { font-size: 2rem; }
  .settings-card { padding: 28px 32px; }
}
@media (max-width: 479px) {
  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .settings-row-value { text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MICRO-INTERACTIONS & POLISH
   Pure CSS — no external libraries. All animation gated on
   prefers-reduced-motion at the bottom of this block.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page fade-in ───────────────────────────────────────────────────────── */
/* body starts invisible; JS adds .page-ready on DOMContentLoaded           */
body { transition: opacity 0.3s ease; }
body:not(.page-ready) { opacity: 0; }

/* ── Button press feedback ──────────────────────────────────────────────── */
/* Unify transition so hover+active both feel responsive                     */
.btn-primary,
.btn-outline,
.btn-danger,
.btn-danger-outline,
.hero-search-btn,
.filter-apply-btn,
.btn-nav-signup,
.btn-save-job,
.btn-cookie-accept,
.btn-cookie-reject {
  will-change: transform;
  transition: background 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.1s ease,
              box-shadow 0.2s ease;
}
.btn-primary:active,
.btn-outline:active,
.btn-danger:active,
.btn-danger-outline:active,
.hero-search-btn:active,
.filter-apply-btn:active,
.btn-nav-signup:active,
.btn-save-job:active,
.btn-cookie-accept:active,
.btn-cookie-reject:active { transform: scale(0.97); }

/* ── Job card left accent border (scaleY slide-in on hover) ─────────────── */
.job-card { position: relative; overflow: hidden; }
.job-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--blue);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  will-change: transform;
}
.job-card:hover::before,
.js-animations .job-card.is-visible:hover::before { transform: scaleY(1); }

/* ── Ripple effect (span injected by JS on click) ───────────────────────── */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(45,107,228,.14);
  transform: scale(0);
  pointer-events: none;
  animation: rippleExpand 0.4s ease-out forwards;
}
@keyframes rippleExpand {
  to { transform: scale(4); opacity: 0; }
}

/* ── Bookmark icon bounce on save ───────────────────────────────────────── */
@keyframes bookmarkBounce {
  0%   { transform: scale(1);   }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1);   }
}
.bookmark-btn.bounce svg {
  animation: bookmarkBounce 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ── Filter pill hover scale ────────────────────────────────────────────── */
.filter-pill { will-change: transform; }
.filter-pill:not(.active):hover { transform: scale(1.05); }

/* ── Input / search focus glow ──────────────────────────────────────────── */
.hero-search-input:focus          { box-shadow: 0 0 0 3px rgba(45,107,228,.15); }
.filter-input-sm:focus            { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,107,228,.15); }
.filter-select-sm:focus           { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,107,228,.15); }
.form-input:focus                 { box-shadow: 0 0 0 3px rgba(45,107,228,.15); }
.tc-notes:focus,
.detail-save-notes:focus          { box-shadow: 0 0 0 3px rgba(45,107,228,.15); }

/* ── Navbar shrink on scroll ────────────────────────────────────────────── */
.nav-container { transition: height 0.25s ease; }
.navbar.is-scrolled .nav-container { height: 48px; }
@media (min-width: 1024px) {
  .navbar.is-scrolled .nav-container { height: 52px; }
}

/* ── Flash messages slide-in from top ───────────────────────────────────── */
@keyframes flashSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0);     }
}
.flash {
  animation: flashSlideIn 0.25s ease both;
  cursor: pointer;
}
/* Smooth auto-dismiss — class added by JS */
.flash.is-dismissing {
  transition: opacity 0.3s ease, transform 0.3s ease,
              max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden;
}

/* ── Tracker card exit animation ────────────────────────────────────────── */
.tracker-card.is-exiting {
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform: translateX(60px);
  opacity: 0;
  pointer-events: none;
}

/* ── Column / tab badge pop ─────────────────────────────────────────────── */
@keyframes badgePop {
  0%   { transform: scale(1);    }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1);    }
}
.badge-pop { animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }

/* ── Skeleton shimmer cards (utility — usable for async loading states) ─── */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.skeleton-card {
  background: linear-gradient(90deg,
    var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
  min-height: 148px;
  border: 1px solid var(--border);
}

/* ── Number counter (hero badge) ────────────────────────────────────────── */
#live-roles-count { font-variant-numeric: tabular-nums; }

/* ── will-change hints ──────────────────────────────────────────────────── */
.job-card,
.tracker-card     { will-change: transform; }

/* ── cursor: pointer where still missing ───────────────────────────────── */
.flash            { cursor: pointer; }

/* ══ prefers-reduced-motion — disable ALL animation & transitions ══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:      0.01ms !important;
    scroll-behavior:          auto   !important;
  }
  /* Ensure page is visible even without the fade-in */
  body:not(.page-ready) { opacity: 1 !important; }
  /* Suppress ripple injection entirely */
  .ripple { display: none !important; }
}
