:root {
  --ink: #142238;
  --muted: #7b8699;
  --line: #e5eaf2;
  --page: #f4f6fa;
  --brand: #6b5de7;
  --radius: 18px
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  font-size: 14px
}

button,
input,
select,
textarea {
  font: inherit
}

button,
select {
  cursor: pointer
}

button {
  transition: background .18s, box-shadow .18s, transform .18s
}

button:active {
  transform: translateY(1px)
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #afa5ff;
  outline-offset: 2px
}

a {
  color: inherit;
  text-decoration: none
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important
}

.topbar {
  min-height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(18px, 4vw, 62px);
  position: relative;
  z-index: 2
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .09em;
  white-space: nowrap
}

.brand small {
  font-size: 9px;
  display: block;
  letter-spacing: .18em;
  color: #77829a;
  margin-top: 2px
}

.mark {
  background: #162440;
  color: white;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 23px;
  letter-spacing: -.1em
}

.mark span {
  color: #aa9eff;
  font-size: 16px;
  margin-left: -7px
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px
}

.top-actions select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 11px;
  color: #344158;
  min-width: 96px
}

.button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 11px 15px;
  min-height: 40px;
  font-weight: 750;
  font-size: 12px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  white-space: nowrap
}

.button.primary {
  background: #2b3761;
  color: white;
  border-color: #2b3761;
  box-shadow: 0 5px 12px #17244921
}

.button.primary:hover {
  background: #394983
}

.button.ghost:hover,
.button.pale:hover {
  background: #f0effc
}

.button.pale {
  background: #f7f8fc;
  color: #3d4a65
}

.button.light-danger {
  color: #b12f43;
  background: #fff6f6;
  border-color: #f6d8dd
}

.button.small {
  min-height: 34px;
  padding: 8px 11px
}

.site-container {
  max-width: 1670px;
  margin: auto;
  padding: 34px clamp(14px, 2.4vw, 36px) 70px
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin: 0 0 27px
}

.intro-copy {
  max-width: 830px
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6050c5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  margin-bottom: 12px
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: #8b7af2;
  border-radius: 50%
}

.version {
  border: 1px solid #e3ddff;
  background: #f5f2ff;
  color: #6654c2;
  border-radius: 12px;
  padding: 3px 7px;
  font-size: 9px;
  letter-spacing: 0
}

.intro h1 {
  font-size: clamp(26px, 2.8vw, 41px);
  letter-spacing: -.035em;
  line-height: 1.25;
  margin: 0;
  font-weight: 850
}

.intro p {
  margin: 10px 0 0;
  color: #78839a;
  line-height: 1.7
}

.trust-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 5px
}

.trust-pills>span {
  white-space: nowrap;
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: 60px;
  padding: 9px 12px;
  font-size: 11px;
  color: #5f6c80;
  font-weight: 700
}

.check {
  color: #10a17a;
  font-size: 13px;
  font-weight: 900;
  margin-inline-end: 4px
}

.workspace {
  display: grid;
  grid-template-columns: minmax(410px, 535px) minmax(570px, 1fr);
  align-items: start;
  gap: 24px
}

.editor,
.preview-panel {
  min-width: 0
}

.editor {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 45px #1e335209;
  overflow: hidden
}

.editor-head {
  padding: 25px 25px 24px
}

.editor-kicker {
  color: #7564d7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  margin-bottom: 9px
}

.editor h2 {
  font-size: 19px;
  letter-spacing: -.02em;
  margin: 0 0 5px
}

.editor-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 17px
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px
}

.template-card {
  border: 1.5px solid #e5e8f0;
  border-radius: 11px;
  background: #fbfcff;
  padding: 9px 5px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  color: #4e5c74;
  min-width: 0
}

.template-card:hover {
  background: #f3f3fc
}

.template-card.active {
  border-color: #6e62de;
  box-shadow: 0 0 0 2px #a99aff29;
  background: #f7f5ff
}

.template-card strong {
  font-weight: 800;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  min-height: 27px;
  display: grid;
  place-items: center
}

.mini {
  width: 53px;
  height: 70px;
  border: 1px solid #dadfe7;
  background: #fff;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 7px #26344c18;
  direction: ltr
}

.mini:before,
.mini:after,
.mini b,
.mini i,
.mini em {
  content: "";
  position: absolute;
  display: block
}

.mini b,
.mini i,
.mini em {
  background: repeating-linear-gradient(to bottom, #c9ccd3 0 2px, transparent 2px 6px);
  right: 6px
}

.mini b {
  top: 27px;
  width: 24px;
  height: 19px
}

.mini i {
  top: 51px;
  width: 24px;
  height: 14px
}

.mini em {
  top: 12px;
  height: 8px;
  width: 24px;
  background: #c5cad5
}

.mini-noir:before {
  inset: 0 auto 0 0;
  width: 19px;
  background: #222326
}

.mini-noir:after {
  width: 13px;
  height: 14px;
  top: 8px;
  left: 3px;
  background: #8b8277;
  border-radius: 2px
}

.mini-noir em {
  background: #bd9b39;
  height: 7px
}

.mini-teal:before {
  height: 15px;
  background: #14998d;
  inset: 0 0 auto;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 55% 100%, 0 55%)
}

.mini-teal:after {
  height: 15px;
  background: #14998d;
  inset: auto 0 0;
  clip-path: polygon(0 30%, 50% 5%, 100% 45%, 100% 100%, 0 100%)
}

.mini-teal em {
  top: 23px;
  left: 6px;
  width: 14px;
  height: 15px;
  border: 3px solid #15978f;
  border-radius: 50%;
  background: #eee
}

.mini-teal b,
.mini-teal i {
  right: 5px;
  width: 23px
}

.mini-modern:before {
  top: 10px;
  left: 5px;
  right: 5px;
  height: 8px;
  background: #5a66c2
}

.mini-modern:after {
  top: 22px;
  left: 5px;
  right: 5px;
  height: 2px;
  background: #5a66c2
}

.mini-classic:before {
  top: 12px;
  left: 9px;
  right: 9px;
  height: 3px;
  background: #253a58
}

.mini-classic:after {
  top: 18px;
  left: 9px;
  right: 9px;
  height: 1px;
  background: #253a58
}

.mini-minimal:before {
  top: 12px;
  left: 6px;
  width: 18px;
  height: 6px;
  background: #596974
}

.mini-minimal:after {
  top: 21px;
  left: 6px;
  right: 7px;
  height: 1px;
  background: #b5c1cd
}

.editor-block {
  border-top: 1px solid var(--line)
}

.editor-block>summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 25px;
  font-size: 13px;
  font-weight: 850;
  user-select: none
}

.editor-block>summary::-webkit-details-marker {
  display: none
}

.chevron {
  font-size: 18px;
  font-weight: 500;
  color: #94a0b3;
  transition: transform .2s
}

.editor-block[open]>summary .chevron {
  transform: rotate(180deg)
}

.block-inner {
  padding: 0 25px 23px;
  display: grid;
  gap: 14px
}

.block-inner label:not(.upload-box):not(.toggle-row):not(.manage-check) {
  display: block;
  min-width: 0
}

.block-inner label>span:first-child:not(.upload-symbol) {
  display: block;
  color: #526076;
  font-size: 11.5px;
  font-weight: 750;
  margin-bottom: 7px
}

input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]),
textarea,
select {
  min-width: 0
}

.block-inner input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]),
.block-inner textarea,
.block-inner select {
  width: 100%;
  border: 1px solid #dfe4ee;
  border-radius: 9px;
  background: #fff;
  padding: 11px 12px;
  font-size: 12.5px;
  color: #243349;
  min-height: 41px
}

.block-inner textarea {
  line-height: 1.6;
  resize: vertical
}

.block-inner input::placeholder,
.block-inner textarea::placeholder {
  color: #b1b8c5
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px
}

.colors-row {
  margin-bottom: -4px
}

.color-control {
  border: 1px solid #dce3ef;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: #fff;
  min-height: 42px
}

.color-control input {
  height: 28px;
  width: 39px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer
}

.color-control code {
  font-size: 10px;
  letter-spacing: .03em;
  color: #5a6578;
  white-space: nowrap
}

