.cv-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  color: #fff;
  padding: 56px 0 48px;
}

.cv-hero__inner {
  max-width: 720px;
}

.cv-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin: 12px 0 14px;
  line-height: 1.15;
}

.cv-hero p {
  margin: 0 0 24px;
  color: #CBD5E1;
  font-size: 17px;
  line-height: 1.6;
}

.cv-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cv-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cv-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  color: #0F172A;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.cv-hero .cv-btn-secondary {
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
}

.cv-section {
  padding: 48px 24px;
}

.cv-section--muted {
  background: #F8FAFC;
  border-block: 1px solid #E2E8F0;
}

.cv-section-title {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 20px;
}

.cv-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.cv-feature-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 22px;
}

.cv-feature-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.cv-feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
}

.cv-feature-card p {
  margin: 0;
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
}

.cv-tips-list {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  line-height: 1.8;
}

.cv-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #EFF6FF 0%, #fff 100%);
  border: 1px solid #BFDBFE;
  border-radius: 16px;
  padding: 28px;
}

.cv-cta-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
}

.cv-cta-card p {
  margin: 0;
  color: #64748B;
  font-size: 14px;
}

.cv-build-header {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 24px 0;
}

.cv-build-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cv-build-header h1 {
  margin: 6px 0 4px;
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
}

.cv-build-header p {
  margin: 0;
  font-size: 14px;
  color: #64748B;
}

.cv-build-header__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cv-back-link {
  font-size: 13px;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
}

.cv-build-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  padding: 24px 24px 80px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cv-build-layout {
    grid-template-columns: 1fr;
  }

  .cv-preview-panel {
    order: -1;
  }
}

.cv-form-section {
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  background: #fff;
}

.cv-form-section legend {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  padding: 0 4px;
}

.cv-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cv-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-field--full {
  grid-column: 1 / -1;
}

