/* ============================================================
   CV Builder v2, Full Rebuild
   ============================================================ */

/* Chrome height = fixed nav clearance + slim editor topbar (76px + 40px). */
:root { --cv-chrome-h: 116px; }

/* ── A11y utilities ── */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; inset-inline-start: 8px; z-index: 2000;
  transform: translateY(-150%);
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #fff; outline-offset: 2px;
}

/* ── App Shell ── */
.cv-app {
  display: flex;
  height: 100vh;
  padding-top: var(--cv-chrome-h);
  background: var(--bg);
  overflow: hidden;
}

/* ── Template Sidebar ── */
.cv-sidebar {
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-inline-end: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s, min-width 0.25s, opacity 0.25s;
  z-index: 30;
}
.cv-sidebar.collapsed {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}
.cv-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--bd);
}
.cv-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--t3);
}
.cv-sidebar-close {
  background: none;
  border: none;
  color: var(--t4);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  transition: all 0.2s;
}
.cv-sidebar-close:hover { color: var(--t1); background: var(--bg3); }

.cv-sidebar-templates {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

/* Template Cards */
.cv-tpl-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: start;
  width: 100%;
  font-family: var(--font);
}
.cv-tpl-card:hover { border-color: var(--bd); transform: translateY(-1px); }
.cv-tpl-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.cv-tpl-preview {
  width: 56px;
  height: 72px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.cv-tpl-preview-inner {
  width: 780px;
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(0.0718);
  transform-origin: top left;
  pointer-events: none;
  font-size: 12.5px;
  line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
  color: #1a1614;
}

.cv-tpl-info { flex: 1; min-width: 0; }
.cv-tpl-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cv-tpl-ats {
  font-size: 9px;
  font-weight: 700;
  background: #059669;
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-top: 2px;
}

/* Template preview: actual rendered mini-resume */

/* ── Main Area ── */
.cv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ── Action Bar ── */
.cv-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  gap: 8px;
  flex-shrink: 0;
  z-index: 20;
  flex-wrap: wrap;
  row-gap: 8px;
}
.cv-actionbar-left,
.cv-actionbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cv-actionbar-center {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cv-separator {
  width: 1px;
  height: 24px;
  background: var(--bd);
  margin: 0 2px;
}

/* Icon Button */
.cv-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cv-icon-btn:hover { background: var(--bg3); color: var(--t1); }
.cv-icon-btn:focus-visible, .cv-btn-export:focus-visible, .cv-dropdown-btn:focus-visible, .cv-ats-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-icon-btn[aria-pressed="true"] { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* Color Dots */
.cv-actionbar-colors {
  display: flex;
  gap: 4px;
  align-items: center;
}
.cv-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dot);
  border: 2px solid transparent;
  /* Subtle edge so a dot whose colour ~matches the bar (e.g. Black in dark mode)
     is still visible. */
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--t1) 28%, transparent);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 0;
}
.cv-dot:hover { transform: scale(1.12); }
.cv-dot.active { border-color: transparent; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--accent); }
.cv-dot:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--accent); }

/* Custom Dropdown */
.cv-dropdown { position: relative; }
.cv-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.cv-dropdown-btn:hover { background: var(--bg3); }
.cv-dropdown-menu {
  display: none;
  position: fixed;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  z-index: 200;
  min-width: 180px;
}
.cv-dropdown-menu.open { display: flex; flex-direction: column; }
.cv-dropdown-item {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--t2);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  text-align: start;
  transition: background 0.15s;
}
.cv-dropdown-item:hover { background: var(--bg3); }
.cv-dropdown-item.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* ATS Pill */
.cv-ats-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 4px; padding-inline: 4px 12px;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--bd);
  border-radius: 20px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
}
.cv-ats-pill:hover { background: var(--bg3); }
.cv-ats-svg { transform: rotate(-90deg); }
.cv-ats-track { fill: none; stroke: var(--bd); stroke-width: 3; }
.cv-ats-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease, stroke 0.3s;
}
.cv-ats-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  font-family: var(--mono);
  min-width: 22px;
  text-align: center;
}
.cv-ats-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--t4);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Export Button */
.cv-btn-export {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  min-height: 44px;
  box-sizing: border-box;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cv-btn-export:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--accent-glow); }

/* ── Workspace ── */
.cv-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Editor */
.cv-editor {
  width: 45%;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
}
.cv-editor-inner {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Preview */
.cv-preview {
  width: 55%;
  overflow-y: auto;
  background: var(--bg3);
  display: flex;
  justify-content: center;
  padding: 20px;
  border-inline-start: 1px solid var(--bd);
}
.cv-preview-inner {
  width: 100%;
  max-width: 780px;
}

/* Resource chips in the editor topbar (Examples / Guides / Reviews) -> moved out
   of the global nav so the nav stays lean and these tool-specific surfaces live
   in the builder's own context. Each opens its drawer (bound by id in
   cv-discover.js). */
.editor-topbar-lead { display: inline-flex; align-items: center; gap: 16px; min-width: 0; }
.cv-resource-chips { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cv-resource-chip {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--t2);
  background: transparent;
  border: 1px solid var(--bd);
  border-radius: 100px;
  padding: 4px 12px;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cv-resource-chip:hover { border-color: var(--accent); color: var(--accent); }
.cv-resource-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) {
  /* On phones the strip is tight; the label gives way so the chips stay usable. */
  .editor-topbar-lead .editor-topbar-left { display: none; }
}

/* ── Section Cards ── */
.cv-sec {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.cv-sec:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.cv-sec.dragging { opacity: 0.5; box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.cv-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.cv-sec-head:hover { background: var(--bg3); }

.cv-grip {
  cursor: grab;
  color: var(--t4);
  display: flex;
  padding: 2px;
}
.cv-grip:active { cursor: grabbing; }
.cv-grip svg { pointer-events: none; }

.cv-sec-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
}
.cv-sec-del {
  color: var(--t4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 3px;
  border-radius: 4px;
  border: none;
  background: none;
  transition: all 0.15s;
}
.cv-sec-del:hover { color: #dc2626; background: #fee2e2; }
.dark .cv-sec-del:hover { color: #f87171; background: #450a0a; }

.cv-sec-arrow {
  color: var(--t4);
  transition: transform 0.2s;
  display: flex;
}
.cv-sec-arrow.shut { transform: rotate(-90deg); }

.cv-sec-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-sec-body.shut { display: none; }

/* ── Custom Form Components ── */
.cv-input {
  padding: 8px 10px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--t1);
  font-size: 13px;
  font-family: var(--font);
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}
.cv-input:focus { border-color: var(--accent); }
.cv-input::placeholder { color: var(--t4); }

.cv-textarea {
  padding: 8px 10px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--t1);
  font-size: 13px;
  font-family: var(--font);
  resize: vertical;
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}
.cv-textarea:focus { border-color: var(--accent); }

.cv-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv-field { display: flex; flex-direction: column; gap: 3px; }

.cv-charcount {
  font-size: 10px;
  color: var(--t4);
  text-align: end;
  font-family: var(--mono);
}

/* Custom Photo Upload Button */
.cv-photo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cv-photo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bd);
}
.cv-photo-empty {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t4);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.cv-photo-empty:hover { border-color: var(--accent); color: var(--accent); }
.cv-photo-btn {
  padding: 5px 10px;
  border: 1px solid var(--bd);
  border-radius: 6px;
  background: var(--bg);
  color: var(--t2);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.cv-photo-btn:hover { background: var(--bg3); }
.cv-photo-btn.danger { color: #dc2626; border-color: #fecaca; }
.dark .cv-photo-btn.danger { color: #f87171; border-color: #450a0a; }

/* Custom Select (proficiency etc.) */
.cv-select {
  position: relative;
}
.cv-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--t1);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s;
}
.cv-select-btn:hover { border-color: var(--t4); }
.cv-select-menu {
  display: none;
  position: fixed;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 200;
  min-width: 140px;
}
.cv-select-menu.open { display: flex; flex-direction: column; }
.cv-select-opt {
  padding: 7px 10px;
  border: none;
  border-radius: 5px;
  background: none;
  color: var(--t2);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  text-align: start;
}
.cv-select-opt:hover { background: var(--bg3); }
.cv-select-opt.active { background: var(--accent-light); color: var(--accent); }

/* Entry Cards */
.cv-entry {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cv-entry-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
}
.cv-entry-rm {
  font-size: 11px;
  color: var(--t4);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--bd);
  background: none;
  font-family: var(--font);
  transition: all 0.15s;
}
.cv-entry-rm:hover { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.dark .cv-entry-rm:hover { color: #f87171; border-color: #450a0a; background: #450a0a; }

/* Bullets */
.cv-bullets { display: flex; flex-direction: column; gap: 4px; }
.cv-bullet-row { display: flex; gap: 4px; align-items: center; }
.cv-bullet-row .cv-input { flex: 1; }
.cv-bullet-x {
  color: var(--t4);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  flex-shrink: 0;
  border: none;
  background: none;
  border-radius: 4px;
}
.cv-bullet-x:hover { color: #dc2626; }

/* Skill Tags */
.cv-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  min-height: 34px;
  background: var(--bg);
  cursor: text;
}
.cv-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.cv-tag-x {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  border: none;
  background: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 4px;
}
.cv-tag-x:hover { opacity: 1; }
.cv-tag-input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--t1);
  font-size: 12px;
  min-width: 60px;
  flex: 1;
  font-family: var(--font);
}

/* Add buttons */
.cv-add-link {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  font-weight: 500;
  border: none;
  background: none;
  font-family: var(--font);
}
.cv-add-link:hover { text-decoration: underline; }
/* Scan a certificate's QR code (cv-builder.js certScanButton): the file input is the whole label. */
.cv-add-link.cv-scan { position: relative; display: flex; margin-left: 0; width: max-content; margin-top: 2px; gap: 6px; }
.cv-scan input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.cv-scan:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.cv-add-section-wrap {
  padding: 0 16px 16px;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}
.cv-add-section-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 2px dashed var(--bd);
  border-radius: 10px;
  background: transparent;
  color: var(--t3);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.cv-add-section-btn:hover { border-color: var(--accent); color: var(--accent); }

.cv-add-menu {
  margin-top: 6px;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cv-add-menu-item {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--t1);
  transition: background 0.15s;
  border: none;
  background: none;
  text-align: start;
  width: 100%;
  font-family: var(--font);
}
.cv-add-menu-item:hover { background: var(--bg3); }

/* Drop indicator */
.cv-drop-line {
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: -2px 0;
}

/* ── Primary Button ── */
.cv-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}
.cv-btn-primary:hover { opacity: 0.9; }
.cv-btn-block { width: 100%; }