.quick-palettes {
  display: flex;
  justify-content: flex-start;
  gap: 9px;
  padding: 2px 0
}

.swatch {
  background: var(--swatch);
  border: 2px solid white;
  outline: 1px solid #d5dbe7;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer
}

.swatch:hover {
  outline: 2px solid #9185da
}

.range-field {
  display: grid;
  gap: 7px
}

.range-heading {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.range-heading label {
  font-size: 12px;
  font-weight: 750;
  color: #526076
}

.range-heading output {
  color: #64748b;
  background: #f4f5f9;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 11px
}

.range-field input {
  width: 100%;
  accent-color: #6c5fe5;
  cursor: pointer
}

.subsection-title {
  font-size: 12px;
  font-weight: 850;
  color: #31415f;
  margin-top: 4px
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  border: 1px solid #e5e9f2;
  border-radius: 8px;
  padding: 11px 10px;
  min-height: 41px
}

.toggle-row input {
  accent-color: #665bd2
}

.toggle-row span {
  font-size: 12px;
  color: #4f5f76;
  font-weight: 700
}

.tiny-help,
.field-help {
  font-size: 11px;
  color: #8b94a4;
  line-height: 1.65;
  margin: 0
}

.upload-box {
  position: relative;
  background: #f9faff;
  border: 1px dashed #bfc7db;
  padding: 14px;
  border-radius: 11px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer
}

.upload-symbol {
  height: 33px;
  width: 33px;
  border-radius: 10px;
  background: #e9eafa;
  display: grid;
  place-items: center;
  color: #655bd4;
  font-size: 19px;
  font-weight: 900
}

.upload-text strong {
  display: block;
  color: #334662;
  font-size: 12px;
  margin-bottom: 5px
}

.upload-text small {
  display: block;
  color: #8e98ac;
  font-size: 10px
}

.text-button {
  border: 0;
  background: none;
  color: #6657d4;
  font-size: 11px;
  font-weight: 750;
  text-align: start;
  justify-self: start;
  padding: 0
}

.item-list {
  display: grid;
  gap: 12px
}

.item-card {
  display: grid;
  gap: 12px;
  background: #f9fafe;
  border: 1px solid #e8eaf1;
  border-radius: 12px;
  padding: 13px
}

.item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px
}

.item-heading strong {
  font-size: 11.5px;
  color: #3e4a67;
  overflow-wrap: anywhere
}

.item-heading strong span {
  color: #99a2b1
}

.item-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0
}

.icon-action,
.manage-controls button {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e4e7ee;
  border-radius: 7px;
  color: #596981;
  min-width: 26px;
  height: 25px;
  padding: 0;
  font-size: 15px
}

.icon-action:hover,
.manage-controls button:hover {
  background: #eceef9
}

.icon-action:disabled,
.manage-controls button:disabled {
  opacity: .35;
  cursor: default
}

.add-button {
  border: 1px dashed #b7b1df;
  border-radius: 9px;
  background: #faf8ff;
  color: #584bc7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  font-size: 12.5px;
  font-weight: 800
}

.add-button:hover {
  background: #f3effe
}

.add-button span:first-child {
  font-size: 19px
}

.section-manager {
  display: grid;
  gap: 7px
}

.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #e9ecf3;
  background: #fbfcff;
  border-radius: 8px;
  padding: 9px 11px
}

.manage-check {
  display: flex;
  gap: 9px;
  align-items: center
}

.manage-check input {
  accent-color: #6556d6
}

.manage-check span {
  font-size: 12px;
  font-weight: 700;
  color: #4e5b72
}

.manage-controls {
  display: flex;
  gap: 5px
}

.editor-footer {
  padding: 19px 25px 22px;
  border-top: 1px solid var(--line)
}

.editor-footer p {
  font-size: 10.5px;
  line-height: 1.65;
  color: #8790a4;
  margin: 0 0 13px
}

.utility {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.utility .button {
  font-size: 11px;
  padding: 9px 10px;
  min-height: 35px
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  margin: 0
}

.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer
}

.preview-panel {
  position: sticky;
  top: 18px;
  min-width: 0
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 13px
}

.preview-label,
.preview-controls {
  display: flex;
  align-items: center;
  gap: 10px
}

.preview-label strong {
  font-size: 13px
}

.preview-label small {
  font-size: 11px;
  color: #9a9faf
}

.live-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #18b47c;
  box-shadow: 0 0 0 3px #18b47c1c
}

.preview-controls select {
  background: #fff;
  border: 1px solid #dee3ef;
  border-radius: 8px;
  color: #4e5b72;
  font-size: 11px;
  padding: 8px
}

.paper-stage {
  border-radius: 15px;
  background: #e0e5ed;
  border: 1px solid #d9dfe8;
  padding: 28px 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  box-shadow: inset 0 1px 4px #10203717
}

.paper {
  background: #fff;
  width: 210mm;
  min-height: 297mm;
  flex-shrink: 0;
  box-shadow: 0 10px 27px #1c2a4752;
  color: #25323c;
  line-height: var(--cv-leading, 1.45);
  font-size: calc(9.2pt * var(--cv-size, 1));
  text-align: start;
  overflow-wrap: anywhere;
  --cv-accent: #c7a74a;
  --cv-side: #1a1d21;
  --cv-size: 1;
  --cv-leading: 1.45;
  --cv-photo-scale: 1;
  --cv-photo-y: 50%;
  --section-space: 15px;
  font-family: "Outfit", sans-serif;
  position: relative
}

.paper * {
  box-sizing: border-box
}

.paper[lang="ar"] {
  font-family: "Tajawal", sans-serif
}

.paper[lang="en"],
.paper[lang="fr"] {
  font-family: "Outfit", sans-serif
}

html[lang="ar"] body {
  font-family: "Tajawal", sans-serif
}

.paper.density-compact {
  --section-space: 10px
}

.paper.density-balanced {
  --section-space: 15px
}

.paper.density-airy {
  --section-space: 23px
}

.paper[dir=rtl] {
  text-align: right
}

.paper .cv-name {
  margin: 0;
  color: #222c37;
  font-weight: 900;
  font-size: calc(28pt * var(--cv-size));
  line-height: 1.13;
  letter-spacing: -.03em;
  overflow-wrap: anywhere
}

.paper[dir=rtl] .cv-name {
  letter-spacing: 0
}

.paper .cv-job {
  color: var(--cv-accent);
  font-weight: 800;
  font-size: calc(11pt * var(--cv-size));
  margin: 8px 0 16px;
  letter-spacing: .09em
}

.paper[dir=rtl] .cv-job {
  letter-spacing: 0
}

.cv-avatar {
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center var(--cv-photo-y);
  border-radius: 9px;
  width: calc(34mm * var(--cv-photo-scale));
  height: calc(39mm * var(--cv-photo-scale));
  background: #e7e9ec;
  color: #6a7080
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 21pt;
  color: #6c7181;
  background: #e8e9ec;
  letter-spacing: .02em
}

.paper.photo-circle .cv-avatar {
  border-radius: 50%;
  width: calc(37mm * var(--cv-photo-scale));
  height: calc(37mm * var(--cv-photo-scale))
}

.paper.photo-square .cv-avatar {
  border-radius: 0
}

.paper.photo-soft .cv-avatar {
  border-radius: 8px
}

.cv-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 8px
}

.cv-contact {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  font-size: calc(8.1pt * var(--cv-size));
  color: #596674;
  overflow-wrap: anywhere
}

.cv-contact-icon {
  font-size: 11pt;
  flex: none;
  font-weight: bold;
  color: var(--cv-accent);
  width: 15px;
  line-height: 1.1
}

.cv-section {
  margin: 0 0 var(--section-space);
  break-inside: avoid-page;
  page-break-inside: avoid
}

.cv-section h2 {
  font-size: calc(10.3pt * var(--cv-size));
  font-weight: 850;
  margin: 0 0 9px;
  letter-spacing: .04em;
  line-height: 1.25;
  text-transform: uppercase;
  color: #243649
}

.paper[dir=rtl] .cv-section h2 {
  letter-spacing: 0
}

.cv-section h2 span {
  display: inline-block
}

