/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f172a;
  --surface:   #1e293b;
  --surface2:  #273548;
  --border:    #334155;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --accent:    #38bdf8;
  --accent2:   #818cf8;
  --green:     #22d3a5;
  --amber:     #f59e0b;
  --red:       #ef4444;
  --radius:    14px;
  --shadow:    0 4px 24px rgba(0,0,0,0.35);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.4rem;
  font-weight: 400;
  white-space: nowrap;
}

.logo-icon { font-size: 1.5rem; }
.logo-text { color: var(--text); }
.logo-text strong { color: var(--accent); }

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ─── Main & Cards ──────────────────────────────────────── */
main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.step { width: 100%; }
.step.hidden { display: none; }
.step.active { display: block; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

/* ─── Hero Card ─────────────────────────────────────────── */
.hero-card { text-align: center; }

.hero-stat-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 120px;
  text-align: left;
}

.hero-card h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  min-width: 220px;
  flex: 1;
  max-width: 340px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

select:focus { outline: none; border-color: var(--accent); }
select:disabled { opacity: 0.45; cursor: not-allowed; }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: 9px;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #0f172a;
  display: block;
  margin: 0 auto;
}

.btn-primary:hover:not(:disabled) { opacity: 0.88; }

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
}

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

/* ─── Step Header ───────────────────────────────────────── */
.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.step-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Skills Grid ───────────────────────────────────────── */
.card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.sub-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.skill-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.skill-check-item:hover { border-color: var(--accent); }
.skill-check-item.checked {
  border-color: var(--green);
  background: rgba(34,211,165,0.08);
}

.skill-check-item input[type="checkbox"] {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

.skill-check-info { flex: 1; }
.skill-check-name {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.15rem;
}

.skill-check-cat {
  font-size: 0.75rem;
  color: var(--muted);
}

.skill-demand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(56,189,248,0.12);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Results Layout ────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.score-card { grid-column: 1; }
.gap-card   { grid-column: 2; }
.readiness-card { grid-column: 1; }
.plan-card  { grid-column: 2; }

/* ─── Gauge ─────────────────────────────────────────────── */
.gauge-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem 0;
}

.gauge-svg {
  width: 200px;
  height: 120px;
}

.gauge-track { stroke: var(--surface2); }

.gauge-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -0.5rem;
}

.score-num {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.impact-text {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ─── Skills Gap List ───────────────────────────────────── */
.skills-gap-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gap-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gap-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.gap-info { flex: 1; min-width: 0; }
.gap-name {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gap-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.gap-bar-track {
  flex: 1;
  height: 5px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
}
.gap-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}
.gap-pct {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── Readiness Bars ────────────────────────────────────── */
.readiness-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.readiness-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.readiness-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.readiness-label { font-weight: 500; }
.readiness-pct { color: var(--muted); }

.readiness-track {
  height: 8px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
}

.readiness-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
}

/* ─── Plan Phases ───────────────────────────────────────── */
.plan-phases {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plan-phase {
  background: var(--surface2);
  border-radius: 10px;
  padding: 1rem;
  border-left: 3px solid var(--accent);
}

.plan-phase:nth-child(2) { border-left-color: var(--accent2); }
.plan-phase:nth-child(3) { border-left-color: var(--green); }

.phase-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.phase-skill-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.phase-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.phase-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.resource-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  background: rgba(56,189,248,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.resource-link:hover { background: rgba(56,189,248,0.2); }

/* ─── Results CTA ───────────────────────────────────────── */
.results-cta {
  text-align: center;
  margin-top: 0.5rem;
  padding-bottom: 2rem;
}

.cta-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-note strong { color: var(--accent); }

/* ─── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

footer a { color: var(--accent); text-decoration: none; }
footer strong { color: var(--text); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  .score-card, .gap-card, .readiness-card, .plan-card {
    grid-column: 1;
  }
  .hero-stat-row { gap: 0.6rem; }
  .stat-chip { padding: 0.4rem 0.8rem; }
  .stat-num { font-size: 1.05rem; }
  .header-inner { flex-direction: column; gap: 0.3rem; text-align: center; }
}
