/* CV Builder page styles.
   Dynamic theme tokens (--cv-primary, --cv-heading, ...) are set inline
   in builder.html because they depend on the saved CV profile. */

@media (min-width: 993px) {
  .main-content:has(.cv-builder-wrap) { margin-left: 280px !important; }
  .cv-builder-wrap { padding-left: 2.5rem; }
}
.cv-builder-split-wrap { width: 100%; height: calc(100vh - 100px); max-height: calc(100vh - 100px); overflow: hidden; }
.cv-builder-split-wrap-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; height: 100%; min-height: 0; align-items: stretch; width: 100%; }
.cv-builder-page { display: contents; }
@media (max-width: 992px) {
  .cv-builder-split-wrap-inner { grid-template-columns: 1fr; }
  .cv-builder-wrap { padding: 0; margin: 0; width: 100%; }
  .cv-builder-split-wrap { height: auto; max-height: none; overflow: visible; }
  body.volunteer-portal .main-content:has(.cv-builder-wrap) {
    padding-left: 9px !important;
    padding-right: 9px !important;
    padding-bottom: 9px !important;
  }
  .main-content:has(.cv-builder-wrap) .container-fluid {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }
}
.cv-form-panel { background: var(--cv-form-bg); padding: 1.25rem 1.5rem 1.25rem 2.5rem; padding-left: 2.5rem; overflow-y: auto; font-family: "Segoe UI", Arial, Helvetica, sans-serif; font-size: 1rem; }
.cv-form-panel h4 { font-size: 1.35rem; font-weight: 700; }
@media (min-width: 993px) { .cv-form-panel { padding-left: 3rem; } }
.cv-form-panel .section-head { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; letter-spacing: 0.02em; }
.cv-form-panel .section-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.15rem; }
.cv-form-section { background: var(--cv-form-card); border: 1px solid var(--cv-form-border); border-radius: var(--cv-form-radius); padding: 1rem; margin-bottom: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.cv-form-panel label { font-weight: 600; font-size: 1rem; color: var(--text); }
.cv-form-panel .form-control, .cv-form-panel .form-select { border-radius: 8px; border: 1px solid rgba(0,0,0,0.12); font-size: 1rem; padding: 0.5rem 0.75rem; }
.cv-form-panel textarea.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  resize: vertical;
}
.cv-form-panel .form-control:focus, .cv-form-panel .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.15); outline: none; }
.cv-form-panel .card { background: var(--cv-form-card); border: 1px solid var(--cv-form-border); border-radius: var(--cv-form-radius); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.cv-form-panel .card-body { padding: 1rem; }
.cv-form-panel .card .row.g-1 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
.cv-form-panel a { color: var(--primary); }
.cv-form-panel a:hover { color: var(--deeper); }
.cv-form-panel .text-muted { color: var(--text-muted) !important; font-size: 0.95rem !important; }
.cv-form-panel .small { font-size: 0.95rem !important; }
.btn-add-another { font-size: 1rem; padding: 8px 14px; background: var(--deeper) !important; color: white !important; border: none !important; border-radius: 8px; }
.btn-add-another:hover { color: white !important; background: var(--primary) !important; }
.btn-remove-another {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border: 1px solid #dc3545 !important;
  color: #dc3545 !important;
  background: #fff !important;
  border-radius: 8px;
  box-shadow: none !important;
  width: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
}
.btn-remove-another:hover { background: #dc3545 !important; color: #fff !important; }
.cv-add-remove-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.cv-exp-dates { margin-bottom: 0.25rem; }
.cv-exp-dates__group { margin-bottom: 0.65rem; }
.cv-exp-dates__group:last-of-type { margin-bottom: 0.35rem; }
.cv-exp-dates__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.35rem;
}
.cv-exp-dates .form-select {
  min-height: 2.75rem;
  font-size: 1rem;
}
.cv-exp-dates__current {
  margin: 0.15rem 0 0;
  padding-left: 1.65rem;
}
@media (min-width: 993px) {
  .cv-exp-dates__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .cv-exp-dates__group { margin-bottom: 0; }
}
#skill-forms-container.cv-skills-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  border-radius: 14px;
  border: 1px dashed rgba(107, 33, 168, 0.3);
  background: linear-gradient(180deg, rgba(107, 33, 168, 0.06) 0%, rgba(255, 255, 255, 0.95) 100%);
}
#skill-forms-container .cv-skill-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0;
}
#skill-forms-container .cv-skill-row__icon {
  flex-shrink: 0;
  width: 2.5rem;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(107, 33, 168, 0.12);
  color: var(--primary, #6b21a8);
  font-size: 1rem;
  aspect-ratio: 1;
}
#skill-forms-container .cv-skill-row__field { flex: 1; min-width: 0; }
#skill-forms-container .cv-skill-name-input,
#skill-forms-container .skill-block .form-control {
  width: 100%;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(107, 33, 168, 0.2);
  background: #fff;
  min-height: 2.75rem;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#skill-forms-container .cv-skill-name-input::placeholder { color: #94a3b8; }