.cv-section .cv-about {
  white-space: pre-line;
  font-size: calc(9pt * var(--cv-size));
  margin: 0;
  color: #43505d;
  line-height: inherit
}

.cv-item {
  margin: 0 0 12px;
  break-inside: avoid;
  page-break-inside: avoid
}

.cv-item:last-child {
  margin-bottom: 0
}

.cv-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px
}

.cv-item h3 {
  font-size: calc(9.5pt * var(--cv-size));
  font-weight: 850;
  margin: 0;
  color: #253241
}

.cv-organization {
  font-size: calc(8.6pt * var(--cv-size));
  color: #5b6775;
  margin: 2px 0 4px;
  font-weight: 650
}

.cv-dates {
  font-size: calc(8pt * var(--cv-size));
  color: #78818b;
  white-space: nowrap;
  flex-shrink: 0
}

.cv-item-details {
  font-size: calc(8.65pt * var(--cv-size));
  color: #4e5965;
  white-space: pre-line;
  line-height: inherit;
  margin: 3px 0
}

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

.cv-tag {
  border-radius: 4px;
  background: #eff2f5;
  color: #3b4855;
  padding: 4px 7px;
  font-size: calc(8.2pt * var(--cv-size));
  line-height: 1.32;
  overflow-wrap: anywhere
}

.cv-blank-notice {
  border: 1px dashed #d8dde7;
  background: #fafbfc;
  border-radius: 9px;
  color: #9ba2af;
  padding: 18px;
  margin: 22px 0;
  font-size: 9pt;
  line-height: 1.6
}

/* Reference-inspired editorial two-column templates */
.cv-two-col {
  display: grid;
  grid-template-columns: 66mm minmax(0, 1fr);
  min-height: 297mm;
  position: relative
}

.cv-two-col .cv-sidebar {
  min-width: 0;
  padding: 14mm 8mm 12mm;
  position: relative;
  z-index: 1
}

.cv-sidebar-head {
  display: flex;
  justify-content: center;
  margin: 0 0 14mm;
  position: relative
}

.cv-two-col .cv-sidebar .cv-contacts {
  display: grid;
  gap: 11px;
  margin: 0 0 21px
}

.cv-two-col .cv-sidebar .cv-contact {
  font-size: calc(8.3pt * var(--cv-size));
  line-height: 1.4
}

.cv-two-col .cv-sidebar .cv-contact-icon {
  font-size: 10.5pt
}

.cv-two-col .cv-body {
  padding: 28mm 15mm 18mm;
  min-width: 0;
  position: relative;
  z-index: 0
}

.cv-two-col .cv-name-header {
  margin: 0 0 23px;
  position: relative;
  z-index: 1
}

.cv-two-col .cv-section {
  position: relative;
  z-index: 1
}

.cv-two-col .cv-name {
  font-size: calc(27pt * var(--cv-size));
  font-weight: 900
}

.cv-two-col .cv-job {
  font-size: calc(10pt * var(--cv-size))
}

.cv-art-top,
.cv-art-bottom {
  pointer-events: none
}

.cv-two-col .cv-section h2 {
  margin-bottom: 11px
}

.cv-two-col .cv-section h2 span {
  max-width: 100%
}

.template-noir .cv-sidebar {
  background: var(--cv-side);
  color: #f8f7f5
}

.template-noir .cv-sidebar:before {
  content: "";
  position: absolute;
  width: 40mm;
  height: 1.2mm;
  background: var(--cv-accent);
  top: 0;
  left: 0
}

.template-noir .cv-sidebar:after {
  content: "";
  position: absolute;
  height: 4mm;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, var(--cv-accent) 0 37%, transparent 37%)
}

.template-noir .cv-sidebar .cv-avatar {
  width: calc(43mm * var(--cv-photo-scale));
  height: calc(48mm * var(--cv-photo-scale));
  border: 2px solid var(--cv-accent);
  box-shadow: 0 8px 22px #0006
}

.template-noir.photo-circle .cv-sidebar .cv-avatar {
  width: calc(43mm * var(--cv-photo-scale));
  height: calc(43mm * var(--cv-photo-scale))
}

.template-noir .cv-sidebar .avatar-fallback {
  background: #3b3f45;
  color: #f8edca
}

.template-noir .cv-sidebar .cv-contact {
  color: #d9d6ce
}

.template-noir .cv-sidebar .cv-contact-icon {
  color: var(--cv-accent)
}

.template-noir .cv-sidebar .cv-section h2 {
  color: var(--cv-accent);
  font-size: calc(10pt * var(--cv-size));
  margin-bottom: 14px
}

.template-noir .cv-sidebar .cv-section h2:after {
  content: "";
  display: block;
  height: 1px;
  background: #55534c;
  margin-top: 6px
}

.template-noir .cv-sidebar .cv-tag {
  display: block;
  min-width: 100%;
  background: transparent;
  color: #f0eee8;
  padding: 5px 2px 5px 12px;
  border-inline-start: 3px solid var(--cv-accent);
  border-radius: 0
}

.template-noir .cv-sidebar .cv-tags {
  display: grid;
  gap: 5px
}

.template-noir .cv-body {
  background: #fff
}

.template-noir .cv-name-header {
  padding-bottom: 9px;
  border-bottom: 2px solid #e1ded4
}

.template-noir .cv-job {
  color: #4d5158;
  letter-spacing: .19em
}

.template-noir .cv-body .cv-section h2 span {
  background: var(--cv-accent);
  color: #181b21;
  padding: 5px 12px 4px;
  border-radius: 2px;
  min-width: 62%
}

.template-noir .cv-body .cv-section h2 {
  margin-bottom: 11px
}

.template-noir .cv-item h3 {
  color: #252b32
}

.template-noir .cv-body .cv-section-extras h2 span {
  min-width: 72%
}

.template-noir .cv-art-top,
.template-noir .cv-art-bottom {
  display: none
}

.template-teal .cv-sidebar {
  background: #f7fbfa;
  color: #27545a;
  border-inline-end: 1px solid #dae9e6;
  padding-top: 25mm
}

.template-teal .cv-sidebar:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18mm;
  background: var(--cv-accent);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 67% 100%, 34% 70%, 0 90%);
  opacity: .96
}

.template-teal .cv-sidebar:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 15mm;
  background: var(--cv-accent);
  clip-path: polygon(0 68%, 40% 28%, 73% 54%, 100% 0, 100% 100%, 0 100%)
}

.template-teal .cv-sidebar-head {
  margin-bottom: 7mm
}

.template-teal .cv-sidebar .cv-avatar {
  width: calc(40mm * var(--cv-photo-scale));
  height: calc(40mm * var(--cv-photo-scale));
  border: 3px solid var(--cv-accent);
  box-shadow: 0 6px 15px #0a57552a
}

.template-teal .cv-sidebar .cv-contact {
  color: #476e6c
}

.template-teal .cv-sidebar .cv-contact-icon {
  color: var(--cv-accent)
}

.template-teal .cv-sidebar .cv-section h2 {
  color: #fff;
  background: var(--cv-accent);
  border-radius: 30px;
  padding: 5px 10px;
  font-size: calc(9.5pt * var(--cv-size))
}

.template-teal .cv-sidebar .cv-tag {
  background: transparent;
  border-bottom: 1px solid #a5c9c4;
  border-radius: 0;
  padding: 5px 3px;
  color: #285854
}

.template-teal .cv-sidebar .cv-tags {
  display: grid;
  gap: 2px
}

.template-teal .cv-body {
  background: #fff;
  padding-top: 24mm
}

.template-teal .cv-name-header {
  border-bottom: 2px solid #d8eeeb;
  padding-bottom: 10px
}

.template-teal .cv-name {
  color: #173f43;
  font-size: calc(25pt * var(--cv-size))
}

.template-teal .cv-job {
  letter-spacing: .17em;
  color: var(--cv-accent);
  font-weight: 650
}

.template-teal .cv-body .cv-section h2 span {
  display: block;
  background: var(--cv-accent);
  color: white;
  border-radius: 50px;
  padding: 5px 13px;
  width: 80%;
  max-width: 100%
}

.template-teal .cv-body .cv-section h2 {
  font-size: calc(9.8pt * var(--cv-size))
}

