/* ═══════════════════════════════════════════════════════════════
   PinoyResume.com — Design System
   Fluent-inspired palette · Inter type · 8-pt spacing · calm motion
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Brand */
  --brand:       #2E6BE6;
  --brand-hover: #1E51C4;
  --brand-deep:  #16336E;
  --brand-tint:  #EBF1FE;
  --accent:      #F5B428;
  --accent-deep: #C98A0B;

  /* Neutrals */
  --bg:      #F7F9FC;
  --surface: #FFFFFF;
  --border:  #E3E9F2;
  --ink:     #16233F;
  --muted:   #5B6B85;
  --faint:   #64748B; /* AA-compliant on white/bg for 13px helper text */

  /* Semantic */
  --success:      #0E9E5E;
  --success-tint: #E7F7EF;
  --danger:       #D6455D;
  --danger-tint:  #FCEEF1;

  /* Darker text shades for small labels on tinted pill backgrounds (WCAG AA) */
  --on-tint-brand:   #1E51C4;
  --on-tint-success: #0A7A48;
  --on-tint-danger:  #B03049;
  --on-tint-gold:    #8A5A00;

  /* Legacy aliases (referenced from JS inline styles) */
  --blue: var(--brand);
  --red: var(--danger);
  --green: var(--success);
  --gold: var(--accent);
  --gold-dark: var(--accent-deep);
  --text: var(--ink);

  /* Shape & elevation */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(22,35,63,.05);
  --shadow: 0 1px 3px rgba(22,35,63,.05), 0 10px 30px rgba(22,35,63,.06);
  --shadow-md: 0 2px 6px rgba(22,35,63,.06), 0 18px 48px rgba(22,35,63,.10);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Type scale */
  --fs-xs: 13px;
  --fs-sm: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  font-size: var(--fs-sm);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Inline SVG icons */
.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.22em;
  flex-shrink: 0;
}

/* ── Tricolor hairline — the one Filipino accent ── */
.flag-bar {
  height: 3px;
  background: linear-gradient(90deg,
    var(--brand) 0%, var(--brand) 44%,
    var(--accent) 44%, var(--accent) 56%,
    var(--danger) 56%, var(--danger) 100%);
}

