    /* ==== CV MAKER LAYOUT ==== */
    .cv-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
    @media (max-width: 1024px) { .cv-shell { grid-template-columns: 1fr; } }

    .cv-pane { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
    .cv-pane h3 { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-muted); margin-bottom: 12px; }
    .cv-pane h3.first { margin-top: 0; }
    .cv-pane h3:not(.first) { margin-top: 26px; }

    .cv-input,
    .cv-textarea {
      width: 100%; padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      font-family: inherit; font-size: 14px;
      color: var(--ink);
      transition: border-color .15s, box-shadow .15s;
    }
    .cv-input:focus, .cv-textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
    .cv-textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
    .cv-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
    .cv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
    .cv-row.three { grid-template-columns: 1fr 1fr 1fr; }
    @media (max-width: 540px) { .cv-row, .cv-row.three { grid-template-columns: 1fr; } }
    .cv-field { margin-bottom: 10px; }

    .cv-item { padding: 14px; border: 1px dashed var(--line); border-radius: 14px; margin-bottom: 12px; background: #fafaf6; }
    .cv-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
    .cv-item-title { font-weight: 700; font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .1em; }
    .cv-btn-mini { font-size: 11px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-soft); font-weight: 600; transition: all .15s; }
    .cv-btn-mini:hover { color: var(--accent); border-color: var(--accent); }

    .cv-add-btn {
      width: 100%; padding: 10px; margin-top: 4px;
      border: 1px dashed var(--line); border-radius: 12px;
      background: transparent; color: var(--ink-soft);
      cursor: pointer; font-weight: 600; font-size: 13px;
      transition: all .15s;
    }
    .cv-add-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

    .cv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
    .cv-action {
      flex: 1; min-width: 120px;
      padding: 10px 14px; border-radius: 999px;
      font-size: 13px; font-weight: 600;
      cursor: pointer; transition: all .15s;
      border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
      text-align: center;
    }
    .cv-action:hover { border-color: var(--ink); color: var(--ink); }
    .cv-action.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
    .cv-action.primary:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.02); }

    /* ==== TEMPLATE PICKER ==== */
    .tpl-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
    .tpl-pick label {
      display: block; padding: 10px 12px; border: 1px solid var(--line);
      border-radius: 12px; cursor: pointer; text-align: center; font-weight: 600;
      font-size: 13px; transition: all .15s; background: #fff; color: var(--ink-soft);
    }
    .tpl-pick input { display: none; }
    .tpl-pick input:checked + label { border-color: var(--ink); background: var(--ink); color: #fff; }

    /* density buttons */
    .cv-density { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 18px; }
    .cv-density-btn { padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-soft); font-weight: 600; font-size: 12px; cursor: pointer; transition: all .15s; }
    .cv-density-btn.active { border-color: var(--ink); background: var(--ink); color: #fff; }

    /* sections manager */
    .cv-sections-manager { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
    .cv-section-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
    .cv-section-row.hidden-sec { opacity: .5; }
    .cv-section-row .cv-sec-label { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
    .cv-section-row .cv-sec-toggle { position: relative; width: 34px; height: 20px; border-radius: 999px; border: none; background: var(--line); cursor: pointer; flex: 0 0 auto; transition: background .15s; }
    .cv-section-row .cv-sec-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
    .cv-section-row .cv-sec-toggle[aria-pressed="true"] { background: var(--accent); }
    .cv-section-row .cv-sec-toggle[aria-pressed="true"]::after { transform: translateX(14px); }
    .cv-section-row .cv-sec-move { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; color: var(--ink-soft); font-size: 13px; line-height: 1; flex: 0 0 auto; }
    .cv-section-row .cv-sec-move:disabled { opacity: .3; cursor: default; }

    /* photo control */
    .cv-photo-control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .cv-photo-thumb { width: 44px; height: 54px; border-radius: 6px; border: 1px solid var(--line); background: #f2efe7 center/cover no-repeat; flex: 0 0 auto; }

    /* ==== PREVIEW PANE ==== */
    .cv-preview-pane { position: sticky; top: 100px; }
    @media (max-width: 1024px) { .cv-preview-pane { position: static; } }

    .cv-preview-stage {
      background: var(--bg-warm);
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 18px;
      overflow: auto;
      max-height: 86vh;
    }
    /* Shrink wrapper takes the visual size of the scaled page so transform doesn't leave overflow */
    .cv-preview-shrink {
      position: relative;
      margin: 0 auto;
      /* width and height set by JS to scaled-page dimensions */
    }
    .cv-preview-page {
      width: 210mm;
      min-height: 297mm;
      background: #fff;
      padding: 16mm 14mm;
      box-shadow: 0 4px 18px rgba(0,0,0,.06);
      transform-origin: top left;
      transform: scale(var(--cv-scale, 0.62));
      font-family: 'Inter', sans-serif;
      color: #111;
      font-size: 10pt;
      line-height: 1.45;
      position: absolute;
      top: 0; left: 0;
    }
    .cv-preview-page a { color: inherit; text-decoration: underline; }

    /* ==== BASE STRUCTURE (shared by every template — keeps rows from clumping) ==== */
    .cv-h-contact { display: flex; flex-wrap: wrap; gap: 5pt 10pt; align-items: baseline; }
    .cv-entry-line1 { display: flex; justify-content: space-between; gap: 10pt; align-items: baseline; }
    .cv-skills-list { display: flex; flex-wrap: wrap; gap: 4pt 8pt; }

    /* PDF export uses html2canvas, which does NOT collapse vertical margins the way the
       browser does. Every section is wrapped in .cv-section; zeroing the trailing
       bottom-margin removes the double-spacing that otherwise appears above each
       section heading in the downloaded PDF (all templates). */
    .cv-section > *:last-child { margin-bottom: 0; }
    .cv-modern-main > .cv-section:last-child { margin-bottom: 0; }
    .cv-modern-side > *:last-child { margin-bottom: 0; }
    .cv-bullets { margin-bottom: 0; }

    /* ==== PHOTO (optional profile picture) ==== */
    .cv-photo { display: block; object-fit: cover; border-radius: 3pt; }
    .cv-head-with-photo { display: flex; gap: 12pt; align-items: flex-start; justify-content: space-between; }
    .cv-head-with-photo .cv-head-text { flex: 1; min-width: 0; }
    .cv-head-with-photo .cv-photo { width: 26mm; height: 32mm; flex: 0 0 auto; }
    .cv-modern-side .cv-photo { width: 34mm; height: 40mm; margin: 0 auto 10pt; }
    .tmpl-modern .cv-modern-side .cv-photo { border: 2px solid rgba(255,255,255,.35); }

    /* ==== DENSITY (Compact / Roomy — shared class overrides apply to all templates) ==== */
    .cv-preview-page[data-density="compact"] .cv-entry { margin-bottom: 6pt; }
    .cv-preview-page[data-density="compact"] .cv-section-title { margin-top: 9pt; }
    .cv-preview-page[data-density="compact"] .cv-summary { margin-bottom: 4pt; line-height: 1.35; }
    .cv-preview-page[data-density="compact"] .cv-bullets li { margin-bottom: 1pt; line-height: 1.3; }
    .cv-preview-page[data-density="roomy"] .cv-entry { margin-bottom: 14pt; }
    .cv-preview-page[data-density="roomy"] .cv-section-title { margin-top: 18pt; }
    .cv-preview-page[data-density="roomy"] .cv-summary { margin-bottom: 9pt; line-height: 1.6; }
    .cv-preview-page[data-density="roomy"] .cv-bullets li { margin-bottom: 3pt; line-height: 1.55; }

    /* ==== TEMPLATE: CLASSIC ==== */
    .tmpl-classic .cv-h-name { font-size: 22pt; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: #111; margin-bottom: 2pt; }
    .tmpl-classic .cv-h-title { font-size: 11pt; color: #444; margin-bottom: 6pt; }
    .tmpl-classic .cv-h-contact { font-size: 9pt; color: #444; display: flex; flex-wrap: wrap; gap: 5pt 10pt; padding-bottom: 7pt; border-bottom: 1px solid #ddd; margin-bottom: 10pt; }
    .tmpl-classic .cv-section-title { font-size: 11pt; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #111; margin: 12pt 0 6pt; padding-bottom: 3pt; border-bottom: 1.5px solid #111; }
    .tmpl-classic .cv-summary { font-size: 9.5pt; color: #333; margin-bottom: 6pt; }
    .tmpl-classic .cv-entry { margin-bottom: 8pt; }
    .tmpl-classic .cv-entry-line1 { display: flex; justify-content: space-between; gap: 10pt; align-items: baseline; }
    .tmpl-classic .cv-entry-role { font-weight: 700; font-size: 10pt; color: #111; }
    .tmpl-classic .cv-entry-dates { font-size: 9pt; color: #555; white-space: nowrap; }
    .tmpl-classic .cv-entry-line2 { display: flex; justify-content: space-between; gap: 10pt; align-items: baseline; font-size: 9pt; color: #555; margin-bottom: 3pt; font-style: italic; }
    .tmpl-classic .cv-bullets { padding-left: 16pt; margin-top: 2pt; }
    .tmpl-classic .cv-bullets li { font-size: 9.5pt; color: #333; margin-bottom: 1.5pt; }
    .tmpl-classic .cv-skills-list { font-size: 9.5pt; color: #333; }
    .tmpl-classic .cv-project { margin-bottom: 5pt; font-size: 9.5pt; color: #333; }
    .tmpl-classic .cv-project-name { font-weight: 700; color: #111; }

    /* ==== TEMPLATE: MODERN (sidebar + main, accent customizable) ==== */
    .tmpl-modern { padding: 0; --cv-side-bg: #1a1a1a; --cv-accent: #ff4d2b; }
    .tmpl-modern .cv-modern-wrap { display: grid; grid-template-columns: 65mm 1fr; min-height: 297mm; }
    .tmpl-modern .cv-modern-side {
      background: var(--cv-side-bg); color: #fff; padding: 16mm 10mm;
      -webkit-print-color-adjust: exact !important;
      print-color-adjust: exact !important;
    }
    .tmpl-modern .cv-modern-main { padding: 16mm 12mm; }
    .tmpl-modern .cv-h-name { font-size: 20pt; font-weight: 800; line-height: 1.05; color: #fff; margin-bottom: 4pt; }
    .tmpl-modern .cv-h-title { font-size: 10pt; color: var(--cv-accent); font-weight: 600; margin-bottom: 12pt; text-transform: uppercase; letter-spacing: .1em; }
    .tmpl-modern .cv-side-title { font-size: 9pt; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--cv-accent); margin: 14pt 0 5pt; }
    .tmpl-modern .cv-h-contact { font-size: 8.5pt; color: rgba(255,255,255,.85); display: flex; flex-direction: column; gap: 3pt; word-break: break-word; }
    .tmpl-modern .cv-skills-list { font-size: 9pt; color: rgba(255,255,255,.9); display: flex; flex-direction: column; gap: 3pt; }
    .tmpl-modern .cv-summary { font-size: 9pt; color: rgba(255,255,255,.85); }
    .tmpl-modern .cv-section-title { font-size: 11pt; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #111; margin: 0 0 7pt; padding-bottom: 3pt; border-bottom: 2px solid var(--cv-accent); display: inline-block; padding-right: 14pt; }
    .tmpl-modern .cv-section { margin-bottom: 12pt; }
    .tmpl-modern .cv-entry { margin-bottom: 9pt; }
    .tmpl-modern .cv-entry-line1 { display: flex; justify-content: space-between; gap: 10pt; align-items: baseline; }
    .tmpl-modern .cv-entry-role { font-weight: 700; font-size: 10.5pt; color: #111; }
    .tmpl-modern .cv-entry-dates { font-size: 8.5pt; color: #777; white-space: nowrap; }
    .tmpl-modern .cv-entry-line2 { font-size: 9pt; color: #555; margin-bottom: 3pt; font-weight: 500; }
    .tmpl-modern .cv-bullets { padding-left: 14pt; margin-top: 2pt; }
    .tmpl-modern .cv-bullets li { font-size: 9.5pt; color: #333; margin-bottom: 2pt; }
    .tmpl-modern .cv-project { margin-bottom: 5pt; font-size: 9.5pt; color: #333; }
    .tmpl-modern .cv-project-name { font-weight: 700; color: #111; }

    /* ==== TEMPLATE: MINIMAL (single column — airy, soft hierarchy) ==== */
    .tmpl-minimal.cv-preview-page {
      box-shadow: inset 4px 0 0 #242424, 0 4px 14px rgba(0, 0, 0, 0.06);
    }
    .tmpl-minimal .cv-h-name {
      font-size: 21pt;
      font-weight: 700;
      letter-spacing: -0.035em;
      line-height: 1.08;
      color: #141414;
      margin-bottom: 3pt;
    }
    .tmpl-minimal .cv-h-title {
      font-size: 10pt;
      font-weight: 500;
      color: #666;
      letter-spacing: 0.03em;
      margin-bottom: 11pt;
    }
    .tmpl-minimal .cv-h-contact {
      font-size: 8.5pt;
      color: #555;
      gap: 4pt 12pt;
      padding-bottom: 11pt;
      margin-bottom: 13pt;
      border-bottom: 1px solid #e6e6e6;
    }
    .tmpl-minimal .cv-section-title {
      font-size: 8.5pt;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: #777;
      margin: 15pt 0 7pt;
      padding-bottom: 4pt;
      border-bottom: 1px solid #ececec;
    }
    .tmpl-minimal .cv-summary { font-size: 9.5pt; color: #3a3a3a; line-height: 1.55; margin-bottom: 7pt; }
    .tmpl-minimal .cv-entry { margin-bottom: 11pt; }
    .tmpl-minimal .cv-entry-role { font-weight: 600; font-size: 10pt; }
    .tmpl-minimal .cv-entry-dates { font-size: 8.5pt; color: #777; }
    .tmpl-minimal .cv-entry-line2 { font-style: normal; color: #666; }
    .tmpl-minimal .cv-bullets li { font-size: 9.5pt; color: #383838; margin-bottom: 2pt; }
    .tmpl-minimal .cv-skills-list { font-size: 9.5pt; color: #444; }
    .tmpl-minimal .cv-project-name { font-weight: 700; color: #151515; }

    /* ==== TEMPLATE: EXECUTIVE (dark band + accent — uses --cv-side-bg / --cv-accent like Modern) ==== */
    .tmpl-executive.cv-preview-page {
      --cv-side-bg: #1c1c1c;
      --cv-accent: #ff4d2b;
      padding: 0 !important;
      font-size: 10pt;
      line-height: 1.45;
      color: #1a1a1a;
    }
    .tmpl-executive .cv-h-name {
      background: var(--cv-side-bg);
      color: #fff;
      font-size: 23pt;
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.08;
      margin: 0;
      padding: 13mm 14mm 5pt;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    .tmpl-executive .cv-h-title {
      background: var(--cv-side-bg);
      color: var(--cv-accent);
      font-size: 10pt;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.11em;
      margin: 0;
      padding: 0 14mm 11pt;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    .tmpl-executive .cv-h-contact {
      background: var(--cv-side-bg);
      color: rgba(255, 255, 255, 0.9);
      display: flex;
      flex-wrap: wrap;
      gap: 5pt 14pt;
      font-size: 8.75pt;
      margin: 0;
      padding: 0 14mm 13mm;
      border-bottom: 4px solid var(--cv-accent) !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    .tmpl-executive .cv-h-contact a {
      color: rgba(255, 255, 255, 0.95) !important;
    }
    .tmpl-executive .cv-section > * {
      padding-left: 14mm;
      padding-right: 14mm;
    }
    .tmpl-executive .cv-h-contact ~ .cv-section-title:first-of-type {
      margin-top: 13pt;
    }
    .tmpl-executive .cv-section-title {
      display: inline-block;
      background: var(--cv-side-bg);
      color: #fff !important;
      font-size: 8pt;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      margin: 15pt 0 8pt;
      padding: 5pt 12pt;
      border-bottom: none !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    .tmpl-executive .cv-summary {
      font-size: 9.5pt;
      color: #333;
      line-height: 1.48;
      margin-bottom: 7pt;
    }
    .tmpl-executive .cv-entry {
      margin-bottom: 9pt;
    }
    .tmpl-executive .cv-entry-line1 {
      gap: 10pt;
    }
    .tmpl-executive .cv-entry-role {
      font-weight: 700;
      font-size: 10.5pt;
      color: #111;
    }
    .tmpl-executive .cv-entry-dates {
      font-size: 9pt;
      color: #555;
    }
    .tmpl-executive .cv-entry-line2 {
      font-size: 9pt;
      color: #555;
      margin-bottom: 3pt;
      font-style: italic;
    }
    .tmpl-executive .cv-bullets {
      padding-left: 16pt;
      margin-top: 3pt;
    }
    .tmpl-executive .cv-bullets li {
      font-size: 9.5pt;
      color: #333;
      margin-bottom: 2pt;
    }
    .tmpl-executive .cv-skills-list {
      font-size: 9.5pt;
      color: #333;
    }
    .tmpl-executive .cv-project {
      margin-bottom: 6pt;
      font-size: 9.5pt;
      color: #333;
    }
    .tmpl-executive .cv-project-name {
      font-weight: 700;
      color: #111;
    }

    /* ==== TEMPLATE: PAKISTAN (formal single column, photo top-right — PK/Gulf job market) ==== */
    .tmpl-pakistan.cv-preview-page {
      --cv-accent: #0f2c4d;
      font-family: 'Inter', sans-serif;
    }
    .tmpl-pakistan .cv-h-name { font-size: 22pt; font-weight: 800; letter-spacing: -.01em; line-height: 1.08; color: #10233b; margin-bottom: 2pt; }
    .tmpl-pakistan .cv-h-title { font-size: 11pt; font-weight: 600; color: var(--cv-accent); margin-bottom: 7pt; }
    .tmpl-pakistan .cv-h-contact { font-size: 9pt; color: #444; padding-bottom: 8pt; border-bottom: 2px solid var(--cv-accent); margin-bottom: 11pt; }
    .tmpl-pakistan .cv-section-title { font-size: 10.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #fff; background: var(--cv-accent); padding: 3pt 8pt; margin: 13pt 0 7pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tmpl-pakistan .cv-summary { font-size: 9.5pt; color: #333; line-height: 1.5; margin-bottom: 6pt; }
    .tmpl-pakistan .cv-entry { margin-bottom: 9pt; }
    .tmpl-pakistan .cv-entry-role { font-weight: 700; font-size: 10.5pt; color: #10233b; }
    .tmpl-pakistan .cv-entry-dates { font-size: 9pt; color: #555; white-space: nowrap; }
    .tmpl-pakistan .cv-entry-line2 { font-size: 9pt; color: #555; font-style: italic; margin-bottom: 3pt; }
    .tmpl-pakistan .cv-bullets { padding-left: 16pt; margin-top: 2pt; }
    .tmpl-pakistan .cv-bullets li { font-size: 9.5pt; color: #333; margin-bottom: 2pt; }
    .tmpl-pakistan .cv-skills-list { font-size: 9.5pt; color: #333; }
    .tmpl-pakistan .cv-project-name { font-weight: 700; color: #10233b; }
    .tmpl-pakistan .cv-photo { width: 28mm; height: 35mm; border: 1.5px solid var(--cv-accent); border-radius: 2pt; }

    /* ==== TEMPLATE: TWO-COLUMN (light sidebar — clean, professional) ==== */
    .tmpl-twocol.cv-preview-page { --cv-accent: #2563eb; padding: 0 !important; }
    .tmpl-twocol .cv-modern-wrap { display: grid; grid-template-columns: 62mm 1fr; min-height: 297mm; }
    .tmpl-twocol .cv-modern-side { background: #f4f6f9; padding: 15mm 10mm; border-right: 2px solid var(--cv-accent); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tmpl-twocol .cv-modern-main { padding: 15mm 12mm; }
    .tmpl-twocol .cv-modern-side .cv-photo { width: 34mm; height: 40mm; margin: 0 auto 10pt; border: 2px solid var(--cv-accent); }
    .tmpl-twocol .cv-h-name { font-size: 19pt; font-weight: 800; line-height: 1.06; color: #111; margin-bottom: 3pt; }
    .tmpl-twocol .cv-h-title { font-size: 10pt; color: var(--cv-accent); font-weight: 600; margin-bottom: 11pt; text-transform: uppercase; letter-spacing: .08em; }
    .tmpl-twocol .cv-side-title { font-size: 9pt; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; color: var(--cv-accent); margin: 13pt 0 5pt; }
    .tmpl-twocol .cv-h-contact { flex-direction: column; gap: 3pt; font-size: 8.5pt; color: #445; word-break: break-word; align-items: flex-start; }
    .tmpl-twocol .cv-skills-list { flex-direction: column; gap: 3pt; font-size: 9pt; color: #333; }
    .tmpl-twocol .cv-summary { font-size: 9pt; color: #444; line-height: 1.5; }
    .tmpl-twocol .cv-section-title { font-size: 11pt; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #111; margin: 0 0 7pt; padding-bottom: 3pt; border-bottom: 2px solid var(--cv-accent); display: inline-block; padding-right: 14pt; }
    .tmpl-twocol .cv-section { margin-bottom: 12pt; }
    .tmpl-twocol .cv-entry { margin-bottom: 9pt; }
    .tmpl-twocol .cv-entry-role { font-weight: 700; font-size: 10.5pt; color: #111; }
    .tmpl-twocol .cv-entry-dates { font-size: 8.5pt; color: #777; white-space: nowrap; }
    .tmpl-twocol .cv-entry-line2 { font-size: 9pt; color: #555; margin-bottom: 3pt; font-weight: 500; }
    .tmpl-twocol .cv-bullets { padding-left: 14pt; margin-top: 2pt; }
    .tmpl-twocol .cv-bullets li { font-size: 9.5pt; color: #333; margin-bottom: 2pt; }
    .tmpl-twocol .cv-project-name { font-weight: 700; color: #111; }

    /* shared empty placeholder */
    .cv-empty { color: #aaa; font-style: italic; }

    /* ==== AUTOSAVE INDICATOR ==== */
    .cv-saved { font-size: 11px; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 6px; }
    .cv-saved::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

    /* ==== MOBILE TAB TOGGLE ==== */
    .cv-tabs { display: none; gap: 6px; margin-bottom: 16px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
    .cv-tabs button { flex: 1; padding: 8px 12px; border-radius: 999px; border: 0; background: transparent; font-weight: 600; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
    .cv-tabs button.active { background: var(--ink); color: #fff; }
    @media (max-width: 1024px) {
      .cv-tabs { display: flex; }
      body[data-cv-view="edit"] .cv-preview-pane { display: none; }
      body[data-cv-view="preview"] .cv-form-pane { display: none; }
    }

    /* PDF: off-screen clone (#cv-pdf-capture-host) — full-scale capture without touching the live preview */
    #cv-pdf-capture-host .cv-preview-page {
      transform: none !important;
      position: relative !important;
      left: auto !important;
      top: auto !important;
    }

    /* ==== THEME PICKER (Modern + Executive share sidebar/header + accent) ==== */
    .cv-theme-section { display: none; }
    .cv-form-pane[data-template="modern"] .cv-theme-section,
    .cv-form-pane[data-template="executive"] .cv-theme-section { display: block; }
    .cv-theme-caption {
      font-size: 11px;
      color: var(--ink-muted);
      margin: -6px 0 12px;
      line-height: 1.45;
    }
    .cv-theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .cv-color-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
    .cv-color-field input[type="color"] { width: 36px; height: 28px; border: none; padding: 0; background: transparent; cursor: pointer; border-radius: 6px; }
    .cv-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
    .cv-color-field input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line); border-radius: 6px; }
    .cv-color-field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin: 0; }
    .cv-presets { display: flex; flex-wrap: wrap; gap: 6px; }
    .cv-preset {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 5px 10px 5px 6px; border-radius: 999px;
      border: 1px solid var(--line); background: #fff;
      font-size: 11px; font-weight: 600; color: var(--ink-soft);
      cursor: pointer; transition: all .15s;
    }
    .cv-preset:hover { border-color: var(--ink); color: var(--ink); }
    .cv-preset.active { border-color: var(--ink); background: var(--ink); color: #fff; }
    .cv-preset-side, .cv-preset-accent { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
    .cv-preset-name { line-height: 1; }

    /* ==== LINKS SECTION ==== */
    .cv-links-help { font-size: 11px; color: var(--ink-muted); margin-bottom: 10px; }

    /* ==== PDF/print parity: single-column section spacing =========================
       html2canvas (used for PDF export) does not collapse vertical margins and
       renders a first-child's margin-top as space INSIDE its parent. Section titles
       are the first child of each .cv-section wrapper, so their margin-top produced
       extra space above every heading in the download. Fix: zero the title top-margin
       and put the inter-section gap on the wrapper as PADDING (padding never collapses,
       so the PDF matches the on-screen preview exactly). Two-column templates keep
       their own margin-bottom spacing and are unaffected. */
    .cv-section > .cv-section-title { margin-top: 0; }
    .tmpl-classic  .cv-section + .cv-section,
    .tmpl-minimal  .cv-section + .cv-section,
    .tmpl-executive .cv-section + .cv-section,
    .tmpl-pakistan .cv-section + .cv-section { padding-top: 13pt; }
    .tmpl-executive .cv-section:first-of-type { padding-top: 13pt; }
