/* ═══════════════════════════════════════════════════════════
   FirstPost.io - Design System
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --c-navy:        #0C1A2E;
  --c-navy-mid:    #1E3A5F;
  --c-green:       #15803D;
  --c-green-vivid: #16A34A;
  --c-green-light: #DCFCE7;
  --c-green-mid:   #86EFAC;
  --c-amber:       #D97706;
  --c-text:        #1E293B;
  --c-muted:       #64748B;
  --c-subtle:      #94A3B8;
  --c-bg:          #FFFFFF;
  --c-bg-alt:      #F8FAFC;
  --c-bg-green:    #F0FDF4;
  --c-border:      #E2E8F0;
  --c-border-mid:  #CBD5E1;
  --c-white:       #FFFFFF;
  --c-error:       #DC2626;
  --c-success:     #16A34A;

  --font-display:  'Fraunces', Georgia, serif;
  --font-body:     'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --r:    8px;
  --r-lg: 16px;
  --r-xl: 24px;

  --max:  1160px;
  --nav-h: 70px;

  --shadow-sm: 0 1px 3px rgba(12,26,46,.08);
  --shadow:    0 4px 16px rgba(12,26,46,.10);
  --shadow-lg: 0 12px 40px rgba(12,26,46,.14);

  --transition: 180ms ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-green-vivid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-green); }
input, textarea, select, button { font-family: var(--font-body); font-size: 1rem; }
ul { list-style: none; }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section    { padding: 88px 0; }
.section--alt { background: var(--c-bg-alt); }
.section--green { background: var(--c-bg-green); }
.section--navy { background: var(--c-navy); color: var(--c-white); }

/* ── Typography ────────────────────────────────────────────── */
.display { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
.display em { font-style: italic; color: var(--c-green-vivid); }
h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.18; letter-spacing: -.02em; }
h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
p { max-width: 65ch; }
p.wide { max-width: none; }
.lead { font-size: 1.15rem; color: var(--c-muted); line-height: 1.7; }
.label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-green-vivid); }
.section-header { margin-bottom: 56px; }
.section-header h2 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-center p { margin: 0 auto; }

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center;
}
.nav__inner {
  display: flex; align-items: center;
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px;
  gap: 0;
}
.nav__logo {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--c-navy); text-decoration: none; margin-right: 32px;
}
.nav__logo-icon {
  width: 34px; height: 34px;
  background: var(--c-green-vivid) url('/assets/firstpost-logo-linkedin.png') center/150% no-repeat;
  border-radius: 10px;
}
.hero__tag-icon {
  display: inline-block; width: 20px; height: 20px; vertical-align: middle;
  background: var(--c-green-vivid) url('/assets/firstpost-logo-linkedin.png') center/150% no-repeat;
  border-radius: 5px;
}
/* Links stretch to fill space and stay centred between logo and actions */
.nav__links { display: flex; align-items: center; gap: 32px; flex: 1; }
.nav__links a { color: var(--c-muted); font-size: .9rem; font-weight: 500; transition: color var(--transition); white-space: nowrap; }
.nav__links a:hover, .nav__links a.active { color: var(--c-navy); }
.nav__actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--c-navy);
  -webkit-appearance: none; appearance: none;
}
/* SVG hamburger bars - transforms are contained within the SVG viewport,
   immune to any CSS overflow clipping on parent elements */