/* ── Drawers (ATS Tips / AI) ── */
.cv-drawer {
  position: fixed;
  inset-inline-end: 0;
  top: var(--cv-chrome-h);
  bottom: 0;
  width: 340px;
  background: var(--bg2);
  border-inline-start: 1px solid var(--bd);
  z-index: 60;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  animation: slideRight 0.2s ease;
}
@keyframes slideRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
/* Wide variant used by the Examples + Guides drawers (was in cv-reviews.css,
   which is gone now that reviews moved to the home page). */
.cv-drawer-wide { width: min(540px, 94vw); overscroll-behavior: contain; }
@media (max-width: 640px) { .cv-drawer-wide { width: 100vw; } }
.cv-drawer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd);
}
.cv-drawer-head h3 {
  flex: 1;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--t1);
}
.cv-drawer-close {
  font-size: 20px;
  cursor: pointer;
  color: var(--t3);
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
}
.cv-drawer-close:hover { background: var(--bg3); }

.cv-drawer-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 12px 16px;
}
.cv-score-box {
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--bd);
  text-align: center;
}
.cv-score-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}
.cv-score-lbl {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}

.cv-drawer-tips {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv-tip {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--bd);
  font-size: 12px;
  color: var(--t2);
  line-height: 1.4;
}
.cv-tip-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
}
.cv-tip-dot.high { background: #dc2626; }
.cv-tip-dot.medium { background: #d97706; }
.cv-tip-dot.low { background: #059669; }

/* ── Modal ── */
.cv-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cv-modal {
  background: var(--bg2);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  scrollbar-width: none;            /* still scrolls by wheel, touch and keys; no bar */
}
.cv-modal::-webkit-scrollbar, .cv-modal textarea::-webkit-scrollbar { display: none; }
.cv-modal textarea { scrollbar-width: none; }
.cv-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd);
}
.cv-modal-head h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 600; color: var(--t1); }
.cv-modal-x {
  font-size: 22px;
  cursor: pointer;
  color: var(--t3);
  background: none;
  border: none;
}
.cv-modal-body { padding: 18px; }
.cv-modal-hint { font-size: 13px; color: var(--t3); margin-bottom: 10px; }
.cv-mpdf-link {
  display: block; width: 100%; margin-top: 10px; padding: 8px; min-height: 36px;
  background: none; border: none; color: var(--t3); font-family: var(--font);
  font-size: 13px; text-decoration: underline; cursor: pointer;
}
.cv-mpdf-link:hover { color: var(--accent); }

