/* CV Maker layout + templates. Preview pages stay paper-white in both themes. */

.cv-privacy {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  border: 1px solid var(--line);
  color: var(--muted);
  max-width: 64rem;
  font-size: .93rem;
}
.cv-privacy strong { color: var(--ink); }

.cv-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  gap: 20px;
  align-items: start;
  margin-bottom: 40px;
}
@media (min-width: 1200px) {
  .cv-app { grid-template-columns: minmax(0, 1fr) minmax(0, 34rem); }
}

.cv-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}
.cv-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
}
.cv-steps button {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.cv-steps button:hover { border-color: var(--accent); color: var(--ink); }
.cv-steps button[aria-current="step"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cv-step-n { display: inline-block; margin-right: 4px; opacity: .8; }

.cv-pane[hidden] { display: none !important; }
.cv-pane h2 { margin: 0 0 4px; font-size: 1.15rem; }
.cv-pane > .hint { margin: 0 0 14px; }

.cv-field-error { color: var(--danger); font-size: .85rem; font-weight: 500; margin: 4px 0 0; min-height: 0; }
.cv-field-error:empty { display: none; }
input.invalid, textarea.invalid, select.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent);
}

.cv-entry {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 12px;
  background: var(--surface-2);
}
.cv-entry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cv-entry-bar strong { font-size: .92rem; }
.cv-entry-bar .entry-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-entry-bar .entry-actions button {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.cv-entry-bar .entry-actions button:hover { border-color: var(--accent); }
.cv-entry-bar .entry-actions button.danger { color: var(--danger); }

.cv-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.cv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 2px 6px 2px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: .9rem;
}
.cv-chip button {
  width: 32px; height: 32px; padding: 0;
  border: 0; background: transparent; color: var(--muted);
  border-radius: 999px; cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.cv-chip button:hover { background: var(--surface); color: var(--danger); }
.cv-add-row { display: flex; gap: 8px; align-items: end; }
.cv-add-row > div { flex: 1; min-width: 0; }

.cv-photo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cv-photo-thumb {
  width: 80px; height: 80px; border-radius: 10px; object-fit: cover;
  background: var(--info-bg); border: 1px solid var(--line);
}
.cv-photo-thumb[hidden] { display: none; }

.cv-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cv-soon-note { width: 100%; margin: 0; color: var(--faint); font-size: .85rem; }

/* Preview column */
.cv-preview-col {
  position: sticky;
  top: 80px;
  min-width: 0;
}
.cv-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.cv-preview-toolbar label { margin: 0; font-size: .8rem; }
.cv-preview-toolbar .grow { flex: 1 1 12rem; min-width: 0; }
.cv-accents { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cv-accents button {
  width: 32px; height: 32px; border-radius: 999px; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0;
}
.cv-accents button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.cv-accents input[type="color"] { width: 44px; height: 32px; padding: 2px; }

.cv-preview-stage {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  max-height: calc(100vh - 160px);
}
.cv-preview-scale {
  transform-origin: top left;
}
.cv-sheet-page {
  width: 210mm;
  height: 297mm;
  padding: 14mm 16mm;
  background: #fff;
  color: #111;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .12);
  margin: 0 0 12px;
  position: relative;
  --cv-accent: #1e3a5f;
  --cv-ink: #111111;
  --cv-muted: #444444;
  --cv-line: #cccccc;
  font-family: Arial, Helvetica, "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Nastaliq Urdu", "Noto Sans", sans-serif;
  font-size: 10.5pt;
  line-height: 1.35;
}
.cv-sheet-page:last-child { margin-bottom: 0; }
.cv-sheet-page * { box-sizing: border-box; }
.cv-sheet-page h1, .cv-sheet-page h2, .cv-sheet-page h3, .cv-sheet-page p, .cv-sheet-page ul {
  margin: 0;
}
.cv-running {
  font-size: 8.5pt;
  color: #555;
  border-bottom: 0.4pt solid var(--cv-line);
  padding-bottom: 3mm;
  margin-bottom: 4mm;
}
.cv-block { margin: 0 0 3.2mm; }
.cv-sec h2 {
  font-size: 10.5pt;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cv-accent);
  border-bottom: 0.7pt solid var(--cv-accent);
  padding-bottom: 1mm;
  margin: 0 0 2.2mm;
  font-weight: 700;
  break-after: avoid;
  page-break-after: avoid;
}
.cv-name { font-size: 18pt; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; color: var(--cv-ink); overflow-wrap: break-word; hyphens: manual; }
.cv-role { font-size: 11.5pt; color: var(--cv-accent); font-weight: 600; margin-top: 1mm; }
.cv-contact, .cv-meta { font-size: 9.5pt; color: var(--cv-muted); margin-top: 1.6mm; }
.cv-item { margin: 0 0 2.8mm; }
.cv-item-head { display: flex; justify-content: space-between; gap: 4mm; align-items: baseline; }
.cv-item-title { font-weight: 700; }
.cv-item-sub { color: var(--cv-muted); font-size: 9.5pt; }
.cv-item-dates { font-size: 9.5pt; color: var(--cv-muted); white-space: nowrap; flex: none; }
.cv-item ul { margin: 1mm 0 0 4.5mm; padding: 0; }
.cv-item li { margin: 0 0 0.6mm; }
.cv-skills { margin: 0; padding: 0; list-style: none; }
.cv-skills li { display: inline; unicode-bidi: isolate; }
.cv-skills li:not(:last-child)::after { content: "  •  "; color: var(--cv-muted); unicode-bidi: isolate; }
.cv-langs { list-style: none; margin: 0; padding: 0; }
.cv-langs li { margin: 0 0 0.7mm; unicode-bidi: isolate; }

/* ATS: plain, single column, no icons, no tables, no photo */
.tpl-ats .cv-name { font-size: 16pt; letter-spacing: .02em; }
.tpl-ats .cv-role { color: #111; font-weight: 600; }
.tpl-ats .cv-sec h2 {
  color: #111;
  border-bottom-color: #111;
  letter-spacing: .08em;
  font-size: 10.5pt;
}
.tpl-ats { font-size: 11pt; }

/* Fresher: education & skills first (order handled in JS) */
.tpl-fresher .cv-name { font-size: 17pt; }
.tpl-fresher .cv-sec h2 { letter-spacing: .04em; }

/* Classic: serif, centred header, double rule */
.tpl-classic { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", "Noto Nastaliq Urdu", serif; }
.tpl-classic .cv-classic-head {
  text-align: center;
  border-bottom: 2.6pt double var(--cv-accent);
  padding-bottom: 3.5mm;
}
.tpl-classic .cv-name { font-size: 20pt; }
.tpl-classic .cv-sec h2 {
  text-align: center;
  color: var(--cv-ink);
  border-bottom: 0.5pt solid var(--cv-line);
  letter-spacing: .1em;
}

/* Minimal: space, thin lines, no colour blocks */
.tpl-minimal { --cv-line: #e2e2e2; line-height: 1.55; }
.tpl-minimal .cv-name { font-size: 19pt; font-weight: 600; }
.tpl-minimal .cv-role { color: #666; font-weight: 500; }
.tpl-minimal .cv-block { margin: 0 0 5mm; }
.tpl-minimal .cv-sec h2 {
  color: #111;
  border-bottom: 0.5pt solid #ddd;
  letter-spacing: .14em;
  font-size: 9.5pt;
  font-weight: 600;
}

/* Executive: formal black and white, heavy rules, no colour */
.tpl-executive { --cv-accent: #111111; }
.tpl-executive .cv-exec-head {
  border-bottom: 2.2pt solid #111;
  padding-bottom: 3mm;
}
.tpl-executive .cv-name { font-size: 19pt; letter-spacing: .04em; text-transform: uppercase; }
.tpl-executive .cv-role { color: #111; font-weight: 600; }
.tpl-executive .cv-sec h2 { color: #111; border-bottom: 1pt solid #111; }

/* Bold header: name in white on an accent band */
.tpl-band .cv-band-head {
  background: var(--cv-accent);
  color: #fff;
  margin: -14mm -16mm 6mm;
  padding: 8mm 16mm 6.5mm;
}
.tpl-band .cv-band-head .cv-name { color: #fff; font-size: 20pt; }
.tpl-band .cv-band-head .cv-role { color: #fff; font-weight: 500; opacity: .92; }
.tpl-band .cv-band-head .cv-contact { color: rgba(255,255,255,.88); }

/* Sunset Band: warm orange gradient header with photo */
.tpl-sunset .cv-sunset-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  justify-content: space-between;
  background: #e8590c;
  background: linear-gradient(120deg, #d9480f 0%, #e8590c 55%, #f76707 100%);
  color: #fff;
  margin: -14mm -16mm 6mm;
  padding: 7mm 16mm;
}
.tpl-sunset .cv-sunset-head .cv-name { color: #fff; font-size: 19pt; }
.tpl-sunset .cv-sunset-head .cv-role { color: #fff; font-weight: 500; opacity: .92; }
.tpl-sunset .cv-sunset-head .cv-contact { color: rgba(255,255,255,.9); }
.tpl-sunset .cv-sunset-head .cv-photo {
  width: 26mm; height: 32mm; object-fit: cover; border: 1.5pt solid #fff; flex: none;
}
.tpl-sunset .cv-sec h2 { color: #d9480f; border-bottom-color: #f2b98a; }

/* Teal Modern: fixed teal header band, teal headings */
.tpl-teal .cv-teal-head {
  background: #0f766e;
  background: linear-gradient(120deg, #115e59 0%, #0f766e 60%, #0d9488 100%);
  color: #fff;
  margin: -14mm -16mm 6mm;
  padding: 8mm 16mm 6.5mm;
}
.tpl-teal .cv-teal-head .cv-name { color: #fff; font-size: 20pt; }
.tpl-teal .cv-teal-head .cv-role { color: #fff; font-weight: 500; opacity: .92; }
.tpl-teal .cv-teal-head .cv-contact { color: rgba(255,255,255,.88); }
.tpl-teal .cv-sec h2 { color: #0f766e; border-bottom-color: #99d5cf; }
.tpl-teal .cv-role { color: #0f766e; }

/* Professional: dark sidebar with photo, contact and skills */
.tpl-professional { padding: 0; }
.tpl-professional .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-professional .cv-side {
  background: #1f2733;
  color: #e9edf3;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-professional .cv-side .cv-photo {
  width: 30mm; height: 36mm; object-fit: cover;
  border: 1pt solid rgba(255,255,255,.45); display: block; margin: 0 0 5mm;
}
.tpl-professional .cv-side h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.35);
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-professional .cv-side p, .tpl-professional .cv-side li { color: #e9edf3; font-size: 9.5pt; }
.tpl-professional .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-professional .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-professional .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-professional .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-professional .cv-main .cv-name { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; font-size: 21pt; }
.tpl-professional.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-professional.page-cont .cv-side { padding: 0; }
.tpl-professional.page-cont .cv-side * { display: none; }
.tpl-professional.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Navy Sidebar: deep navy sidebar with photo, contact and skills */
.tpl-navy { padding: 0; }
.tpl-navy .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-navy .cv-side {
  background: #14304d;
  color: #eaf1f8;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-navy .cv-side .cv-photo {
  width: 30mm; height: 36mm; object-fit: cover;
  border: 1.5pt solid #fff; display: block; margin: 0 0 5mm;
}
.tpl-navy .cv-side h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.4);
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-navy .cv-side p, .tpl-navy .cv-side li { color: #eaf1f8; font-size: 9.5pt; }
.tpl-navy .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-navy .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-navy .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-navy .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-navy .cv-main .cv-name { font-size: 20pt; color: #14304d; }
.tpl-navy .cv-main .cv-sec h2 { color: #14304d; border-bottom-color: #14304d; }
.tpl-navy.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-navy.page-cont .cv-side { padding: 0; }
.tpl-navy.page-cont .cv-side * { display: none; }
.tpl-navy.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Creative: gradient accent sidebar, pill headings */
.tpl-creative { padding: 0; }
.tpl-creative .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-creative .cv-side {
  background: var(--cv-accent);
  background: linear-gradient(165deg, var(--cv-accent) 0%, color-mix(in srgb, var(--cv-accent) 55%, #160a2e) 100%);
  color: #fff;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-creative .cv-side .cv-photo {
  width: 30mm; height: 30mm; object-fit: cover; border-radius: 3mm;
  border: 2pt solid rgba(255,255,255,.8); display: block; margin: 0 auto 5mm;
}
.tpl-creative .cv-side h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.45);
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-creative .cv-side p, .tpl-creative .cv-side li { color: #fff; font-size: 9.5pt; }
.tpl-creative .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-creative .cv-side .cv-skills li {
  display: inline-block;
  border: 0.6pt solid rgba(255,255,255,.65);
  border-radius: 999px;
  padding: 0.5mm 2.2mm;
  margin: 0 1mm 1.4mm 0;
}
.tpl-creative .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-creative .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-creative .cv-main .cv-name { font-size: 20pt; color: var(--cv-accent); }
.tpl-creative .cv-main .cv-sec h2 {
  background: var(--cv-accent);
  color: #fff;
  border-bottom: 0;
  border-radius: 1.8mm;
  padding: 1.4mm 3mm;
}
.tpl-creative.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-creative.page-cont .cv-side { padding: 0; }
.tpl-creative.page-cont .cv-side * { display: none; }
.tpl-creative.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Rose Sidebar: light maroon-tinted sidebar with photo and skills */
.tpl-rose { padding: 0; }
.tpl-rose .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-rose .cv-side {
  background: #f7ecec;
  color: #33231f;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-rose .cv-side .cv-photo {
  width: 30mm; height: 30mm; object-fit: cover; border-radius: 50%;
  border: 2pt solid #7a1f2b; display: block; margin: 0 auto 5mm;
}
.tpl-rose .cv-side h2 {
  color: #7a1f2b;
  border-bottom-color: #d9b8bc;
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-rose .cv-side p, .tpl-rose .cv-side li { color: #33231f; font-size: 9.5pt; }
.tpl-rose .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-rose .cv-side .cv-skills li {
  display: inline-block;
  border: 0.6pt solid #b98a90;
  border-radius: 999px;
  padding: 0.5mm 2.2mm;
  margin: 0 1mm 1.4mm 0;
}
.tpl-rose .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-rose .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-rose .cv-main .cv-name { font-size: 20pt; color: #7a1f2b; }
.tpl-rose .cv-main .cv-sec h2 { color: #7a1f2b; border-bottom-color: #7a1f2b; }
.tpl-rose.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-rose.page-cont .cv-side { background: #f7ecec; padding: 0; }
.tpl-rose.page-cont .cv-side * { display: none; }
.tpl-rose.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Gulf: photo in header, extra personal fields */
.tpl-gulf .cv-gulf-head {
  display: flex;
  gap: 6mm;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1.4pt solid var(--cv-accent);
  padding-bottom: 3mm;
}
.tpl-gulf .cv-gulf-head .cv-photo {
  width: 28mm; height: 34mm; object-fit: cover; border: 0.5pt solid #ddd; flex: none;
}
.tpl-gulf .cv-name { font-size: 18pt; }
.tpl-gulf .cv-kv { font-size: 9.5pt; color: var(--cv-muted); margin-top: 2mm; }
.tpl-gulf .cv-kv span { white-space: nowrap; }
.tpl-gulf .cv-kv span + span::before { content: "  |  "; color: #999; }

/* Europass-style (not the official EU service) */
.tpl-europass .cv-eu-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  background: var(--cv-accent);
  color: #fff;
  margin: -14mm -16mm 6mm;
  padding: 7mm 16mm;
}
.tpl-europass .cv-eu-head .cv-name { color: #fff; font-size: 18pt; }
.tpl-europass .cv-eu-head .cv-role { color: #fff; font-weight: 500; opacity: .92; }
.tpl-europass .cv-eu-head .cv-label { font-size: 8pt; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-bottom: 1mm; }
.tpl-europass .cv-eu-head .cv-photo {
  width: 26mm; height: 32mm; object-fit: cover; border: 1.5pt solid #fff; flex: none; margin-left: auto;
}
.tpl-europass .cv-sec h2 { text-transform: none; letter-spacing: 0; font-size: 12pt; border-bottom-width: 1.2pt; }
.tpl-europass .cv-contact { margin-top: 0 0 3mm; }

/* Modern two-column */
.tpl-modern { padding: 0; }
.tpl-modern .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-modern .cv-side {
  background: var(--cv-accent);
  color: #fff;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-modern .cv-side .cv-photo {
  width: 32mm; height: 32mm; object-fit: cover; border-radius: 50%;
  border: 2pt solid rgba(255,255,255,.7); display: block; margin: 0 auto 5mm;
}
.tpl-modern .cv-side h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.45);
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-modern .cv-side p, .tpl-modern .cv-side li { color: #fff; font-size: 9.5pt; }
.tpl-modern .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-modern .cv-side .cv-skills li:not(:last-child)::after { color: rgba(255,255,255,.7); }
.tpl-modern .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-modern .cv-main .cv-name { font-size: 20pt; }
.tpl-modern.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-modern.page-cont .cv-side { padding: 0; }
.tpl-modern.page-cont .cv-side * { display: none; }
.tpl-modern.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* French Sidebar: pale steel-blue sidebar, round photo, gold rule */
.tpl-french { padding: 0; }
.tpl-french .cv-modern {
  display: grid;
  grid-template-columns: 64mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-french .cv-side {
  background: #e8edf3;
  color: #1c2b3a;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-french .cv-side .cv-photo {
  width: 30mm; height: 30mm; object-fit: cover; border-radius: 50%;
  border: 2pt solid #274b73; display: block; margin: 0 auto 5mm;
}
.tpl-french .cv-side h2 {
  color: #274b73;
  border-bottom: 1.4pt solid #c9a227;
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-french .cv-side p, .tpl-french .cv-side li { color: #1c2b3a; font-size: 9.5pt; }
.tpl-french .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-french .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-french .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-french .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-french .cv-main .cv-name { font-size: 20pt; color: #274b73; }
.tpl-french .cv-main .cv-sec h2 { color: #274b73; border-bottom-color: #b9c6d4; }
.tpl-french.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-french.page-cont .cv-side { padding: 0; }
.tpl-french.page-cont .cv-side * { display: none; }
.tpl-french.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Dutch Two-Column: deep teal sidebar, square photo, orange rule */
.tpl-dutch { padding: 0; }
.tpl-dutch .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-dutch .cv-side {
  background: #123c4a;
  color: #eaf3f5;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-dutch .cv-side .cv-photo {
  width: 30mm; height: 34mm; object-fit: cover;
  border: 2pt solid #e8720c; display: block; margin: 0 0 5mm;
}
.tpl-dutch .cv-side h2 {
  color: #fff;
  border-bottom: 1.4pt solid #e8720c;
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-dutch .cv-side p, .tpl-dutch .cv-side li { color: #eaf3f5; font-size: 9.5pt; }
.tpl-dutch .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-dutch .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-dutch .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-dutch .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-dutch .cv-main .cv-name { font-size: 20pt; color: #123c4a; }
.tpl-dutch .cv-main .cv-sec h2 { color: #123c4a; border-bottom-color: #9dbec7; }
.tpl-dutch.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-dutch.page-cont .cv-side { padding: 0; }
.tpl-dutch.page-cont .cv-side * { display: none; }
.tpl-dutch.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Management Consultant: light rail, dark text, no photo */
.tpl-consultant { padding: 0; }
.tpl-consultant .cv-modern {
  display: grid;
  grid-template-columns: 62mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-consultant .cv-side {
  background: #f2f3f5;
  color: #23252a;
  padding: 14mm 8mm 12mm 10mm;
  border-right: 0.7pt solid #d6d9de;
}
.tpl-consultant .cv-side h2 {
  color: #23252a;
  border-bottom: 1pt solid #23252a;
  letter-spacing: .1em;
  font-size: 9pt;
  margin: 0 0 2.5mm;
}
.tpl-consultant .cv-side p, .tpl-consultant .cv-side li { color: #23252a; font-size: 9.5pt; }
.tpl-consultant .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-consultant .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-consultant .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-consultant .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-consultant .cv-main .cv-name { font-size: 19pt; letter-spacing: -.01em; }
.tpl-consultant .cv-main .cv-sec h2 { color: #23252a; border-bottom: 1.2pt solid #23252a; }
.tpl-consultant.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-consultant.page-cont .cv-side { padding: 0; }
.tpl-consultant.page-cont .cv-side * { display: none; }
.tpl-consultant.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Slate Sidebar: slate-grey sidebar with rectangular photo */
.tpl-slate { padding: 0; }
.tpl-slate .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-slate .cv-side {
  background: #3c4756;
  color: #edf1f5;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-slate .cv-side .cv-photo {
  width: 30mm; height: 36mm; object-fit: cover;
  border: 1.5pt solid #fff; display: block; margin: 0 0 5mm;
}
.tpl-slate .cv-side h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.4);
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-slate .cv-side p, .tpl-slate .cv-side li { color: #edf1f5; font-size: 9.5pt; }
.tpl-slate .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-slate .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-slate .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-slate .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-slate .cv-main .cv-name { font-size: 20pt; color: #2f3844; }
.tpl-slate .cv-main .cv-sec h2 { color: #3c4756; border-bottom-color: #c3cad2; }
.tpl-slate.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-slate.page-cont .cv-side { padding: 0; }
.tpl-slate.page-cont .cv-side * { display: none; }
.tpl-slate.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Emerald Sidebar: deep emerald sidebar, gold-ringed round photo, pill skills */
.tpl-emerald { padding: 0; }
.tpl-emerald .cv-modern {
  display: grid;
  grid-template-columns: 68mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-emerald .cv-side {
  background: #0b5d43;
  background: linear-gradient(170deg, #0b5d43 0%, #083f2e 100%);
  color: #eafaf2;
  padding: 14mm 8mm 12mm 10mm;
}
.tpl-emerald .cv-side .cv-photo {
  width: 30mm; height: 30mm; object-fit: cover; border-radius: 50%;
  border: 2pt solid #d4af37; display: block; margin: 0 auto 5mm;
}
.tpl-emerald .cv-side h2 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.4);
  letter-spacing: .08em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-emerald .cv-side p, .tpl-emerald .cv-side li { color: #eafaf2; font-size: 9.5pt; }
.tpl-emerald .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-emerald .cv-side .cv-skills li {
  display: inline-block;
  border: 0.6pt solid rgba(255,255,255,.6);
  border-radius: 999px;
  padding: 0.5mm 2.2mm;
  margin: 0 1mm 1.4mm 0;
}
.tpl-emerald .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-emerald .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-emerald .cv-main .cv-name { font-size: 20pt; color: #0b5d43; }
.tpl-emerald .cv-main .cv-sec h2 { color: #0b5d43; border-bottom-color: #9fc9b8; }
.tpl-emerald.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-emerald.page-cont .cv-side { padding: 0; }
.tpl-emerald.page-cont .cv-side * { display: none; }
.tpl-emerald.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Two-Column Pro: narrow light rail, very large name */
.tpl-twocol { padding: 0; }
.tpl-twocol .cv-modern {
  display: grid;
  grid-template-columns: 58mm 1fr;
  min-height: 297mm;
  height: 297mm;
}
.tpl-twocol .cv-side {
  background: #f4f4f2;
  color: #1c1c1c;
  padding: 14mm 7mm 12mm 9mm;
}
.tpl-twocol .cv-side .cv-photo {
  width: 28mm; height: 32mm; object-fit: cover;
  border: 1pt solid #111; display: block; margin: 0 0 5mm;
}
.tpl-twocol .cv-side h2 {
  color: #111;
  border-bottom: 2pt solid #111;
  letter-spacing: .06em;
  font-size: 9.5pt;
  margin: 0 0 2.5mm;
}
.tpl-twocol .cv-side p, .tpl-twocol .cv-side li { color: #1c1c1c; font-size: 9.5pt; }
.tpl-twocol .cv-side .cv-contact-block p { margin: 0 0 1.6mm; overflow-wrap: anywhere; word-break: break-word; font-size: 8.5pt; }
.tpl-twocol .cv-side .cv-skills li { display: block; margin: 0 0 1mm; }
.tpl-twocol .cv-side .cv-skills li:not(:last-child)::after { content: ""; }
.tpl-twocol .cv-main { padding: 14mm 12mm 12mm 10mm; }
.tpl-twocol .cv-main .cv-name { font-size: 23pt; color: #111; letter-spacing: -.01em; }
.tpl-twocol .cv-main .cv-sec h2 { color: #111; border-bottom: 2pt solid #111; }
.tpl-twocol.page-cont .cv-modern { grid-template-columns: 8mm 1fr; }
.tpl-twocol.page-cont .cv-side { background: #f4f4f2; padding: 0; }
.tpl-twocol.page-cont .cv-side * { display: none; }
.tpl-twocol.page-cont .cv-main { padding: 14mm 16mm 12mm 12mm; }

/* Europass Official: blue label column like the EU Europass layout */
.tpl-europass2 .cv-eu2-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.6pt solid #0e4194;
  padding-bottom: 3.5mm;
}
.tpl-europass2 .cv-eu2-head .cv-label { font-size: 8.5pt; letter-spacing: .14em; text-transform: uppercase; color: #0e4194; margin-bottom: 1mm; }
.tpl-europass2 .cv-eu2-head .cv-name { color: #0e4194; font-size: 19pt; }
.tpl-europass2 .cv-eu2-head .cv-role { color: #333; }
.tpl-europass2 .cv-eu2-head .cv-photo {
  width: 26mm; height: 32mm; object-fit: cover; border: 1pt solid #0e4194; flex: none;
}
.tpl-europass2 .cv-eu2-row { display: grid; grid-template-columns: 44mm 1fr; gap: 6mm; }
.tpl-europass2 .cv-eu2-row + .cv-eu2-row { border-top: 0.4pt solid #ccd6ea; padding-top: 3.2mm; }
.tpl-europass2 .cv-eu2-label { color: #0e4194; font-weight: 700; font-size: 10pt; text-align: right; }
.tpl-europass2 .cv-eu2-body p { margin: 0 0 1.2mm; }
.tpl-europass2 .cv-eu2-body .cv-item:last-child { margin-bottom: 0; }

/* German Lebenslauf: personal data table, dates in a fixed left column */
.tpl-lebenslauf .cv-leb-head {
  display: flex;
  gap: 6mm;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1.2pt solid #333;
  padding-bottom: 3mm;
}
.tpl-lebenslauf .cv-leb-head .cv-label { font-size: 8.5pt; letter-spacing: .14em; text-transform: uppercase; color: #777; margin-bottom: 1mm; }
.tpl-lebenslauf .cv-leb-head .cv-photo {
  width: 26mm; height: 32mm; object-fit: cover; border: 0.5pt solid #bbb; flex: none;
}
.tpl-lebenslauf .cv-sec h2 { color: #222; border-bottom: 1pt solid #333; letter-spacing: .05em; }
.tpl-lebenslauf .cv-leb-table { width: 100%; border-collapse: collapse; }
.tpl-lebenslauf .cv-leb-table th {
  text-align: left; width: 44mm; color: #555; font-weight: 600;
  padding: 1mm 3mm 1mm 0; vertical-align: top; font-size: 10pt;
}
.tpl-lebenslauf .cv-leb-table td { padding: 1mm 0; border-bottom: 0.3pt solid #e3e3e3; }
.tpl-lebenslauf .cv-leb-item { display: grid; grid-template-columns: 40mm 1fr; gap: 5mm; }
.tpl-lebenslauf .cv-leb-dates { color: #555; font-size: 9.5pt; padding-top: 0.4mm; }

/* Dublin: photo beside the name, green accent */
.tpl-dublin .cv-dublin-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  border-bottom: 1.4pt solid #169b62;
  padding-bottom: 3.5mm;
}
.tpl-dublin .cv-dublin-head .cv-photo {
  width: 26mm; height: 32mm; object-fit: cover; border: 1pt solid #169b62; flex: none;
}
.tpl-dublin .cv-name { color: #0d5c3a; }
.tpl-dublin .cv-role { color: #169b62; }
.tpl-dublin .cv-sec h2 { color: #0d5c3a; border-bottom-color: #a9d8c2; }

/* Milan: uppercase name, framed photo with offset shadow */
.tpl-milan .cv-milan-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.7pt solid #111;
  padding-bottom: 3.5mm;
}
.tpl-milan .cv-milan-head .cv-photo {
  width: 26mm; height: 32mm; object-fit: cover; border: 1pt solid #111;
  box-shadow: 2.2mm 2.2mm 0 #111; flex: none; margin-right: 2.2mm;
}
.tpl-milan .cv-name { text-transform: uppercase; letter-spacing: .03em; font-size: 20pt; }
.tpl-milan .cv-role { color: #111; letter-spacing: .14em; text-transform: uppercase; font-size: 10pt; }
.tpl-milan .cv-sec h2 { color: #111; border-bottom: 0; letter-spacing: .18em; }
.tpl-milan .cv-sec h2::after { content: ""; display: block; width: 12mm; border-bottom: 1.8pt solid #111; margin-top: 1.4mm; }

/* Banking & Finance: navy band, gold line, contact strip */
.tpl-banker .cv-banker-head {
  background: #10243e;
  color: #fff;
  margin: -14mm -16mm 0;
  padding: 8mm 16mm 5mm;
  border-bottom: 1.6pt solid #c9a227;
}
.tpl-banker .cv-banker-head .cv-name { color: #fff; font-size: 20pt; font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; }
.tpl-banker .cv-banker-head .cv-role { color: #d8c690; }
.tpl-banker .cv-banker-strip {
  background: #eef1f5;
  color: #333;
  margin: 0 -16mm 6mm;
  padding: 2.6mm 16mm;
  font-size: 9.5pt;
  border-bottom: 0.5pt solid #d5dbe3;
}
.tpl-banker .cv-sec h2 { color: #10243e; border-bottom: 1pt solid #c9a227; }

/* Charcoal Band: dark band, contact details on the right */
.tpl-charcoal .cv-charcoal-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  justify-content: space-between;
  background: #22262d;
  color: #fff;
  margin: -14mm -16mm 6mm;
  padding: 8mm 16mm 6.5mm;
}
.tpl-charcoal .cv-charcoal-head .cv-name { color: #fff; font-size: 20pt; }
.tpl-charcoal .cv-charcoal-head .cv-role { color: #c8cdd4; }
.tpl-charcoal .cv-char-contact { text-align: right; font-size: 9pt; color: rgba(255,255,255,.85); line-height: 1.5; flex: none; }
.tpl-charcoal .cv-sec h2 { color: #22262d; border-bottom-color: #22262d; }

/* Azure Header: bright blue band with a round photo */
.tpl-azure .cv-azure-head {
  display: flex;
  gap: 6mm;
  align-items: center;
  justify-content: space-between;
  background: #0b5fa5;
  background: linear-gradient(120deg, #0b5fa5 0%, #1282c9 70%, #2f9be8 100%);
  color: #fff;
  margin: -14mm -16mm 6mm;
  padding: 7mm 16mm;
}
.tpl-azure .cv-azure-head .cv-name { color: #fff; font-size: 19pt; }
.tpl-azure .cv-azure-head .cv-role { color: #fff; font-weight: 500; opacity: .92; }
.tpl-azure .cv-azure-head .cv-contact { color: rgba(255,255,255,.9); }
.tpl-azure .cv-azure-head .cv-photo {
  width: 27mm; height: 27mm; object-fit: cover; border-radius: 50%;
  border: 2pt solid #fff; flex: none;
}
.tpl-azure .cv-sec h2 { color: #0b5fa5; border-bottom-color: #a8cfee; }

/* Swiss Clean: red accents, heading rules above the title */
.tpl-swiss .cv-name { font-size: 22pt; font-weight: 600; letter-spacing: -.01em; }
.tpl-swiss .cv-role { color: #da291c; text-transform: uppercase; letter-spacing: .1em; font-size: 10.5pt; }
.tpl-swiss .cv-sec h2 {
  color: #111;
  border-bottom: 0;
  border-top: 1.8pt solid #111;
  padding-top: 2.2mm;
  letter-spacing: .1em;
}

/* Nordic Minimal: airy, fine lines, blue-grey headings */
.tpl-nordic { line-height: 1.6; --cv-line: #dbe2e8; }
.tpl-nordic .cv-name { font-size: 20pt; font-weight: 600; color: #2e3a46; }
.tpl-nordic .cv-role { color: #71808e; font-weight: 500; }
.tpl-nordic .cv-block { margin: 0 0 4.6mm; }
.tpl-nordic .cv-sec h2 {
  color: #2e3a46;
  border-bottom: 0.5pt solid #d4dbe1;
  letter-spacing: .16em;
  font-size: 9.5pt;
  font-weight: 600;
}

/* London Professional: centred serif name, navy double-rule headings */
.tpl-london .cv-name { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; text-align: center; font-size: 20pt; color: #1e3a5f; }
.tpl-london .cv-role { text-align: center; color: #1e3a5f; }
.tpl-london .cv-contact { text-align: center; }
.tpl-london .cv-sec h2 {
  font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif;
  color: #1e3a5f;
  border-bottom: 2.2pt double #1e3a5f;
  letter-spacing: .05em;
  text-transform: none;
  font-size: 12pt;
}

/* Vienna Formal: serif throughout, centred, quiet gold */
.tpl-vienna { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; }
.tpl-vienna .cv-name { text-align: center; font-size: 20pt; letter-spacing: .03em; }
.tpl-vienna .cv-role { text-align: center; color: #8a6d3b; }
.tpl-vienna .cv-contact { text-align: center; }
.tpl-vienna .cv-sec h2 { text-align: center; color: #8a6d3b; border-bottom: 0.5pt solid #d8c9a3; letter-spacing: .12em; }

/* Stockholm: Swedish blue headings over a yellow rule */
.tpl-stockholm .cv-name { color: #005293; font-size: 20pt; }
.tpl-stockholm .cv-role { color: #333; }
.tpl-stockholm .cv-sec h2 { color: #005293; border-bottom: 1.8pt solid #fecc00; }

/* Copenhagen: oversized name, small red square markers */
.tpl-copenhagen .cv-name { font-size: 23pt; font-weight: 800; letter-spacing: -.02em; }
.tpl-copenhagen .cv-role { color: #c8102e; }
.tpl-copenhagen .cv-sec h2 { color: #111; border-bottom: 0; letter-spacing: .08em; }
.tpl-copenhagen .cv-sec h2::before {
  content: "";
  display: inline-block;
  width: 2.6mm; height: 2.6mm;
  background: #c8102e;
  margin-right: 2.6mm;
}

/* Engineer / Technical: dark heading bars, mono-spaced dates */
.tpl-engineer .cv-name { color: #263238; }
.tpl-engineer .cv-role { color: #546e7a; }
.tpl-engineer .cv-sec h2 {
  background: #263238;
  color: #fff;
  border-bottom: 0;
  padding: 1.6mm 3mm;
  letter-spacing: .09em;
}
.tpl-engineer .cv-item-dates { font-family: "Courier New", Courier, monospace; font-size: 9pt; }

/* Medical / Healthcare: calm teal, boxed contact line, left-bar headings */
.tpl-medical .cv-name { color: #0b5c5b; }
.tpl-medical .cv-role { color: #0e7c7b; }
.tpl-medical .cv-contact {
  display: inline-block;
  border: 0.7pt solid #bfe0df;
  background: #f2fafa;
  border-radius: 2mm;
  padding: 2.4mm 3.4mm;
}
.tpl-medical .cv-sec h2 {
  color: #0e7c7b;
  border-bottom: 0;
  border-left: 3.5pt solid #0e7c7b;
  padding-left: 3mm;
}

/* Sales & Marketing: pill headings in the accent colour */
.tpl-sales .cv-name { font-size: 21pt; color: var(--cv-accent); }
.tpl-sales .cv-role { text-transform: uppercase; letter-spacing: .06em; }
.tpl-sales .cv-sec h2 {
  display: inline-block;
  background: var(--cv-accent);
  color: #fff;
  border-bottom: 0;
  border-radius: 999px;
  padding: 1.3mm 4mm;
}

/* Burgundy Serif: wine-red serif, centred headings */
.tpl-burgundy { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; }
.tpl-burgundy .cv-name { text-align: center; color: #722f37; font-size: 20pt; }
.tpl-burgundy .cv-role { text-align: center; color: #722f37; }
.tpl-burgundy .cv-contact { text-align: center; }
.tpl-burgundy .cv-sec h2 { text-align: center; color: #722f37; border-bottom: 0.7pt solid #722f37; letter-spacing: .12em; }

/* Graphite ATS: grey heading bars, single column, portal-safe */
.tpl-graphite { font-size: 11pt; }
.tpl-graphite .cv-name { font-size: 17pt; }
.tpl-graphite .cv-role { color: #374151; }
.tpl-graphite .cv-sec h2 {
  background: #eef0f2;
  color: #111;
  border-bottom: 0;
  padding: 1.5mm 2.6mm;
  letter-spacing: .07em;
}

/* Royal Navy & Gold: navy serif name over a gold rule */
.tpl-royal .cv-name { font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", serif; color: #12294d; font-size: 20pt; }
.tpl-royal .cv-role { color: #8a6d3b; }
.tpl-royal .cv-contact { border-bottom: 1.8pt solid #c9a227; padding-bottom: 3mm; }
.tpl-royal .cv-sec h2 { color: #12294d; border-bottom: 0.7pt solid #c9a227; }

/* Berlin Modern: uppercase grotesque, heavy black rules */
.tpl-berlin .cv-name { text-transform: uppercase; font-size: 22pt; font-weight: 800; letter-spacing: .01em; }
.tpl-berlin .cv-role {
  display: inline-block;
  background: #111;
  color: #fff;
  padding: 0.8mm 2.6mm;
  font-size: 10pt;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tpl-berlin .cv-sec h2 { color: #111; border-bottom: 2.4pt solid #111; letter-spacing: .1em; }
.tpl-berlin .cv-item-dates { font-weight: 700; color: #111; }

#cv-measure {
  position: absolute;
  left: -10000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}

.cv-save-msg { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.cv-page-count { margin: 8px 0 0; font-size: .85rem; color: var(--muted); text-align: center; }

/* Template picker */
.cv-picker { margin: 0 0 20px; }
.cv-picker h2 { margin: 0 0 4px; font-size: 1.2rem; }
.cv-picker .hint { margin: 0 0 14px; max-width: 64rem; }
.cv-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}
@media (max-width: 480px) {
  .cv-tpl-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}
.cv-tpl-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font: inherit;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  color: var(--ink);
  position: relative;
}
.cv-tpl-card:hover { border-color: var(--accent); }
.cv-tpl-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.cv-tpl-card.selected::after {
  content: "✓";
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
}
.cv-tpl-name { font-weight: 700; font-size: .95rem; }
.cv-tpl-desc { color: var(--muted); font-size: .82rem; line-height: 1.35; }

/* Mini template previews: small CSS mock layouts, one per template */
.tp-mini {
  display: flex;
  flex-direction: column;
  gap: 5px;
  aspect-ratio: 210 / 232;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  padding: 7px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.tp-mini i { display: block; height: 3px; border-radius: 2px; background: #ccd2dc; margin: 0 0 3px; }
.tp-head { display: flex; gap: 5px; align-items: flex-start; }
.tp-headtxt { flex: 1; min-width: 0; }
.tp-mini .tp-name { height: 5px; width: 62%; background: #7d8698; margin-bottom: 4px; }
.tp-mini .tp-role { height: 3px; width: 40%; background: var(--tp, #1e3a5f); margin-bottom: 0; }
.tp-photo { display: none; flex: none; width: 15px; height: 18px; border-radius: 2px; background: #aeb6c4; }
.tp-cols { display: flex; gap: 5px; flex: 1; min-height: 0; }
.tp-side { display: none; width: 27%; flex: none; border-radius: 3px; padding: 4px; }
.tp-side i { background: rgba(255,255,255,.72); }
.tp-sphoto { width: 13px; height: 13px; border-radius: 50%; margin: 0 auto 4px; background: rgba(255,255,255,.9); }
.tp-main { flex: 1; min-width: 0; }
.tp-main .tp-h { width: 42%; background: var(--tp, #1e3a5f); margin-top: 4px; }
.tp-main .tp-h:first-child { margin-top: 0; }
.tp-main .w70 { width: 70%; }
.tp-main .w80 { width: 80%; }
/* mini: sidebar templates */
.tp-mini.tpl-modern .tp-side,
.tp-mini.tpl-professional .tp-side,
.tp-mini.tpl-creative .tp-side,
.tp-mini.tpl-navy .tp-side,
.tp-mini.tpl-rose .tp-side { display: block; }
.tp-mini.tpl-modern .tp-side { background: var(--tp); }
.tp-mini.tpl-professional .tp-side { background: #1f2733; }
.tp-mini.tpl-professional .tp-sphoto { border-radius: 2px; }
.tp-mini.tpl-navy .tp-side { background: #14304d; }
.tp-mini.tpl-navy .tp-sphoto { border-radius: 2px; }
.tp-mini.tpl-creative .tp-side { background: linear-gradient(160deg, var(--tp), #4c1d95); }
.tp-mini.tpl-creative .tp-sphoto { border-radius: 3px; }
.tp-mini.tpl-rose .tp-side { background: #f7ecec; }
.tp-mini.tpl-rose .tp-side i { background: #c99aa0; }
.tp-mini.tpl-rose .tp-sphoto { background: #7a1f2b; }
/* mini: photo in header */
.tp-mini.tpl-gulf .tp-photo,
.tp-mini.tpl-europass .tp-photo,
.tp-mini.tpl-sunset .tp-photo { display: block; }
.tp-mini.tpl-gulf .tp-head { border-bottom: 2px solid var(--tp); padding-bottom: 4px; }
/* mini: coloured header bands */
.tp-mini.tpl-band .tp-head,
.tp-mini.tpl-teal .tp-head,
.tp-mini.tpl-europass .tp-head,
.tp-mini.tpl-sunset .tp-head { background: var(--tp); border-radius: 3px; padding: 5px; }
.tp-mini.tpl-sunset .tp-head { background: linear-gradient(120deg, #d9480f, #f76707); }
.tp-mini.tpl-band .tp-name, .tp-mini.tpl-teal .tp-name,
.tp-mini.tpl-europass .tp-name, .tp-mini.tpl-sunset .tp-name { background: #fff; }
.tp-mini.tpl-band .tp-role, .tp-mini.tpl-teal .tp-role,
.tp-mini.tpl-europass .tp-role, .tp-mini.tpl-sunset .tp-role { background: rgba(255,255,255,.75); }
.tp-mini.tpl-band .tp-photo, .tp-mini.tpl-teal .tp-photo,
.tp-mini.tpl-europass .tp-photo, .tp-mini.tpl-sunset .tp-photo { background: rgba(255,255,255,.65); }
/* mini: classic, minimal, executive, plain */
.tp-mini.tpl-classic .tp-headtxt { text-align: center; }
.tp-mini.tpl-classic .tp-name, .tp-mini.tpl-classic .tp-role { margin-left: auto; margin-right: auto; }
.tp-mini.tpl-classic .tp-head { border-bottom: 3px double #98a2b3; padding-bottom: 4px; }
.tp-mini.tpl-minimal i { background: #dde1e7; }
.tp-mini.tpl-minimal .tp-name { background: #a7aeb9; }
.tp-mini.tpl-minimal .tp-role { background: #c3c9d2; }
.tp-mini.tpl-minimal .tp-h { background: #b9bfc9; }
.tp-mini.tpl-executive .tp-name { background: #111; }
.tp-mini.tpl-executive .tp-role { background: #555; }
.tp-mini.tpl-executive .tp-h { background: #111; }
.tp-mini.tpl-executive .tp-head { border-bottom: 3px solid #111; padding-bottom: 4px; }
.tp-mini.tpl-ats .tp-h { background: #6b7280; }
.tp-mini.tpl-fresher .tp-h { background: var(--tp); }
.tp-mini.tpl-fresher .tp-head { border-bottom: 2px solid var(--tp); padding-bottom: 4px; }

/* mini: new sidebar templates */
.tp-mini.tpl-french .tp-side,
.tp-mini.tpl-dutch .tp-side,
.tp-mini.tpl-consultant .tp-side,
.tp-mini.tpl-slate .tp-side,
.tp-mini.tpl-emerald .tp-side,
.tp-mini.tpl-twocol .tp-side { display: block; }
.tp-mini.tpl-french .tp-side { background: #dbe4ee; }
.tp-mini.tpl-french .tp-side i { background: #8fa5bd; }
.tp-mini.tpl-french .tp-sphoto { background: #274b73; }
.tp-mini.tpl-dutch .tp-side { background: #123c4a; }
.tp-mini.tpl-dutch .tp-sphoto { border-radius: 2px; }
.tp-mini.tpl-consultant .tp-side { background: #e8eaed; }
.tp-mini.tpl-consultant .tp-side i { background: #a9adb5; }
.tp-mini.tpl-consultant .tp-sphoto { display: none; }
.tp-mini.tpl-slate .tp-side { background: #3c4756; }
.tp-mini.tpl-slate .tp-sphoto { border-radius: 2px; }
.tp-mini.tpl-emerald .tp-side { background: linear-gradient(165deg, #0b5d43, #083f2e); }
.tp-mini.tpl-twocol .tp-side { background: #e9e9e6; }
.tp-mini.tpl-twocol .tp-side i { background: #a3a39e; }
.tp-mini.tpl-twocol .tp-sphoto { border-radius: 2px; background: #55534e; }
/* mini: new photo headers and bands */
.tp-mini.tpl-dublin .tp-photo,
.tp-mini.tpl-milan .tp-photo,
.tp-mini.tpl-lebenslauf .tp-photo,
.tp-mini.tpl-europass2 .tp-photo,
.tp-mini.tpl-azure .tp-photo { display: block; }
.tp-mini.tpl-dublin .tp-head { border-bottom: 2px solid #169b62; padding-bottom: 4px; }
.tp-mini.tpl-milan .tp-photo { border: 1px solid #111; }
.tp-mini.tpl-azure .tp-head { background: linear-gradient(120deg, #0b5fa5, #2f9be8); border-radius: 3px; padding: 5px; }
.tp-mini.tpl-azure .tp-name { background: #fff; }
.tp-mini.tpl-azure .tp-role { background: rgba(255,255,255,.75); }
.tp-mini.tpl-azure .tp-photo { border-radius: 50%; background: rgba(255,255,255,.65); }
.tp-mini.tpl-banker .tp-head { background: #10243e; border-radius: 3px 3px 0 0; padding: 5px; border-bottom: 2px solid #c9a227; }
.tp-mini.tpl-banker .tp-name { background: #fff; }
.tp-mini.tpl-banker .tp-role { background: #d8c690; }
.tp-mini.tpl-charcoal .tp-head { background: #22262d; border-radius: 3px; padding: 5px; }
.tp-mini.tpl-charcoal .tp-name { background: #fff; }
.tp-mini.tpl-charcoal .tp-role { background: rgba(255,255,255,.7); }
/* mini: europass2 label rail + lebenslauf table look */
.tp-mini.tpl-europass2 .tp-side { display: block; background: #dbe4f5; }
.tp-mini.tpl-europass2 .tp-side i { background: #7d9cc9; }
.tp-mini.tpl-europass2 .tp-sphoto { display: none; }
.tp-mini.tpl-europass2 .tp-head { border-bottom: 2px solid #0e4194; padding-bottom: 4px; }
.tp-mini.tpl-lebenslauf .tp-head { border-bottom: 2px solid #555; padding-bottom: 4px; }
.tp-mini.tpl-lebenslauf .tp-h { background: #555; }
/* mini: new single-column designs */
.tp-mini.tpl-swiss .tp-h { background: #da291c; }
.tp-mini.tpl-swiss .tp-head { border-top: 3px solid #111; padding-top: 4px; }
.tp-mini.tpl-nordic i { background: #dde3e9; }
.tp-mini.tpl-nordic .tp-h { background: #8fa3b5; }
.tp-mini.tpl-london .tp-headtxt { text-align: center; }
.tp-mini.tpl-london .tp-name, .tp-mini.tpl-london .tp-role { margin-left: auto; margin-right: auto; }
.tp-mini.tpl-london .tp-head { border-bottom: 3px double #1e3a5f; padding-bottom: 4px; }
.tp-mini.tpl-vienna .tp-headtxt { text-align: center; }
.tp-mini.tpl-vienna .tp-name, .tp-mini.tpl-vienna .tp-role { margin-left: auto; margin-right: auto; }
.tp-mini.tpl-vienna .tp-h { background: #8a6d3b; }
.tp-mini.tpl-stockholm .tp-h { background: #005293; }
.tp-mini.tpl-stockholm .tp-head { border-bottom: 3px solid #fecc00; padding-bottom: 4px; }
.tp-mini.tpl-copenhagen .tp-name { background: #111; }
.tp-mini.tpl-copenhagen .tp-h { background: #c8102e; }
.tp-mini.tpl-engineer .tp-h { background: #263238; height: 5px; }
.tp-mini.tpl-medical .tp-h { background: #0e7c7b; }
.tp-mini.tpl-sales .tp-h { background: var(--tp); border-radius: 999px; width: 55%; }
.tp-mini.tpl-burgundy .tp-headtxt { text-align: center; }
.tp-mini.tpl-burgundy .tp-name, .tp-mini.tpl-burgundy .tp-role { margin-left: auto; margin-right: auto; }
.tp-mini.tpl-burgundy .tp-h { background: #722f37; }
.tp-mini.tpl-graphite .tp-h { background: #9aa3ab; height: 5px; }
.tp-mini.tpl-royal .tp-head { border-bottom: 2px solid #c9a227; padding-bottom: 4px; }
.tp-mini.tpl-royal .tp-h { background: #12294d; }
.tp-mini.tpl-berlin .tp-name { background: #111; }
.tp-mini.tpl-berlin .tp-h { background: #111; height: 4px; }
.tp-mini.tpl-berlin .tp-head { border-bottom: 3px solid #111; padding-bottom: 4px; }

/* Large template preview modal */
.cv-tpl-view { color: var(--accent); font-size: .8rem; font-weight: 600; }
.cv-tpl-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv-tpl-modal[hidden] { display: none !important; }
.cv-tpl-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 15, 26, .66); }
.cv-tpl-modal-box {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: min(94vw, 880px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 10px;
}
.cv-tpl-modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cv-tpl-modal-head h2 { margin: 0; font-size: 1.25rem; }
.cv-tpl-modal-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.cv-tpl-modal-stage {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.cv-tpl-modal-scale { transform-origin: top left; }
.cv-tpl-modal-note { margin: 0; color: var(--muted); font-size: .88rem; }
.cv-tpl-modal-actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
body.cv-modal-lock { overflow: hidden; }

@media (max-width: 980px) {
  .cv-app { grid-template-columns: 1fr; }
  .cv-preview-col { position: static; }
  .cv-preview-stage { max-height: none; overflow-x: auto; }
}
@media (max-width: 720px) {
  .cv-editor { padding: 12px; }
  .row.cols-2, .row.cols-3 { grid-template-columns: 1fr; }
  .cv-editor-actions .btn { flex: 1 1 calc(50% - 8px); }
  .cv-editor-actions .btn#cv-download { flex: 1 1 100%; }
}

/* Print: only the pre-paginated A4 sheets */
@media print {
  .site-header, .site-footer, .skip, .crumb, .tool-head, .cv-privacy, .cv-no-print { display: none !important; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  main, .page, .wrap, .cv-app, .cv-preview-col, .cv-preview-stage, .cv-preview-scale, #cv-preview {
    display: block !important;
    width: 210mm !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: static !important;
    transform: none !important;
    height: auto !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .cv-preview-scale { width: 210mm !important; height: auto !important; }
  .cv-sheet-page {
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    page-break-after: always;
    break-after: page;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cv-sheet-page:last-child { page-break-after: auto; break-after: auto; }
  a { color: inherit !important; text-decoration: none !important; }
}
@page { size: A4; margin: 0; }
