/* CVatch intro animation – separate from the existing search styles */
:root {
  color-scheme: dark;
  --cv-bg: #071426;
  --cv-panel: rgba(14, 33, 58, .88);
  --cv-blue: #4da3ff;
  --cv-cyan: #56e0e0;
  --cv-text: #f3f7ff;
  --cv-muted: #b8c8dc;
}
* { box-sizing: border-box; }
body.cv-intro-page {
  margin: 0;
  min-height: 100vh;
  color: var(--cv-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(31, 115, 201, .28), transparent 42%),
    radial-gradient(ellipse at 85% 80%, rgba(24, 192, 200, .14), transparent 38%),
    var(--cv-bg);
  display: flex;
  flex-direction: column;
}
.cv-intro-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.cv-intro-logo {
  color: #fff;
  text-decoration: none;
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -.06em;
}
.cv-intro-logo span { color: var(--cv-cyan); }
.cv-skip {
  appearance: none;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 11px 17px;
  font: inherit;
  font-size: .94rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.cv-skip:hover { background: rgba(77,163,255,.18); border-color: var(--cv-blue); }
.cv-skip:focus-visible { outline: 3px solid var(--cv-cyan); outline-offset: 3px; }
.cv-intro-main {
  width: min(980px, calc(100% - 32px));
  margin: auto;
  padding: clamp(28px, 6vh, 60px) 0 40px;
  text-align: center;
}
.cv-eyebrow {
  color: var(--cv-cyan);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .76rem;
  font-weight: 800;
  margin: 0 0 14px;
}
.cv-intro-main h1 {
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.cv-intro-subtitle {
  max-width: 670px;
  margin: 18px auto 0;
  color: var(--cv-muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}
.cv-demo {
  position: relative;
  margin: clamp(28px, 5vh, 48px) auto 0;
  max-width: 800px;
  min-height: 278px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 36px);
  background: linear-gradient(145deg, rgba(18,43,73,.93), rgba(8,23,42,.94));
  box-shadow: 0 25px 80px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
  text-align: left;
}
.cv-demo-top { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.cv-dot { width: 8px; height: 8px; border-radius: 50%; background: #52718e; }
.cv-demo-label { margin-left: 8px; color: #b6c9de; font-size: .8rem; }
.cv-steps { position: relative; min-height: 260px; }
.cv-step {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .55s ease, transform .55s ease, visibility .55s;
}
.cv-step.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cv-step-number {
  flex: 0 0 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cv-blue), #2674dc);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(39,116,220,.25);
}
.cv-step h2 { margin: 2px 0 8px; font-size: clamp(1.15rem, 3vw, 1.55rem); letter-spacing: -.02em; }
.cv-step p { margin: 0; color: var(--cv-muted); line-height: 1.6; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cv-chip { border: 1px solid rgba(86,224,224,.28); border-radius: 999px; padding: 7px 11px; color: #dffbff; background: rgba(86,224,224,.08); font-size: .83rem; }
.cv-progress { height: 4px; margin-top: 24px; background: rgba(255,255,255,.11); border-radius: 99px; overflow: hidden; }
.cv-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cv-blue), var(--cv-cyan)); animation: cvProgress 50s linear forwards; }
.cv-intro-foot { margin: 22px 0 0; color: #91a9c2; font-size: .85rem; }
@keyframes cvProgress { to { width: 100%; } }
@media (max-width: 560px) {
  .cv-intro-nav { min-height: 66px; padding: 12px 16px; }
  .cv-intro-logo { font-size: 1.35rem; }
  .cv-skip { padding: 10px 13px; font-size: .88rem; }
  .cv-demo { border-radius: 18px; min-height: 320px; }
  .cv-steps { min-height: 330px; }
  .cv-step { gap: 12px; }
  .cv-step-number { flex-basis: 38px; height: 38px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cv-step { position: relative; opacity: 1; transform: none; margin-bottom: 22px; }
  .cv-steps { min-height: 0; }
  .cv-progress span { width: 100%; }
}

/* Compact headings while keeping them easy to read */
.cv-step h2 {
  max-width: 100%;
  line-height: 1.18;
  letter-spacing: -.035em;
  font-size: clamp(1.08rem, 2.7vw, 1.42rem);
  margin-top: 0;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.cv-intro-main h1 {
  line-height: 1.12;
  letter-spacing: -.04em;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

/* Readability fix: prevent headings/body copy from being squeezed */
.cv-demo { width: 100%; }
.cv-step { width: 100%; }
.cv-step > div { min-width: 0; flex: 1; }
.cv-step h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.28;
  letter-spacing: -.02em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  max-width: 100%;
}
.cv-step p {
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
.cv-chip { white-space: nowrap; }
@media (max-width: 560px) {
  .cv-demo { padding: 20px 16px; }
  .cv-step { gap: 12px; }
  .cv-step p { font-size: .96rem; line-height: 1.65; }
}

/* Final readability overrides */
.cv-demo { overflow: visible; }
.cv-step { padding-right: 4px; }
.cv-step > div { min-width: 0; flex: 1 1 auto; }
.cv-step h2 {
  font-size: clamp(1.18rem, 2.5vw, 1.48rem);
  line-height: 1.3;
  letter-spacing: -.015em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  margin: 0 0 12px;
}
.cv-step p {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 62ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
@media (max-width: 560px) {
  .cv-step { gap: 12px; }
  .cv-step h2 { font-size: 1.12rem; line-height: 1.3; }
  .cv-step p { font-size: .96rem; line-height: 1.7; }
}
@media (prefers-reduced-motion: reduce) {
  .cv-step { transition: none !important; }
  .cv-progress span { animation: none !important; width: 100%; }
}


/* Intro cards: fixed space for absolutely positioned steps, with a moderate mobile height */
.cv-demo { min-height: 330px; }
.cv-steps { min-height: 230px; }
.cv-step { min-height: 0; }
@media (max-width: 560px) {
  .cv-demo { min-height: 315px; padding: 18px 15px; }
  .cv-demo-top { margin-bottom: 18px; }
  .cv-steps { min-height: 215px; }
  .cv-step { min-height: 0; }
}


/* Search pages use the CVatch intro visual language while retaining app layout rules */
body:not(.cv-intro-page) {
  color: var(--cv-text, #f3f7ff);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(35,108,190,.22), transparent 36%),
    radial-gradient(ellipse at 92% 28%, rgba(25,177,190,.10), transparent 32%),
    #071426;
}
body:not(.cv-intro-page) .nav-bar {
  background: rgba(7,20,38,.92);
  border-bottom-color: rgba(177,204,232,.15);
}
body:not(.cv-intro-page) .app-container { max-width: 1440px; }
body:not(.cv-intro-page) .glass-card,
body:not(.cv-intro-page) .accordion-panel,
body:not(.cv-intro-page) .job-card,
body:not(.cv-intro-page) .selection-panel {
  border-radius: 20px;
}
body:not(.cv-intro-page) .selected-result-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
body:not(.cv-intro-page) .selected-result-card .card-details { min-width: 0; }
body:not(.cv-intro-page) .result-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
body:not(.cv-intro-page) .result-badges .score-lens,
body:not(.cv-intro-page) .result-hit-badge,
body:not(.cv-intro-page) .result-deselect-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .82rem;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
}
body:not(.cv-intro-page) .result-badges .score-lens { width: auto; height: auto; }
body:not(.cv-intro-page) .result-hit-badge {
  color: #a9d8ff;
  background: rgba(77,163,255,.13);
  border: 1px solid rgba(77,163,255,.34);
}
body:not(.cv-intro-page) .result-deselect-badge {
  margin-left: auto;
  border: 1px solid rgba(248,113,113,.42);
  background: rgba(239,68,68,.12);
  color: #ff9b9b;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
body:not(.cv-intro-page) .result-deselect-badge:hover {
  background: rgba(239,68,68,.22);
  border-color: #f87171;
  color: #ffd1d1;
}
@media (max-width: 560px) {
  body:not(.cv-intro-page) .result-badges { gap: 6px; }
  body:not(.cv-intro-page) .result-badges .score-lens,
  body:not(.cv-intro-page) .result-hit-badge,
  body:not(.cv-intro-page) .result-deselect-badge { min-height: 30px; padding: 6px 10px; }
}


/* Result card: one compact, unified badge row */
body:not(.cv-intro-page) .result-badges { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
body:not(.cv-intro-page) .criteria-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:32px; max-width:100%; box-sizing:border-box;
  border:1px solid rgba(86,224,224,.25); border-radius:999px;
  padding:6px 11px; color:#dffbff; background:rgba(86,224,224,.08);
  font-size:.82rem; line-height:1.2; font-weight:750; overflow-wrap:anywhere;
}
body:not(.cv-intro-page) .result-deselect-badge { margin-left:auto; flex:0 0 auto; }
@media (max-width:560px) {
  body:not(.cv-intro-page) .result-badges { gap:6px; }
  body:not(.cv-intro-page) .criteria-badge { min-height:29px; padding:5px 9px; font-size:.78rem; }
  body:not(.cv-intro-page) .result-deselect-badge { margin-left:0; }
}