.cv-jd-results { margin-top: 14px; }
.cv-jd-score {
  text-align: center;
  margin-bottom: 14px;
}
.cv-jd-num {
  font-size: 42px;
  font-weight: 700;
  font-family: var(--mono);
}
.cv-jd-pct { font-size: 13px; color: var(--t3); }
.cv-jd-kws { display: flex; flex-direction: column; gap: 10px; }
.cv-jd-kws h4 { font-size: 12px; font-weight: 600; color: var(--t1); margin-bottom: 4px; }
.cv-jd-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cv-jd-tag {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}
.cv-jd-tag.hit { background: #d1fae5; color: #059669; }
.cv-jd-tag.miss { background: #fee2e2; color: #dc2626; }
.dark .cv-jd-tag.hit { background: #022c22; color: #34d399; }
.dark .cv-jd-tag.miss { background: #450a0a; color: #f87171; }

/* Check my CV against this job (static/js/lens-ui.js): Learn's type (DM Sans 600, tight
   tracking, mono caps labels), cream paper, no italics anywhere. */
#job-match-modal .cv-modal { max-width: 640px; border-radius: 20px; border: 1px solid var(--bd); }
#job-match-modal .cv-modal-head { padding: 18px 22px 14px; border-bottom: 0; align-items: flex-start; }
#job-match-modal .cv-modal-head h3 { font-family: var(--font); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
#job-match-modal .cv-modal-body { padding: 0 22px 22px; }
#job-match-modal .cv-modal-hint { font-size: 14px; color: var(--t2); line-height: 1.5; margin-bottom: 12px; }
#job-match-modal #jd-input { border-radius: 12px; }
.lens-kicker, .lens-h { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); }
.lens-kicker { margin: 18px 0 6px; }
.lens-head { font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--t1); margin: 0 0 6px; }
.lens-head b { color: var(--accent); font-weight: 700; }
.lens-sum { font-family: var(--mono); font-size: 12px; color: var(--t3); margin: 0 0 8px; }
.lens-trust { font-size: 13px; color: var(--t2); margin: 0 0 14px; display: flex; gap: 8px; align-items: center; }
.lens-trust svg { flex: none; color: #059669; }
.lens-note { font-size: 13px; color: var(--t2); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.lens-better { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--t1); background: var(--accent-light); border-radius: 12px; padding: 12px 14px; margin: 0 0 6px; }
.lens-h { margin: 22px 0 2px; }
.lens-list { list-style: none; margin: 0; padding: 0; }
.lens-row { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 12px; padding: 14px 0; border-top: 1px solid var(--bd); }
.lens-row:first-child { border-top: 0; }
.lens-req { display: contents; }
.lens-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.lens-row.green .lens-dot { background: #059669; }
.lens-row.amber .lens-dot { background: #d97706; }
.lens-row.red .lens-dot { background: #dc2626; }
.lens-text { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--t1); line-height: 1.35; }
.lens-body { grid-column: 2; }
.lens-why { font-size: 13px; color: var(--t3); margin: 3px 0 0; line-height: 1.45; }
.lens-line { margin: 8px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--bd); font-size: 14px; font-weight: 500; color: var(--t1); line-height: 1.45; overflow-wrap: anywhere; }
.lens-row.green .lens-line { border-left-color: #059669; }
.lens-row.amber .lens-line { border-left-color: #d97706; }
.lens-proof .lens-line { border-left-color: var(--accent); }
.lens-line cite { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: var(--t4); margin-top: 2px; }
.lens-proof { margin-top: 10px; }
.lens-proof-h { font-size: 13px; color: var(--t2); margin: 0; }
.lens-add { margin-top: 8px; min-height: 34px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent); background: none; color: var(--accent); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; }
.lens-add:hover:not(:disabled) { background: var(--accent); color: #fff; }
.lens-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lens-add:disabled { border-color: var(--bd); color: var(--t3); cursor: default; }
.lens-chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lens-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--bd); border-radius: 999px; padding: 3px 4px 3px 14px; font-size: 14px; font-weight: 600; color: var(--t1); background: var(--bg); }
.lens-chip.asked { border-color: var(--accent); }
.lens-chip .lens-add { margin: 0; min-height: 30px; padding: 4px 12px; }
.lens-credit { font-family: var(--mono); font-size: 11px; color: var(--t4); margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--bd); }

/* ── Mobile Toggle ── */
.cv-mobile-toggle {
  display: none;
  padding: 6px 12px;
  gap: 6px;
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
}
.cv-mobile-tab {
  flex: 1;
  padding: 7px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  background: var(--bg);
  color: var(--t3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  font-family: var(--font);
  transition: all 0.2s;
}
.cv-mobile-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   Resume Page, Shared Structure
   ============================================================ */
.cv-page {
  width: 100%;
  max-width: 780px;
  min-height: 1100px;
  background: #fff;
  color: #1a1614;
  padding: 40px 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-radius: 4px;
  font-family: var(--cv-font, 'DM Sans', sans-serif);
  font-size: 12.5px;
  line-height: 1.5;
  box-sizing: border-box;
}
.cv-page * { box-sizing: border-box; }

/* Header */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 14px;
}
.cv-header-text { flex: 1; }
.cv-name {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 5px;
  color: #1a1614;
  font-family: var(--cv-font-display, var(--cv-font, 'DM Sans', sans-serif));
}
.cv-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  font-size: 11.5px;
  color: #666;
}
.cv-contact-item a { color: var(--cv-accent, #5b5bf6); text-decoration: none; }
.cv-contact-item a:hover { text-decoration: underline; }
.cv-photo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eee;
  flex-shrink: 0;
}

/* Sections */
.cv-section { margin-bottom: 14px; }
.cv-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cv-accent, #5b5bf6);
  margin: 0 0 6px;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--cv-accent, #5b5bf6);
  font-family: var(--cv-font-display, var(--cv-font, 'DM Sans', sans-serif));
}

/* Entries */
.cv-entry-item { margin-bottom: 8px; }
.cv-entry-item:last-child { margin-bottom: 0; }
.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.cv-entry-left { flex: 1; }
.cv-entry-title { font-size: 12.5px; font-weight: 600; color: #1a1614; }
.cv-entry-sub { font-size: 11.5px; color: #666; margin-inline-start: 4px; }
.cv-entry-dates {
  font-size: 10.5px;
  color: #888;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}
.cv-entry-desc { font-size: 11.5px; color: #444; margin: 2px 0 0; }
.cv-entry-bullets {
  margin: 3px 0 0;
  padding-inline-start: 15px;
  list-style: disc;
}
.cv-entry-bullets li {
  font-size: 11.5px;
  color: #333;
  margin-bottom: 1.5px;
  line-height: 1.45;
}
.cv-entry-link { font-size: 10.5px; color: var(--cv-accent, #5b5bf6); text-decoration: none; }

.cv-tech-stack { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.cv-tech-tag { padding: 1px 5px; background: #f0f0f0; border-radius: 3px; font-size: 10px; color: #555; }

.cv-summary-text { font-size: 12px; color: #333; line-height: 1.55; margin: 0; }

.cv-skills-group { margin-bottom: 5px; display: flex; flex-wrap: wrap; gap: 3px; align-items: baseline; }
.cv-skills-label { font-size: 11.5px; font-weight: 600; color: #333; margin-inline-end: 4px; }
.cv-skills-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.cv-skill-tag { padding: 1px 7px; background: #f0f0f0; border-radius: 9px; font-size: 10.5px; color: #444; }

.cv-lang-entry { display: flex; justify-content: space-between; font-size: 11.5px; padding: 1.5px 0; }
.cv-lang-name { font-weight: 500; color: #333; }
.cv-lang-level { color: #888; }

.cv-pub-title { font-weight: 600; font-size: 11.5px; color: #333; }
.cv-pub-venue { font-size: 11.5px; color: #666;  }
.cv-custom-entry { font-size: 11.5px; color: #333; margin-bottom: 3px; }

.cv-empty-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #aaa;
  text-align: center;
  gap: 8px;
}
.cv-empty-preview svg { opacity: 0.25; }
.cv-empty-preview p { font-size: 14px; }

/* Two-column helpers */
.cv-sidebar-col { background: #f8f7f5; padding: 18px 14px; border-inline-end: 1px solid #eee; }
.cv-main-col { padding: 18px 20px; }

/* ============================================================
   TEMPLATES, Famous-Inspired Designs
   ============================================================ */

/* 1. Executive, Harvard-inspired: Times, single-col, pure text, tight, conservative */
/* Templates with a font of their own (Executive, Compact, Academic, Tech, Elegant) keep it
   until the visitor picks a font: the builder then sets --cv-font-pick and
   --cv-font-display-pick, and every fixed font below gives way to the chosen one. */
.cv-page.tpl-executive {
  font-family: var(--cv-font-pick, 'Georgia', 'Times New Roman', serif);
  padding: 36px 40px;
  font-size: 11.5px;
  line-height: 1.4;
}
.cv-page.tpl-executive .cv-name {
  font-family: var(--cv-font-display-pick, 'Georgia', serif);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  border-bottom: 2px solid #1a1614;
  padding-bottom: 6px;
}
.cv-page.tpl-executive .cv-header { flex-direction: column; align-items: center; }
.cv-page.tpl-executive .cv-contact-line { justify-content: center; font-size: 11px; }
.cv-page.tpl-executive .cv-section-title {
  font-family: var(--cv-font-display-pick, 'Georgia', serif);
  font-size: 12px;
  color: #1a1614;
  border-bottom: 1px solid #666;
  letter-spacing: 2.5px;
  padding-bottom: 2px;
  margin-bottom: 6px;
}
.cv-page.tpl-executive .cv-entry-title { font-family: var(--cv-font-pick, 'Georgia', serif); }
.cv-page.tpl-executive .cv-skill-tag { background: transparent; padding: 0; font-size: 11px; border-radius: 0; }
/* Plain skills read as a list on the page and in the PDF: "Excel, Word, Outlook" */
.cv-page.tpl-executive .cv-skill-tag:not(:last-child)::after { content: ","; }
.cv-page.tpl-executive .cv-skills-group { display: inline; }
.cv-page.tpl-executive .cv-section { margin-bottom: 10px; }

/* 2. Modern Pro, Awesome CV-inspired: colored section headers, bold name, spacious */
.cv-page.tpl-modern-pro { padding: 36px 30px; }
.cv-page.tpl-modern-pro .cv-name { font-size: 32px; font-weight: 700; color: var(--cv-accent, #5b5bf6); }
.cv-page.tpl-modern-pro .cv-contact-line { font-size: 11px; color: #555; }
.cv-page.tpl-modern-pro .cv-section-title {
  background: transparent;
  color: var(--cv-accent, #5b5bf6);
  border-inline-start: 3px solid var(--cv-accent, #5b5bf6);
  border-bottom: none;
  padding-block: 1px 2px; padding-inline: 10px 0;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.cv-page.tpl-modern-pro .cv-entry-title { color: var(--cv-accent, #5b5bf6); font-weight: 700; }
.cv-page.tpl-modern-pro .cv-skill-tag { border: 1px solid var(--cv-accent, #5b5bf6); background: transparent; color: var(--cv-accent, #5b5bf6); }

/* 3. Minimal, Spearmint-inspired: extreme whitespace, ultra-thin, airy */
.cv-page.tpl-minimal { padding: 56px 48px; font-size: 11px; line-height: 1.6; }
.cv-page.tpl-minimal .cv-name {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #444;
}
.cv-page.tpl-minimal .cv-contact-line { font-size: 10px; color: #aaa; letter-spacing: 1px; }
.cv-page.tpl-minimal .cv-section-title {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 4px;
  color: #aaa;
  border-bottom: 0.5px solid #e8e8e8;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.cv-page.tpl-minimal .cv-section { margin-bottom: 20px; }
.cv-page.tpl-minimal .cv-entry-title { font-weight: 500; font-size: 12px; }
.cv-page.tpl-minimal .cv-entry-bullets { list-style: none; padding-inline-start: 0; }
.cv-page.tpl-minimal .cv-entry-bullets li { padding-inline-start: 16px; position: relative; }
.cv-page.tpl-minimal .cv-entry-bullets li::before { content: ''; position: absolute; inset-inline-start: 0; top: 8px; width: 6px; height: 1px; background: #ccc; }
.cv-page.tpl-minimal .cv-skill-tag { background: transparent; border: 1px solid #ddd; font-size: 10px; }

/* 4. Creative, Full-height colored left sidebar layout */
.cv-page.tpl-creative {
  display: grid;
  grid-template-columns: 260px 1fr;
  padding: 0;
  min-height: 1100px;
}
.cv-page.tpl-creative .cv-header { display: none; }
.cv-page.tpl-creative .cv-layout-sidebar {
  background: var(--cv-accent, #5b5bf6);
  color: #fff;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cv-page.tpl-creative .cv-sb-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: #fff;
}
.cv-page.tpl-creative .cv-sb-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.3);
  align-self: center;
}
.cv-page.tpl-creative .cv-sb-contact {
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv-page.tpl-creative .cv-sb-item { font-size: 11px; color: rgba(255,255,255,0.85); }
.cv-page.tpl-creative .cv-sb-item a { color: #fff; text-decoration: none; }
.cv-page.tpl-creative .cv-layout-sidebar .cv-section-title {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  font-size: 10px;
  letter-spacing: 2px;
}
.cv-page.tpl-creative .cv-layout-sidebar .cv-skill-tag {
  background: #fff;
  color: #1a1614;
  font-weight: 500;
}
.cv-page.tpl-creative .cv-layout-sidebar .cv-lang-name,
.cv-page.tpl-creative .cv-layout-sidebar .cv-lang-level { color: rgba(255,255,255,0.85); }
.cv-page.tpl-creative .cv-layout-main {
  padding: 32px 28px;
}
.cv-page.tpl-creative .cv-layout-main .cv-section-title {
  color: var(--cv-accent, #5b5bf6);
  border-bottom: 2px solid var(--cv-accent, #5b5bf6);
}

/* 5. Two Column, Deedy-inspired: neutral sidebar + main */
.cv-page.tpl-two-column {
  display: grid;
  grid-template-columns: 240px 1fr;
  padding: 0;
  font-size: 11.5px;
  min-height: 1100px;
}
.cv-page.tpl-two-column .cv-header { display: none; }
.cv-page.tpl-two-column .cv-layout-sidebar {
  background: #f0eeea;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-inline-end: 1px solid #e0dcd6;
}
.cv-page.tpl-two-column .cv-sb-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #1a1614;
}
.cv-page.tpl-two-column .cv-sb-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}
.cv-page.tpl-two-column .cv-sb-contact {
  border-top: 1px solid #ddd;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cv-page.tpl-two-column .cv-sb-item { font-size: 10.5px; color: #555; }
.cv-page.tpl-two-column .cv-sb-item a { color: var(--cv-accent, #5b5bf6); }
.cv-page.tpl-two-column .cv-layout-sidebar .cv-section-title {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #555;
  border-bottom-color: #ddd;
}
.cv-page.tpl-two-column .cv-layout-sidebar .cv-section { margin-bottom: 8px; }
.cv-page.tpl-two-column .cv-layout-sidebar .cv-skill-tag { font-size: 10px; }
.cv-page.tpl-two-column .cv-layout-main {
  padding: 28px 24px;
}
.cv-page.tpl-two-column .cv-layout-main .cv-section-title { font-size: 11px; letter-spacing: 1px; }
.cv-page.tpl-two-column .cv-layout-main .cv-section { margin-bottom: 10px; }

/* 6. Nordic, Stockholm-inspired: cool palette, left accent line, icy clean */
.cv-page.tpl-nordic {
  border-inline-start: 6px solid #5a7d9a;
  padding-block: 36px; padding-inline: 28px 30px;
}
.cv-page.tpl-nordic .cv-name {
  font-weight: 300;
  font-size: 30px;
  letter-spacing: 1px;
  color: #2c3e50;
}
.cv-page.tpl-nordic .cv-contact-line { color: #7a8fa0; font-size: 11px; }
.cv-page.tpl-nordic .cv-section-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 10px;
  color: #5a7d9a;
  border-bottom: 2px solid #c8d6e0;
  padding-bottom: 4px;
}
.cv-page.tpl-nordic .cv-entry-title { color: #2c3e50; }
.cv-page.tpl-nordic .cv-entry-dates { color: #7a8fa0; }
.cv-page.tpl-nordic .cv-skill-tag { background: #e3ecf2; color: #3a5a78; border-radius: 4px; }
.cv-page.tpl-nordic .cv-tech-tag { background: #e3ecf2; color: #3a5a78; }

/* 7. Bold, Swiss-inspired: massive typography hierarchy, strong dividers */
.cv-page.tpl-bold { padding: 32px 28px; }
.cv-page.tpl-bold .cv-name {
  font-size: 38px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1;
  border-bottom: 4px solid #1a1614;
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.cv-page.tpl-bold .cv-contact-line { font-size: 11px; font-weight: 500; }
.cv-page.tpl-bold .cv-section-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: #1a1614;
  border-bottom: 3px solid var(--cv-accent, #ff9800);
  letter-spacing: 2px;
  padding-bottom: 3px;
}
.cv-page.tpl-bold .cv-entry-title { font-size: 14px; font-weight: 700; }
.cv-page.tpl-bold .cv-entry-sub { font-size: 12px; }
.cv-page.tpl-bold .cv-skill-tag { font-weight: 600; font-size: 11px; background: #f0f0f0; padding: 3px 10px; border-radius: 3px; }

/* 8. Compact, Jake's Resume-inspired: maximum density, Palatino, fits everything */
.cv-page.tpl-compact {
  font-family: var(--cv-font-pick, 'Palatino Linotype', 'Book Antiqua', Palatino, serif);
  padding: 16px 16px;
  font-size: 10px;
  line-height: 1.3;
}
.cv-page.tpl-compact .cv-name { font-size: 18px; margin-bottom: 1px; font-weight: 700; }
.cv-page.tpl-compact .cv-header { margin-bottom: 8px; }
.cv-page.tpl-compact .cv-contact-line { font-size: 9px; }
.cv-page.tpl-compact .cv-section { margin-bottom: 6px; }
.cv-page.tpl-compact .cv-section-title {
  font-size: 9.5px;
  margin-bottom: 2px;
  padding-bottom: 1px;
  color: #333;
  border-bottom: 0.5px solid #888;
  font-weight: 700;
  letter-spacing: 1px;
}
.cv-page.tpl-compact .cv-entry-item { margin-bottom: 3px; }
.cv-page.tpl-compact .cv-entry-title { font-size: 10px; }
.cv-page.tpl-compact .cv-entry-sub { font-size: 9px; }
.cv-page.tpl-compact .cv-entry-dates { font-size: 9px; }
.cv-page.tpl-compact .cv-entry-bullets li { font-size: 9.5px; margin-bottom: 0; }
.cv-page.tpl-compact .cv-entry-bullets { margin-top: 1px; }
.cv-page.tpl-compact .cv-skill-tag { font-size: 9px; padding: 0 4px; }
.cv-page.tpl-compact .cv-summary-text { font-size: 9.5px; }

/* 9. Academic, Europass-inspired: institutional header, structured, serif body */
.cv-page.tpl-academic {
  font-family: var(--cv-font-pick, 'Georgia', 'Times New Roman', serif);
  padding: 0;
}
.cv-page.tpl-academic .cv-header {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  align-items: center;
  background: transparent;
  padding: 32px 32px 14px;
  margin: 0 0 16px;
  color: #1a1614;
  border-bottom: 2px solid #1a1614;
}
.cv-page.tpl-academic .cv-name {
  font-family: var(--cv-font-display-pick, 'Playfair Display', 'Georgia', serif);
  color: #1a1614; font-size: 26px; font-weight: 700; letter-spacing: 1px;
}
.cv-page.tpl-academic .cv-contact-line { justify-content: center; color: #555; font-size: 11px; }
.cv-page.tpl-academic .cv-contact-item a { color: var(--cv-accent, #5b5bf6); text-decoration: none; }
.cv-page.tpl-academic .cv-photo { border-color: #ddd; }
.cv-page.tpl-academic .cv-section { padding: 0 32px; }
.cv-page.tpl-academic .cv-section-title {
  background: transparent;
  color: #1a1614;
  border-bottom: 1px solid rgba(26,22,20,0.35);
  padding: 0 0 3px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}
.cv-page.tpl-academic .cv-entry-title { font-family: var(--cv-font-pick, 'Georgia', serif); }
.cv-page.tpl-academic .cv-summary-text { font-family: var(--cv-font-pick, 'Georgia', serif); font-size: 12px; padding: 0 32px; }

/* 10. Tech, Terminal-inspired: monospace throughout, dark tags, code aesthetic */
.cv-page.tpl-tech {
  font-family: var(--cv-font-pick, 'JetBrains Mono', 'Fira Code', monospace);
  font-size: 11px;
  padding: 28px 24px;
  border: 2px solid #e0e0e0;
}
.cv-page.tpl-tech .cv-name {
  font-family: var(--cv-font-display-pick, 'JetBrains Mono', monospace);
  font-size: 22px;
  font-weight: 700;
  color: var(--cv-accent, #5b5bf6);
}
.cv-page.tpl-tech .cv-contact-line { font-family: var(--cv-font-pick, 'JetBrains Mono', monospace); font-size: 10px; }
.cv-page.tpl-tech .cv-section-title {
  font-family: var(--cv-font-display-pick, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--cv-accent, #5b5bf6);
  border-bottom: 1px dashed var(--cv-accent, #5b5bf6);
  text-transform: none;
}
.cv-page.tpl-tech .cv-section-title::before { content: '> '; opacity: 0.5; }
.cv-page.tpl-tech .cv-entry-title { font-family: var(--cv-font-pick, 'JetBrains Mono', monospace); font-size: 11px; }
.cv-page.tpl-tech .cv-entry-sub { font-family: var(--cv-font-pick, 'JetBrains Mono', monospace); font-size: 10px; }
.cv-page.tpl-tech .cv-entry-dates { font-family: var(--cv-font-pick, 'JetBrains Mono', monospace); font-size: 10px; }
.cv-page.tpl-tech .cv-entry-bullets li { font-size: 10.5px; }
.cv-page.tpl-tech .cv-entry-bullets li::marker { color: var(--cv-accent, #5b5bf6); }
.cv-page.tpl-tech .cv-skill-tag {
  font-family: var(--cv-font-pick, 'JetBrains Mono', monospace);
  background: #1a1a1e;
  color: #a3e635;
  font-size: 9.5px;
  padding: 2px 8px;
  border-radius: 3px;
}
.cv-page.tpl-tech .cv-tech-tag {
  font-family: var(--cv-font-pick, 'JetBrains Mono', monospace);
  background: #1a1a1e;
  color: #67e8f9;
  padding: 2px 6px;
}
.cv-page.tpl-tech .cv-summary-text { font-size: 11px; }

/* 11. Elegant, Playfair, double borders, drop-cap */
.cv-page.tpl-elegant .cv-name {
  font-family: var(--cv-font-display-pick, 'Playfair Display', serif);
  font-size: 28px;
  font-weight: 600;
  font-style: italic;
}
.cv-page.tpl-elegant .cv-section-title {
  font-family: var(--cv-font-display-pick, 'Playfair Display', serif);
  text-transform: none;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #333;
  border-bottom: double 3px #ccc;
}
.cv-page.tpl-elegant .cv-header {
  border-top: double 3px var(--cv-accent, #5b5bf6);
  padding-top: 14px;
}
.cv-page.tpl-elegant .cv-summary-text::first-letter {
  font-size: 22px;
  font-family: var(--cv-font-display-pick, 'Playfair Display', serif);
  font-weight: 700;
  float: left;
  margin-right: 3px;
  line-height: 1;
  color: var(--cv-accent, #5b5bf6);
}

/* 12. Startup, Modern Writer-inspired: color blocks, pill tags, friendly */
.cv-page.tpl-startup .cv-name { font-size: 24px; font-weight: 600; }
.cv-page.tpl-startup .cv-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: var(--cv-accent, #5b5bf6);
  color: #fff;
  border-bottom: none;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}
.cv-page.tpl-startup .cv-skill-tag {
  border-radius: 20px;
  padding: 2px 10px;
  background: var(--cv-accent, #5b5bf6);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
}
.cv-page.tpl-startup .cv-tech-tag { border-radius: 20px; padding: 1px 7px; }

/* ── Template Eye (Preview) Button ── */
.cv-tpl-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.cv-tpl-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--bd);
  background: var(--bg2);
  color: var(--t4);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.cv-tpl-eye:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }

/* ── Template Preview Modal ── */
.cv-modal-wide { max-width: 860px; }
.cv-modal-scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
}
.cv-tpl-fullpreview {
  max-width: 780px;
  margin: 0 auto;
}
.cv-modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--bd);
  display: flex;
  justify-content: flex-end;
}

/* ── Section Navigate Button ── */
.cv-sec-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--bd);
  background: none;
  color: var(--t4);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.cv-sec-nav:hover { color: var(--accent); border-color: var(--accent); }


/* ============================================================
   Responsive
   ============================================================ */
/* When the templates panel is docked open it takes 220px from the action bar. On
   anything narrower than a wide desktop that pushes the action buttons onto a second
   row, so collapse them to icon-only (the labels stay as title/aria-label tooltips)
   to keep the bar a single row. Panel closed -> bar gets full width -> labels return. */
@media (max-width: 1400px) {
  #cv-sidebar:not(.collapsed) ~ .cv-main .cv-actionbar-right .cv-icon-btn span { display: none; }
  #cv-sidebar:not(.collapsed) ~ .cv-main .cv-actionbar-right .cv-icon-btn { padding: 8px; }
}

@media (max-width: 1024px) {
  .cv-sidebar { position: fixed; inset-inline-start: 0; top: var(--cv-chrome-h); bottom: 0; z-index: 50; box-shadow: 4px 0 20px rgba(0,0,0,0.1); }
  .cv-sidebar.collapsed { transform: translateX(-100%); width: 220px; min-width: 220px; opacity: 1; }
}

@media (max-width: 900px) {
  .cv-mobile-toggle { display: flex; }
  .cv-actionbar { flex-wrap: wrap; }
  .cv-actionbar-colors { display: flex; }
  .cv-workspace { flex-direction: column; }
  .cv-editor { width: 100%; }
  .cv-preview { width: 100%; display: none; border-inline-start: none; }
  .cv-preview.mobile-on { display: flex; }
  .cv-editor.mobile-off { display: none; }
  .cv-drawer { width: 100%; }
  /* Let the toolbar groups wrap so no action button overflows off-screen. */
  .cv-actionbar-left,
  .cv-actionbar-right { flex-wrap: wrap; flex-shrink: 1; row-gap: 6px; }
}

@media (max-width: 600px) {
  .cv-page { padding: 18px 14px; min-height: auto; }
  .cv-row { grid-template-columns: 1fr; }
  .cv-actionbar-right { gap: 3px; }
  /* Phones have no hover tooltips: a short label sits under each icon instead. */
  .cv-actionbar-right .cv-icon-btn { flex-direction: column; gap: 2px; padding: 4px 8px; min-height: 44px; }
  .cv-actionbar-right .cv-icon-btn span { display: block; font-size: 10.5px; line-height: 1.1; }
  #more-dropdown-btn { flex-direction: row; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  /* White everything so the app's cream background never bleeds onto pages. */
  html, body { background: #fff !important; }
  /* Force accent fills / coloured bars to print even when the user hasn't ticked
     "Background graphics" -> otherwise design-led templates lose their colour. */
  .cv-page, .cv-page * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body::before, body::after { display: none !important; }
  .nav, .cv-actionbar, .cv-editor, .cv-mobile-toggle,
  .cv-drawer, .cv-modal-bg, .theme-dock, .cv-sidebar, .skip-link,
  .cv-add-section-wrap, .editor-topbar, .cv-toast,
  .help-backdrop, .help-drawer, .footer, .cv-pdf-loader,
  .nav-set, #cv-howto-root, .lang-hint { display: none !important; }
  .cv-app, .cv-main, .cv-workspace, .cv-preview, .cv-preview-inner { background: #fff !important; }
  /* Unclip the app shell so the whole resume prints, not just one viewport. */
  .cv-app { padding-top: 0; height: auto; overflow: visible; display: block; }
  .cv-main { width: 100%; height: auto; overflow: visible; }
  .cv-workspace { display: block; height: auto; min-height: 0; }
  .cv-preview { width: 100%; padding: 0; overflow: visible; border-inline-start: none; height: auto; display: block; }
  .cv-preview-inner { max-width: 100%; }
  /* The on-screen frame around the page (panel + inner padding) must not print:
     it pushed the full-height page past the sheet and made a blank page 2. */
  #preview-panel, .cv-preview, .cv-preview-inner { padding: 0 !important; margin: 0 !important; }
  /* Export = one clean PORTRAIT page. @page margin:0 forces portrait (no
     landscape) and lets colour-led templates (creative sidebar, two-column
     panel, nordic accent bar) bleed to the paper edge instead of sitting inside
     a white frame / outline; each template keeps its own padding so the text
     stays inset. min-height:100vh fills exactly one page (safe now the page
     margin is 0) so colour panels reach the bottom edge instead of stopping at
     the content height. box-shadow/radius forced off so no card frame prints. */
  @page { size: portrait; margin: 0; }
  .cv-page { box-shadow: none !important; border-radius: 0 !important; max-width: 100%; margin: 0; min-height: 100vh !important; }
  .cv-page .cv-layout-sidebar { min-height: 100vh !important; }
  /* Cover letter prints with the same margin:0 page, so give the letter sheet
     its own inset (it has no colour to bleed). */
  body.printing-letter .cv-letter-sheet { padding: 18mm 16mm !important; }

  /* Hand-in slip: two half-page slips on one sheet with a cut line between. */
  body.printing-slip .cv-app, body.printing-slip .cv-letter-sheet { display: none !important; }
  body.printing-slip .cv-slip-sheet { display: block !important; color: #1a1614; font-family: var(--font, 'DM Sans', sans-serif); }
  body.printing-slip .cv-slip-cut { border-top: 1px dashed #8a847c; margin: 4mm 0 0; height: 0; }
  /* Cover-letter print mode: hide the resume app, show only the letter sheet. */
  body.printing-letter .cv-app { display: none !important; }
  body.printing-letter .cv-letter-sheet {
    display: block !important;
    max-width: 100%;
    color: #1a1614;
    font-family: var(--font, 'DM Sans', sans-serif);
  }
}

/* ── Cover letter print sheet ── (hidden on screen; revealed only in print) */
.cv-letter-sheet { display: none; }
.cv-slip-sheet { display: none; }
.cv-slip { height: 138mm; overflow: hidden; padding: 12mm 16mm 0; box-sizing: border-box; background: #fff; color: #1a1614; font-family: var(--font, 'DM Sans', sans-serif); }
.cv-slip-probe { display: block !important; position: fixed; left: -10000px; top: 0; width: 210mm; visibility: hidden; pointer-events: none; }
.cv-slip-li { padding-inline-start: 4mm; position: relative; }
.cv-slip-li::before { content: ''; position: absolute; inset-inline-start: 1mm; top: .62em; width: 1.2mm; height: 1.2mm; border-radius: 50%; background: currentColor; }
.cv-slip-name { font-size: 24pt; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.cv-slip-contact { font-size: 11.5pt; color: #3d3833; margin-top: 2mm; overflow-wrap: anywhere; }
.cv-slip-h { font-size: 9.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6e6862; margin: 4mm 0 1mm; border-bottom: 1px solid #d9d4cc; padding-bottom: .8mm; }
.cv-slip-item { font-size: 11pt; font-weight: 600; margin-top: 1mm; overflow-wrap: anywhere; }
.cv-slip-text { font-size: 10.5pt; line-height: 1.4; overflow-wrap: anywhere; }
.cv-letter-head { margin: 0 0 30px; padding-bottom: 14px; border-bottom: 1px solid #d9d4cc; }
.cv-letter-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px; font-weight: 600; color: #1a1614; letter-spacing: -0.01em;
}
.cv-letter-contact { font-size: 12.5px; color: #6e6862; margin-top: 6px; }
.cv-letter-body p { font-size: 14px; line-height: 1.7; color: #2b2723; margin: 0 0 14px; }
.cv-letter-body p:last-child { margin-bottom: 0; }

/* ── Save indicator animation ── */
@keyframes fadeOut {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   Toast notifications
   ============================================================ */
.cv-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--t1);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  z-index: 400;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.cv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cv-toast[data-kind="error"] { background: #e11d48; color: #fff; }
.cv-toast[data-kind="success"] { background: #059669; color: #fff; }

/* ============================================================
   Accessibility: visible keyboard focus
   ============================================================ */
:where(.nav, .editor-topbar, .cv-app, .help-drawer, .cv-drawer, .cv-modal-bg)
  :is(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Cover-letter modal actions */
.cv-cl-actions { gap: 8px; margin-top: 10px; }

/* Subtle A4 page-break guide in the on-screen preview (screen only, never prints).
   A faint neutral line marks ~where each printed page ends. */
@media screen {
  .cv-preview .cv-page {
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0, transparent 1099px,
      rgba(120, 120, 130, 0.22) 1099px, rgba(120, 120, 130, 0.22) 1100px);
  }
}

/* Dark mode: lift editor cards/inputs off the near-black editor background so the
   working column doesn't read as a featureless slab. */
.dark .cv-sec { background: #211b18; border-color: rgba(240, 237, 230, 0.14); }
.dark .cv-sec:hover { border-color: rgba(240, 237, 230, 0.24); }
.dark .cv-input,
.dark .cv-textarea,
.dark .cv-dropdown-btn,
.dark .cv-icon-btn { border-color: rgba(240, 237, 230, 0.16); }
.dark .cv-actionbar { border-bottom-color: rgba(240, 237, 230, 0.12); }

/* Multiple-resume switcher menu */
.cv-resume-item { display: flex; align-items: center; gap: 2px; border-radius: 6px; }
.cv-resume-item.active { background: var(--accent-light); }
.cv-resume-pick {
  flex: 1; text-align: start; background: none; border: none; cursor: pointer;
  padding: 8px 10px; font-size: 13px; color: var(--t1); font-family: var(--font);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.cv-resume-item.active .cv-resume-pick { color: var(--accent); font-weight: 600; }
.cv-resume-act {
  background: none; border: none; cursor: pointer; color: var(--t4);
  padding: 4px 7px; border-radius: 5px; font-size: 13px; line-height: 1;
}
.cv-resume-act:hover { color: var(--t1); background: var(--bg3); }
#resume-dropdown-label { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Destructive "remove all saved data" entry at the bottom of the resume menu. */
.cv-resume-clear { color: #dc2626; border-top: 1px solid var(--bd); margin-top: 4px; }
.cv-resume-clear:hover { background: rgba(220, 38, 38, 0.08); }

/* Keyboard-accessible section reorder buttons */
.cv-sec-move {
  background: none;
  border: none;
  color: var(--t4);
  cursor: pointer;
  padding: 2px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.cv-sec-move:hover:not(:disabled) { color: var(--t1); background: var(--bg3); }
.cv-sec-move:disabled { opacity: 0.3; cursor: default; }

/* ============================================================
   3D PDF export loader
   Shown for a beat when the user hits "Download PDF", while the
   browser's print dialog spins up. A resume sheet rotates in real
   3D (perspective + preserve-3d), front face is a mini resume, back
   face is the paper underside. Warm-tinted shadow, no neon glow.
   Hidden in @media print so it never lands on the page.
   Accent comes in live via --cv-loader-accent (set by the builder JS).
   ============================================================ */
.cv-pdf-loader {
  --cv-loader-accent: var(--accent);
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s var(--ease), visibility 0s linear 0.34s;
}
.cv-pdf-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.34s var(--ease), visibility 0s;
}
.cv-pdf-loader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(240, 237, 230, 0.82);   /* frosted cream */
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  backdrop-filter: blur(14px) saturate(118%);
}
.dark .cv-pdf-loader__backdrop { background: rgba(15, 13, 12, 0.86); }

.cv-pdf-loader__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.42s var(--ease);
}
.cv-pdf-loader.show .cv-pdf-loader__inner { transform: translateY(0) scale(1); }

/* ── 3D stage ── */
.cv-pdf-loader__stage {
  position: relative;
  width: 230px;
  height: 270px;
  margin-bottom: 30px;
  perspective: 1150px;
  perspective-origin: 50% 42%;
}
/* Restrained warm-accent wash behind the sheet -> depth, not a neon orb. */
.cv-pdf-loader__glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    color-mix(in srgb, var(--cv-loader-accent) 26%, transparent) 0%,
    transparent 68%);
  filter: blur(6px);
  opacity: 0.55;
  animation: cv-pdf-glow 3.4s ease-in-out infinite;
}
.dark .cv-pdf-loader__glow { opacity: 0.7; }

/* Soft contact shadow that narrows as the sheet turns edge-on. Warm ink, not black. */
.cv-pdf-loader__shadow {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 150px;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(26, 22, 20, 0.26) 0%, rgba(26, 22, 20, 0) 70%);
  filter: blur(3px);
  animation: cv-pdf-shadow 2.6s linear infinite;
}
.dark .cv-pdf-loader__shadow {
  background: radial-gradient(ellipse at center,
    rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Float + tilt wrapper (keeps the bob/tilt off the spin axis). */
.cv-pdf-loader__doc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 176px;
  height: 234px;
  margin: -117px 0 0 -88px;
  transform-style: preserve-3d;
  animation: cv-pdf-float 3.4s ease-in-out infinite;
}
/* Inner spinner (full 360 on Y). */
.cv-pdf-loader__sheet {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: cv-pdf-spin 2.6s linear infinite;
}
.cv-pdf-loader__face {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(26, 22, 20, 0.22),
              0 2px 6px rgba(26, 22, 20, 0.12);
}
.cv-pdf-loader__face--front {
  background: #fff;
  /* faint top-down sheen for paper realism */
  background-image: linear-gradient(160deg, rgba(255,255,255,1) 0%, rgba(248,245,239,1) 100%);
  border: 1px solid rgba(26, 22, 20, 0.06);
}
.cv-pdf-loader__face--back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #f6f2ea 0%, #ece6db 100%);
  border: 1px solid rgba(26, 22, 20, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv-pdf-loader__face--back::before {
  /* bound-edge accent stripe */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 7px;
  background: var(--cv-loader-accent);
  opacity: 0.85;
}
.cv-pdf-loader__mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--cv-loader-accent) 70%, #5b534b);
  opacity: 0.78;
}

/* ── Mini resume on the front face ── */
.cv-pdf-loader__band {
  display: block;
  width: 100%;
  height: 30px;
  background: var(--cv-loader-accent);
}
.cv-pdf-loader__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 16px 16px;
}
.cv-pdf-loader__bar {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: rgba(26, 22, 20, 0.11);
}
.cv-pdf-loader__bar--name {
  height: 9px;
  width: 64%;
  background: rgba(26, 22, 20, 0.7);
  margin-top: 2px;
}
.cv-pdf-loader__bar--sub {
  height: 5px;
  width: 42%;
  background: rgba(26, 22, 20, 0.28);
  margin-bottom: 4px;
}
.cv-pdf-loader__bar--line { width: 100%; }
.cv-pdf-loader__bar--short { width: 72%; }
.cv-pdf-loader__rule {
  display: block;
  height: 1px;
  background: rgba(26, 22, 20, 0.1);
  margin: 3px 0 2px;
}
.cv-pdf-loader__head {
  display: block;
  height: 5px;
  width: 34%;
  border-radius: 3px;
  background: color-mix(in srgb, var(--cv-loader-accent) 80%, transparent);
  margin: 6px 0 2px;
}

/* ── Caption + progress ── */
.cv-pdf-loader__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t1);
  margin: 0 0 7px;
}
.cv-pdf-loader__sub {
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--t3);
  margin: 0 0 20px;
  min-height: 19px;
}
.cv-pdf-loader__progress {
  position: relative;
  width: 188px;
  height: 4px;
  border-radius: 4px;
  background: rgba(26, 22, 20, 0.1);
  overflow: hidden;
}
.dark .cv-pdf-loader__progress { background: rgba(240, 237, 230, 0.12); }
.cv-pdf-loader__progress span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 42%;
  border-radius: 4px;
  background: linear-gradient(90deg,
    transparent,
    var(--cv-loader-accent),
    color-mix(in srgb, var(--cv-loader-accent) 40%, transparent));
  animation: cv-pdf-track 1.5s var(--ease) infinite;
}

@keyframes cv-pdf-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
@keyframes cv-pdf-float {
  0%, 100% { transform: translateY(0) rotateX(8deg) rotateZ(-1deg); }
  50%      { transform: translateY(-12px) rotateX(8deg) rotateZ(1deg); }
}
@keyframes cv-pdf-shadow {
  0%, 50%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.85; }
  25%, 75%      { transform: translateX(-50%) scaleX(0.42); opacity: 0.45; }
}
@keyframes cv-pdf-glow {
  0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.94); }
  50%      { opacity: 0.62; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes cv-pdf-track {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(360%); }
}

/* Motion-sensitive users: hold a static 3D angle, just breathe the progress. */
@media (prefers-reduced-motion: reduce) {
  .cv-pdf-loader__sheet { animation: none; transform: rotateY(-20deg); }
  .cv-pdf-loader__doc { animation: none; transform: rotateX(7deg); }
  .cv-pdf-loader__shadow,
  .cv-pdf-loader__glow { animation: none; }
  .cv-pdf-loader__progress span {
    animation: cv-pdf-pulse 1.6s ease-in-out infinite;
    width: 100%;
    background: var(--cv-loader-accent);
  }
}
@keyframes cv-pdf-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}

/* Right-to-left pages (Arabic): the drawers slide in from the left edge they sit on,
   and the phone templates panel tucks away to the right. */
[dir="rtl"] .cv-drawer { animation-name: cvDrawerInRtl; }
@keyframes cvDrawerInRtl { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@media (max-width: 1024px) {
  [dir="rtl"] .cv-sidebar { box-shadow: -4px 0 20px rgba(0,0,0,0.1); }
  [dir="rtl"] .cv-sidebar.collapsed { transform: translateX(100%); }
}
[dir="rtl"] .cv-drawer { box-shadow: 4px 0 20px rgba(0,0,0,0.1); }
/* Arabic letters join and Hindi letters hang from one line: the templates' tracked
   headings would break them apart, so these CVs set every letter normally (the PDF
   gets this too: it renders with this stylesheet). */
.cv-page[lang="ar"] *, .cv-page[lang="fa"] *, .cv-page[lang="hi"] * { letter-spacing: normal !important; }
/* The display and code fonts have no Arabic letters (the code font even sets each one
   apart in a fixed cell), so Arabic CVs use the text font everywhere. */
.cv-page:is([lang="ar"], [lang="fa"]), .cv-page:is([lang="ar"], [lang="fa"]) * { font-family: var(--cv-font, 'DM Sans', sans-serif) !important; }
/* Right-to-left CVs: the PDF renderer misplaces a right-to-left flex header (it lands
   past the page edge), so the header row is laid out left to right with its items
   reversed, which looks the same, and the text inside stays right to left. */
.cv-page[dir="rtl"] .cv-header { direction: ltr; flex-direction: row-reverse; }
.cv-page[dir="rtl"] .cv-header > * { direction: rtl; }
.cv-page[dir="rtl"].tpl-executive .cv-header,
.cv-page[dir="rtl"].tpl-academic .cv-header { flex-direction: column; }
/* (The PDF renderer cannot float a drop-cap with float: inline-start, so the side is set per direction.) */
.cv-page[dir="rtl"].tpl-elegant .cv-summary-text::first-letter { float: right; margin-right: 0; margin-left: 3px; }
/* Right-to-left sidebar templates: the PDF renderer does not mirror a grid, so the
   columns are placed explicitly (sidebar on the right) and their content stays right
   to left. The browser preview gets the same layout, so screen and PDF match. */
.cv-page[dir="rtl"].tpl-two-column, .cv-page[dir="rtl"].tpl-creative { direction: ltr; }
.cv-page[dir="rtl"].tpl-two-column { grid-template-columns: 1fr 240px; }
.cv-page[dir="rtl"].tpl-creative { grid-template-columns: 1fr 260px; }
.cv-page[dir="rtl"].tpl-two-column > *, .cv-page[dir="rtl"].tpl-creative > * { direction: rtl; }
.cv-page[dir="rtl"].tpl-two-column > .cv-layout-sidebar, .cv-page[dir="rtl"].tpl-creative > .cv-layout-sidebar { grid-column: 2; grid-row: 1; }
.cv-page[dir="rtl"].tpl-two-column > .cv-layout-main, .cv-page[dir="rtl"].tpl-creative > .cv-layout-main { grid-column: 1; grid-row: 1; }
/* The builder's own headings use Playfair Display, whose served files have no Vietnamese,
   Hausa or Twi letters: on those pages they use the page font (Noto Sans) instead. */
:root:is([lang="vi"], [lang="ha"], [lang="tw"]) :is(.cv-drawer-head h3, .cv-modal-head h3) { font-family: var(--font); }

/* Kinds of work (cv-builder.js kindsBlock): Learn's type, mono caps kicker, no italics. */
.cv-kinds { background: var(--bg2); border: 1px solid var(--bd); border-radius: 18px; padding: 18px 18px 14px; }
.cv-kinds-kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--t3); }
.cv-kinds-h { font-family: var(--font); font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--t1); margin: 6px 0 4px; }
.cv-kinds-p { font-size: 14px; color: var(--t2); line-height: 1.5; margin: 0 0 14px; }
.cv-kinds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cv-kind { display: flex; flex-direction: column; gap: 3px; text-align: start; min-height: 64px; padding: 11px 12px; border: 1px solid var(--bd); border-radius: 12px; background: var(--bg); color: var(--t1); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.cv-kind b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.cv-kind span { font-size: 12.5px; color: var(--t3); line-height: 1.35; }
.cv-kind:hover { border-color: var(--accent); }
.cv-kind:focus-visible, .cv-kinds-change:focus-visible, .cv-kinds-skip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-kind.on { border-color: var(--accent); background: var(--accent-light); }
.cv-kinds-skip { margin-top: 10px; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--t3); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cv-kinds-skip:hover { color: var(--t1); }
.cv-kinds-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 4px 2px; }
.cv-kinds-bar b { font-size: 14px; font-weight: 600; color: var(--t1); }
.cv-kinds-change { margin-inline-start: auto; min-height: 36px; padding: 0 14px; border: 1px solid var(--bd); border-radius: 999px; background: var(--bg2); color: var(--t1); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cv-kinds-change:hover { border-color: var(--accent); }
.dark .cv-kinds { background: #211b18; border-color: rgba(240, 237, 230, 0.14); }
.dark .cv-kind { background: #1a1512; border-color: rgba(240, 237, 230, 0.14); }
.cv-check { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 2px 0 10px; font-size: 14px; font-weight: 500; color: var(--t1); cursor: pointer; }
.cv-check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.cv-checks { display: grid; gap: 0; margin: 0 0 8px; }
.cv-checks .cv-check { margin: 0; }
.lens-fact-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lens-fact-in { flex: 1 1 160px; min-width: 0; min-height: 40px; }

/* Phones and small tablets: the whole page scrolls (not a box under a fixed toolbar), so
   with the keyboard open the toolbar moves out of the way and the field being typed in shows. */
@media (max-width: 900px) {
  .cv-app { height: auto; min-height: 100vh; overflow: visible; }
  .cv-main { overflow: visible; }
  .cv-workspace { min-height: auto; }
  .cv-editor, .cv-preview { overflow: visible; }
  /* The site menu pill and the settings button scroll away with the page here: pinned to the
     screen they sat on top of the field being typed in. */
  .nav, .nav-set { position: absolute; }
}
/* Work without a boss + gap line (cv-builder.js noBossBlock / gapBlock). */
.cv-noboss { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--bd); }
.cv-noboss-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.cv-noboss-btn { min-height: 36px; padding: 0 12px; border: 1px solid var(--bd); border-radius: 999px; background: var(--bg); color: var(--t1); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cv-noboss-btn:hover { border-color: var(--accent); }
.cv-noboss-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-gap { background: var(--accent-light); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.cv-gap-p { margin: 0; font-size: 14px; font-weight: 500; color: var(--t1); line-height: 1.45; }
/* The look preview window keeps its Apply button in view at any screen height. */
#tpl-preview-modal .cv-modal { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
#tpl-preview-modal .cv-modal-scroll { flex: 1; min-height: 0; overflow-y: auto; }
#tpl-preview-modal .cv-modal-foot { flex: none; }
/* Read by a person in 20 seconds (cv-builder.js personChecks). */
.cv-person { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bd); }
.cv-person-h { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t3); }
.cv-person-h b { color: var(--t1); }
.cv-person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cv-person-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--t1); line-height: 1.4; }
.cv-person-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: #dc2626; }
.cv-person-list li.ok .cv-person-dot { background: #059669; }
.cv-person-list li.ok { color: var(--t2); }
.cv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cv-page .cv-name, .cv-page .cv-sb-name, .cv-page .cv-contact-item, .cv-page .cv-entry-title { overflow-wrap: anywhere; }

/* Accessibility pass (2026-11-20): small text dark enough to read (4.5:1), the look card's preview
   button beside the card button (not inside it). */
.cvh-badge .course-eyebrow, .ce-brand .course-eyebrow, .ce-pill { color: color-mix(in srgb, var(--accent) 70%, #000); }
.cv-ats-label, .cv-charcount { color: #6b645b; }
.dark .cv-ats-label, .dark .cv-charcount { color: #b3aca2; }
.cv-tpl-slot { position: relative; }
.cv-tpl-slot > .cv-tpl-eye { position: absolute; inset-inline-end: 12px; bottom: 12px; }
/* The back of the spinning page: a plain mark, no text (WebKit could show text mirrored mid-turn). */
.cv-pdf-loader__mark { display: block; width: 46%; height: 10px; border-radius: 6px; background: currentColor; opacity: .55; }
/* Phones: a lighter toolbar (smaller colour dots, the font as "Aa"). */
@media (max-width: 600px) {
  .cv-actionbar-colors { gap: 3px; }
  .cv-actionbar-colors .cv-dot { width: 22px; height: 22px; }
  #font-dropdown-label { display: none; }
  #font-dropdown-btn::before { content: 'Aa'; font-weight: 700; }
  #font-dropdown-btn { padding-inline: 10px; }
  .cv-actionbar-right { flex-wrap: wrap; }
  #btn-export-pdf { flex: 1 1 100%; justify-content: center; }
}
.cv-pdf-loader__backdrop { background: rgba(251, 248, 241, 0.96); }
.dark .cv-pdf-loader__backdrop { background: rgba(15, 13, 12, 0.95); }

/* Signs of a fake job advert (static/js/scam-signs.js) */
.scam-warn { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--amber, #d97706); border-inline-start-width: 4px; border-radius: 12px; background: color-mix(in srgb, var(--amber, #d97706) 9%, transparent); color: var(--t1); font-size: 14px; line-height: 1.45; }
.scam-warn b { display: block; font-weight: 700; margin-bottom: 4px; }
.scam-warn ul { margin: 0 0 6px; padding-inline-start: 18px; }
.scam-warn li { margin: 2px 0; }
.scam-warn p { margin: 0; color: var(--t2); font-size: 13px; }

.cv-btn-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border, rgba(0,0,0,.15)); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.cv-btn-secondary:hover { border-color: var(--accent); }

/* Every editor window (Check my CV, Send as a link, Cover letter, Look preview, ATS): one design.
   Learn's type (DM Sans 600, no serif, no italics), an icon tile, a round close button, a soft
   blurred backdrop; on phones each window is a sheet that rises from the bottom. */
.cv-modal-bg { background: rgba(24, 20, 16, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cv-modal { display: flex; flex-direction: column; max-height: min(88dvh, 900px); overflow: hidden; border-radius: 22px; border: 1px solid var(--bd); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 28px 70px -20px rgba(0,0,0,.35); animation: cvModalIn .22s cubic-bezier(.2,.8,.2,1); }
.cv-modal-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 4px 22px 22px; }
.cv-modal-body::-webkit-scrollbar { display: none; }
.cv-modal-head { flex: none; gap: 12px; padding: 18px 18px 14px 22px; border-bottom: 0; }
.cv-modal-head h3, .cv-drawer-head h3, #job-match-modal .cv-modal-head h3 { flex: 1; margin: 0; font-family: var(--font); font-style: normal; font-size: 1.22rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--t1); }
.cv-mi { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-light); color: var(--accent); }
.cv-mi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cv-modal-x, .cv-drawer-close { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--t2); background: var(--bg3); border: 0; cursor: pointer; transition: background .15s, color .15s; }
.cv-modal-x:hover, .cv-drawer-close:hover { background: var(--bd); color: var(--t1); }
.cv-modal-x:focus-visible, .cv-drawer-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-modal-hint { font-size: 14px; line-height: 1.5; color: var(--t2); margin: 0 0 14px; }
.cv-modal .cv-input, .cv-modal .cv-textarea { border-radius: 12px; }
.cv-modal .cv-btn-primary { min-height: 46px; border-radius: 12px; font-size: 14.5px; }
.cv-modal .cv-btn-secondary { border-radius: 12px; min-height: 44px; border-color: var(--bd); }
.cv-modal-foot { flex: none; padding: 14px 22px; border-top: 1px solid var(--bd); background: var(--bg2); }
.cv-modal-scroll { max-height: none; padding: 4px 22px 22px; }
#job-match-modal .cv-modal-head { padding: 18px 18px 14px 22px; align-items: center; }
#job-match-modal .cv-modal-body { padding: 4px 22px 22px; }
#cover-letter-modal .cv-modal { max-width: 680px; }
#cover-letter-modal .cv-modal-body > .cv-modal-hint:first-child { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
#cover-letter-modal #btn-generate-cl { margin-top: 4px; }
#cover-letter-modal #btn-generate-cl + .cv-modal-hint { margin: 10px 0 0; font-size: 13px; text-align: center; color: var(--t3); }
#tpl-preview-modal .cv-modal-scroll { background: var(--bg); margin: 0 22px; padding: 18px; border-radius: 16px; }
#tpl-preview-modal .cv-modal-foot { border-top: 0; }
#tpl-preview-modal .cv-modal-foot .cv-btn-primary { min-width: 220px; }
.cv-drawer-head { gap: 12px; padding: 16px 16px 14px 18px; }
.cv-drawer { border-radius: 22px 0 0 22px; }
@keyframes cvModalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes cvSheetIn { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 640px) {
  .cv-modal-bg { align-items: flex-end; padding: 0; }
  .cv-modal, #job-match-modal .cv-modal, #tpl-preview-modal .cv-modal { max-width: none; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: cvSheetIn .26s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  .cv-modal::before { content: ''; flex: none; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--bd); margin: 8px auto 0; }
  .cv-modal-head, #job-match-modal .cv-modal-head { padding: 10px 14px 12px 18px; }
  .cv-modal-body, .cv-modal-scroll, #job-match-modal .cv-modal-body { padding: 2px 18px 20px; }
  #tpl-preview-modal .cv-modal-scroll { margin: 0 12px; padding: 10px; }
  .cv-modal-foot { padding: 12px 18px; }
  #tpl-preview-modal .cv-modal-foot .cv-btn-primary { width: 100%; }
  .cv-drawer { border-radius: 22px 22px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .cv-modal, .cv-drawer { animation: none !important; } }

/* Send your CV as a link: choices on the left, what they will see on the right (a phone).
   On phones the preview opens under the choices with "See what they will see". */
.cv-pdf-loader__title, .cv-pdf-loader__mark { font-family: var(--font) !important; font-style: normal; letter-spacing: -.02em; }

/* Check my CV (lens-ui.js): a narrow window. Before: the advert on a soft paper field and one
   button. After: the advert folds into one line, a score card (ring + three-colour bar), then each
   thing they ask for as its own card with a tick, a dash or a cross. */
#job-match-modal .cv-modal { max-width: 560px; }
#job-match-modal .cv-modal-hint { font-size: 14px; color: var(--t2); margin: 0 0 12px; }
#job-match-modal #jd-input { display: block; width: 100%; min-height: 168px; resize: none; padding: 14px 16px; font: 400 15px/1.5 var(--font); color: var(--t1); background: var(--bg); border: 1px solid transparent; border-radius: 16px; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, box-shadow .15s, background .15s; }
#job-match-modal #jd-input::placeholder { color: var(--t3); }
#job-match-modal #jd-input:focus, #job-match-modal #jd-input:focus-visible { outline: none; background: var(--bg2); border-color: var(--bd); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.lens-go { display: flex; justify-content: flex-end; margin-top: 12px; }
.lens-go .cv-btn-primary { min-width: 170px; padding: 0 22px; border-radius: 999px; }
.lens-advert { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px 8px 14px; margin: 0 0 4px; border: 1px solid var(--bd); border-radius: 14px; background: var(--bg); color: var(--t2); font: 500 14px/1.3 var(--font); text-align: start; cursor: pointer; }
.lens-advert:hover { border-color: var(--accent); color: var(--t1); }
.lens-advert:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lens-advert span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lens-advert svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lens-advert .lens-advert-pen { color: var(--accent); }
#jd-results { margin-top: 10px; }
.lens-bar { display: flex; gap: 3px; height: 8px; margin: 0 0 8px; }
.lens-bar span { flex-basis: 0; border-radius: 4px; min-width: 8px; }
.lens-bar .green { background: #059669; }
.lens-bar .amber { background: #d97706; }
.lens-bar .red { background: #dc2626; opacity: .75; }
.lens-score .lens-sum { margin: 0; font-size: 11.5px; }
#jd-results .lens-trust { margin: 10px 2px 4px; font-size: 12.5px; color: var(--t3); }
#jd-results .lens-h { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 8px; }
.lens-h-n { font-weight: 700; color: var(--t2); letter-spacing: .06em; }
#jd-results .lens-list { display: grid; gap: 8px; }
#jd-results .lens-row { grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; padding: 14px 14px 14px 12px; border: 1px solid var(--bd); border-top: 1px solid var(--bd); border-radius: 16px; background: var(--bg2); }
#jd-results .lens-row:first-child { border-top: 1px solid var(--bd); }
#jd-results .lens-dot { width: 26px; height: 26px; margin-top: -2px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, currentColor 13%, transparent); }
#jd-results .lens-dot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
#jd-results .lens-dot path { display: none; }
#jd-results .lens-row.green .lens-dot { background: color-mix(in srgb, #059669 14%, transparent); color: #047857; }
#jd-results .lens-row.amber .lens-dot { background: color-mix(in srgb, #d97706 16%, transparent); color: #b45309; }
#jd-results .lens-row.red .lens-dot { background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; }
#jd-results .lens-row.green .lens-m0, #jd-results .lens-row.amber .lens-m1, #jd-results .lens-row.red .lens-m2 { display: inline; }
.dark #jd-results .lens-row.green .lens-dot { color: #34d399; }
.dark #jd-results .lens-row.amber .lens-dot { color: #fbbf24; }
.dark #jd-results .lens-row.red .lens-dot { color: #f87171; }
#jd-results .lens-text { font-size: 15px; }
#jd-results .lens-line { background: var(--bg); border-radius: 0 10px 10px 0; padding: 8px 12px; }
#jd-results .lens-add { border-radius: 999px; }
@media (max-width: 640px) {
  .lens-go .cv-btn-primary { width: 100%; }
              #jd-results .lens-row { padding: 12px 12px 12px 10px; }
}
.lens-advert[hidden] { display: none; }
@media (max-width: 640px) { #job-match-modal #jd-input { min-height: 140px; } }

/* Check my CV, option A (2026-11-20): one box for the advert or its link, the answer in one
   sentence and a bar, then To fix (not found and partly, must-haves first), and what is
   already on the CV folded under one line. */
.lens-go { align-items: center; gap: 12px; }
.lens-linkhint { flex: 1; margin: 0; font-size: 12.5px; color: var(--t3); line-height: 1.4; }
.lens-linkhint.busy { color: var(--accent); font-weight: 600; }
.lens-err { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #d97706 12%, transparent); color: var(--t1); font-size: 13.5px; line-height: 1.45; }
.lens-score { padding: 16px 18px; border-radius: 18px; background: var(--bg); }
.lens-score .lens-head { font-size: 1.2rem; margin: 0 0 10px; }
.lens-bar { margin: 0 0 8px; }
.lens-kind { display: block; margin: 0 0 2px; font: 700 10px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--t3); }
#jd-results .lens-h { justify-content: flex-start; gap: 8px; }
.lens-h-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg3); color: var(--t1); font: 700 11px/1 var(--mono); letter-spacing: 0; }
.lens-have { margin-top: 18px; }
.lens-have > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 6px 14px; border: 1px solid var(--bd); border-radius: 14px; background: var(--bg); cursor: pointer; }
.lens-have > summary::-webkit-details-marker { display: none; }
.lens-have > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--t3); border-bottom: 2px solid var(--t3); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.lens-have[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.lens-have > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lens-have > summary .lens-h { margin: 0 !important; }
.lens-have > .lens-list { margin-top: 8px; }
@media (max-width: 640px) { .lens-go { flex-direction: column; align-items: stretch; gap: 10px; } .lens-linkhint { text-align: center; } }

/* ?embed=1 (the home page's CV preview): only the CV page, as the editor draws it. */
html.cv-embed, html.cv-embed body { background: transparent !important; overflow: hidden auto; }
html.cv-embed body::before, html.cv-embed body::after { display: none !important; }
html.cv-embed .nav, html.cv-embed .nav-set, html.cv-embed #splash, html.cv-embed .skip-link, html.cv-embed .snd-share, html.cv-embed .editor-topbar,
html.cv-embed .cv-actionbar, html.cv-embed .cv-editor, html.cv-embed .cv-mobile-toggle, html.cv-embed .cv-drawer, html.cv-embed .cv-modal-bg,
html.cv-embed .theme-dock, html.cv-embed .cv-sidebar, html.cv-embed .cv-add-section-wrap, html.cv-embed .cv-toast, html.cv-embed .help-backdrop,
html.cv-embed .help-drawer, html.cv-embed .footer, html.cv-embed .cv-pdf-loader, html.cv-embed #cv-howto-root, html.cv-embed #cv-onboarding-root,
html.cv-embed .lang-hint, html.cv-embed .cursor-trail, html.cv-embed .cv-modal, html.cv-embed .jobs-moved-note { display: none !important; }
html.cv-embed .cv-app { padding: 0 !important; height: auto !important; min-height: 0 !important; display: block !important; overflow: visible !important; }
html.cv-embed .cv-main, html.cv-embed .cv-workspace { display: block !important; width: 100% !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
html.cv-embed .cv-preview { display: block !important; width: 100% !important; height: auto !important; border: 0 !important; background: transparent !important; padding: 0 0 8px !important; overflow: visible !important; }
html.cv-embed .cv-preview-inner { background: transparent !important; padding: 2px 2px 16px !important; margin: 0 auto !important; }
html.cv-embed { scrollbar-width: none; } html.cv-embed::-webkit-scrollbar { display: none; }
html.cv-embed .cv-page { width: 780px !important; max-width: none !important; }
html.cv-embed .cv-preview-inner { width: max-content !important; max-width: none !important; }
html.cv-embed .cv-page { box-shadow: none !important; border-radius: 0 !important; }
html.cv-embed .cv-app, html.cv-embed .cv-main, html.cv-embed .cv-workspace { background: transparent !important; }
html.cv-embed .cv-preview-inner { padding: 0 !important; }