.template-teal .cv-body .cv-dates {
  color: var(--cv-accent);
  font-weight: 750
}

.template-teal .cv-art-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 12mm;
  background: var(--cv-accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 61% 68%, 20% 100%, 0 72%);
  opacity: .90
}

.template-teal .cv-art-bottom {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 11mm;
  background: var(--cv-accent);
  clip-path: polygon(0 65%, 34% 23%, 70% 58%, 100% 10%, 100% 100%, 0 100%);
  opacity: .92
}

/* Previous three templates retained */
.cv-single {
  padding: 18mm 17mm 20mm;
  min-height: 297mm
}

.cv-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 0 0 21px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--cv-accent)
}

.cv-heading-text {
  min-width: 0
}

.cv-single .cv-heading .cv-avatar {
  width: calc(29mm * var(--cv-photo-scale));
  height: calc(34mm * var(--cv-photo-scale));
  border: 2px solid #eee
}

.cv-single.photo-circle .cv-heading .cv-avatar {
  height: calc(33mm * var(--cv-photo-scale));
  width: calc(33mm * var(--cv-photo-scale))
}

.cv-single .cv-job {
  margin-bottom: 5px
}

.cv-single .cv-section h2 {
  color: var(--cv-accent);
  border-bottom: 1px solid #e7eaf0;
  padding-bottom: 6px
}

.cv-single .cv-tag {
  background: #eef0fa;
  color: #3b4563
}

.template-classic .cv-single {
  padding: 18mm 19mm 22mm
}

.template-classic .cv-heading {
  display: flex;
  flex-direction: column-reverse;
  text-align: center;
  border-bottom: 1px solid #263e59;
  padding-bottom: 15px;
  gap: 8px
}

.template-classic .cv-heading-text {
  text-align: center
}

.template-classic .cv-contacts {
  justify-content: center
}

.template-classic .cv-name {
  font-weight: 600;
  letter-spacing: .03em;
  font-size: calc(26pt * var(--cv-size))
}

.template-classic .cv-job {
  color: #49576a;
  font-weight: 500;
  letter-spacing: .09em
}

.template-classic .cv-single .cv-section h2 {
  color: #263c52;
  border-bottom: 1px solid #3c4b5a
}

.template-classic .cv-single .cv-tag {
  border: 1px solid #bfc6ca;
  background: #fff;
  border-radius: 0;
  color: #37444c
}

.template-minimal .cv-heading {
  border-bottom: 0;
  margin-bottom: 13px;
  padding-bottom: 10px
}

.template-minimal .cv-name {
  font-weight: 650;
  font-size: calc(26pt * var(--cv-size))
}

.template-minimal .cv-job {
  color: #67747f;
  font-weight: 500
}

.template-minimal .cv-single .cv-section h2 {
  border: 0;
  color: #2e3d48;
  padding-bottom: 0;
  letter-spacing: 0
}

.template-minimal .cv-single .cv-section {
  margin-bottom: calc(var(--section-space) + 4px)
}

.template-minimal .cv-single .cv-tag {
  border: 1px solid #e0e4e7;
  background: #fff;
  border-radius: 0
}

.preview-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #7c8798;
  font-size: 10px;
  line-height: 1.5
}

.toast {
  position: fixed;
  inset-inline-end: 25px;
  bottom: 24px;
  z-index: 10;
  background: #1f2d47;
  color: white;
  border-radius: 11px;
  box-shadow: 0 10px 35px #0003;
  padding: 12px 16px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .2s, transform .2s;
  pointer-events: none
}

.toast.show {
  opacity: 1;
  transform: translateY(0)
}

html[dir=rtl] .editor,
html[dir=rtl] .intro {
  text-align: right
}

html[dir=rtl] input:not([type=color]),
html[dir=rtl] textarea {
  text-align: right
}

html[dir=rtl] .brand {
  letter-spacing: normal
}

html[dir=rtl] .mini {
  direction: ltr
}

.paper[dir=rtl] .cv-job {
  text-transform: none
}

.paper[dir=rtl] .cv-dates {
  white-space: normal
}

.paper[dir=rtl] .cv-about,
.paper[dir=rtl] .cv-item-details {
  line-height: 1.7
}

@media(max-width:1280px) {
  .workspace {
    grid-template-columns: minmax(385px, 470px) minmax(0, 1fr)
  }

  .paper-stage {
    justify-content: flex-start
  }

  .intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px
  }

  .site-container {
    padding-inline: 20px
  }
}

@media(max-width:1000px) {
  .workspace {
    grid-template-columns: 1fr
  }

  .preview-panel {
    position: static
  }

  .paper-stage {
    justify-content: center
  }

  .editor {
    max-width: none
  }

  .site-container {
    padding: 26px 16px 55px
  }

  .preview-panel {
    max-width: 100%
  }
}

@media(max-width:700px) {
  .topbar {
    flex-wrap: wrap;
    min-height: 70px;
    padding: 13px 15px
  }

  .top-actions {
    width: 100%;
    justify-content: space-between
  }

  .top-actions .button {
    padding: 9px;
    font-size: 11px
  }

  .top-actions select {
    padding: 9px
  }

  .brand {
    font-size: 15px
  }

  .intro h1 {
    font-size: 27px
  }

  .intro p {
    font-size: 13px
  }

  .editor-head {
    padding: 21px 16px
  }

  .block-inner {
    padding: 0 16px 21px
  }

  .editor-block>summary {
    padding: 18px 16px
  }

  .editor-footer {
    padding: 18px 16px
  }

  .template-grid {
    gap: 5px
  }

  .mini {
    width: 45px;
    height: 64px
  }

  .template-card {
    padding: 6px 2px
  }

  .template-card strong {
    font-size: 9px
  }

  .preview-label small {
    display: none
  }

  .paper-stage {
    justify-content: flex-start;
    padding: 10px
  }

  .preview-foot {
    flex-direction: column
  }

  .preview-toolbar {
    flex-wrap: wrap
  }

  .preview-controls {
    margin-inline-start: auto
  }
}

@media(max-width:430px) {
  .field-row {
    grid-template-columns: 1fr
  }

  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .mini {
    width: 39px;
    height: 57px
  }

  .template-card strong {
    font-size: 8px
  }

  .preview-toolbar .button {
    font-size: 10px
  }

  .brand {
    font-size: 13px
  }
}

@media print {
  @page {
    size: A4;
    margin: 0
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    color: #000 !important
  }

  .no-print,
  .topbar,
  .intro,
  .editor,
  .preview-toolbar,
  .preview-foot,
  .toast {
    display: none !important
  }

  .site-container,
  .workspace,
  .preview-panel,
  .paper-stage {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: static !important
  }

  .paper {
    zoom: 1 !important;
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    overflow: visible !important
  }

  .cv-two-col {
    min-height: 297mm !important
  }

  .cv-single {
    min-height: 297mm !important
  }

  .cv-section h2 {
    break-after: avoid;
    page-break-after: avoid
  }

  .cv-item,
  .cv-section,
  .cv-heading,
  .cv-name-header {
    break-inside: avoid-page;
    page-break-inside: avoid
  }

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

/* Fine control over headings and sidebar/main-column placement */
.manage-row {
  display: grid;
  gap: 9px
}

.manage-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.manage-row-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 7px
}

.manage-row-bottom .heading-override,
.manage-row-bottom select {
  min-width: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #dde3ee;
  border-radius: 7px;
  min-height: 32px;
  padding: 5px 7px;
  color: #47536a;
  font-size: 10.5px
}

.manage-row-bottom .heading-override::placeholder {
  color: #a2aab8
}

/* Fine control over headings and column placement */
.manage-row {
  display: grid;
  gap: 9px
}

.manage-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.manage-row-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 7px
}

.manage-row-bottom .heading-override,
.manage-row-bottom select {
  min-width: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #dde3ee;
  border-radius: 7px;
  min-height: 32px;
  padding: 5px 7px;
  color: #47536a;
  font-size: 10.5px
}

.manage-row-bottom .heading-override::placeholder {
  color: #a2aab8
}

/* V3 brand typography: Outfit for English/French and Tajawal for Arabic. */
html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  font-family: "Tajawal", sans-serif;
}