#skill-forms-container .cv-skill-name-input:focus,
#skill-forms-container .skill-block .form-control:focus {
  border-color: var(--primary, #6b21a8);
  box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.14);
  outline: none;
}
.cv-block-removed { display: none !important; }
.cv-exp-block__foot,
.cv-edu-block__foot { display: flex; justify-content: flex-end; margin: 0.35rem 0 0; }
.cv-exp-remove-btn,
.cv-edu-remove-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  line-height: 1.35;
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #dc3545;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}
.cv-exp-remove-btn:hover,
.cv-edu-remove-btn:hover { background: #dc3545; color: #fff; border-color: #dc3545; }
.cv-exp-bullets { margin-bottom: 0.25rem; }
.cv-exp-bullets__list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.45rem; }
.cv-exp-bullet-row { display: flex; align-items: center; gap: 0.35rem; }
.cv-exp-bullet-row .cv-exp-bullet-input { flex: 1; min-width: 0; }
.cv-exp-bullet-remove {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid rgba(220, 53, 69, 0.35);
  border-radius: 4px;
  background: transparent;
  color: #dc3545;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.cv-exp-bullet-remove:hover { background: #dc3545; color: #fff; border-color: #dc3545; }
.cv-exp-bullet-add {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  line-height: 1.35;
  border: 1px solid rgba(107, 33, 168, 0.25);
  color: var(--primary, #6b21a8);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}
.cv-exp-bullet-add:hover { background: rgba(107, 33, 168, 0.08); border-color: rgba(107, 33, 168, 0.4); }
.color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.color-row input[type="color"] { width: 40px; height: 36px; padding: 2px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(107, 33, 168, 0.25); }
.color-row input[type="text"] { flex: 1; max-width: 100px; font-family: monospace; font-size: 0.9rem; }
.btn-cv { background: var(--grad); color: white; border: none; border-radius: 10px; padding: 10px 20px; font-weight: 600; font-size: 1rem; }
.btn-cv:hover { opacity: 0.9; color: white; }
.btn-cv-download { background: var(--deeper); color: white !important; }
.btn-cv-download:hover { color: white !important; background: var(--primary) !important; }
.cv-form-actions { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--cv-form-border); display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.cv-preview-panel { background: var(--cv-bg); padding: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: auto; min-height: 0; }
.cv-preview-sheet-wrap { transform: scale(0.82); transform-origin: top center; width: 100%; max-width: 120%; }
@media (min-width: 1200px) { .cv-preview-sheet-wrap { transform: scale(0.9); } }
@media (max-width: 992px) { .cv-preview-sheet-wrap { transform: none; max-width: 100%; } }
.cv-preview-sheet { width: 100%; max-width: 210mm; margin: 0 auto; background: var(--cv-bg); color: var(--cv-text); font-size: 11pt; line-height: 1.5; padding: 50px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); font-family: 'Reddit Sans', "Segoe UI", Arial, sans-serif; box-sizing: border-box; overflow-x: hidden; min-width: 0; }
.cv-preview-sheet .cv-name { font-size: 20pt; font-weight: 700; color: var(--cv-heading); margin: 0 0 4px 0; letter-spacing: 0.01em; }
.cv-preview-sheet .cv-contact { font-size: 10pt; color: var(--cv-text); margin-bottom: 6px; line-height: 1.4; }
.cv-preview-sheet .cv-contact__email { color: inherit; text-decoration: underline; }
.cv-preview-sheet .cv-contact-divider {
  border: none;
  border-top: 1px solid var(--cv-heading);
  margin: 0 0 18px 0;
  opacity: 0.85;
}
.cv-preview-sheet .cv-job-title-wrap { margin: 0 0 20px 0; }
.cv-preview-sheet .cv-job-title-line { display: none; }
.cv-preview-sheet .cv-job-title { font-size: 11pt; font-weight: 600; color: var(--cv-heading); display: block; }
.cv-preview-sheet .cv-section-head { display: flex; align-items: stretch; margin: 18px 0 10px 0; min-height: 28px; }
.cv-preview-sheet .cv-job-title-wrap + .cv-section-head { margin-top: 0; }
.cv-preview-sheet .cv-section-block { width: 6px; flex-shrink: 0; background: var(--cv-primary); }
.cv-preview-sheet .cv-section-banner { flex: 1; display: flex; align-items: center; padding: 6px 12px; background: rgba(var(--cv-primary-rgb), 0.14); }
.cv-preview-sheet .cv-section-title { font-size: 10pt; font-weight: 700; color: var(--cv-heading); text-transform: uppercase; letter-spacing: 0.06em; }
.cv-preview-sheet .cv-section-line { display: none; }
.cv-preview-sheet .cv-summary { margin-bottom: 0; font-size: 11pt; line-height: 1.55; color: var(--cv-text); max-width: 100%; white-space: pre-line; overflow-wrap: anywhere; word-break: break-all; }
.cv-preview-sheet .cv-exp-item { margin-bottom: 14px; }
.cv-preview-sheet .cv-exp-company { font-weight: 600; color: var(--cv-heading); font-size: 11pt; }
.cv-preview-sheet .cv-exp-role { font-size: 11pt; color: var(--cv-text); margin: 1px 0 5px 0; }
.cv-preview-sheet .cv-exp-desc {
  font-size: 10.5pt;
  line-height: 1.5;
  margin: 0;
  padding: 0 14px 0 0;
  color: var(--cv-text);
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}
.cv-preview-sheet .cv-exp-desc ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  max-width: 100%;
  box-sizing: border-box;
}
.cv-preview-sheet .cv-exp-desc li {
  position: relative;
  margin: 0 0 0.2em;
  padding: 0 0 0 0.9em;
  overflow-wrap: break-word;
  max-width: 100%;
}
.cv-preview-sheet .cv-exp-desc li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  line-height: inherit;
}
.cv-preview-sheet .cv-edu-item { margin-bottom: 8px; }
.cv-preview-sheet .cv-edu-line { font-weight: 600; color: var(--cv-heading); font-size: 11pt; }
.cv-preview-sheet .cv-skills-list { display: flex; flex-direction: column; row-gap: 0.35em; margin: 0; padding: 0; width: 100%; font-size: 11pt; line-height: 1.6; color: var(--cv-text); box-sizing: border-box; }
.cv-preview-sheet .cv-skills-row { width: 100%; box-sizing: border-box; }
.cv-preview-sheet .cv-skills-row--count-1,
.cv-preview-sheet .cv-skills-row--count-2,
.cv-preview-sheet .cv-skills-row--count-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.cv-preview-sheet .cv-skills-row--count-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; }
.cv-preview-sheet .cv-skills-row--count-1 .cv-skill-item:nth-child(1) { grid-column: 1; justify-self: start; }
.cv-preview-sheet .cv-skills-row--count-2 .cv-skill-item:nth-child(1) { grid-column: 1; justify-self: start; }
.cv-preview-sheet .cv-skills-row--count-2 .cv-skill-item:nth-child(2) { grid-column: 2; justify-self: center; }
.cv-preview-sheet .cv-skills-row--count-3 .cv-skill-item:nth-child(1) { grid-column: 1; justify-self: start; }
.cv-preview-sheet .cv-skills-row--count-3 .cv-skill-item:nth-child(2) { grid-column: 2; justify-self: center; }
.cv-preview-sheet .cv-skills-row--count-3 .cv-skill-item:nth-child(3) { grid-column: 3; justify-self: end; }
.cv-preview-sheet .cv-skills-row--count-4 .cv-skill-item:nth-child(1) { grid-column: 1; justify-self: start; }
.cv-preview-sheet .cv-skills-row--count-4 .cv-skill-item:nth-child(2) { grid-column: 2; justify-self: center; }
.cv-preview-sheet .cv-skills-row--count-4 .cv-skill-item:nth-child(3) { grid-column: 3; justify-self: center; }
.cv-preview-sheet .cv-skills-row--count-4 .cv-skill-item:nth-child(4) { grid-column: 4; justify-self: end; }
.cv-preview-sheet .cv-skill-item { margin: 0; font-weight: 700; flex: 0 0 auto; white-space: nowrap; }
.cv-preview-sheet .cv-skill-item::before { content: "\2022\00a0"; }
.cv-preview-sheet .cv-ref { text-align: center; font-size: 9pt; font-style: italic; color: var(--cv-text); opacity: 0.7; margin-top: 28px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.08); }
.cv-top-banner {
  margin: -50px -50px 20px -50px;
  background: linear-gradient(135deg, var(--cv-banner-color) 0%, var(--cv-banner-color-end, var(--cv-banner-color)) 100%);
}
.cv-preview-sheet[data-banner-style=""] .cv-top-banner { display: none; }
.cv-preview-sheet[data-banner-style="line"] .cv-top-banner { height: 5px; }
.cv-preview-sheet[data-banner-style="block"] .cv-top-banner { height: 20px; }
.cv-preview-sheet[data-banner-style="curve"] .cv-top-banner { height: 28px; border-radius: 0 0 50% 50% / 0 0 16px 16px; }
.cv-preview-sheet[data-banner-style="angle"] .cv-top-banner { height: 26px; clip-path: polygon(0 0, 100% 0, 100% 65%, 0 100%); }
.cv-preview-highlight { border-radius: 4px; box-shadow: 0 0 0 2px #6b21a8, 0 0 0 3px rgba(126, 34, 206, 0.85), 0 0 0 4px rgba(190, 24, 93, 0.75); }
.cv-preview-sheet.cv-highlight-primary .cv-section-head { border-radius: 4px; box-shadow: 0 0 0 2px #6b21a8, 0 0 0 3px rgba(126, 34, 206, 0.85), 0 0 0 4px rgba(190, 24, 93, 0.75); }
.cv-preview-sheet.cv-highlight-heading .cv-name, .cv-preview-sheet.cv-highlight-heading .cv-job-title, .cv-preview-sheet.cv-highlight-heading .cv-section-title, .cv-preview-sheet.cv-highlight-heading .cv-exp-company, .cv-preview-sheet.cv-highlight-heading .cv-edu-line { border-radius: 4px; box-shadow: 0 0 0 2px #6b21a8, 0 0 0 3px rgba(126, 34, 206, 0.85), 0 0 0 4px rgba(190, 24, 93, 0.75); }
.cv-preview-sheet.cv-highlight-text .cv-contact, .cv-preview-sheet.cv-highlight-text .cv-summary, .cv-preview-sheet.cv-highlight-text #pv-experience, .cv-preview-sheet.cv-highlight-text .cv-skills-list, .cv-preview-sheet.cv-highlight-text #pv-education, .cv-preview-sheet.cv-highlight-text .cv-ref { border-radius: 4px; box-shadow: 0 0 0 2px #6b21a8, 0 0 0 3px rgba(126, 34, 206, 0.85), 0 0 0 4px rgba(190, 24, 93, 0.75); }
.cv-wizard-finish__hint-mobile { display: none; }
.cv-wizard-step { display: none; }
.cv-wizard-step.is-active { display: block; animation: cvWizardIn 0.28s ease; }
@keyframes cvWizardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .cv-wizard-step.is-active { animation: none; } }
.cv-wizard-progress { margin-bottom: 1.25rem; }
.cv-wizard-progress__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(107, 33, 168, 0.12);
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.cv-wizard-progress__fill {
  height: 100%;
  width: 14.28%;
  border-radius: inherit;
  background: var(--grad, linear-gradient(135deg, #8931A1 0%, #A92176 100%));
  transition: width 0.35s ease;
}
.cv-wizard-progress__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cv-wizard-progress__list li { list-style: none; margin: 0; padding: 0; }
.cv-wizard-progress__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--cv-form-border);
  border-radius: 999px;
  background: var(--cv-form-card);
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.cv-wizard-progress__item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}
.cv-wizard-progress__item.is-complete { color: var(--primary, #6b21a8); border-color: rgba(107, 33, 168, 0.25); }
.cv-wizard-progress__item.is-complete::before { opacity: 1; background: var(--primary, #6b21a8); }
.cv-wizard-progress__item.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--grad, linear-gradient(135deg, #8931A1 0%, #A92176 100%));
}
.cv-wizard-progress__item.is-active::before { background: #fff; opacity: 1; }
.cv-wizard-progress__mobile-label {
  display: none;
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary, #6b21a8);
  letter-spacing: 0.01em;
}
.cv-wizard-nav {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--cv-form-border);
  background: linear-gradient(180deg, rgba(250, 247, 255, 0.65) 0%, var(--cv-form-bg) 35%);
}
.cv-wizard-nav__indicator {
  flex: 1;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  line-height: 1.3;
}
.btn-cv-step {
  min-width: 7.5rem;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 1rem;
}
.btn-cv-step:hover:not(:disabled) { opacity: 0.92; color: #fff; }
.btn-cv-step:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.btn-cv-step--ghost {
  background: #f5f3ff;
  color: #6b21a8 !important;
  border: 1px solid rgba(107, 33, 168, 0.28);
}
.btn.btn-cv-step--ghost:hover:not(:disabled) {
  background: #ede9fe;
  color: #4c1d95 !important;
  opacity: 1;
}
.btn.btn-cv-step--ghost:disabled {
  opacity: 1;
  color: rgba(107, 33, 168, 0.4) !important;
  background: #f8f5ff;
}
.cv-wizard-finish { text-align: center; padding: 0.5rem 0 0.25rem; }
.cv-wizard-finish .section-label {
  display: inline-block;
  background: linear-gradient(135deg, rgba(107, 33, 168, 0.12), rgba(190, 24, 93, 0.1));
  color: #6b21a8;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.cv-wizard-finish__title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.45rem;
  background: linear-gradient(135deg, #6b21a8, #be185d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cv-wizard-finish__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1rem; }
@media (max-width: 576px) {
  .cv-wizard-progress__item { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
  .btn-cv-step { min-width: 0; flex: 1; }
  .cv-add-remove-row .btn-add-another {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
  }
  .btn-remove-another {
    font-size: 0.78rem;
    line-height: 1.2;
    padding: 0.28rem 0.5rem;
    max-width: none;
  }
}
/* Mobile: step wizard, edge-to-edge with 9px page margin */
@media (max-width: 992px) {
  .cv-builder-wrap {
    --cv-mobile-bottom-stack: 9.25rem;
  }
  .cv-form-panel {
    padding: 0.65rem 0 calc(var(--cv-mobile-bottom-stack) + 0.5rem);
    overflow-y: visible;
    background: var(--cv-form-bg);
  }
  .cv-form-panel h4 { font-size: 1.15rem; }
  .cv-form-section {
    border-radius: 12px;
    margin-bottom: 0.65rem;
    padding: 0.9rem 0.75rem;
    box-shadow: none;
  }
  .cv-wizard-progress {
    margin-bottom: 0.85rem;
    padding: 0 0.15rem;
  }
  .cv-wizard-progress__mobile-label { display: block; }
  .cv-wizard-progress__list { display: none; }
  .cv-mobile-bottom-stack {
    position: fixed;
    left: 9px;
    right: 9px;
    bottom: max(9px, env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
  }
  .cv-mobile-bottom-stack > * {
    pointer-events: auto;
  }
  .cv-mobile-preview-bar {
    position: static;
    width: 100%;
  }
  .cv-mobile-preview-bar .cv-preview-toggle {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
  }
  .cv-wizard-nav {
    position: static;
    margin: 0;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--cv-form-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  }
  .cv-wizard-nav__indicator { display: none; }
  .cv-wizard-finish__actions .btn { flex: 1 1 100%; }
  .cv-preview-panel {
    display: flex !important;
    flex-direction: column;
    margin-top: 0.5rem;
    padding: 0;
    background: transparent;
  }
  .cv-preview-panel:not(.cv-preview-panel--collapsed) {
    padding-bottom: calc(var(--cv-mobile-bottom-stack) + 0.5rem);
  }
  .cv-preview-panel__mobile-head {
    display: none;
    align-items: center;
    width: 100%;
    margin-bottom: 0.35rem;
    padding: 0 0.15rem;
  }
  .cv-preview-panel:not(.cv-preview-panel--collapsed) .cv-preview-panel__mobile-head {
    display: flex;
  }
  .cv-preview-panel__mobile-label {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary, #6b21a8);
  }
  .cv-preview-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    border: 1px solid rgba(107, 33, 168, 0.22);
    background: #fff;
    color: var(--primary, #6b21a8);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .cv-preview-toggle:hover {
    background: rgba(107, 33, 168, 0.06);
    border-color: rgba(107, 33, 168, 0.35);
  }
  .cv-preview-toggle__icon {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
  }
  .cv-preview-panel--collapsed .cv-preview-sheet-wrap {
    display: none;
  }
  .cv-preview-panel .cv-preview-sheet {
    padding: 28px 22px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border-radius: 12px;
    max-height: none;
    overflow: visible;
  }
  .cv-preview-panel .cv-top-banner { margin: -28px -22px 16px -22px; }
  .cv-preview-panel,
  .cv-preview-sheet,
  .cv-preview-zone {
    scroll-margin-top: 5rem;
    scroll-margin-bottom: calc(var(--cv-mobile-bottom-stack) + 1rem);
  }
  .cv-wizard-finish__hint-mobile { display: block; }
  .cv-wizard-finish__hint-desktop { display: none; }
}
@media (min-width: 993px) {
  .cv-wizard-progress__mobile-label { display: none; }
  .cv-mobile-bottom-stack {
    display: block;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    pointer-events: auto;
  }
  .cv-mobile-preview-bar { display: none; }
  .cv-wizard-nav {
    position: sticky;
    bottom: 0;
    margin-top: 1rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px solid var(--cv-form-border);
    background: linear-gradient(180deg, rgba(250, 247, 255, 0.65) 0%, var(--cv-form-bg) 35%);
    box-shadow: none;
    border-radius: 0;
  }
  .cv-preview-panel__mobile-head { display: none; }
  .cv-wizard-finish__hint-mobile { display: none; }
  .cv-wizard-finish__hint-desktop { display: block; }
}
.cv-builder-wrap > .ah-hero { margin-bottom: 1rem; }
@media (max-width: 992px) {
  .cv-builder-wrap > .ah-hero {
    border-radius: 16px;
    padding: 1.15rem 1rem 1rem;
    margin-bottom: 0.65rem;
  }
  .cv-builder-wrap > .ah-hero .ah-hero__avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }
  .cv-builder-wrap > .ah-hero .ah-hero__title { font-size: 1.2rem; }
  .cv-builder-wrap > .ah-hero .ah-hero__sub { font-size: 0.88rem; }
}

/* "Add from your volunteering" suggestions */
.cv-vol-suggest {
  border: 1px dashed rgba(107, 33, 168, 0.3);
  background: linear-gradient(180deg, rgba(107, 33, 168, 0.06) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.cv-vol-suggest__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--primary, #6b21a8);
  font-size: 0.95rem;
}
.cv-vol-suggest__hint { font-size: 0.85rem; color: var(--text-muted, #64748b); margin: 0.15rem 0 0.65rem; }
.cv-vol-suggest__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  background: #fff;
  border: 1px solid var(--cv-form-border, #e2e8f0);
  border-radius: 10px;
  margin-bottom: 0.45rem;
}
.cv-vol-suggest__item:last-child { margin-bottom: 0; }
.cv-vol-suggest__text { min-width: 0; font-size: 0.92rem; color: var(--text, #1f2937); }
.cv-vol-suggest__meta { display: block; font-size: 0.8rem; color: var(--text-muted, #64748b); margin-top: 0.1rem; }
.cv-vol-suggest__add {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--primary, #6b21a8);
  color: var(--primary, #6b21a8);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cv-vol-suggest__add:hover:not(:disabled) { background: var(--primary, #6b21a8); color: #fff; }
.cv-vol-suggest__add.is-added,
.cv-vol-suggest__add:disabled {
  border-color: #16a34a;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  cursor: default;
}

/* Unsaved-draft restore banner */
.cv-draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(217, 119, 6, 0.4);
  background: rgba(251, 191, 36, 0.12);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #92400e;
}
.cv-draft-banner__text { display: inline-flex; align-items: center; gap: 0.4rem; }
.cv-draft-banner__actions { display: flex; gap: 0.4rem; }
.cv-draft-banner__btn {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(146, 64, 14, 0.35);
  background: #fff;
  color: #92400e;
  cursor: pointer;
}
.cv-draft-banner__btn--primary {
  background: var(--primary, #6b21a8);
  border-color: var(--primary, #6b21a8);
  color: #fff;
}

/* Banner colours and page palettes: round mixed balls, examples then custom */
.cv-theme-block {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(107, 33, 168, 0.12);
}
.cv-theme-block--lead {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.cv-layout-field {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(107, 33, 168, 0.12);
}
.cv-theme-block__label {
  display: block;
  margin: 0.75rem 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}
.cv-theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
}
.cv-theme-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.cv-theme-ball {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(107, 33, 168, 0.16);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}
body.volunteer-portal .cv-theme-ball {
  width: 3rem;
  height: 3rem;
}
.cv-theme-chip.is-active .cv-theme-ball {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6b21a8;
}
.cv-theme-name {
  max-width: 4.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: #6b7280;
}
.cv-theme-ball--picker {
  position: relative;
  overflow: hidden;
}
.cv-theme-ball--picker input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
}
.cv-hex-keep {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* AI assist controls */
.cv-ai-label-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.cv-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(107, 33, 168, 0.3);
  background: rgba(107, 33, 168, 0.06);
  color: var(--primary, #6b21a8);
  cursor: pointer;
  transition: background 0.2s ease;
}
.cv-ai-btn:hover:not(:disabled) { background: rgba(107, 33, 168, 0.14); }
.cv-ai-btn:disabled, .cv-ai-btn.is-loading { opacity: 0.6; cursor: default; }
.cv-exp-bullet-improve {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid rgba(107, 33, 168, 0.3);
  border-radius: 4px;
  background: rgba(107, 33, 168, 0.06);
  color: var(--primary, #6b21a8);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}
.cv-exp-bullet-improve:hover:not(:disabled) { background: rgba(107, 33, 168, 0.16); }
.cv-exp-bullet-improve:disabled, .cv-exp-bullet-improve.is-loading { opacity: 0.5; cursor: default; }

/* "Modern" template skin (preview) — same markup, restyled headings */
.cv-preview-sheet[data-cv-template="modern"] .cv-name { text-align: center; color: var(--cv-primary); }
.cv-preview-sheet[data-cv-template="modern"] .cv-contact { text-align: center; }
.cv-preview-sheet[data-cv-template="modern"] .cv-contact-divider { display: none; }
.cv-preview-sheet[data-cv-template="modern"] .cv-section-block { display: none; }
.cv-preview-sheet[data-cv-template="modern"] .cv-section-banner {
  background: transparent;
  padding-left: 0;
  border-bottom: 2px solid var(--cv-primary);
}
.cv-preview-sheet[data-cv-template="modern"] .cv-section-title { color: var(--cv-primary); }
.cv-preview-sheet[data-cv-template="plain"] .cv-top-banner { display: none; }
.cv-preview-sheet[data-cv-template="plain"] .cv-name,
.cv-preview-sheet[data-cv-template="plain"] .cv-job-title,
.cv-preview-sheet[data-cv-template="plain"] .cv-exp-company,
.cv-preview-sheet[data-cv-template="plain"] .cv-edu-line,
.cv-preview-sheet[data-cv-template="plain"] .cv-section-title { color: #111827; }
.cv-preview-sheet[data-cv-template="plain"] .cv-contact,
.cv-preview-sheet[data-cv-template="plain"] .cv-summary,
.cv-preview-sheet[data-cv-template="plain"] .cv-exp-role,
.cv-preview-sheet[data-cv-template="plain"] .cv-edu-notes,
.cv-preview-sheet[data-cv-template="plain"] .cv-exp-desc { color: #1f2937; }
.cv-preview-sheet[data-cv-template="plain"] .cv-section-block { display: none; }
.cv-preview-sheet[data-cv-template="plain"] .cv-section-banner { background: transparent; padding-left: 0; border-bottom: 1px solid #111827; }
.cv-preview-sheet[data-cv-template="plain"] .cv-contact-divider { border-color: #111827; }
.cv-edu-notes { font-size: 0.92rem; color: var(--cv-text, #374151); margin-top: 0.15rem; white-space: pre-line; }
.cv-exp-group { margin-bottom: 1.25rem; }
.cv-exp-group .section-head { font-size: 1rem; margin-bottom: 0.25rem; }
.cv-skill-suggest { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.cv-skill-suggest__chip {
  border: 1px solid rgba(107, 33, 168, 0.35);
  background: #fff;
  color: var(--primary, #6b21a8);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.cv-skill-suggest__chip.is-added, .cv-skill-suggest__chip:disabled { opacity: 0.55; cursor: default; }
.cv-finish-check {
  list-style: none;
  margin: 1rem auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 26rem;
  text-align: left;
}
.cv-finish-check li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(107, 33, 168, 0.14);
  box-shadow: 0 1px 2px rgba(107, 33, 168, 0.05);
  color: #475569;
  font-weight: 600;
}
.cv-finish-check li::before {
  content: "";
  position: static;
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(107, 33, 168, 0.35);
  background: transparent;
}
.cv-finish-check li.is-done {
  color: #4c1d95;
  border-color: rgba(107, 33, 168, 0.28);
  background: linear-gradient(135deg, rgba(107, 33, 168, 0.08), rgba(190, 24, 93, 0.08));
}
.cv-finish-check li.is-done::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #6b21a8, #be185d);
}

/* Guest save screen: same white card on the purple CV builder background. */
body.cv-gate-page main.main {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 1rem 3rem;
}
.cv-gate {
  position: relative;
  z-index: 1;
  width: min(36rem, 100%);
}
.cv-gate__card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(20, 8, 40, 0.22);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
}
.cv-gate__kicker {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(107, 33, 168, 0.12), rgba(190, 24, 93, 0.1));
  color: #6b21a8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cv-gate__title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #6b21a8, #be185d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cv-gate__copy {
  margin: 0 auto 1.5rem;
  max-width: 32rem;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-wrap: normal;
  word-break: normal;
}
.cv-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.cv-gate__actions .btn {
  min-width: 8.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, #6b21a8, #be185d);
  border: none;
  color: #fff !important;
}
.cv-gate__actions .btn-cv-download {
  background: #4c1d95;
}
.cv-gate__actions .btn:hover,
.cv-gate__actions .btn-cv-download:hover {
  background: linear-gradient(135deg, #581c87, #9d174d) !important;
  color: #fff !important;
  opacity: 1;
}
.cv-gate__actions .btn-cv-download:hover {
  background: #3b0764 !important;
}