.cv-field span {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.cv-field input,
.cv-field textarea {
  width: 100%;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0F172A;
  background: #fff;
}

.cv-field input:focus,
.cv-field textarea:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cv-repeat-row {
  border: 1px dashed #CBD5E1;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #F8FAFC;
}

.cv-add-row,
.cv-remove-row {
  border: none;
  background: transparent;
  color: #2563EB;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.cv-remove-row {
  color: #DC2626;
  margin-top: 8px;
}

.cv-preview-panel {
  position: sticky;
  top: 80px;
}

.cv-preview-panel__label {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.cv-preview-frame {
  --cv-zoom: 1;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.cv-preview-frame > #cvPreview {
  transform: scale(var(--cv-zoom));
  transform-origin: top center;
}

.cv-alert {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.cv-alert--success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.cv-alert--info {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.cv-document {
  font-family: Georgia, 'Times New Roman', serif;
  color: #111;
  font-size: 11pt;
  line-height: 1.45;
}

.cv-document__name {
  margin: 0 0 6px;
  font-size: 22pt;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cv-document__contact,
.cv-document__meta {
  margin: 0 0 4px;
  font-size: 10pt;
  color: #333;
}

.cv-document__section {
  margin-top: 14px;
}

.cv-document__heading {
  margin: 0 0 8px;
  font-size: 11pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #222;
  padding-bottom: 3px;
}

.cv-document__entry {
  margin-bottom: 10px;
}

.cv-document__entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-document__dates {
  font-size: 10pt;
  color: #444;
  white-space: nowrap;
}

.cv-document__sub {
  font-size: 10pt;
  color: #333;
  margin-bottom: 4px;
}

.cv-document__text {
  margin: 0;
  font-size: 10.5pt;
  white-space: normal;
  text-align: justify;
  text-justify: inter-word;
}

.cv-document__rich,
.cv-document__rich p,
.cv-document__rich li,
.cv-document__list li,
.cv-document__references {
  text-align: justify;
  text-justify: inter-word;
}

.cv-document__rich p {
  margin: 0 0 6px;
}

.cv-document__rich ul,
.cv-document__rich ol {
  margin: 4px 0 0;
  padding-left: 18px;
}

.cv-document__headline {
  margin: 0 0 6px;
  font-size: 11pt;
  font-weight: 600;
  color: #475569;
}

.cv-document__it-badge {
  display: inline-block;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: #06B6D4;
  color: #0F172A;
  margin-bottom: 8px;
}

.cv-document__it-links {
  margin: 6px 0 0;
  font-size: 9.5pt;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  color: #334155;
}

.cv-print-body {
  margin: 0;
  background: #E2E8F0;
  font-family: system-ui, sans-serif;
}

.cv-print-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #0F172A;
  color: #fff;
}

.cv-print-toolbar a {
  color: #93C5FD;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.cv-print-toolbar button {
  border: none;
  background: #2563EB;
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.cv-print-page {
  max-width: 210mm;
  margin: 24px auto;
  background: #fff;
  padding: 18mm 16mm;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

@media print {
  .cv-print-toolbar {
    display: none !important;
  }

  .cv-print-body {
    background: #fff;
  }

  .cv-print-page {
    margin: 0;
    box-shadow: none;
    padding: 0;
    max-width: none;
  }
}

.cv-print-body--print .cv-print-toolbar {
  display: none;
}

@media (max-width: 640px) {
  .cv-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Toolbar & progress */
.cv-build-toolbar {
  padding: 16px 24px 0;
}

.cv-progress {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.cv-progress__label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #64748B;
  margin-bottom: 8px;
}

.cv-progress__label strong {
  color: #2563EB;
}

.cv-progress__track {
  height: 8px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.cv-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563EB, #059669);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.cv-toolbar-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 8px;
}

.cv-toolbar-field {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-toolbar-field span {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.cv-toolbar-field select {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

/* Accordion sections */
.cv-accordion {
  padding: 0;
  overflow: hidden;
}

.cv-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.cv-accordion > summary::-webkit-details-marker {
  display: none;
}

.cv-accordion > summary::after {
  content: '+';
  float: right;
  color: #94A3B8;
  font-weight: 700;
}

.cv-accordion[open] > summary::after {
  content: '−';
}

.cv-accordion > .cv-form-grid,
.cv-accordion > .cv-field,
.cv-accordion > #cvExperienceRows,
.cv-accordion > #cvEducationRows,
.cv-accordion > #cvProjectRows,
.cv-accordion > .cv-add-row {
  margin-left: 18px;
  margin-right: 18px;
}

.cv-accordion > .cv-add-row {
  margin-bottom: 16px;
}

.cv-accordion > .cv-field:last-child {
  margin-bottom: 16px;
}

.cv-form-section--flat {
  border: none;
  background: transparent;
  padding: 0;
}

/* Template picker */
.cv-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cv-template-card {
  position: relative;
  cursor: pointer;
}

.cv-template-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cv-template-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  min-height: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cv-template-card input:checked + .cv-template-card__preview + .cv-template-card__body,
.cv-template-card input:checked ~ .cv-template-card__body {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cv-template-card__preview {
  display: block;
  height: 56px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #E2E8F0;
}

.cv-template-card__preview--ats-classic {
  background: linear-gradient(180deg, #fff 40%, #F8FAFC 40%);
}

.cv-template-card__preview--modern-pro {
  background: linear-gradient(90deg, #2563EB 8px, #fff 8px);
}

.cv-template-card__preview--gov-formal {
  background: linear-gradient(180deg, #0F172A 18px, #fff 18px);
}

.cv-template-card__body strong {
  font-size: 14px;
  color: #0F172A;
}

.cv-template-card__body em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cv-template-card__body small {
  font-size: 12px;
  color: #64748B;
  line-height: 1.45;
}

/* Landing template showcase */
.cv-template-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cv-template-showcase__card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
}

.cv-template-showcase__thumb {
  width: 72px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.cv-template-showcase__card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.cv-template-showcase__card p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #64748B;
  line-height: 1.5;
}

.cv-showcase-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #2563EB;
  background: #EFF6FF;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Preview panel head */
.cv-preview-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cv-preview-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cv-preview-zoom button {
  width: 28px;
  height: 28px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  color: #475569;
}

.cv-preview-zoom span {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  min-width: 40px;
  text-align: center;
}

/* Document lists & tags */
.cv-document__list {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 10.5pt;
  text-align: justify;
  text-justify: inter-word;
}

.cv-document__list li {
  margin-bottom: 3px;
}

.cv-document__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-document__tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 9.5pt;
  font-family: system-ui, sans-serif;
}

.cv-document__gov-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #CBD5E1;
  font-size: 9.5pt;
  color: #334155;
}

/* Template: Modern Pro */
.cv-document--modern-pro {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.cv-document--modern-pro .cv-document__name {
  font-size: 20pt;
  border-left: 4px solid #2563EB;
  padding-left: 10px;
}

.cv-document--modern-pro .cv-document__heading {
  color: #2563EB;
  border-bottom-color: #BFDBFE;
}

/* Template: Government Formal */
.cv-document--gov-formal .cv-document__header {
  text-align: center;
  border-bottom: 2px solid #0F172A;
  padding-bottom: 10px;
}

.cv-document--gov-formal .cv-document__name {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cv-document--gov-formal .cv-document__heading {
  background: #F1F5F9;
  padding: 4px 8px;
  border-bottom: none;
}

.cv-document--gov-formal .cv-document__gov-meta {
  justify-content: center;
  border-color: #0F172A;
}

/* Template: IT Professional */
.cv-document--it-professional {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.cv-document--it-professional .cv-document__header {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 55%, #0E7490 100%);
  color: #F8FAFC;
  margin: 0 0 18px;
  padding: 18px 16px;
  border-radius: 6px;
}

.cv-document--it-professional .cv-document__name {
  font-size: 21pt;
  color: #fff;
  margin-bottom: 4px;
}

.cv-document--it-professional .cv-document__headline {
  color: #67E8F9;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 10pt;
}

.cv-document--it-professional .cv-document__contact,
.cv-document--it-professional .cv-document__it-links {
  color: #CBD5E1;
}

.cv-document--it-professional .cv-document__heading {
  color: #0E7490;
  border-bottom: 2px solid #06B6D4;
  padding-bottom: 4px;
  font-size: 10pt;
  letter-spacing: 0.08em;
}

.cv-document--it-professional .cv-document__tag {
  background: #ECFEFF;
  color: #0E7490;
  border: 1px solid #A5F3FC;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 9pt;
}

/* Rich text editor */
.cv-field-hint {
  display: block;
  font-size: 11px;
  color: #94A3B8;
  margin-top: -2px;
  margin-bottom: 4px;
}

.cv-rich-editor {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.cv-rich-editor:focus-within {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.cv-rich-editor__toolbar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.cv-rich-editor__btn {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.cv-rich-editor__btn:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.cv-rich-editor__area {
  min-height: var(--cv-editor-min-height, 88px);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #0F172A;
  outline: none;
  text-align: left;
}

.cv-rich-editor__area:empty::before {
  content: attr(data-placeholder);
  color: #94A3B8;
  pointer-events: none;
}

.cv-rich-editor__area ul,
.cv-rich-editor__area ol {
  margin: 6px 0;
  padding-left: 20px;
}

.cv-template-card__preview--it-professional {
  background: linear-gradient(135deg, #0F172A 55%, #06B6D4 55%);
}

.cv-accordion > .cv-rich-editor,
.cv-accordion > .cv-field:has(.cv-rich-editor) {
  margin-left: 18px;
  margin-right: 18px;
  margin-bottom: 12px;
}