/* ═══ Nav ═══ */
nav {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: border-color .3s ease, box-shadow .3s ease;
}
nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(22,35,63,.06);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo img { height: 34px; width: auto; mix-blend-mode: multiply; }
.nav-wordmark {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-wordmark .wm-a { color: var(--brand); }
.nav-wordmark .wm-b { color: var(--ink); }
.nav-wordmark .wm-c { color: var(--faint); font-weight: 500; font-size: 13px; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Small phones: keep the whole nav inside the viewport */
@media (max-width: 420px) {
  nav { padding: 0 14px; }
  .nav-logo { gap: 7px; }
  .nav-logo img { height: 28px; }
  .nav-wordmark { font-size: 16px; }
  .nav-wordmark .wm-c { display: none; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-ghost { padding: 8px 10px; font-size: 13px; min-height: 36px; }
}

/* ═══ Buttons — one system ═══ */
.btn-primary, .btn-secondary, .btn-ghost, .btn-back {
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  transition: background .2s ease, border-color .2s ease, color .2s ease,
              box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
  touch-action: manipulation;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(46,107,230,.25), 0 8px 24px rgba(46,107,230,.18);
  width: 100%;
}
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 4px 12px rgba(46,107,230,.3), 0 12px 32px rgba(46,107,230,.22); }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 13px 24px;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  padding: 9px 16px;
  font-size: 14px;
  color: var(--muted);
  min-height: 40px;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-back {
  background: none;
  border: 1px solid var(--border);
  padding: 13px 24px;
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
}
.btn-back:hover { border-color: var(--ink); color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover { transform: translateY(-1px); }
  .btn-primary:active { transform: translateY(0) scale(.985); }
}

/* ═══ Hero ═══ */
.hero {
  text-align: center;
  padding: clamp(64px, 10vw, 128px) 24px 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(46,107,230,.07) 0%, transparent 70%),
    radial-gradient(40% 40% at 82% 28%, rgba(245,180,40,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid rgba(46,107,230,.18);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero h1 span {
  background: linear-gradient(100deg, var(--brand) 20%, var(--brand-hover) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: clamp(var(--fs-md), 2.2vw, var(--fs-lg));
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow { animation: heroRise .7s var(--ease-out) both; }
  .hero h1 { animation: heroRise .7s .08s var(--ease-out) both; }
  .hero p { animation: heroRise .7s .16s var(--ease-out) both; }
  #panel-fork .fork-grid, #panel-fork .fork-reassurance { animation: heroRise .7s .26s var(--ease-out) both; }
  @keyframes heroRise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* App mode: collapse the landing around the flow */
body.in-app .hero,
body.in-app #landingSections { display: none; }

/* ═══ Scroll-reveal ═══ */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  }
  .reveal.in { opacity: 1; transform: translateY(0); }
}

/* ═══ Landing sections ═══ */
.land-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) 24px 0;
  text-align: center;
}
.land-section:last-child { padding-bottom: clamp(64px, 9vw, 120px); }
.land-title {
  font-size: clamp(var(--fs-xl), 3.4vw, var(--fs-2xl));
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.land-sub {
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 520px;
  margin: 0 auto 44px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.how-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 800;
  font-size: var(--fs-md);
  margin-bottom: 18px;
}
.how-card h3 { font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.how-card p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.who-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
}
.who-card .icon { color: var(--brand); width: 22px; height: 22px; }

.privacy-band {
  background: var(--brand-deep);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: clamp(40px, 6vw, 64px) 32px;
  text-align: center;
}
.privacy-band .icon { width: 36px; height: 36px; stroke-width: 1.5; color: var(--accent); margin-bottom: 16px; }
.privacy-band h2 { font-size: clamp(var(--fs-lg), 2.8vw, 28px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.privacy-band p { color: rgba(255,255,255,.75); font-size: var(--fs-sm); max-width: 480px; margin: 0 auto 24px; }
.privacy-points { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.privacy-point {
  font-size: var(--fs-xs);
  font-weight: 600;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 100px;
  padding: 7px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.privacy-point .icon { width: 14px; height: 14px; margin: 0; color: var(--accent); }

@media (max-width: 760px) {
  .how-grid { grid-template-columns: 1fr; }
  .who-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .who-grid { grid-template-columns: 1fr; }
}

/* ═══ Stepper ═══ */
.stepper-wrap { max-width: 720px; margin: 32px auto 0; padding: 0 24px; }
.stepper { display: flex; align-items: center; justify-content: space-between; }
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--faint);
  font-weight: 700;
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s, color .3s, border-color .3s, transform .35s var(--ease-out);
}
.step-item.active .step-circle {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 5px var(--brand-tint);
}
.step-item.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--faint);
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--brand); }
.step-item.done .step-label { color: var(--success); }
.step-connector {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  margin: 0 8px 26px;
  max-width: 72px;
  transition: background .3s;
}
.step-connector.done { background: var(--success); }
@media (max-width: 560px) {
  .step-label { font-size: 11px; }
  .step-connector { max-width: 36px; margin-bottom: 24px; }
}

.progress-bar-wrap { max-width: 720px; margin: 16px auto 0; padding: 0 24px; }
.progress-bar-track {
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width .5s var(--ease-out);
}

/* ═══ Main container & panels ═══ */
.main { max-width: 720px; margin: 0 auto; padding: 32px 20px 96px; }

.step-panel { display: none; }
.step-panel.active { display: block; position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  .step-panel.forward-in  { animation: slideInRight .4s var(--ease-out) both; }
  .step-panel.backward-in { animation: slideInLeft .4s var(--ease-out) both; }
  .step-panel.forward-out  { animation: slideOutLeft .3s ease both; }
  .step-panel.backward-out { animation: slideOutRight .3s ease both; }
  @keyframes slideInRight { from { transform: translateX(32px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
  @keyframes slideInLeft  { from { transform: translateX(-32px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
  @keyframes slideOutLeft  { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-32px); opacity: 0; } }
  @keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(32px); opacity: 0; } }
}

/* ═══ Cards ═══ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 20px;
}
@media (max-width: 560px) { .card { padding: 24px 20px; } }
.card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-title-icon {
  width: 38px; height: 38px;
  background: var(--brand-tint);
  color: var(--brand);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-title-icon .icon { width: 19px; height: 19px; }

/* ═══ Disclosure sections ═══ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 18px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.section-header.collapsed {
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.section-header-title {
  font-weight: 700;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header-title .icon { color: var(--brand); width: 19px; height: 19px; }
.section-body {
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 4px 24px 28px;
  margin-bottom: 16px;
}
@media (max-width: 560px) {
  .section-header { padding: 16px 20px; }
  .section-body { padding: 2px 20px 24px; }
}
.chevron {
  transition: transform .25s var(--ease-out);
  color: var(--faint);
  display: flex;
}
.chevron .icon { width: 16px; height: 16px; }
.chevron.collapsed { transform: rotate(-90deg); }
.optional-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  background: var(--bg);
  border-radius: 100px;
  padding: 3px 10px;
  margin-left: 4px;
}

/* ═══ Forms ═══ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .grid-2 { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { margin-bottom: 16px; }
label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  transition: color .2s;
}
label .req { color: var(--danger); margin-left: 2px; }
label .opt { font-weight: 400; color: var(--faint); font-size: 12px; }
.form-group:focus-within > label { color: var(--brand); }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="month"], input[type="url"],
textarea, select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  min-height: 48px;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46,107,230,.14);
}
input.error, textarea.error { border-color: var(--danger); }
input.error:focus, textarea.error:focus { box-shadow: 0 0 0 3px rgba(214,69,93,.14); }
textarea { resize: vertical; line-height: 1.55; }
::placeholder { color: var(--faint); }

.field-error {
  font-size: var(--fs-xs);
  color: var(--danger);
  display: none;
}
.field-error.show { display: block; }
.hint-text { font-size: var(--fs-xs); color: var(--faint); margin-top: 6px; }

.checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: var(--brand);
}
.checkbox-row label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); cursor: pointer; }

/* ═══ Photo upload ═══ */
.photo-wrap { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
/* On narrow screens the note text wraps and makes the actions column tall;
   top-align so the circle sits beside the Upload button instead of floating */
@media (max-width: 400px) {
  .photo-wrap { align-items: flex-start; gap: 16px; }
}
.photo-circle {
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg);
  transition: border-color .2s, background .2s;
}
.photo-circle:hover { border-color: var(--brand); background: var(--brand-tint); }
.photo-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}
.photo-placeholder .icon { width: 22px; height: 22px; }
.photo-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-upload {
  background: none;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 10px;
  padding: 11px 18px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
  align-self: flex-start;
}
.btn-upload:hover { background: var(--brand-tint); }
.btn-remove-photo {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  border-radius: 10px;
  padding: 11px 18px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: none;
  transition: border-color .2s, color .2s;
  align-self: flex-start;
}
.btn-remove-photo:hover { border-color: var(--danger); color: var(--danger); }
#photoInput { display: none; }
.photo-note { font-size: 12px; color: var(--faint); line-height: 1.5; }

/* ═══ Chips (sectors) ═══ */
.chips-wrap { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chip {
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface);
  font-family: inherit;
  transition: border-color .2s, color .2s, background .2s;
  user-select: none;
  min-height: 44px;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

/* ═══ Entry cards (work / edu / cert) ═══ */
.entry-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
}
.entry-card .entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.entry-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: 100px;
  padding: 4px 12px;
}
.btn-remove-entry {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--faint);
  font-size: 1.15rem;
  line-height: 1;
  min-width: 44px;   /* comfortable tap target for a destructive action */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.btn-remove-entry:hover { color: var(--danger); background: var(--danger-tint); }

.btn-add {
  width: 100%;
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 6px;
  min-height: 48px;
}
.btn-add:hover { border-color: var(--brand); background: var(--brand-tint); }

/* ═══ Skills input ═══ */
.skills-input-wrap {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: 50px;
  cursor: text;
  transition: border-color .2s, box-shadow .2s;
  background: var(--surface);
}
.skills-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46,107,230,.14);
}
.skill-tag {
  background: var(--brand-tint);
  color: var(--brand-hover);
  border-radius: 8px;
  padding: 4px 6px 4px 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.skill-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  padding: 4px 8px;
  opacity: .65;
  transition: opacity .15s;
}
.skill-tag button:hover { opacity: 1; }
#skillInput, #softSkillInput {
  border: none !important;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  flex: 1;
  min-width: 130px;
  padding: 4px 0;
  min-height: 0;
  background: transparent;
  box-shadow: none !important;
}