.hb-bar {
  transition: transform .22s ease, opacity .22s ease;
  transform-box: fill-box;  /* use each bar's own bounding box as origin reference */
  transform-origin: center;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r); font-weight: 600; font-size: .9rem;
  cursor: pointer; border: 1.5px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap; background: transparent;
}
.btn--primary { background: var(--c-green-vivid); color: #fff; border-color: var(--c-green-vivid); }
.btn--primary:hover { background: var(--c-green); border-color: var(--c-green); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,.3); }
.btn--outline { background: transparent; color: var(--c-navy); border-color: var(--c-border-mid); }
.btn--outline:hover { border-color: var(--c-navy); color: var(--c-navy); background: var(--c-bg-alt); }
.btn--ghost { background: transparent; color: var(--c-muted); border-color: transparent; }
.btn--ghost:hover { color: var(--c-navy); background: var(--c-bg-alt); }
.btn--white { background: #fff; color: var(--c-navy); border-color: #fff; }
.btn--white:hover { background: var(--c-green-light); }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--sm { padding: 7px 14px; font-size: .82rem; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(160deg, #f0fdf4 0%, #fff 55%);
  overflow: hidden; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: -120px; right: -160px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(134,239,172,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero__tag { display: inline-flex; align-items: center; gap: 6px; background: var(--c-green-light); color: var(--c-green); padding: 5px 12px; border-radius: 100px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 24px; }
.hero__title { margin-bottom: 20px; }
.hero__body { font-size: 1.1rem; color: var(--c-muted); margin-bottom: 36px; line-height: 1.75; max-width: 52ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero__trust { display: flex; align-items: center; gap: 16px; font-size: .82rem; color: var(--c-muted); }
.hero__trust-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--c-border-mid); }
.hero__visual { position: relative; }
.hero__card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 24px; max-width: 380px; margin-left: auto;
}
.hero__card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hero__card-title { font-weight: 700; font-size: .95rem; }
.hero__card-badge { background: var(--c-green-light); color: var(--c-green); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 100px; }
.hero__job { padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.hero__job:last-child { border-bottom: none; padding-bottom: 0; }
.hero__job-role { font-size: .88rem; font-weight: 600; color: var(--c-navy); margin-bottom: 3px; }
.hero__job-meta { font-size: .78rem; color: var(--c-muted); display: flex; gap: 12px; }
.hero__job-co { color: var(--c-green-vivid); font-weight: 500; }

/* ── Stats bar ─────────────────────────────────────────────── */
.stats { background: var(--c-navy); padding: 36px 0; }
.stats__grid { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat__num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--c-white); line-height: 1; margin-bottom: 4px; }
.stat__num span { color: var(--c-green-mid); }
.stat__label { font-size: .8rem; color: rgba(255,255,255,.55); letter-spacing: .05em; text-transform: uppercase; font-weight: 500; }

/* ── How it works ──────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { border-radius: var(--r-lg); padding: 24px; border: 1px solid transparent; }
.step__num { width: 44px; height: 44px; border-radius: 12px; background: var(--c-green-light); color: var(--c-green-vivid); font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step h3 { margin-bottom: 10px; }
.step p { font-size: .92rem; color: var(--c-muted); }

/* ── Feature grid ──────────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.feature-card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 28px; transition: box-shadow var(--transition); }
.feature-card:hover { box-shadow: var(--shadow); }
.feature-icon { font-size: 1.5rem; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: .9rem; color: var(--c-muted); }

/* ── Pricing cards ─────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }
.plan {
  background: var(--c-bg); border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg); padding: 32px; position: relative;
  transition: box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.plan:hover { box-shadow: var(--shadow); }
.plan--featured { border-color: var(--c-green-vivid); box-shadow: 0 0 0 4px var(--c-green-light); }
.plan__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--c-green-vivid); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 100px;
}
.plan__name { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: 8px; }
.plan__price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--c-navy); line-height: 1; margin-bottom: 4px; }
.plan__price sup { font-size: 1.2rem; vertical-align: super; }
.plan__price sub { font-size: 1rem; color: var(--c-muted); }
.plan__companies { font-size: .85rem; color: var(--c-muted); margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--c-border); }
.plan__features { margin-bottom: 28px; flex: 1; }
.plan__feature { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--c-text); margin-bottom: 10px; }
.plan__check { color: var(--c-green-vivid); font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.plan__annual { font-size: .78rem; color: var(--c-muted); margin-top: 8px; margin-bottom: 4px; }
.plan__annual strong { color: var(--c-green-vivid); }
.save-badge { background: var(--c-green-light); color: var(--c-green); font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 100px; margin-left: 4px; }

/* ── Testimonials ──────────────────────────────────────────── */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 28px; }
.testimonial__stars { color: #FBBF24; margin-bottom: 12px; font-size: .9rem; }
.testimonial__body { font-size: .92rem; color: var(--c-text); margin-bottom: 20px; line-height: 1.7; font-style: italic; }
.testimonial__author { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-green-light); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--c-green); }
.testimonial__name { font-size: .88rem; font-weight: 600; }
.testimonial__role { font-size: .78rem; color: var(--c-muted); }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; font-size: 1rem; font-weight: 600; color: var(--c-navy);
  text-align: left; gap: 16px;
}
.faq-q:hover { color: var(--c-green-vivid); }
.faq-icon { flex-shrink: 0; transition: transform var(--transition); font-size: 1.2rem; color: var(--c-muted); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq-a p { font-size: .92rem; color: var(--c-muted); padding-bottom: 20px; line-height: 1.75; }
.faq-item.open .faq-a { max-height: 500px; }

/* ── CTA banner ────────────────────────────────────────────── */
.cta-banner { background: var(--c-green-vivid); color: #fff; padding: 72px 0; text-align: center; }
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,.8); margin: 0 auto 32px; }
.cta-banner .btn--white:hover { color: var(--c-green-vivid); }