html[lang="en"] body,
html[lang="fr"] body,
html[lang="en"] button,
html[lang="fr"] button,
html[lang="en"] input,
html[lang="fr"] input,
html[lang="en"] select,
html[lang="fr"] select,
html[lang="en"] textarea,
html[lang="fr"] textarea {
  font-family: "Outfit", sans-serif;
}

#cv-font:disabled {
  opacity: .82;
  cursor: default;
  background: #f8f9fc;
}

.font-note {
  display: block;
  color: #8b94a4;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 5px;
}

/* Additional template thumbnails */
.mini-botanical:before {
  inset: 0;
  background: #c4b6a9;
}
.mini-botanical:after {
  top: 5px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f8f7f3;
  border: 2px solid #8b7b70;
}
.mini-botanical b { top: 33px; left: 5px; right: auto; width: 20px; background: repeating-linear-gradient(to bottom, #76685f 0 2px, transparent 2px 5px); }
.mini-botanical i { top: 48px; left: 5px; right: auto; width: 20px; background: repeating-linear-gradient(to bottom, #76685f 0 2px, transparent 2px 5px); }
.mini-botanical em { top: 29px; right: 5px; width: 17px; background: #8b7b70; }

.mini-mauve:before {
  inset: 0 auto 0 0;
  width: 19px;
  background: #7a576d;
  border-radius: 0 9px 9px 0;
}
.mini-mauve:after {
  top: 7px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f4f4f4;
  border: 2px solid #e4d7e0;
}
.mini-mauve b, .mini-mauve i, .mini-mauve em { left: 25px; right: 4px; width: auto; }
.mini-mauve em { top: 12px; background: #7a576d; }
.mini-mauve b { top: 31px; }
.mini-mauve i { top: 49px; }

.mini-royal:before {
  inset: 0 0 auto;
  height: 25px;
  background: #3f0157;
}
.mini-royal:after {
  top: 5px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #d0c4ea;
  border: 2px solid #fff;
}
.mini-royal b { top: 34px; right: 5px; width: 25px; }
.mini-royal i { top: 50px; right: 5px; width: 25px; }
.mini-royal em { top: 29px; right: 5px; width: 25px; background: #3f0157; }

.mini-navy:before {
  inset: 0 0 0 auto;
  width: 19px;
  background: #113555;
}
.mini-navy:after {
  top: 6px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e6e6e6;
  border: 2px solid #d2ae4c;
}
.mini-navy b, .mini-navy i, .mini-navy em { left: 5px; right: auto; width: 22px; }
.mini-navy em { top: 12px; background: #d2ae4c; }
.mini-navy b { top: 31px; }
.mini-navy i { top: 49px; }

/* Shared structural rules for the four new A4 layouts. */
.cv-template-text {
  min-width: 0;
  direction: ltr;
  text-align: left;
}
.paper[dir="rtl"] .cv-template-text {
  direction: rtl;
  text-align: right;
}
.cv-template-text .cv-section h2 {
  margin: 0 0 10px;
  font-size: calc(10pt * var(--cv-size));
  line-height: 1.3;
}
.cv-template-text .cv-section {
  margin-bottom: var(--section-space);
}
.cv-template-text .cv-item {
  margin-bottom: 11px;
}
.cv-template-text .cv-item h3 {
  font-size: calc(9.3pt * var(--cv-size));
}
.cv-template-text .cv-item-details,
.cv-template-text .cv-about {
  font-size: calc(8.5pt * var(--cv-size));
}
.cv-template-text .cv-contacts {
  display: grid;
  gap: 7px;
  margin: 0 0 17px;
}
.cv-template-text .cv-contact {
  font-size: calc(7.8pt * var(--cv-size));
  line-height: 1.45;
}
.cv-template-text .cv-section h2 span {
  max-width: 100%;
}

/* 06 — Botanical Beige: warm taupe, ivory portrait field and botanical line art. */
.template-botanical {
  background: var(--cv-side);
  color: #211a16;
}
.cv-botanical-layout {
  min-height: 297mm;
  position: relative;
  overflow: hidden;
  padding: 10mm 10mm 13mm;
  background: var(--cv-side);
  direction: ltr;
}
.cv-botanical-layout:before {
  content: "";
  position: absolute;
  width: 122mm;
  height: 122mm;
  top: -48mm;
  right: -27mm;
  border-radius: 50%;
  background: #f8f7f3;
}
.cv-botanical-top {
  min-height: 91mm;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 69mm;
  gap: 5mm;
  align-items: center;
  position: relative;
  z-index: 1;
}
.cv-botanical-identity {
  padding: 22mm 0 0 1mm;
}
.cv-botanical-identity .cv-name {
  color: #241b17;
  font-size: calc(28pt * var(--cv-size));
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.035em;
}
.cv-botanical-identity .cv-job {
  color: #342821;
  font-size: calc(11pt * var(--cv-size));
  font-weight: 600;
  letter-spacing: 0;
  margin: 4mm 0 0;
}
.cv-botanical-photo {
  width: 64mm;
  height: 64mm;
  justify-self: end;
  align-self: center;
  display: grid;
  place-items: center;
  border: 1.2mm solid var(--cv-accent);
  border-radius: 50%;
  background: #e8ded5;
  padding: 1.2mm;
  overflow: hidden;
  transform: scale(var(--cv-photo-scale));
}
.template-botanical .cv-botanical-photo .cv-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 0;
  box-shadow: none;
}
.cv-botanical-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .9fr);
  gap: 10mm;
  position: relative;
  z-index: 1;
  padding: 3mm 1mm 0;
}
.cv-botanical-main,
.cv-botanical-side {
  min-width: 0;
}
.template-botanical .cv-section h2 span {
  display: inline-block;
  min-width: 54mm;
  border: 1px solid #8b7d72;
  border-radius: 50px;
  padding: 2mm 4mm;
  color: #211a16;
  background: transparent;
  font-weight: 800;
}
.template-botanical .cv-section h2 {
  margin-bottom: 5mm;
}
.template-botanical .cv-item h3,
.template-botanical .cv-organization,
.template-botanical .cv-item-details,
.template-botanical .cv-about,
.template-botanical .cv-contact {
  color: #29211c;
}
.template-botanical .cv-dates {
  color: #332821;
  font-weight: 750;
}
.template-botanical .cv-tag {
  background: transparent;
  color: #29211c;
  border-radius: 0;
  padding: 2px 0;
}
.template-botanical .cv-botanical-side .cv-tags {
  display: grid;
  gap: 1px;
}
.template-botanical .cv-botanical-side .cv-tag:before {
  content: "•";
  margin-inline-end: 7px;
}
.botanical-ornament {
  position: absolute;
  pointer-events: none;
  fill: none;
  z-index: 2;
}
.botanical-top-leaves {
  width: 55mm;
  height: 38mm;
  top: -1mm;
  left: -3mm;
}
.botanical-bottom-leaves {
  width: 45mm;
  height: 56mm;
  right: -1mm;
  bottom: -5mm;
}

/* 07 — Mauve Wave: soft plum sidebar with a flowing edge and clean white content. */
.template-mauve {
  background: #f4f4f4;
  color: #382b35;
}
.cv-mauve-layout {
  min-height: 297mm;
  display: grid;
  grid-template-columns: 78mm minmax(0, 1fr);
  background: #f4f4f4;
  direction: ltr;
  overflow: hidden;
}
.cv-mauve-sidebar {
  position: relative;
  z-index: 1;
  padding: 12mm 9mm 13mm;
  background: var(--cv-side);
  color: #fff;
  border-radius: 0 38% 26% 0 / 0 13% 10% 0;
}
.cv-mauve-photo {
  width: 58mm;
  height: 58mm;
  margin: 0 auto 10mm;
  border-radius: 50%;
  padding: 1mm;
  background: #e4d7e0;
  overflow: hidden;
  transform: scale(var(--cv-photo-scale));
}
.template-mauve .cv-mauve-photo .cv-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 0;
}
.template-mauve .cv-mauve-sidebar .cv-contact {
  color: #f7eef3;
}
.template-mauve .cv-mauve-sidebar .cv-contact-icon {
  color: #eadce5;
}
.template-mauve .cv-mauve-sidebar .cv-section h2 {
  color: #fff;
  font-size: calc(10pt * var(--cv-size));
  letter-spacing: .04em;
  margin-bottom: 5px;
}
.template-mauve .cv-mauve-sidebar .cv-section h2 span {
  display: block;
  border-bottom: 1px solid #c9afbf;
  padding: 0 0 2mm;
}
.template-mauve .cv-mauve-sidebar .cv-section .cv-about,
.template-mauve .cv-mauve-sidebar .cv-section .cv-item-details,
.template-mauve .cv-mauve-sidebar .cv-section .cv-item h3,
.template-mauve .cv-mauve-sidebar .cv-section .cv-organization,
.template-mauve .cv-mauve-sidebar .cv-section .cv-tag {
  color: #fff;
}
.template-mauve .cv-mauve-sidebar .cv-tag {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #a9879c;
  border-radius: 0;
  padding: 4px 0;
}
.template-mauve .cv-mauve-sidebar .cv-tags {
  display: grid;
  gap: 2px;
}
.cv-mauve-main {
  padding: 17mm 12mm 16mm 9mm;
  min-width: 0;
  background: #f4f4f4;
}
.cv-mauve-heading {
  margin: 0 0 12mm;
  padding: 0 0 5mm;
  border-bottom: 1px solid var(--cv-accent);
}
.cv-mauve-heading .cv-name {
  color: var(--cv-accent);
  font-size: calc(27pt * var(--cv-size));
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -.025em;
}
.cv-mauve-heading .cv-job {
  color: var(--cv-accent);
  opacity: .72;
  font-size: calc(10pt * var(--cv-size));
  font-weight: 600;
  letter-spacing: .02em;
  margin: 2mm 0 0;
}
.template-mauve .cv-mauve-main .cv-section h2 {
  color: #7a576d;
  font-size: calc(11pt * var(--cv-size));
  letter-spacing: .02em;
}
.template-mauve .cv-mauve-main .cv-section h2 span {
  display: inline-block;
  border-bottom: 1.2mm solid #e4d7e0;
  padding-bottom: 1.5mm;
}
.template-mauve .cv-mauve-main .cv-dates,
.template-mauve .cv-mauve-main .cv-organization {
  color: #9a7e90;
}
.template-mauve .cv-mauve-main .cv-tag {
  background: #e4d7e0;
  color: #67495d;
}

/* 08 — Royal Purple: deep violet banner, portrait overlap and editorial lower columns. */
.template-royal {
  background: #fff;
  color: #351a40;
}
.cv-royal-layout {
  min-height: 297mm;
  background: #fff;
  direction: ltr;
}
.cv-royal-header {
  min-height: 72mm;
  padding: 11mm 12mm 11mm 13mm;
  display: grid;
  grid-template-columns: 62mm minmax(0, 1fr);
  gap: 9mm;
  align-items: center;
  background: var(--cv-side);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cv-royal-header:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 65mm;
  background: linear-gradient(135deg, #64217a, var(--cv-side));
  clip-path: polygon(0 0, 100% 0, 64% 100%, 0 100%);
}
.cv-royal-photo {
  position: relative;
  z-index: 1;
  width: 49mm;
  height: 49mm;
  border-radius: 50%;
  border: 2mm solid #fff;
  padding: 1mm;
  background: #d0c4ea;
  overflow: hidden;
  transform: scale(var(--cv-photo-scale));
}
.template-royal .cv-royal-photo .cv-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 0;
}
.cv-royal-identity {
  position: relative;
  z-index: 1;
  color: #fff;
}
.cv-royal-identity .cv-name {
  color: #fff;
  font-size: calc(25pt * var(--cv-size));
  line-height: 1.1;
  font-weight: 900;
}
.cv-royal-identity .cv-job {
  color: #e4d7ed;
  font-size: calc(11pt * var(--cv-size));
  font-weight: 600;
  margin: 2mm 0 0;
  letter-spacing: .02em;
}
.cv-royal-content {
  display: grid;
  grid-template-columns: 70mm minmax(0, 1fr);
  min-height: 225mm;
}
.cv-royal-sidebar {
  padding: 11mm 8mm 13mm;
  background: #fff;
  border-right: 1px solid #e8e1ef;
}
.cv-royal-main {
  padding: 12mm 12mm 14mm;
  min-width: 0;
}
.template-royal .cv-royal-sidebar .cv-section h2 span {
  display: block;
  background: var(--cv-side);
  color: #fff;
  border-radius: 50px;
  padding: 2mm 4mm;
}
.template-royal .cv-royal-sidebar .cv-section h2,
.template-royal .cv-royal-main .cv-section h2 {
  color: #3f0157;
}
.template-royal .cv-royal-main .cv-section h2 span {
  display: inline-block;
  border-bottom: 1px solid #bda7cf;
  padding-bottom: 1.5mm;
}
.template-royal .cv-royal-sidebar .cv-tag {
  background: #f0eaf6;
  color: #4c235e;
  border-radius: 4px;
}
.template-royal .cv-royal-main .cv-dates,
.template-royal .cv-royal-main .cv-organization {
  color: #6b3b7b;
}
.template-royal .cv-royal-sidebar .cv-contact-icon {
  color: #4b1263;
}

/* 09 — Navy & Gold: Arabic-first right sidebar with clean light content. */
.template-navy {
  background: #f3f3f3;
  color: #172f43;
}
.cv-navy-layout {
  min-height: 297mm;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, .92fr);
  background: #f3f3f3;
  direction: ltr;
}
.cv-navy-main {
  grid-column: 1;
  padding: 12mm 10mm 14mm;
  min-width: 0;
  background: #f3f3f3;
}
.cv-navy-sidebar {
  grid-column: 2;
  grid-row: 1;
  padding: 10mm 7mm 13mm;
  min-width: 0;
  background: var(--cv-side);
  color: #fff;
  border-radius: 0 0 12mm 12mm;
}
.cv-navy-photo {
  width: 48mm;
  height: 48mm;
  margin: 0 auto 10mm;
  border-radius: 50%;
  padding: 1.3mm;
  border: 1mm solid var(--cv-accent);
  background: #e5e5e5;
  overflow: hidden;
  transform: scale(var(--cv-photo-scale));
}
.template-navy .cv-navy-photo .cv-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 0;
}
.cv-navy-heading {
  margin: 0 0 10mm;
  padding: 0 0 7mm;
  border-bottom: 1px solid var(--cv-accent);
}
.cv-navy-heading .cv-name {
  color: #113555;
  font-size: calc(25pt * var(--cv-size));
  font-weight: 900;
  line-height: 1.18;
}
.cv-navy-heading .cv-job {
  color: var(--cv-accent);
  font-size: calc(13pt * var(--cv-size));
  font-weight: 800;
  margin: 2mm 0 0;
  letter-spacing: 0;
}
.template-navy .cv-navy-main .cv-section h2 {
  color: #fff;
  margin-bottom: 5mm;
}
.template-navy .cv-navy-main .cv-section h2 span {
  display: inline-block;
  background: #23658b;
  color: #fff;
  padding: 2.5mm 4mm;
  border-radius: 3mm 0 3mm 0;
  border-inline-start: 1.2mm solid var(--cv-accent);
}
.template-navy .cv-navy-main .cv-item h3,
.template-navy .cv-navy-main .cv-organization,
.template-navy .cv-navy-main .cv-item-details,
.template-navy .cv-navy-main .cv-about {
  color: #24394a;
}
.template-navy .cv-navy-main .cv-dates {
  color: #23658b;
  font-weight: 800;
}
.template-navy .cv-navy-main .cv-tag {
  background: #e4ebf0;
  color: #173e5c;
}
.template-navy .cv-navy-sidebar .cv-contact {
  color: #f3f4f6;
}
.template-navy .cv-navy-sidebar .cv-contact-icon {
  color: var(--cv-accent);
}
.template-navy .cv-navy-sidebar .cv-section h2 {
  color: var(--cv-accent);
  border-bottom: 1px solid #42627a;
  padding-bottom: 2mm;
}
.template-navy .cv-navy-sidebar .cv-section h2 span {
  display: inline-block;
}
.template-navy .cv-navy-sidebar .cv-tag {
  display: block;
  width: 100%;
  background: transparent;
  color: #fff;
  border-radius: 0;
  padding: 3px 0;
  border-bottom: 1px solid #294e6b;
}
.template-navy .cv-navy-sidebar .cv-tags {
  display: grid;
  gap: 2px;
}

/* Keep the four new designs clean on smaller editor screens and in A4 print. */
@media(max-width:700px) {
  .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media print {
  .cv-botanical-layout,
  .cv-mauve-layout,
  .cv-royal-layout,
  .cv-navy-layout {
    min-height: 297mm !important;
  }
}


/* The portrait shape control remains available in all four new templates. */
.paper.photo-square .cv-botanical-photo,
.paper.photo-square .cv-mauve-photo,
.paper.photo-square .cv-royal-photo,
.paper.photo-square .cv-navy-photo,
.paper.photo-square .cv-botanical-photo .cv-avatar,
.paper.photo-square .cv-mauve-photo .cv-avatar,
.paper.photo-square .cv-royal-photo .cv-avatar,
.paper.photo-square .cv-navy-photo .cv-avatar {
  border-radius: 0 !important;
}
.paper.photo-soft .cv-botanical-photo,
.paper.photo-soft .cv-mauve-photo,
.paper.photo-soft .cv-royal-photo,
.paper.photo-soft .cv-navy-photo,
.paper.photo-soft .cv-botanical-photo .cv-avatar,
.paper.photo-soft .cv-mauve-photo .cv-avatar,
.paper.photo-soft .cv-royal-photo .cv-avatar,
.paper.photo-soft .cv-navy-photo .cv-avatar {
  border-radius: 3mm !important;
}


/* V4: Website-matched header */
.topbar.site-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 0;
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(20, 34, 56, .06);
}
.site-header-inner {
  max-width: 1670px;
  min-height: 72px;
  margin: 0 auto;
  padding: 10px clamp(14px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-main {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 32px);
  min-width: 0;
}
.site-brand {
  color: #7e22ce;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.site-nav ul,
.mobile-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 25px);
  margin: 0;
  padding: 0;
}
.site-nav a,
.mobile-menu a {
  color: #596579;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .18s ease;
}
.site-nav a:hover,
.mobile-menu a:hover { color: #7e22ce; }
.header-actions {
  flex-shrink: 0;
  gap: 8px;
}
.site-header .top-actions select {
  min-width: 92px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #e2e6ef;
  border-radius: 10px;
  background: #fff;
  color: #344158;
  font: inherit;
  font-size: 12px;
}
.site-header .top-actions .export-format { min-width: 116px; }
.header-quick {
  display: flex;
  align-items: center;
  gap: 7px;
}
.header-icon-button {
  width: 39px;
  height: 39px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e5eaf2;
  border-radius: 11px;
  background: #fff;
  color: #4b5563;
  font-size: 20px;
  line-height: 1;
}
.header-icon-button:hover { background: #f7f4ff; color: #7e22ce; }
.theme-sun { display: none; }
html.dark .theme-moon { display: none; }
html.dark .theme-sun { display: inline; }
.mobile-menu-toggle { display: none; }
.mobile-menu {
  display: none;
  padding: 0 18px 13px;
  border-top: 1px solid #edf0f5;
  background: #fff;
}
.mobile-menu[hidden] { display: none !important; }
.mobile-menu ul {
  max-width: 1670px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}
.mobile-menu a {
  display: block;
  padding: 8px 2px;
}
.header-actions .button:disabled { opacity: .65; cursor: wait; }

/* V4: brand fonts are applied consistently to every CV template and export. */
.paper,
.paper * {
  font-family: var(--cv-font-family, "Outfit", sans-serif) !important;
}
.font-note {
  display: block;
  margin-top: 6px;
  color: #8993a4;
  font-size: 10px;
  line-height: 1.55;
}
#cv-font { width: 100%; }

/* V4: SEO content below the interactive tool */
.seo-content {
  max-width: 1400px;
  margin: 0 auto 70px;
  padding: 0 clamp(14px, 2.4vw, 36px);
  color: #26364c;
}
.seo-content-inner {
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 18px;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 12px 35px rgba(20, 34, 56, .04);
}
.seo-eyebrow {
  margin: 0 0 8px;
  color: #7564d7;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}
.seo-copy h2,
.seo-how h2,
.faq-section h2 {
  margin: 0 0 12px;
  color: #18283f;
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.35;
}
.seo-copy > p:last-child {
  max-width: 1000px;
  margin: 0;
  color: #66748a;
  line-height: 1.9;
  font-size: 14px;
}
.seo-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 34px;
}
.seo-card {
  padding: 18px;
  border: 1px solid #e8ecf3;
  border-radius: 13px;
  background: #fafbfe;
}
.seo-card h3 {
  margin: 0 0 7px;
  color: #33435d;
  font-size: 14px;
}
.seo-card p {
  margin: 0;
  color: #78849a;
  font-size: 12px;
  line-height: 1.8;
}
.seo-how { margin-bottom: 32px; }
.seo-how ol {
  margin: 0;
  padding-inline-start: 23px;
  color: #647188;
  line-height: 2;
  font-size: 13px;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.faq-item {
  padding: 14px 16px;
  border: 1px solid #e6eaf1;
  border-radius: 11px;
  background: #fbfcff;
}
.faq-item summary {
  color: #33435d;
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
}
.faq-item p {
  margin: 10px 0 0;
  color: #738097;
  font-size: 12px;
  line-height: 1.8;
}

/* V4: shared ADAWATAI dark-mode preference (aitools_darkMode). */
html.dark { color-scheme: dark; }
html.dark body {
  background: #0e1523;
  color: #e5eaf2;
}
html.dark .topbar.site-header,
html.dark .mobile-menu {
  background: #151e2d;
  border-color: #2a374b;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
html.dark .site-brand { color: #c4b5fd; }
html.dark .site-nav a,
html.dark .mobile-menu a { color: #c0c9d7; }
html.dark .site-nav a:hover,
html.dark .mobile-menu a:hover { color: #c4b5fd; }
html.dark .site-header .top-actions select,
html.dark .header-icon-button {
  background: #1d293b;
  border-color: #39465b;
  color: #e5eaf2;
}
html.dark .header-icon-button:hover { background: #28364c; color: #d8ccff; }
html.dark .mobile-menu { border-top-color: #2a374b; }
html.dark .editor,
html.dark .seo-content-inner {
  background: #151e2d;
  border-color: #2a374b;
  color: #e5eaf2;
  box-shadow: 0 14px 45px rgba(0, 0, 0, .18);
}
html.dark .editor-block { border-top-color: #2a374b; }
html.dark .editor h2,
html.dark .editor-block > summary,
html.dark .preview-label strong { color: #e5eaf2; }
html.dark .editor-head p,
html.dark .intro p,
html.dark .preview-foot { color: #a0aec0; }
html.dark .intro h1 { color: #f3f4f6; }
html.dark .trust-pills > span {
  background: #1b2739;
  border-color: #334158;
  color: #c5cfdd;
}
html.dark .template-card {
  background: #1a2638;
  border-color: #344158;
  color: #d8e0eb;
}
html.dark .template-card:hover,
html.dark .template-card.active {
  background: #252c46;
  border-color: #8879e8;
}
html.dark .block-inner label > span:first-child,
html.dark .range-heading label,
html.dark .subsection-title { color: #c4cedc; }
html.dark .block-inner input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=file]),
html.dark .block-inner textarea,
html.dark .block-inner select,
html.dark .manage-row-bottom .heading-override,
html.dark .manage-row-bottom select,
html.dark .color-control,
html.dark .top-actions select,
html.dark .preview-controls select {
  background: #101a29;
  border-color: #3a485d;
  color: #e5eaf2;
}
html.dark .block-inner input::placeholder,
html.dark .block-inner textarea::placeholder,
html.dark .manage-row-bottom .heading-override::placeholder { color: #718096; }
html.dark .item-card,
html.dark .manage-row,
html.dark .section-manager .manage-row,
html.dark .upload-box,
html.dark .faq-item,
html.dark .seo-card {
  background: #1a2638;
  border-color: #344158;
}
html.dark .item-heading strong,
html.dark .manage-check span,
html.dark .seo-card h3,
html.dark .faq-item summary,
html.dark .seo-copy h2,
html.dark .seo-how h2,
html.dark .faq-section h2 { color: #e2e8f0; }
html.dark .item-heading strong span,
html.dark .field-help,
html.dark .tiny-help,
html.dark .editor-footer p,
html.dark .seo-card p,
html.dark .faq-item p,
html.dark .seo-copy > p:last-child,
html.dark .seo-how ol { color: #a2aec0; }
html.dark .icon-action,
html.dark .manage-controls button {
  background: #243248;
  border-color: #43516a;
  color: #d5deeb;
}
html.dark .button.ghost,
html.dark .button.pale {
  background: #202d41;
  border-color: #394860;
  color: #dce5f1;
}
html.dark .button.ghost:hover,
html.dark .button.pale:hover { background: #2b3950; }
html.dark .add-button { background: #25233d; border-color: #665b9c; color: #d8d0ff; }
html.dark .upload-box { background: #1b283b; }
html.dark .upload-text strong { color: #e2e8f0; }
html.dark .upload-text small { color: #a0aec0; }
html.dark .paper-stage {
  background: #111a29;
  border-color: #2b394d;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .25);
}
html.dark .seo-eyebrow { color: #b4a7ff; }
html.dark .seo-content { color: #e5eaf2; }
html.dark .editor-footer { border-top-color: #2a374b; }
html.dark .preview-label small { color: #9aa8bb; }

@media (max-width: 1120px) {
  .site-nav { display: none; }
  .mobile-menu-toggle { display: inline-grid; }
  .mobile-menu:not([hidden]) { display: block; }
}
@media (max-width: 700px) {
  .topbar.site-header { padding: 0; }
  .site-header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 12px;
  }
  .header-main {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .site-brand { font-size: 19px; }
  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, .9fr);
    gap: 6px;
  }
  .site-header .top-actions select,
  .site-header .top-actions .export-format {
    width: 100%;
    min-width: 0;
    padding: 8px 5px;
    font-size: 11px;
  }
  .site-header .top-actions .button {
    width: 100%;
    min-width: 0;
    padding: 8px 5px;
    font-size: 11px;
  }
  .mobile-menu { padding: 0 12px 10px; }
  .mobile-menu ul { justify-content: flex-start; gap: 4px 18px; }
  .seo-content { margin-bottom: 42px; padding-inline: 12px; }
  .seo-content-inner { padding: 20px 16px; }
  .seo-feature-grid { grid-template-columns: 1fr; gap: 9px; margin: 20px 0 26px; }
  .faq-grid { grid-template-columns: 1fr; }
}


/* V5: focused, one-section-at-a-time editor workflow. */
.editor-block > summary {
  min-height: 54px;
  transition: background .18s ease, color .18s ease;
}
.editor-block > summary:hover { background: #f8f9fd; }
.editor-block[open] > summary { color: #5b50c9; }
.template-block > summary { padding-inline: 25px; }
.template-block .editor-head { padding: 22px 25px 24px; }
.step-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid #edf0f5;
}
.next-step {
  min-width: 112px;
  justify-content: center;
}
.next-step span[aria-hidden="true"] {
  font-size: 15px;
  line-height: 1;
}
html[dir="rtl"] .next-step span[aria-hidden="true"] { transform: rotate(180deg); }
.sample-toggle-button {
  border-color: #ded9ff;
  background: #f7f5ff;
  color: #5145b8;
}
.sample-toggle-button:hover { background: #eeebff; }
.sample-toggle-button[hidden],
.sample-preview-badge[hidden] { display: none !important; }
.sample-preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1efff;
  color: #5b50b8;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
}
.button:disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.paper.photo-circle .cv-avatar {
  border-radius: 50% !important;
  object-fit: cover;
}
.paper.photo-circle .cv-botanical-photo,
.paper.photo-circle .cv-mauve-photo,
.paper.photo-circle .cv-royal-photo,
.paper.photo-circle .cv-navy-photo {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
.paper.photo-circle .cv-botanical-photo .cv-avatar,
.paper.photo-circle .cv-mauve-photo .cv-avatar,
.paper.photo-circle .cv-royal-photo .cv-avatar,
.paper.photo-circle .cv-navy-photo .cv-avatar {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  object-fit: cover;
}
html.dark .editor-block > summary:hover { background: #1b293d; }
html.dark .editor-block[open] > summary { color: #c4b5fd; }
html.dark .step-actions { border-top-color: #2a374b; }
html.dark .sample-toggle-button,
html.dark .sample-preview-badge {
  background: #292646;
  border-color: #514a80;
  color: #ddd6fe;
}
@media (max-width: 700px) {
  .site-header .header-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .template-block .editor-head { padding: 18px 16px 20px; }
  .template-block > summary { padding: 17px 16px; }
  .sample-preview-badge { max-width: 100%; white-space: normal; }
  .step-actions { padding-top: 10px; }
  .next-step { width: 100%; }
}

/* V5.2 — Only UX and image-shape fixes. Existing palettes/layouts stay unchanged. */
.editor-block > summary { scroll-margin-top: 92px; }
/* In the original three single-column themes, .photo-circle is on .paper,
   not on .cv-single: enforce equal dimensions after template-specific rules. */
.paper.photo-circle .cv-single .cv-heading .cv-avatar {
  width: calc(33mm * var(--cv-photo-scale)) !important;
  height: calc(33mm * var(--cv-photo-scale)) !important;
  aspect-ratio: 1 / 1 !important;
  min-width: calc(33mm * var(--cv-photo-scale));
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.paper.template-noir.photo-circle .cv-sidebar .cv-avatar {
  width: calc(43mm * var(--cv-photo-scale)) !important;
  height: calc(43mm * var(--cv-photo-scale)) !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.paper.template-teal.photo-circle .cv-sidebar .cv-avatar {
  width: calc(40mm * var(--cv-photo-scale)) !important;
  height: calc(40mm * var(--cv-photo-scale)) !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.paper .cv-avatar[role="button"] {
  cursor: pointer;
  transition: filter .2s ease;
}
.paper .cv-avatar[role="button"]:hover { filter: brightness(.94); }
.paper .cv-avatar[role="button"]:focus-visible {
  outline: 3px solid var(--cv-accent);
  outline-offset: 3px;
}
.paper .cv-photo-placeholder-mark {
  font-size: 32pt;
  font-weight: 400;
  line-height: 1;
}
/* Muted instructional copy makes it clear that these values aren't personal data. */
.paper .cv-placeholder:not(.cv-section) { opacity: .72; }
.paper .cv-section.cv-placeholder .cv-item,
.paper .cv-section.cv-placeholder .cv-tag,
.paper .cv-section.cv-placeholder .cv-about { opacity: .78; }
@media (max-width: 700px) {
  .editor-block > summary { scroll-margin-top: 84px; }
}
@media print {
  .paper .cv-avatar[role="button"]:focus-visible { outline: 0; }
}

/* V5.3: print-readable default CV typography (A4). User font-size slider remains adjustable. */
.paper { font-size: calc(10pt * var(--cv-size, 1)); }
.paper .cv-section .cv-about { font-size: calc(9.7pt * var(--cv-size)); }
.paper .cv-item-details { font-size: calc(9.5pt * var(--cv-size)); }
.paper .cv-item h3 { font-size: calc(10.15pt * var(--cv-size)); }
.paper .cv-organization { font-size: calc(9.35pt * var(--cv-size)); }
.paper .cv-dates { font-size: calc(8.6pt * var(--cv-size)); }
.paper .cv-contact { font-size: calc(8.9pt * var(--cv-size)); }
.paper .cv-tag { font-size: calc(9pt * var(--cv-size)); }
/* Narrow/sidebar areas retain a balanced scale to prevent wrapping. */
.paper .cv-template-text .cv-item-details,
.paper .cv-template-text .cv-about { font-size: calc(9.15pt * var(--cv-size)); }
.paper .cv-template-text .cv-item h3 { font-size: calc(9.9pt * var(--cv-size)); }
.paper .cv-template-text .cv-contact { font-size: calc(8.55pt * var(--cv-size)); }
