/* CareerAgent — design tokens per PRD §39.21: Inter, 8pt spacing, 12px radius, minimal */
:root {
  --bg: #0B0D14;
  --bg-raised: #12151F;
  --bg-card: #161A27;
  --border: #262B3B;
  --text: #E8EAF2;
  --text-dim: #9AA1B5;
  --accent: #5B6CFF;
  --accent-hover: #4A5AE8;
  --accent-soft: rgba(91, 108, 255, 0.12);
  --green: #3DD68C;
  --amber: #F5B14C;
  --radius: 12px;
  --radius-sm: 8px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3);
  --shadow-2: 0 8px 24px rgba(0,0,0,.35);
  --shadow-3: 0 24px 64px rgba(0,0,0,.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-3); }
.container.narrow { max-width: 760px; }
.center { text-align: center; }

h1 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
h3 { font-size: 1.125rem; font-weight: 600; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: var(--space-1) var(--space-2);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-3); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.brand-mark { border-radius: 8px; flex-shrink: 0; }
.nav-links { display: flex; gap: var(--space-4); }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: .925rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-dim); }
.btn-sm { padding: 8px 16px; font-size: .875rem; }

/* ---------- Hero ---------- */
.hero { padding: var(--space-12) 0 var(--space-8); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-8); align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: var(--space-2);
  color: var(--accent); font-weight: 600; font-size: .875rem;
  background: var(--accent-soft); padding: 6px 14px; border-radius: 999px;
}
.lead { color: var(--text-dim); font-size: 1.125rem; margin-top: var(--space-3); max-width: 34rem; }
.hero-actions { display: flex; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }
.hero-points { list-style: none; margin-top: var(--space-4); display: grid; gap: var(--space-1); }
.hero-points li { color: var(--text-dim); font-size: .925rem; padding-left: 26px; position: relative; }
.hero-points li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6CFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 10px; background-position: center; background-repeat: no-repeat;
}