/* ── Footer ────────────────────────────────────────────────── */
.footer { background: var(--c-navy); color: rgba(255,255,255,.6); padding: 64px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer__brand p { font-size: .88rem; line-height: 1.7; margin-top: 14px; max-width: 28ch; }
.footer__col h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer__col a { display: block; font-size: .88rem; color: rgba(255,255,255,.55); margin-bottom: 8px; transition: color var(--transition); }
.footer__col a:hover { color: var(--c-green-mid); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .82rem; }
.footer__bottom a { color: rgba(255,255,255,.45); }
.footer__bottom a:hover { color: #fff; }
.footer-logo { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.footer-logo-icon { width: 30px; height: 30px; background: var(--c-green-vivid) url('/assets/firstpost-logo-linkedin.png') center/150% no-repeat; border-radius: 8px; }

/* ── Ad slots ──────────────────────────────────────────────── */
/* HIDDEN PRE-ADSENSE-APPROVAL. The DOM placeholders + body.fp-pro
   plumbing are kept so re-enabling is a one-line CSS change once
   AdSense approves and the AdSense JS tag is in <head>: replace
   the rule below with the styled-block version (display:flex with
   min-height/border/background) and `<ins class="adsbygoogle">`
   units inside each .ad-slot. body.fp-pro hides ads for paid users
   (see app.js consent + plan logic). */
.ad-slot { display: none; }
.ad-slot--leaderboard { width: 100%; margin: 32px 0; }
.ad-slot--sidebar     { width: 300px; }
.ad-slot--banner      { width: 100%; }
.ad-slot--inline      { margin: 16px 0; }

/* ── Cookie consent banner ────────────────────────────────────
   Shown once on first visit until user clicks Accept / Essentials.
   Choice stored in localStorage.fp_cookie_consent. Replaceable
   with Google Funding Choices once the AdSense console unlocks. */
#fp-cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 9999;
  background: var(--c-bg, #fff);
  border: 1px solid var(--c-border, #e0e0e0);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  padding: 16px 20px;
  max-width: 720px;
  margin: 0 auto;
}
.fp-cookie-banner__inner {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.fp-cookie-banner__text {
  font-size: .85rem;
  margin: 0;
  flex: 1 1 320px;
  line-height: 1.5;
  color: var(--c-text);
}
.fp-cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  #fp-cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
    max-width: none;
  }
}

/* ── Aside cards (shared across pages - backgrounds set inline per instance) */
.aside-card { border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 20px; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 40px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 22px; }
.form-group label:not(.check-item) { display: block; font-size: .88rem; font-weight: 600; color: var(--c-navy); margin-bottom: 7px; }
.form-group label .req { color: var(--c-error); margin-left: 3px; }
.form-hint { font-size: .78rem; color: var(--c-muted); margin-top: 5px; }
.form-error { font-size: .78rem; color: var(--c-error); margin-top: 5px; display: none; }
.form-group.has-error .form-error { display: block; }
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea { border-color: var(--c-error); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%; padding: 11px 2.5rem 11px 14px;
  border: 1.5px solid var(--c-border); border-radius: var(--r);
  font-size: .95rem; color: var(--c-text); background: var(--c-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
/* Custom chevron for <select> so the arrow sits consistently close to the
   right edge across iOS/Android/desktop. Without this the browser's native
   widget respects the oversized right padding and floats the arrow inward. */
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--c-green-vivid);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
textarea { resize: vertical; min-height: 110px; }

/* Checkboxes and radios */
.check-group { display: flex; flex-direction: column; gap: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.check-item { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 24px; }
.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  width: 17px; height: 17px; min-width: 17px;
  accent-color: var(--c-green-vivid); cursor: pointer; flex-shrink: 0;
  margin: 0;
}
.check-item span { font-size: .9rem; color: var(--c-text); line-height: 1.3; }

/* Chip-cloud variant of .check-grid - flex-wrap of pill-shaped buttons.
   Used for the Matched jobs "Your feed criteria" card to render industries,
   seniority, and work-arrangement multi-selects as compact toggles instead
   of a tall checkbox column. The underlying inputs stay the source of truth
   so existing form-collection logic keeps working unchanged. */
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cloud .check-item {
  margin: 0; padding: 6px 14px; border: 1px solid var(--c-border);
  border-radius: 100px; background: var(--c-bg);
  transition: background var(--transition), border-color var(--transition);
  user-select: none; min-height: 32px;
}
.chip-cloud .check-item:hover { background: var(--c-bg-alt); }
.chip-cloud .check-item:has(input:checked) {
  background: var(--c-green-light); border-color: var(--c-green-mid);
}
.chip-cloud .check-item input[type="checkbox"],
.chip-cloud .check-item input[type="radio"] { display: none; }
.chip-cloud .check-item span { font-size: .85rem; }

[data-theme="dark"] .chip-cloud .check-item:has(input:checked) {
  background: rgba(50, 130, 100, .25);
  border-color: var(--c-green-mid);
}

/* Per-section collapsible rows for the "Your feed criteria" card. Each
   subsection (titles, industries, seniority, etc.) is its own native
   <details>/<summary> so users can expand only the field they want to
   edit. Summary line shows the saved value at a glance via .summary-chip
   pills built dynamically by _updatePerSectionSummaries(). */
.pref-collapse {
  border-top: 1px solid var(--c-border);
  /* Bigger vertical breathing room between collapsed rows so the card
     doesn't feel like an HTML spreadsheet. */
  margin-top: 6px;
  padding-top: 6px;
}
.pref-collapse:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.pref-collapse > summary,
.pref-collapse > summary * {
  cursor: pointer;                         /* hand-cursor everywhere on the row */
}
.pref-collapse > summary {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 6px;                       /* generous click target */
  user-select: none;
  border-radius: var(--r-md);
  transition: background var(--transition);
  /* Hide the native disclosure marker across all engines. Setting
     list-style:none on a flex container handles WebKit + Firefox; the
     ::-webkit-details-marker rule covers older WebKit; ::marker covers
     standards-compliant browsers. Belt + braces. */
  list-style: none;
}
.pref-collapse > summary::-webkit-details-marker { display: none; }
.pref-collapse > summary::marker { content: ''; display: none; }
.pref-collapse > summary:hover { background: rgba(0, 0, 0, .03); }
[data-theme="dark"] .pref-collapse > summary:hover { background: rgba(255, 255, 255, .04); }

.pref-collapse__label {
  font-size: .92rem; font-weight: 600;
  color: var(--c-text);
  flex-shrink: 0; min-width: 130px;
}
/* Trailing colon after the label, e.g. "Industries:". Implemented in CSS
   so it can't drift out of sync if a label is edited in HTML. */
.pref-collapse__label::after {
  content: ':';
  margin-left: 1px;
  color: var(--c-muted);
}
.pref-collapse__summary {
  font-size: .85rem; color: var(--c-muted);
  flex: 1; min-width: 0;
}
/* When the row is expanded, fade the summary so the editor body is the
   visual focal point. */
.pref-collapse[open] > summary > .pref-collapse__summary { opacity: .55; }

.pref-collapse__chevron {
  flex-shrink: 0;
  width: 14px; height: 14px;
  transition: transform 0.15s ease;
  /* SVG chevron via background - single source of truth, no double-arrow
     because we're not using any text glyph. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='3,5 7,9 11,5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.pref-collapse[open] > summary > .pref-collapse__chevron { transform: rotate(180deg); }

.pref-collapse__body {
  padding: 4px 6px 18px 6px;
}

/* Inline summary pills - small read-only badges displayed in the collapsed
   summary row. Visually distinct from the active chip-cloud chips (gray
   instead of green) since they're informational, not interactive. Spacing
   between chips comes from explicit margin (not flex `gap`) so the chip
   never visually merges with its neighbour even if a parent rule strips
   the flex layout. */
.summary-chip {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 6px 4px 0;
  border-radius: 100px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: .78rem; font-weight: 500;
  white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle;
}
.summary-chip--more {
  background: transparent; border-color: transparent;
  color: var(--c-muted); font-style: italic;
  padding-left: 2px;
}
.summary-chip--empty {
  background: transparent; border-color: transparent;
  color: var(--c-muted); font-style: italic;
  padding-left: 0;
}

/* Mobile layout for the criteria card collapsibles. Below 640px the
   horizontal label-summary-chevron line doesn't fit cleanly with chip
   pills wide enough to read, so we drop the chips onto a second line
   and keep the label + chevron on the first. Also shrinks card padding
   so the content has more horizontal room. */
@media (max-width: 640px) {
  .dash-card { padding: 18px; }

  .pref-collapse > summary {
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 4px;
    padding: 14px 4px;
  }
  .pref-collapse__label { min-width: 0; }
  .pref-collapse__summary {
    flex-basis: 100%;
    order: 3;            /* push chips onto a second row below label/chevron */
    margin-top: 2px;
  }
  .pref-collapse__chevron { margin-left: auto; }

  /* Tighter chips so even a long industry label doesn't blow out the row */
  .summary-chip {
    max-width: 100%;
    font-size: .76rem;
    padding: 3px 9px;
    margin: 0 5px 4px 0;
  }
}

/* File upload */
.file-drop {
  border: 2px dashed var(--c-border-mid); border-radius: var(--r-lg);
  padding: 36px 24px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--c-bg-alt);
}
.file-drop:hover, .file-drop.drag-over { border-color: var(--c-green-vivid); background: var(--c-green-light); }
.file-drop__icon { font-size: 2rem; margin-bottom: 10px; }
.file-drop__text { font-size: .9rem; color: var(--c-muted); margin-bottom: 6px; }
.file-drop__sub { font-size: .78rem; color: var(--c-subtle); }
.file-drop__name { font-size: .88rem; font-weight: 600; color: var(--c-green-vivid); margin-top: 10px; display: none; }

/* Tags input */
.tags-input-wrap { border: 1.5px solid var(--c-border); border-radius: var(--r); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; cursor: text; transition: border-color var(--transition), box-shadow var(--transition); }
.tags-input-wrap:focus-within { border-color: var(--c-green-vivid); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.tag-pill { background: var(--c-green-light); color: var(--c-green); font-size: .8rem; font-weight: 600; padding: 3px 10px 3px 10px; border-radius: 100px; display: flex; align-items: center; gap: 5px; }
.tag-pill button { background: none; border: none; cursor: pointer; color: var(--c-green); font-size: 1rem; line-height: 1; padding: 0; display: flex; }
.tags-input { border: none; outline: none; font-family: var(--font-body); font-size: .9rem; color: var(--c-text); min-width: 120px; background: transparent; flex: 1; padding: 2px 0; }

/* CV-derived title suggestions block (signup step 3 + dashboard prefs).
   Renders above the jobTitles tags-input. Each chip is a click-to-add. */
.cv-suggestions { background: var(--c-green-light); border: 1px solid var(--c-green-mid); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; }
.cv-suggestions__header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cv-suggestions__icon { font-size: .95rem; }
.cv-suggestions__title { font-size: .8rem; font-weight: 600; color: var(--c-green); flex: 1; }
.cv-suggestions__close { -webkit-appearance: none; appearance: none; background: none; border: none; cursor: pointer; color: var(--c-green); font-size: 1.2rem; line-height: 1; padding: 0 4px; opacity: .7; }
.cv-suggestions__close:hover { opacity: 1; }
.cv-suggestions__chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Chip styling - visual language matches .tag-pill (green-light fill, green
   text, pill radius) so it sits naturally next to existing tag-pills. The
   appearance reset is critical: without it, browser user-agent button
   styling bleeds through on some pages (Chrome on macOS dark mode in
   particular renders <button> with a 3px square radius and grey fill that
   ignores `border-radius` until appearance:none is applied). */
.cv-chip {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--c-green-light); color: var(--c-green);
  border: 1px solid var(--c-green-mid);
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 100px;
  cursor: pointer; line-height: 1.2; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.cv-chip:hover { background: var(--c-green); color: #fff; border-color: var(--c-green); transform: translateY(-1px); }
.cv-chip:focus-visible { outline: 2px solid var(--c-green-vivid); outline-offset: 2px; }
/* Inherit the chip's font-size so the + sits on the same baseline as the
   text. The 1px upward nudge compensates for the asymmetric vertical
   bearings in the '+' glyph (most sans-serif fonts render '+' centred on
   x-height rather than cap-height). */
.cv-chip__plus { font-weight: 700; line-height: 1; opacity: .85; transform: translateY(-1px); }
.cv-chip:hover .cv-chip__plus { opacity: 1; }
[data-theme="dark"] .cv-suggestions { background: rgba(22,163,74,.10); border-color: var(--c-green-mid); }
[data-theme="dark"] .cv-chip { background: rgba(22,163,74,.18); color: var(--c-green-mid); border-color: var(--c-green-mid); }
[data-theme="dark"] .cv-chip:hover { background: var(--c-green); color: #fff; border-color: var(--c-green); }
/* Matched-jobs "no signal" empty state - surfaced when the user has
   neither typed jobTitles nor a CV that produced suggestions. Two CTAs
   nudge them toward the title input or the CV panel. */
.jobs-empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 24px; gap: 12px;
}
.jobs-empty-state__icon { font-size: 2.4rem; line-height: 1; }
.jobs-empty-state__title { margin: 0; font-size: 1.1rem; color: var(--c-text); }
.jobs-empty-state__body { margin: 0; max-width: 420px; font-size: .9rem; color: var(--c-muted); line-height: 1.5; }
.jobs-empty-state__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
@media (max-width: 480px) {
  .jobs-empty-state { padding: 36px 16px; }
  .jobs-empty-state__actions { flex-direction: column; width: 100%; }
  .jobs-empty-state__actions .btn { width: 100%; }
}

/* "Reading your CV…" status row shown on signup while we poll for the
   extractor's result.  Subtle, no chips - replaced by the chip block once
   suggestions arrive. */
.cv-suggestions--loading { display: flex; align-items: center; gap: 8px; }
.cv-suggestions--loading .cv-suggestions__title { font-weight: 500; }
.cv-suggestions__spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid var(--c-green-mid); border-top-color: transparent;
  border-radius: 50%; animation: cvSpin .9s linear infinite;
}
@keyframes cvSpin { to { transform: rotate(360deg); } }

/* Progress steps
   Layout: [step(32px)] [line(flex:1)] [step(32px)] [line] [step] [line] [step]
   Each step is a fixed 32px-wide flex column so labels overflow symmetrically.
   Line margin-top centres it with the dot: (32px - 2px) / 2 = 15px.          */
/* Plan feature badge (shown on restricted features) */
.plan-badge { display: inline-block; font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 100px; background: var(--c-green-light); color: var(--c-green); border: 1px solid var(--c-green-mid); vertical-align: middle; margin-left: 4px; }
.plan-badge--label { font-size: .6rem; }
/* Dim locked sections without affecting the upgrade notice child */
.plan-locked { pointer-events: none; cursor: not-allowed; }
.plan-locked > *:not(.plan-locked-notice) { opacity: .5; }
.plan-locked input, .plan-locked textarea, .plan-locked select {
  background: var(--c-bg-alt) !important; color: var(--c-subtle) !important;
  border-color: var(--c-border) !important; cursor: not-allowed !important;
}
/* Amber notice - must stay fully opaque inside a dimmed parent */
.plan-locked-notice {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; color: #92400e; font-weight: 600;
  background: #fef3c7; border: 1px solid #fcd34d; border-radius: var(--r);
  padding: 6px 12px; margin-top: 10px;
}

/* Progress steps
   Layout: [step(32px)] [line(flex:1)] [step(32px)] [line] [step] [line] [step]
   Each step is a fixed 32px-wide flex column so labels overflow symmetrically.
   Line margin-top centres it with the dot: (32px - 2px) / 2 = 15px.          */
.progress-steps { display: flex; align-items: flex-start; margin-bottom: 52px; }
.progress-step {
  flex-shrink: 0; width: 32px;
  display: flex; flex-direction: column; align-items: center;
}
.progress-step__dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  border: 2px solid var(--c-border); background: var(--c-bg); color: var(--c-muted);
  transition: all var(--transition); position: relative; z-index: 1;
  cursor: pointer; flex-shrink: 0;
}
.progress-step__dot:hover:not(.active):not(.locked) { border-color: var(--c-green-mid); }
.progress-step__dot.locked { opacity: .35; cursor: not-allowed; pointer-events: none; }
.progress-step__dot.active { border-color: var(--c-green-vivid); background: var(--c-green-vivid); color: #fff; cursor: default; }
.progress-step__dot.done  { border-color: var(--c-green-vivid); background: var(--c-green-light); color: var(--c-green-vivid); }
.progress-step__line { flex: 1; height: 2px; background: var(--c-border); margin-top: 15px; transition: background var(--transition); min-width: 12px; }
.progress-step__line.done { background: var(--c-green-vivid); }
/* Labels sit below the dot, overflow the 32px step symmetrically */
.progress-step__label {
  margin-top: 8px; font-size: .72rem; font-weight: 600; color: var(--c-muted);
  white-space: nowrap; text-align: center;
  /* Center text under the 32px dot even when label is wider */
  position: relative; left: 50%; transform: translateX(-50%);
}
.progress-step__label.active { color: var(--c-green-vivid); }

/* ── Dashboard ─────────────────────────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - var(--nav-h)); }
.dash-sidebar { background: var(--c-bg-alt); border-right: 1px solid var(--c-border); padding: 32px 0; }
.dash-sidebar__menu a { display: flex; align-items: center; gap: 10px; padding: 10px 24px; font-size: .9rem; font-weight: 500; color: var(--c-muted); border-left: 3px solid transparent; transition: all var(--transition); }
.dash-sidebar__menu a:hover { color: var(--c-navy); background: var(--c-border); }
.dash-sidebar__menu a.active { color: var(--c-green-vivid); border-left-color: var(--c-green-vivid); background: var(--c-green-light); }
.dash-sidebar__icon { font-size: 1rem; }
.dash-main { padding: 40px; }
.dash-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 24px; }
.dash-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-card h3 { font-size: 1rem; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.status-badge--active { background: var(--c-green-light); color: var(--c-green); }
.status-badge--pending { background: #FEF9C3; color: #854D0E; }
.status-badge--inactive { background: var(--c-bg-alt); color: var(--c-muted); }
.change-notice { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--r); padding: 12px 16px; font-size: .85rem; color: #92400E; margin-bottom: 24px; display: flex; align-items: flex-start; gap: 10px; }
.change-notice__icon { flex-shrink: 0; margin-top: 1px; }

/* ── Page hero (inner pages) ───────────────────────────────── */
.page-hero { background: var(--c-bg-green); padding: 64px 0 56px; border-bottom: 1px solid var(--c-border); }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { margin-bottom: 0; }

/* ── Legal pages ───────────────────────────────────────────── */
.legal-body { max-width: 760px; }
.legal-body h2 { font-size: 1.25rem; margin: 40px 0 12px; }
.legal-body h3 { font-size: 1rem; margin: 24px 0 8px; }
.legal-body p { font-size: .93rem; color: var(--c-text); margin-bottom: 14px; line-height: 1.8; }
.legal-body ul { margin: 0 0 14px 20px; list-style: disc; }
.legal-body ul li { font-size: .93rem; color: var(--c-text); margin-bottom: 6px; line-height: 1.75; }
.legal-body a { color: var(--c-green-vivid); }
.legal-meta { font-size: .82rem; color: var(--c-muted); margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--c-border); }

/* ── Contact page ──────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
.contact-info__item { display: flex; gap: 14px; margin-bottom: 28px; }
.contact-info__icon { width: 42px; height: 42px; border-radius: 10px; background: var(--c-green-light); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.contact-info__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--c-muted); margin-bottom: 3px; }
.contact-info__value { font-size: .95rem; color: var(--c-navy); font-weight: 500; }
.contact-info__value a { color: var(--c-navy); }

/* ── Alert / notice ────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--r); font-size: .88rem; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; }
.alert--success { background: var(--c-green-light); color: var(--c-green); border: 1px solid var(--c-green-mid); }
.alert--error { background: #FEF2F2; color: var(--c-error); border: 1px solid #FECACA; }
.alert--info { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* ── Prevent horizontal overflow ───────────────────────────── */
/* clip: prevents scroll container creation (unlike hidden), so transforms
   on sticky/fixed children (e.g. hamburger X rotation) are never clipped */
html, body { overflow-x: clip; }

/* ── Touch UX: no tap flash, respect tap targets ───────────── */
a, button, label, [role="button"],
input[type="checkbox"], input[type="radio"] { -webkit-tap-highlight-color: transparent; }
button, a, [role="button"] { touch-action: manipulation; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  /* nav__links and nav-toggle handled by the 768px nav block above */
  .footer__grid { grid-template-columns: 1fr; }
  .stats__grid { gap: 32px; }
  .hero { padding: 64px 0 56px; }
  .form-card { padding: 24px; }
}

/* ══════════════════════════════════════════════════════════════
   Mobile enhancements
   ══════════════════════════════════════════════════════════════ */

/* ── Mobile nav drawer (≤768px: tablets + phones) ──────────── */
/* Nav-specific breakpoint separate from other 640px mobile styles */
@media (max-width: 768px) {
  /* Collapse links, show hamburger */
  .nav__links { display: none; }
  .nav-toggle  { display: flex; flex-direction: column; }

  /* Push actions right; hide auth buttons - they're inside the drawer */
  .nav__actions { margin-left: auto; gap: 6px; }
  .nav__inner:has(.nav-toggle) .nav__actions .btn { display: none; }

  /* Hamburger: never shrink, gap from dark-toggle */
  .nav-toggle { flex-shrink: 0; margin-left: 12px; }

  /* Drawer open state */
  .nav__links--open {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(12,26,46,.15);
    padding: 0 0 20px;
    z-index: 99;
    animation: navSlideDown .2s ease;
    /* Max-height + scroll in case content is tall */
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  /* Full-width link rows */
  .nav__links a {
    display: block;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text);
    white-space: normal;
    width: 100%;
  }
  /* Background only in drawer context, never on desktop */
  .nav__links--open a:hover,
  .nav__links--open a.active { color: var(--c-green-vivid); background: var(--c-bg-alt); }
  /* Keep primary CTA green on hover - the rule above would grey it out */
  .nav__links--open .nav__mobile-auth .btn--primary:hover {
    background: var(--c-green);
    border-color: var(--c-green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22,163,74,.3);
  }

  /* Auth button block at bottom of drawer */
  .nav__mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px 0;
  }
  /* Override display:block set by the nav link rule above */
  .nav__mobile-auth .btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  /* Keep primary button text white in dark mode */
  .nav__mobile-auth .btn--primary { color: #fff !important; }

  /* Hamburger → X animation (SVG bars, transforms stay inside SVG viewport) */
  .nav-toggle[aria-expanded="true"] .hb-bar--1 { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .hb-bar--2 { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .hb-bar--3 { transform: translateY(-6px) rotate(-45deg); }

  /* Logo: shrink margin on narrow screens so hamburger always fits */
  .nav__logo { margin-right: 16px; }
}

/* Hide drawer-only auth on wider screens */
@media (min-width: 769px) { .nav__mobile-auth { display: none; } }

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Semi-transparent backdrop behind open drawer */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0; top: var(--nav-h);
  background: rgba(12,26,46,.3);
  backdrop-filter: blur(2px);
  z-index: 98;
}
.nav-overlay--visible { display: block; }

/* Dark mode drawer - scoped to ≤768px to avoid desktop hover side-effects */
@media (max-width: 768px) {
  [data-theme="dark"] .nav__links--open  { background: var(--c-bg); }
  [data-theme="dark"] .nav__links a      { color: var(--c-text); border-bottom-color: var(--c-border); }
  [data-theme="dark"] .nav__links--open a:hover,
  [data-theme="dark"] .nav__links--open a.active { background: var(--c-bg-alt); }
}

/* ── Prevent iOS auto-zoom on input focus (≥16px required) ─── */
@media (max-width: 640px) {
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], textarea, select, .tags-input { font-size: 16px; }
}

/* ── Tighter spacing on small screens ───────────────────────── */
@media (max-width: 480px) {
  .container      { padding: 0 16px; }
  .form-card      { padding: 20px 16px; }
  .section        { padding: 48px 0; }
  .section-header { margin-bottom: 32px; }
  .page-hero      { padding: 44px 0 36px; }
}

/* ── Hero: full-width CTAs, tidy trust row ──────────────────── */
@media (max-width: 640px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__trust { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .hero__trust-dot { display: none; }
}

/* ── Stats: 2×2 grid on phones ──────────────────────────────── */
@media (max-width: 480px) {
  .stats__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
}

/* ── Progress steps: shrink and hide labels on phones ───────── */
@media (max-width: 640px) {
  .progress-step__dot   { width: 28px; height: 28px; font-size: .7rem; }
  .progress-step__line  { margin-top: 13px; }
  .progress-step__label { display: none; }  /* hide text labels - dots show step numbers */
  .progress-steps       { margin-bottom: 28px; }
}

/* ── Signup step 4: centre card and override inline padding ──── */
#step-4 { max-width: 520px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  #step-4 { padding: 36px 20px !important; }
  /* Give 4th progress dot breathing room from right edge */
  .progress-steps { padding-right: 4px; }
}

/* ── Check grid: single column on phones ────────────────────── */
@media (max-width: 480px) {
  .check-grid { grid-template-columns: 1fr; }
}

/* ── CTA banner: full-width button ─────────────────────────── */
@media (max-width: 640px) {
  .cta-banner .btn { display: block; width: 100%; max-width: 320px; margin: 0 auto 12px; text-align: center; }
}

/* ── Footer bottom row: stack on mobile ─────────────────────── */
@media (max-width: 640px) {
  .footer { padding: 48px 0 24px; }
  .footer__grid { gap: 28px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ── Comparison table: horizontal scroll ────────────────────── */
@media (max-width: 760px) {
  .compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Dashboard: payment-pending lock state ──────────────────── */
/* Collapses the 2-col grid and centres content when subscription isn't active */
.dash-layout--locked { grid-template-columns: 1fr !important; }
.dash-layout--locked .dash-main { max-width: 640px; margin: 0 auto; }

/* ── Cancel-subscription modal buttons ─────────────────────── */
.cancel-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 540px) {
  .cancel-modal-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cancel-modal-actions button { width: 100%; text-align: center; justify-content: center; }
  /* Order on mobile: safest tap (Keep) first, then Submit & cancel, then Skip at the bottom. */
  .cancel-modal-actions button[onclick="closeCancelModal()"]  { order: 1; }
  .cancel-modal-actions #cancel-submit-btn                    { order: 2; }
  .cancel-modal-actions button[onclick="skipCancelFeedback()"] { order: 3; }
}

/* ── Dashboard: mobile bottom tab bar ───────────────────────── */
.dash-mobile-nav { display: none; }
.dash-mobile-nav__fade { display: none; }

@media (max-width: 980px) {
  .dash-mobile-nav {
    display: flex;
    justify-content: flex-start;   /* pack items to the left so overflow on the right is visible */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -4px 16px rgba(12,26,46,.08);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .dash-mobile-nav::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  /* Right-edge fade - visual cue that more tabs exist beyond the viewport.
     Fixed position so it stays as the user scrolls; pointer-events:none so
     taps pass through to whichever tab is underneath. */
  .dash-mobile-nav__fade {
    position: fixed;
    right: 0; bottom: 0;
    width: 42px;
    height: 64px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, var(--c-bg) 85%);
    z-index: 101;
    display: block;
  }
  .dash-mobile-nav__item {
    flex: 0 0 auto;   /* don't grow/shrink - fixed width so items never squish */
    min-width: 64px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 8px 8px;
    font-size: .58rem; font-weight: 600; line-height: 1.2;
    color: var(--c-muted);
    text-decoration: none; border: none; background: none;
    cursor: pointer; font-family: var(--font-body);
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .dash-mobile-nav__item:last-child { padding-right: 36px; }  /* room for fade to not obscure text */
  .dash-mobile-nav__item:hover,
  .dash-mobile-nav__item.active { color: var(--c-green-vivid); }
  .dash-mobile-nav__icon { font-size: 1.3rem; line-height: 1; }
  /* Push main content above the tab bar */
  .dash-main { padding: 28px 20px 92px; }
  /* Shorten verbose form hints on mobile so they don't dominate short inputs */
  .form-hint { font-size: .78rem; }
}

[data-theme="dark"] .dash-mobile-nav { background: var(--c-bg-alt); border-top-color: var(--c-border); }
@media (max-width: 980px) {
  [data-theme="dark"] .dash-mobile-nav__fade {
    background: linear-gradient(to right, rgba(30,41,59,0) 0%, var(--c-bg-alt) 85%);
  }
}

/* ── Dark mode ──────────────────────────────────────────────── */
[data-theme="dark"] {
  --c-bg:          #0F172A;
  --c-bg-alt:      #1E293B;
  --c-bg-green:    #0A2818;
  --c-text:        #E2E8F0;
  --c-muted:       #94A3B8;
  --c-subtle:      #64748B;
  --c-border:      #334155;
  --c-border-mid:  #475569;
  --c-green-light: #14532d;
  color-scheme: dark;
}

/* Elements with hardcoded white backgrounds */
[data-theme="dark"] .nav                { background: rgba(15,23,42,.95); border-bottom: 1px solid var(--c-border); }
[data-theme="dark"] .form-card          { background: var(--c-bg-alt); }
[data-theme="dark"] .dash-card          { background: var(--c-bg-alt); }
[data-theme="dark"] .hero__card         { background: var(--c-bg-alt); }
[data-theme="dark"] .plan               { background: var(--c-bg-alt); }
[data-theme="dark"] .feature-card       { background: var(--c-bg-alt); }
[data-theme="dark"] .testimonial        { background: var(--c-bg-alt); }
[data-theme="dark"] .progress-step__dot { background: var(--c-bg); }

/* Aside-cards: override any hardcoded background (#fff or var(--c-bg-green)) */
[data-theme="dark"] .aside-card         { background: var(--c-bg-alt) !important; border-color: var(--c-border); }

/* Step cards: add card treatment (border + padding) so they read as distinct from bg */
[data-theme="dark"] .step               { background: var(--c-bg-alt); border-color: var(--c-border); }

/* Hero gradient */
[data-theme="dark"] .hero { background: linear-gradient(160deg, #0a2818 0%, #0F172A 55%); }

/* Nav text colours */
[data-theme="dark"] .nav__logo                       { color: var(--c-text); }
[data-theme="dark"] .nav__links a                    { color: var(--c-muted); }
[data-theme="dark"] .nav__links a:hover,
[data-theme="dark"] .nav__links a.active             { color: var(--c-text); }
[data-theme="dark"] .nav-toggle                      { color: var(--c-text); }

/* Form labels */
[data-theme="dark"] .form-group label:not(.check-item) { color: var(--c-text); }
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4       { color: var(--c-text); }

/* Buttons */
[data-theme="dark"] .btn--outline { color: var(--c-text); border-color: var(--c-border-mid); }
[data-theme="dark"] .btn--ghost   { color: var(--c-muted); }
[data-theme="dark"] .btn--ghost:hover { color: var(--c-text); background: var(--c-border); }

/* ── Tag pills: ensure readable contrast in dark mode ──────── */
[data-theme="dark"] .tag-pill                       { color: var(--c-green-mid); }
[data-theme="dark"] .tag-pill button                { color: var(--c-green-mid); }

/* ── Navy-coloured foreground text that needs lightening in dark mode ─ */
[data-theme="dark"] .faq-q                          { color: var(--c-text); }
[data-theme="dark"] .plan__price                    { color: var(--c-text); }
[data-theme="dark"] .plan-opt__price                { color: var(--c-text); }
[data-theme="dark"] .hero__job-role                 { color: var(--c-text); }
[data-theme="dark"] .contact-info__value,
[data-theme="dark"] .contact-info__value a          { color: var(--c-text); }

/* ── Pricing page: guarantee box border + featured column ─────── */
[data-theme="dark"] .guarantee                      { border-color: var(--c-green); }
[data-theme="dark"] .save-badge,
[data-theme="dark"] .hero__tag,
[data-theme="dark"] .hero__card-badge,
[data-theme="dark"] .plan-badge                     { background: rgba(22,163,74,.2); color: #86EFAC; border-color: rgba(22,163,74,.4); }
[data-theme="dark"] .step__num                      { background: rgba(22,163,74,.2); }
[data-theme="dark"] .compare-table .featured-col    { background: rgba(22,163,74,.12); }

/* ── Informational panel banner ──────────────────────────────── */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--c-bg-green);
  border: 1px solid var(--c-green-light);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 24px;
  font-size: .82rem;
  color: var(--c-text);
}
/* Both --c-bg-green and --c-green-light have dark-mode overrides in the
   :root block above, so no separate [data-theme="dark"] rule needed here. */

/* ── Amber / info coloured boxes ──────────────────────────────── */
[data-theme="dark"] .change-notice       { background: #1c1205; border-color: #5a3500; color: #FCD34D; }
[data-theme="dark"] .status-badge--active  { background: rgba(22,163,74,.2); color: #86EFAC; }
[data-theme="dark"] .status-badge--pending { background: #2d1a02; color: #FCD34D; }
[data-theme="dark"] .alert--info         { background: #0c1f3d; color: #93C5FD; border-color: #1e3a6e; }
[data-theme="dark"] .alert--success      { background: #052e16; color: #86EFAC; border-color: #166534; }
[data-theme="dark"] .alert--error        { background: #2d0a0a; color: #FCA5A5; border-color: #7f1d1d; }

/* Dark mode toggle button */
.dark-toggle {
  background: none; border: 1.5px solid var(--c-border-mid); border-radius: var(--r);
  cursor: pointer; padding: 5px 9px; font-size: .85rem; color: var(--c-muted);
  transition: border-color var(--transition), color var(--transition);
  line-height: 1; display: flex; align-items: center;
}
.dark-toggle:hover { border-color: var(--c-green-vivid); color: var(--c-text); }

/* ── Tags-input placeholder: show data-placeholder when no tags yet ── */
.tags-input-wrap:not(:has(.tag-pill)) .tags-input:empty::before {
  content: attr(data-placeholder);
  color: var(--c-subtle);
  pointer-events: none;
}