/* ═══ Fork (path choice) ═══ */
.fork-wrap { max-width: 880px; margin: 0 auto; text-align: center; }
.fork-heading {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.fork-subheading { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 32px; }
.fork-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 640px) { .fork-grid { grid-template-columns: 1fr; } }
.fork-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  cursor: pointer;
  transition: border-color .25s, box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.fork-card:hover, .fork-card:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
@media (prefers-reduced-motion: no-preference) {
  .fork-card:hover { transform: translateY(-4px); }
}
.fork-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46,107,230,.18);
}
.fork-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fork-icon .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.fork-label {
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.015em;
  color: var(--ink);
}
.fork-desc { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.fork-cta {
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fork-card:hover .fork-cta .icon { transform: translateX(3px); }
.fork-cta .icon { transition: transform .25s var(--ease-out); width: 16px; height: 16px; }
.free-pill {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--success-tint);
  color: var(--on-tint-success);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  border-radius: 100px;
  padding: 4px 12px;
}
.free-pill.pill-soon { background: var(--danger-tint); color: var(--on-tint-danger); }
.fork-reassurance {
  font-size: var(--fs-xs);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.fork-reassurance .icon { width: 14px; height: 14px; }

/* ═══ Step nav row ═══ */
.step-nav { display: flex; gap: 12px; margin-top: 28px; }
.step-nav .btn-next { flex: 1; }

/* ═══ Alerts ═══ */
.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: var(--fs-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-info    { background: var(--brand-tint); border: 1px solid rgba(46,107,230,.2); color: var(--brand-hover); }
.alert-success { background: var(--success-tint); border: 1px solid rgba(14,158,94,.25); color: #0A7A48; }
.alert-error   { background: var(--danger-tint); border: 1px solid rgba(214,69,93,.25); color: #B03049; }
.alert .alert-icon { flex-shrink: 0; margin-top: 2px; display: flex; }
.alert .icon { width: 17px; height: 17px; }

/* ═══ Step 4 — result layout ═══ */
.result-layout { width: 100%; max-width: 820px; margin: 0 auto; }

.result-alert {
  display: none;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 20px;
  align-items: center;
  gap: 10px;
}
.result-alert.alert-success { display: flex; }
.result-alert.alert-error   { display: flex; }

.result-resume-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 48px 56px;
  box-shadow: var(--shadow-md);
  min-height: 200px;
  position: relative;
}
@media (max-width: 600px) { .result-resume-card { padding: 28px 20px; } }

@media (prefers-reduced-motion: no-preference) {
  #resumeResult { animation: resultRise .6s var(--ease-out) both; }
  @keyframes resultRise {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

/* ── Resume document preview — conservative navy ── */
.result-resume-content {
  font-family: Calibri, 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #1A2333;
}
.result-resume-content .rh-name { font-size: 21px; font-weight: 700; color: #1F3A64; text-align: center; }
.result-resume-content .rh-role { font-size: 10px; font-weight: 700; color: #8B99B0; text-align: center; letter-spacing: 0.12em; }
.result-resume-content .rh-contact { font-size: 12px; color: #4A5568; text-align: center; }
.result-resume-content .rh-personal { font-size: 11px; color: #6B7A94; text-align: center; margin-bottom: 4px; }
.result-resume-content .rh-header { text-align: center; margin-bottom: 6px; }
.result-resume-content .rh-photo { width: 76px; height: 76px; margin: 0 auto 8px; }
.result-resume-content .rh-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.result-resume-content .rh-rule { border: none; border-top: 2px solid #1F3A64; margin: 8px 0 14px 0; }
.result-resume-content .rh-heading { font-size: 11px; font-weight: 700; color: #1F3A64; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1.5px solid #1F3A64; padding-bottom: 3px; margin-top: 18px; margin-bottom: 8px; }
.result-resume-content .rh-summary { font-size: 14px; color: #1A2333; line-height: 1.75; margin-bottom: 4px; text-align: left; }
.result-resume-content .rh-job-title { font-size: 14px; font-weight: 700; color: #1A2333; margin-top: 4px; }
.result-resume-content .rh-job-title.rh-job-gap { margin-top: 14px; }
.result-resume-content .rh-job-dates { float: right; font-weight: 400; font-size: 12px; color: #5B6B85; }
.result-resume-content .rh-company { font-size: 13px; font-style: italic; color: #1F3A64; margin-bottom: 2px; }
.result-resume-content .rh-bullet { font-size: 13px; color: #4A5568; padding-left: 16px; position: relative; }
.result-resume-content .rh-bullet::before { content: '\2013 '; color: #1F3A64; font-weight: 700; position: absolute; left: 0; }
.result-resume-content .rh-edu-line { font-size: 14px; font-weight: 700; color: #1A2333; }
.result-resume-content .rh-edu-year { float: right; font-weight: 400; font-size: 12px; color: #5B6B85; }
.result-resume-content .rh-edu-school { font-size: 13px; font-style: italic; color: #4A5568; }
.result-resume-content .rh-honors { font-size: 13px; color: #1F3A64; font-weight: 600; }
.result-resume-content .rh-cert-line { font-size: 13px; color: #1A2333; }
.result-resume-content .rh-cert-detail { font-size: 12px; color: #4A5568; }
.result-resume-content .rh-ref-name { font-size: 14px; font-weight: 700; color: #1A2333; }
.result-resume-content .rh-ref-phone { float: right; font-weight: 400; font-size: 12px; color: #5B6B85; }
.result-resume-content .rh-ref-title { font-size: 12px; font-style: italic; color: #1F3A64; margin-bottom: 4px; }
.result-resume-content .rh-footer { text-align: center; font-size: 10px; color: #8B99B0; font-style: italic; border-top: 1px solid #1F3A64; padding-top: 6px; margin-top: 24px; }
.result-resume-content .rh-text { font-size: 14px; color: #1A2333; }
.result-resume-content .rh-muted { font-size: 14px; font-style: italic; color: #4A5568; }

/* ── Download / print actions ── */
.result-actions { display: flex; gap: 12px; margin-top: 24px; }
@media (max-width: 600px) {
  .result-actions {
    flex-direction: column;
    position: sticky;
    bottom: 0;
    padding: 12px 0 16px;
    background: linear-gradient(to top, var(--bg) 78%, transparent);
    z-index: 5;
  }
}
.result-action-btn { flex: 1; display: flex; flex-direction: column; }
.btn-result-docx {
  width: 100%;
  min-height: 52px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 2px 8px rgba(46,107,230,.25), 0 8px 24px rgba(46,107,230,.18);
  transition: background .2s, transform .25s var(--ease-out), box-shadow .25s;
}
.btn-result-docx:hover { background: var(--brand-hover); }
.btn-result-docx:active { transform: scale(.985); }
.btn-result-docx:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-result-print {
  width: 100%;
  min-height: 52px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, color .2s, transform .25s var(--ease-out);
}
.btn-result-print:hover { border-color: var(--brand); color: var(--brand); }
.btn-result-print:active { transform: scale(.985); }
.btn-result-print:disabled { opacity: .4; cursor: not-allowed; }
.result-action-hint {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  display: block;
  margin-top: 7px;
}

/* ── Tips ── */
.result-tips { margin-top: 32px; }
.result-tips-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.result-tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .result-tips-grid { grid-template-columns: 1fr; } }
.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.tip-card::before {
  content: '→';
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
}

.resume-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--muted);
  text-align: center;
  gap: 12px;
}
.resume-placeholder .big-icon { color: var(--faint); }
.resume-placeholder .big-icon .icon { width: 44px; height: 44px; stroke-width: 1.4; }
.resume-placeholder p { font-size: var(--fs-sm); max-width: 280px; }

/* ═══ Shared ═══ */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ═══ Progress (generate & match) ═══ */
.analysis-progress {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 56px 20px;
}
.progress-percent {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.analysis-progress .progress-bar-wrap {
  width: 100%; max-width: 320px; height: 6px;
  background: var(--border); border-radius: 100px; overflow: hidden;
  margin: 0; padding: 0;
}
.analysis-progress .progress-bar-fill {
  height: 100%; width: 0%; border-radius: 100px;
  background: linear-gradient(to right, var(--brand), var(--brand-hover));
  transition: width .4s ease;
}
.progress-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; text-align: center; }

/* ═══ Match results ═══ */
.score-ring-wrap {
  position: relative;
  width: 148px; height: 148px;
  margin: 8px auto 4px;
}
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
}
.score-ring .ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1.2s var(--ease-out);
}
.score-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.score-caption {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--faint);
}
.score-encouragement { font-size: var(--fs-sm); color: var(--muted); margin-top: 6px; }

.kw-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-chip {
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.kw-chip .icon { width: 13px; height: 13px; }
.kw-hit { background: var(--success-tint); color: #0A7A48; }
.kw-miss { background: var(--danger-tint); color: #B03049; border: 1px dashed rgba(214,69,93,.4); }
.kw-note { font-size: var(--fs-xs); color: var(--faint); margin-top: 10px; line-height: 1.5; }

.match-section-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 20px 0 10px;
}
.gap-info-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  margin-bottom: 8px;
}
.gap-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  letter-spacing: .03em;
  padding: 3px 10px; border-radius: 100px; margin-top: 2px;
}
.gap-badge.gap  { background: var(--danger-tint); color: var(--on-tint-danger); }
.gap-badge.tip  { background: var(--brand-tint); color: var(--on-tint-brand); }
.gap-badge.interview { background: var(--success-tint); color: var(--on-tint-success); }
.gap-info-text { font-size: var(--fs-sm); color: var(--ink); line-height: 1.55; }

/* ═══ Step 4 review ═══ */
.review-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.review-row:last-child { border-bottom: none; }
.review-row-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-row-icon .icon { width: 17px; height: 17px; }
.review-row-label { font-size: var(--fs-xs); color: var(--muted); width: 92px; flex-shrink: 0; }
.review-row-value { font-size: var(--fs-sm); color: var(--ink); font-weight: 600; }
.step4-center-card { max-width: 560px; margin: 0 auto; }

/* ═══ Upload dropzone ═══ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.upload-zone-icon {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
}
.upload-zone-icon .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.upload-zone-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.upload-zone-hint { font-size: var(--fs-xs); color: var(--faint); }

/* ═══ Modal ═══ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(22,35,63,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: modalUp .35s var(--ease-out);
}
@keyframes modalUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer;
  color: var(--faint); padding: 6px 10px;
  border-radius: 8px; line-height: 1;
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 4px; }
.modal-kicker { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 16px; }
.modal-body-text { font-size: var(--fs-sm); color: var(--ink); line-height: 1.7; margin-bottom: 14px; }
.modal-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.modal-pill {
  font-size: var(--fs-xs);
  border-radius: 100px;
  padding: 6px 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.modal-pill .icon { width: 13px; height: 13px; }
.modal-pill.p-brand { background: var(--brand-tint); color: var(--on-tint-brand); }
.modal-pill.p-green { background: var(--success-tint); color: var(--on-tint-success); }
.modal-pill.p-gold  { background: rgba(245,180,40,.14); color: var(--on-tint-gold); }

/* ═══ Skeleton / spinner ═══ */
.spinner-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 280px; gap: 16px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg {
  font-size: var(--fs-sm); color: var(--muted); font-weight: 500;
  text-align: center; max-width: 260px;
}

/* ═══ Momentum scroll ═══ */
.result-resume-content, #matchGapList, .section-body { -webkit-overflow-scrolling: touch; }

/* ═══ Print ═══ */
@media print {
  .flag-bar, nav, .hero, #landingSections, .stepper-wrap, .progress-bar-wrap,
  .step-panel:not(.active), .step-nav, .result-layout > :not(.result-resume-card),
  .section-header, .section-body,
  #step4Review, #step4Progress, #draftBanner, #aboutModal,
  .result-actions, .result-tips, .result-alert,
  ins.adsbygoogle, .google-auto-placed { display: none !important; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body  { background: white !important; margin: 0 !important; padding: 0 !important; }
  .main { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
  .result-layout { max-width: 100% !important; }
  .result-resume-card {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  .result-resume-content {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    color: #000 !important;
  }
  @page { size: Letter portrait; margin: 0.75in; }
}