/* ---------- Match card ---------- */
.match-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-3); box-shadow: var(--shadow-3);
  max-width: 420px; justify-self: end; width: 100%;
}
/* Rotating example carousel */
.match-carousel { justify-self: end; width: 100%; max-width: 420px; }
.match-slides { display: grid; }
.match-slides > .match-card {
  grid-area: 1 / 1; /* stack all slides in one cell → container sizes to the tallest */
  max-width: 100%; justify-self: stretch;
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.985);
  transition: opacity .5s ease, transform .5s ease, visibility 0s linear .5s;
  pointer-events: none;
}
.match-slides > .match-card.is-active {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity .5s ease, transform .5s ease, visibility 0s;
}
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-3); }
.carousel-dots .dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--border); transition: background .3s ease, width .3s ease;
}
.carousel-dots .dot.is-active { background: var(--accent); width: 22px; }
@media (prefers-reduced-motion: reduce) {
  .match-slides > .match-card { transition: opacity .01s, visibility 0s; transform: none; }
}
.match-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); }
.match-role { font-weight: 700; font-size: 1.05rem; }
.match-company { color: var(--text-dim); font-size: .875rem; margin-top: 2px; }
.match-score {
  text-align: center; background: var(--accent-soft); border: 1px solid rgba(91,108,255,.35);
  border-radius: var(--radius-sm); padding: 8px 14px; flex-shrink: 0;
}
.match-score span { display: block; font-weight: 800; font-size: 1.35rem; color: var(--accent); line-height: 1; }
.match-score small { color: var(--text-dim); font-size: .7rem; }
.match-body { margin-top: var(--space-3); }
.match-why-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.match-why { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
.match-why li {
  font-size: .8rem; font-weight: 500; color: var(--green);
  background: rgba(61,214,140,.1); border: 1px solid rgba(61,214,140,.25);
  padding: 4px 10px; border-radius: 999px;
}
.match-why li::before { content: '✓ '; }
.match-gaps { margin-top: var(--space-2); font-size: .85rem; color: var(--amber); }
.gap-label { color: var(--text-dim); }
.match-probs { display: flex; gap: var(--space-4); margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.match-probs strong { font-size: 1.1rem; display: block; }
.match-probs span { font-size: .75rem; color: var(--text-dim); }
.match-actions { display: flex; gap: var(--space-1); margin-top: var(--space-3); }

/* ---------- Sections ---------- */
.section { padding: var(--space-12) 0; }
.section.alt { background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lead { color: var(--text-dim); font-size: 1.075rem; margin-top: var(--space-2); max-width: 40rem; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- Stats ---------- */
.stats { padding: var(--space-6) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.stat strong { font-size: 1.9rem; font-weight: 800; color: var(--accent); display: block; letter-spacing: -0.02em; }
.stat span { color: var(--text-dim); font-size: .9rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-top: var(--space-6); }
.steps li {
  counter-increment: step; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-4); position: relative;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-weight: 800; font-size: .85rem; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 4px 12px;
  display: inline-block; margin-bottom: var(--space-2);
}
.steps p { color: var(--text-dim); font-size: .925rem; margin-top: var(--space-1); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-6); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-4); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2);
}
.card p { color: var(--text-dim); font-size: .9rem; margin-top: var(--space-1); }

/* ---------- Explainability ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-8); align-items: center; }
.check-list { list-style: none; margin-top: var(--space-4); display: grid; gap: var(--space-2); }
.check-list li { padding-left: 30px; position: relative; color: var(--text-dim); font-size: .95rem; }
.check-list li strong { color: var(--text); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(61,214,140,.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233DD68C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 10px; background-position: center; background-repeat: no-repeat;
}
.quote-block {
  background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: var(--space-4);
}
.quote-block blockquote { font-size: 1.05rem; font-style: italic; color: var(--text); }
.quote-block cite { display: block; margin-top: var(--space-2); color: var(--text-dim); font-size: .875rem; font-style: normal; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-6); align-items: start; }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2);
}
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-2); position: relative; }
.badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 600;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.price strong { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.price span { color: var(--text-dim); font-size: .875rem; }
.price-tag { color: var(--accent); font-size: .85rem; font-weight: 600; }
.price-card ul { list-style: none; display: grid; gap: var(--space-1); margin: var(--space-1) 0 var(--space-2); }
.price-card li { color: var(--text-dim); font-size: .9rem; padding-left: 24px; position: relative; }
.price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.price-card .btn { margin-top: auto; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: var(--space-6); display: grid; gap: var(--space-2); }
.faq-list details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-list summary {
  cursor: pointer; padding: var(--space-3); font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-2);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 1.3rem; color: var(--text-dim); transition: transform .2s; flex-shrink: 0; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 var(--space-3) var(--space-3); color: var(--text-dim); font-size: .95rem; }

/* ---------- Waitlist ---------- */
.waitlist { background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(91,108,255,.15), transparent), var(--bg); }
#waitlist-form { display: flex; gap: var(--space-1); max-width: 460px; margin: var(--space-4) auto 0; }
#waitlist-form input {
  flex: 1; min-width: 0; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; color: var(--text);
  font-family: inherit; font-size: .95rem;
}
#waitlist-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-note { margin-top: var(--space-2); color: var(--text-dim); font-size: .85rem; }
.form-note.success { color: var(--green); }
.form-note.error { color: var(--amber); }
.form-privacy { margin: var(--space-2) auto 0; max-width: 34rem; color: var(--text-dim); font-size: .72rem; line-height: 1.5; opacity: .8; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: var(--space-6) 0; }
.footer-inner { display: grid; gap: var(--space-1); }
footer p { color: var(--text-dim); font-size: .9rem; }
footer .fine { font-size: .8rem; }
.brand.small { font-size: .95rem; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: var(--space-6); }
  .match-card, .match-carousel { justify-self: stretch; max-width: 100%; }
  .cards, .pricing-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .cards, .pricing-grid, .stats-grid { grid-template-columns: 1fr; }
  .section { padding: var(--space-8) 0; }
  .hero { padding: var(--space-8) 0 var(--space-6); }
  #waitlist-form { flex-direction: column; }
  .price-card.featured { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Fit report page ---------- */
.report-hero { padding-bottom: var(--space-4); }
.report-body { padding-top: 0; }
.fit-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.fit-field label { display: block; font-weight: 600; margin-bottom: var(--space-1); }
.fit-field textarea {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-2); color: var(--text);
  font-family: inherit; font-size: .9rem; line-height: 1.5; resize: vertical;
}
.fit-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field-hint { color: var(--text-dim); font-size: .8rem; margin-top: 6px; }
.fit-actions { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-3); flex-wrap: wrap; }
.fit-result { margin-top: var(--space-6); }
.report-card { max-width: 720px; margin: 0 auto; }
.report-headline { margin-top: var(--space-2); font-size: 1.05rem; color: var(--text); }
.report-list { list-style: none; display: grid; gap: 6px; margin: var(--space-1) 0 var(--space-2); }
.report-list li { font-size: .9rem; color: var(--text-dim); padding-left: 22px; position: relative; }
.report-why li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.report-gaps li::before { content: '→'; position: absolute; left: 0; color: var(--amber); font-weight: 700; }
.report-suggestions li::before { content: '↗'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.report-gaps .no-gaps::before { content: '✓'; color: var(--green); }
.verdict-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; margin-top: 4px;
}
.verdict-strong { background: rgba(61,214,140,.15); color: var(--green); }
.verdict-good { background: var(--accent-soft); color: var(--accent); }
.verdict-stretch { background: rgba(245,177,76,.15); color: var(--amber); }
.verdict-weak { background: rgba(255,107,107,.15); color: #FF6B6B; }
@media (max-width: 900px) { .fit-inputs { grid-template-columns: 1fr; } }

/* ---------- Resume upload + JD link controls ---------- */
.input-row {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  margin-bottom: 6px; height: 40px;
}
.btn-upload {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  padding: 9px 16px; font-size: .875rem; font-weight: 600; border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap; height: 40px; box-sizing: border-box; transition: border-color .15s, background .15s, color .15s;
}
.btn-upload:hover { border-color: var(--accent); color: #fff; background: var(--accent); }
.btn-upload svg { flex-shrink: 0; }
.input-row-hint { color: var(--text-dim); font-size: .8rem; }
.jd-url-input {
  flex: 1; min-width: 0; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 14px; color: var(--text);
  font-family: inherit; font-size: .875rem; height: 40px; box-sizing: border-box;
}
.jd-url-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
#resume-drop.drag { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: var(--radius-sm); }
.field-hint.success { color: var(--green); }
.field-hint.error { color: var(--amber); }
.status-line { min-height: 2.4em; }

/* ---------- Score breakdown bars ---------- */
.report-dims {
  display: grid; gap: 12px; margin: var(--space-1) 0 var(--space-3);
  padding: var(--space-3); background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.dim-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: .82rem; }
.dim-head span:first-child { color: var(--text); font-weight: 500; }
.dim-head span:last-child { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dim-track { height: 8px; background: var(--bg-card); border-radius: 999px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.dim-fill.dim-strong { background: var(--green); }
.dim-fill.dim-mid { background: var(--accent); }
.dim-fill.dim-weak { background: var(--amber); }
@media (prefers-reduced-motion: reduce) { .dim-fill { transition: none; } }

/* ---------- Job-alerts signup form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.fit-field input[type="text"], .fit-field input[type="email"] {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text);
  font-family: inherit; font-size: .9rem; box-sizing: border-box;
}
.fit-field input:focus, select.jd-url-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
select.jd-url-input { width: 100%; }
.opt { color: var(--text-dim); font-weight: 400; font-size: .8rem; }
.req { color: var(--accent); }
.field-block { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3); margin: var(--space-3) 0; }
.field-block legend { font-weight: 600; padding: 0 8px; font-size: .95rem; }
.checks-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); margin-top: var(--space-2); }
.checks-group-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .88rem; color: var(--text-dim); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.check:hover span { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-2); }
.chip { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: var(--text-dim); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
