/* =========================================================
   XY — CV Builder (layout + the two CV templates)
   Uses the site's design tokens from /styles.css.
   ========================================================= */

.cb { min-height: 100vh; }

/* ---------- Header ---------- */
.cb-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.cb-header-in { display: flex; align-items: center; gap: var(--s2); height: 64px; width: min(1320px, 100% - var(--s4)); margin-inline: auto; }
.cb-header-title { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-left: var(--s2); border-left: 1px solid var(--line-strong); }
.cb-back { margin-left: auto; font-size: .9375rem; color: var(--ink-2); }
.cb-back:hover { color: var(--ink); }
.cb-progress { height: 3px; background: var(--line); }
.cb-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s var(--ease); }

/* ---------- Layout ---------- */
.cb-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s6); width: min(1320px, 100% - var(--s4)); margin: var(--s5) auto var(--s10); align-items: start; }
.cb-form { min-width: 0; }

/* Step list */
.cb-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s4); }
.cb-steps button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 500 .8125rem/1 var(--sans); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.cb-steps button b { font-weight: 600; font-family: var(--serif); }
.cb-steps button:hover { border-color: var(--ink); color: var(--ink); }
.cb-steps button[aria-current="step"] { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.cb-steps button.done:not([aria-current]) { color: var(--ink); border-color: var(--accent); }
.cb-steps button.done:not([aria-current])::after { content: "✓"; color: var(--accent); font-size: .75rem; }

/* Panel */
.cb-panel { outline: none; }
.cb-panel h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.05; margin-bottom: var(--s1); }
.cb-panel h1 em { font-style: italic; }
.cb-lead { color: var(--ink-2); margin-bottom: var(--s4); max-width: 56ch; }
.cb-tip { display: flex; gap: 10px; padding: 12px 16px; margin: 0 0 var(--s3); border-radius: 12px; background: var(--accent-tint); color: var(--tag-ink); font-size: .9375rem; line-height: 1.55; }
.cb-tip::before { content: "💡"; flex: none; }
.cb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
.cb-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field .opt { font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.field .hint { font-size: .8125rem; color: var(--ink-2); margin-top: 6px; }
.field textarea.short { min-height: 112px; }
.cb-count { text-align: right; font-size: .75rem; color: var(--ink-2); margin-top: 4px; }
.cb-count.warn { color: var(--error); }

/* Package cards */
.cb-packages { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.cb-package { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s2); padding: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.cb-package:hover { border-color: var(--ink-2); }
.cb-package input { position: absolute; opacity: 0; pointer-events: none; }
.cb-package .cb-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.cb-package .cb-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .2s var(--ease); }
.cb-package:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.cb-package:has(input:checked) .cb-dot { border-color: var(--accent); }
.cb-package:has(input:checked) .cb-dot::after { transform: scale(1); }
.cb-package:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.cb-package h3 { font-size: 1.375rem; }
.cb-package p { font-size: .9375rem; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.cb-package .price { font-family: var(--serif); font-size: 1.75rem; color: var(--ink); white-space: nowrap; }
.cb-package .badge { position: absolute; top: -11px; right: 20px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--cream); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Checkbox */
.cb-check { display: flex; align-items: flex-start; gap: 12px; padding: var(--s2); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: .9375rem; line-height: 1.55; cursor: pointer; }
.cb-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.cb-check.invalid { border-color: var(--error); }
.cb-check-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; cursor: pointer; margin-bottom: var(--s3); }
.cb-check-inline input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Repeating entries (jobs, schools, certificates) */
.cb-entry { position: relative; padding: var(--s3); padding-top: var(--s5); margin-bottom: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.cb-entry-head { position: absolute; top: 12px; left: var(--s3); right: 12px; display: flex; align-items: center; gap: 6px; }
.cb-entry-head span { margin-right: auto; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.cb-icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; font-size: .9375rem; line-height: 1; }
.cb-icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.cb-icon-btn.del:hover { border-color: var(--error); color: var(--error); }
.cb-icon-btn[disabled] { opacity: .35; cursor: default; }
.cb-add { width: 100%; min-height: 52px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink); font: 600 .9375rem/1 var(--sans); cursor: pointer; margin-bottom: var(--s3); }
.cb-add:hover { border-color: var(--accent); color: var(--accent); }
.cb-date { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Suggestion chips */
.cb-chips-label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); margin: -8px 0 8px; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s3); }
.cb-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font: 500 .8125rem/1.3 var(--sans); cursor: pointer; text-align: left; transition: background-color .2s, border-color .2s, color .2s; }
.cb-chip:hover { border-color: var(--accent); }
.cb-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.cb-chip.add::before { content: "+ "; color: var(--accent); }
.cb-chip.add:hover { background: var(--accent-tint); }
.cb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 8px; }
.cb-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--tag-ink); font-size: .8125rem; font-weight: 600; }
.cb-tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; }
.cb-tag button:hover { background: rgba(0, 0, 0, .08); }
.cb-tag-input { display: flex; gap: 8px; }
.cb-tag-input input { flex: 1; }
.cb-tag-input .btn { min-height: 48px; }
.cb-sugg-field { margin-bottom: var(--s2); }
.cb-more { margin: -8px 0 var(--s3); }
.cb-more summary { cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--accent); padding: 6px 0; list-style: none; }
.cb-more summary::-webkit-details-marker { display: none; }
.cb-more summary::before { content: "+ "; }
.cb-more[open] summary::before { content: "– "; }
.cb-more[open] summary { margin-bottom: var(--s2); }
.cb-group-title { font-family: var(--serif); font-size: 1.375rem; margin: var(--s2) 0 var(--s2); max-width: none; }

/* Examples */
.cb-examples { display: grid; gap: 8px; margin-bottom: var(--s3); }
.cb-example { padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); color: var(--ink); text-align: left; font: inherit; font-size: .875rem; line-height: 1.55; cursor: pointer; }
.cb-example b { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.cb-example:hover { border-color: var(--accent); }

/* Photo */
.cb-photo { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.cb-photo-thumb { width: 88px; height: 110px; flex: none; border-radius: 44px 44px 10px 10px; background: var(--sand) center / cover no-repeat; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink-2); font-size: .75rem; text-align: center; }
.cb-photo label.btn { cursor: pointer; }
.cb-photo input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* Review checklist */
.cb-checklist { display: grid; gap: 8px; margin-bottom: var(--s4); }
.cb-checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: .9375rem; line-height: 1.5; }
.cb-checklist li::before { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.cb-checklist li.ok::before { content: "✓"; background: var(--accent); color: var(--cream); }
.cb-checklist li.warn::before { content: "!"; background: #C98A3C; color: #fff; }
.cb-checklist li.bad::before { content: "×"; background: var(--error); color: #fff; }
.cb-checklist li button { margin-left: auto; flex: none; border: 0; background: none; color: var(--accent); font: 600 .875rem/1.5 var(--sans); cursor: pointer; text-decoration: underline; }
.cb-summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--radius); background: var(--accent); color: var(--cream); margin-bottom: var(--s2); }
.cb-summary p { color: var(--cream); }
.cb-summary small { display: block; opacity: .8; font-size: .8125rem; }
.cb-summary .price { font-family: var(--serif); font-size: 2rem; }
.cb-soon { font-size: .875rem; color: var(--ink-2); text-align: center; }
/* Payment step */
.cb-pay-amount { display: grid; justify-items: center; gap: 2px; padding: var(--s3); margin-bottom: var(--s3); border-radius: var(--radius); background: var(--accent); color: var(--cream); text-align: center; }
.cb-pay-amount span { font-size: .8125rem; opacity: .85; }
.cb-pay-amount b { font-family: var(--serif); font-weight: 400; font-size: 2.75rem; line-height: 1.1; }
.cb-link { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.cb-pay-tabs { display: flex; width: max-content; margin: 0 auto var(--s2); }
.cb-qr { width: min(300px, 100%); margin: 0 auto var(--s2); padding: 12px; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px var(--line), 0 16px 32px -20px rgba(0, 0, 0, .3); }
.cb-qr img { width: 100%; height: auto; }
.cb-pay-steps { list-style: decimal; padding-left: 1.25rem; margin-bottom: var(--s4); display: grid; gap: 6px; font-size: .9375rem; line-height: 1.55; color: var(--ink); }
.cb-receipt { display: flex; align-items: center; gap: var(--s2); }
.cb-receipt-thumb { width: 72px; height: 110px; flex: none; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--sand) center / cover no-repeat; display: grid; place-items: center; padding: 6px; font-size: .6875rem; line-height: 1.3; text-align: center; color: var(--ink-2); }
.cb-receipt label.btn { cursor: pointer; }
.cb-receipt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cb-relink { padding: var(--s3); margin: var(--s2) 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.cb-relink p { font-size: .9375rem; line-height: 1.55; margin-bottom: var(--s2); }
.cb-relink .cb-tag-input input { font-size: .8125rem; }
.cb-relink .hint { margin: 8px 0 0; color: var(--accent); }
#cb-next[hidden] { display: none; }
.cb-downloads { display: grid; gap: var(--s2); margin-bottom: var(--s2); }
.cb-dl-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s1); }
.cb-dl-btns .btn[disabled] { cursor: not-allowed; opacity: .5; }
.cb-test { padding: 10px 14px; border-radius: 12px; border: 1px dashed #C98A3C; color: var(--ink); font-size: .875rem; line-height: 1.5; background: color-mix(in srgb, #C98A3C 10%, transparent); }

/* Nav */
.cb-nav { display: flex; justify-content: space-between; gap: var(--s2); padding-top: var(--s3); margin-top: var(--s2); border-top: 1px solid var(--line); }
.cb-nav .btn { min-width: 132px; }
.cb-nav #cb-prev[hidden] { display: inline-flex; visibility: hidden; }
.cb-saved { min-height: 1.5em; margin-top: var(--s2); font-size: .8125rem; color: var(--ink-2); text-align: center; }
.cb-error-msg { color: var(--error); font-size: .875rem; margin-top: var(--s2); }

/* ---------- Preview ---------- */
.cb-preview { position: sticky; top: calc(64px + 3px + var(--s3)); min-width: 0; }
.cb-preview-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.cb-preview-label { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-right: auto; }
.cb-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; }
.cb-tabs button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 .8125rem/1 var(--sans); cursor: pointer; }
.cb-tabs button[aria-selected="true"] { background: var(--ink); color: var(--cream); }
.cb-tabs button[hidden] { display: none; }
.cb-preview-close { display: none; }
.cb-paper-wrap { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35), 0 0 0 1px var(--line); background: #fff; max-height: calc(100vh - 64px - 3px - var(--s3) - 110px); overflow-y: auto; overscroll-behavior: contain; }
.cb-paper-scale { position: relative; transform-origin: top left; width: 210mm; }
.cb-paper { width: 210mm; min-height: 297mm; background: #fff; color: #1C1A17; user-select: none; -webkit-user-select: none; }
.cb-watermark { position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='220'%3E%3Ctext x='30' y='130' transform='rotate(-24 210 110)' font-family='Arial' font-size='22' font-weight='700' fill='%233E4A34' fill-opacity='.13' letter-spacing='3'%3EPREVIEW %C2%B7 XY CV BUILDER%3C/text%3E%3C/svg%3E");
  background-size: 420px 220px; }
.cb-pages { margin-top: var(--s1); font-size: .8125rem; color: var(--ink-2); text-align: center; min-height: 1.4em; }
.cb-pages.warn { color: var(--error); }
.cb-page-break { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(155, 61, 44, .5); pointer-events: none; }
.cb-page-break span { position: absolute; right: 8px; top: 2px; font: 700 10px/1 Arial, sans-serif; color: rgba(155, 61, 44, .8); letter-spacing: .08em; }
.cb-preview-fab { display: none; }

/* Full-screen finished CV (opened by the download buttons) */
#cb-print { display: none; position: fixed; inset: 0; z-index: 100; overflow: auto; background: #E9E4DA; overscroll-behavior: contain; }
body.print-open { overflow: hidden; }
body.print-open #cb-print { display: block; }
.cb-print-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; padding: 12px 16px; background: #1C1A17; color: #F6F1E9; font: 14px/1.5 var(--sans); text-align: center; }
.cb-print-bar p { color: #F6F1E9; max-width: 60ch; }
.cb-print-bar div { display: flex; gap: 8px; }
.cb-print-bar button { min-height: 42px; padding: 0 20px; border-radius: 999px; font: 700 .875rem/1 var(--sans); cursor: pointer; }
.cb-print-save { border: 0; background: #B9C4A0; color: #1C1A17; }
.cb-print-close { border: 1px solid rgba(246, 241, 233, .4); background: transparent; color: #F6F1E9; }
.cb-print-sheet { width: 210mm; margin: 20px auto 40px; background: #fff; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .35); }
@media screen { .cb-print-sheet { zoom: var(--z, 1); } }

@media print {
  /* Without an unlocked download, printing shows only a note (no free CV via Ctrl+P). */
  body.cb:not(.print-open) .cb-main, body.cb:not(.print-open) .cb-header, body.cb:not(.print-open) .cb-preview-fab { display: none !important; }
  body.cb:not(.print-open)::after { content: "To save your CV, use the Download step in the CV Builder."; display: block; padding: 40px; font: 16px Arial, sans-serif; }
  /* Unlocked download: print the CV only, edge to edge. */
  body.print-open > *:not(#cb-print) { display: none !important; }
  body.print-open { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-open #cb-print { position: static; overflow: visible; background: #fff; }
  .cb-print-bar { display: none !important; }
  .cb-print-sheet { margin: 0; box-shadow: none; width: auto; zoom: 1; }
  .cb-print-sheet .cvd { min-height: 296mm; }
  .cb-print-sheet .cva { min-height: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cb-main { grid-template-columns: minmax(0, 1fr); margin-top: var(--s3); }
  .cb-preview { position: fixed; inset: 0; z-index: 70; top: 0; padding: var(--s2); background: var(--cream); display: none; flex-direction: column; }
  .cb-preview.open { display: flex; }
  .cb-preview-close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
  .cb-paper-wrap { max-height: none; flex: 1; }
  .cb-preview-fab { display: inline-flex; position: fixed; z-index: 60; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); }
  .cb-preview-fab:active { transform: translateX(-50%) translateY(1px); }
  body.preview-open { overflow: hidden; }
  .cb-nav { margin-bottom: var(--s8); }
}
@media (max-width: 640px) {
  .cb-row, .cb-row-3 { grid-template-columns: minmax(0, 1fr); }
  .cb-header-title { display: none; }
  .cb-package { grid-template-columns: auto 1fr; padding: var(--s2); }
  .cb-package .price { grid-column: 2; font-size: 1.375rem; }
  .cb-nav .btn { min-width: 0; flex: 1; }
  .cb-summary { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   CV TEMPLATES (always light, independent of site theme)
   ========================================================= */
.cvd, .cva { width: 210mm; min-height: 297mm; color: #1C1A17; background: #fff; }
.cvd *, .cva * { box-sizing: border-box; }
.cvd h1, .cvd h2, .cvd h3, .cvd p, .cvd ul, .cva h1, .cva h2, .cva h3, .cva p, .cva ul { margin: 0; padding: 0; color: inherit; font-family: inherit; line-height: inherit; max-width: none; letter-spacing: normal; }
.cvd ul, .cva ul { list-style: none; }
.cvd em { color: var(--cv-accent); }
.cv-empty { color: #736C63; font-style: italic; }

/* Designed */
.cvd { display: grid; grid-template-columns: 66mm 1fr; grid-template-areas: "side main"; font-family: "Manrope", "Segoe UI", Arial, sans-serif; font-size: 8.7pt; line-height: 1.45; }
.cvd main { grid-area: main; padding: 13mm 13mm 10mm 11mm; display: flex; flex-direction: column; gap: 4mm; min-width: 0; }
.cvd aside { grid-area: side; background: var(--cv-side); padding: 13mm 8mm 10mm 10mm; display: flex; flex-direction: column; gap: 4.5mm; min-width: 0; }
.cvd .name { font-family: "Fraunces", Georgia, serif; font-size: 24pt; line-height: 1.02; letter-spacing: -.02em; font-weight: 500; overflow-wrap: anywhere; }
.cvd .name em { font-style: italic; }
.cvd .role { margin-top: 2mm; font-size: 10pt; font-weight: 600; color: var(--cv-accent); }
.cvd .contact-line { margin-top: 1.6mm; font-size: 8.4pt; color: #4F4942; overflow-wrap: anywhere; }
.cvd .contact-line b { color: #1C1A17; font-weight: 600; }
.cvd .summary { font-size: 9pt; color: #4F4942; border-left: 2px solid var(--cv-accent); padding-left: 4mm; white-space: pre-line; }
.cvd .main-title { font-family: "Fraunces", Georgia, serif; font-size: 13pt; font-weight: 500; display: flex; align-items: center; gap: 3mm; margin-bottom: 2mm; }
.cvd .main-title::after { content: ""; flex: 1; height: 1px; background: rgba(28, 26, 23, .14); }
.cvd .job { margin-bottom: 3mm; break-inside: avoid; }
.cvd .job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; }
.cvd .job h3 { font-size: 10.4pt; font-weight: 700; }
.cvd .dates { font-size: 8pt; font-weight: 600; color: var(--cv-warm); white-space: nowrap; }
.cvd .org { color: var(--cv-accent); font-weight: 600; font-size: 8.8pt; margin: .4mm 0 1.2mm; }
.cvd .job ul li { padding-left: 3.6mm; text-indent: -3.6mm; color: #4F4942; }
.cvd .job ul li::before { content: ""; display: inline-block; width: 1.8mm; height: 1px; margin-right: 1.8mm; vertical-align: .3em; background: var(--cv-accent); }
.cvd .certs li { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; padding: 1mm 0; border-bottom: 1px solid rgba(28, 26, 23, .14); color: #4F4942; }
.cvd .certs li:last-child { border-bottom: 0; }
.cvd .certs b { color: #1C1A17; font-weight: 600; }
.cvd .certs small { display: block; font-size: 8pt; }
.cvd .mono { width: 16mm; height: 16mm; border-radius: 50%; background: var(--cv-accent); color: #F6F1E9; display: grid; place-items: center; font-family: "Fraunces", Georgia, serif; font-size: 15pt; letter-spacing: -.02em; margin-bottom: 1mm; }
.cvd .photo { display: block; width: 36mm; height: 45mm; object-fit: cover; border-radius: 18mm 18mm 3mm 3mm; box-shadow: 0 0 0 1.2mm #fff, 0 0 0 1.5mm rgba(28, 26, 23, .14); margin: 0 auto 1mm; }
.cvd .side-title { font-size: 7.2pt; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cv-accent); padding-bottom: 2mm; border-bottom: 1px solid rgba(28, 26, 23, .14); margin-bottom: 2.5mm; }
.cvd .cv-skills li { padding: .35mm 0; padding-left: 3.4mm; text-indent: -3.4mm; }
.cvd .cv-skills li::before { content: ""; display: inline-block; width: 1.4mm; height: 1.4mm; border-radius: 50%; background: var(--cv-accent); margin: 0 2mm .4mm 0; vertical-align: middle; }
.cvd .cv-edu li { margin-bottom: 2mm; }
.cvd .cv-edu b { display: block; font-weight: 600; }
.cvd .cv-edu small { display: block; color: #4F4942; font-size: 8pt; }
.cvd .cv-edu .yr { display: block; color: var(--cv-warm); font-weight: 600; font-size: 7.5pt; }

/* ATS */
.cva { padding: 10mm 14mm; font-family: Arial, Helvetica, sans-serif; font-size: 9.2pt; line-height: 1.28; }
.cva h1 { font-size: 19pt; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cva .title { font-size: 11pt; font-weight: 700; color: #3E4A34; margin-top: 1mm; }
.cva .cv-contact { margin-top: 1.5mm; font-size: 9.5pt; overflow-wrap: anywhere; }
.cva h2 { font-size: 10.5pt; font-weight: 700; text-transform: uppercase; color: #3E4A34; border-bottom: 1px solid #3E4A34; padding-bottom: 1mm; margin: 3mm 0 1.5mm; }
.cva .summary { white-space: pre-line; }
.cva .item { margin-bottom: 2.2mm; break-inside: avoid; }
.cva .item h3 { font-size: 10.5pt; font-weight: 700; }
.cva .meta { font-size: 9pt; margin: .3mm 0 .6mm; }
.cva ul.bullets { padding-left: 5mm; list-style: disc; }
.cva ul.bullets li { margin-bottom: .15mm; }
.cva .cv-skills p { margin-bottom: .8mm; }

/* ---------- Design options: colors + layouts ---------- */
.cvd { --cv-accent: #3E4A34; --cv-side: #EEE7DB; --cv-warm: #A8643F; }
.cvd.col-navy     { --cv-accent: #1F3A5F; --cv-side: #E7EDF4; --cv-warm: #B0683A; }
.cvd.col-wine     { --cv-accent: #6B2737; --cv-side: #F4E9EA; --cv-warm: #9A6B2F; }
.cvd.col-teal     { --cv-accent: #1F5E63; --cv-side: #E3EFEE; --cv-warm: #B35F3A; }
.cvd.col-charcoal { --cv-accent: #2E2E2E; --cv-side: #EEEDEA; --cv-warm: #8C6A3E; }

/* Modern: bold sans headings, solid color sidebar */
.cvd.lay-modern aside { background: var(--cv-accent); color: #fff; }
.cvd.lay-modern .side-title { color: #fff; border-bottom-color: rgba(255, 255, 255, .28); }
.cvd.lay-modern .cv-skills li::before { background: #fff; }
.cvd.lay-modern .cv-edu small { color: rgba(255, 255, 255, .82); }
.cvd.lay-modern .cv-edu .yr { color: var(--cv-side); }
.cvd.lay-modern .mono { background: #fff; color: var(--cv-accent); }
.cvd.lay-modern .photo { box-shadow: 0 0 0 1.2mm rgba(255, 255, 255, .9); }
.cvd.lay-modern .name { font-family: "Manrope", "Segoe UI", Arial, sans-serif; font-weight: 800; font-size: 23pt; letter-spacing: -.035em; }
.cvd.lay-modern .name em { font-style: normal; color: var(--cv-accent); }
.cvd.lay-modern main header { padding-bottom: 4mm; border-bottom: 2.5px solid var(--cv-accent); }
.cvd.lay-modern .summary { border-left: 0; padding-left: 0; }
.cvd.lay-modern .main-title { font-family: "Manrope", "Segoe UI", Arial, sans-serif; font-size: 9.5pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cv-accent); }

/* Minimal: white page, thin lines, spaced capitals */
.cvd.lay-minimal aside { background: #fff; border-right: 1px solid rgba(28, 26, 23, .14); }
.cvd.lay-minimal .name { font-family: "Manrope", "Segoe UI", Arial, sans-serif; font-weight: 300; font-size: 21pt; letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.cvd.lay-minimal .name em { font-style: normal; font-weight: 700; color: inherit; }
.cvd.lay-minimal .role { letter-spacing: .04em; }
.cvd.lay-minimal .summary { border-left: 0; padding-left: 0; }
.cvd.lay-minimal .main-title { font-family: "Manrope", "Segoe UI", Arial, sans-serif; font-size: 8.5pt; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.cvd.lay-minimal .mono { background: transparent; color: var(--cv-accent); box-shadow: inset 0 0 0 1.2px var(--cv-accent); }

/* Design picker + strength meter (preview column) */
.cb-design { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px var(--s2); margin-bottom: var(--s2); }
.cb-design[hidden] { display: none; }
.cb-layouts { display: inline-flex; gap: 6px; }
.cb-layouts button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 .8125rem/1 var(--sans); cursor: pointer; }
.cb-layouts button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.cb-colors { display: inline-flex; align-items: center; gap: 8px; }
.cb-colors span { font-size: .75rem; font-weight: 600; color: var(--ink-2); margin-right: 2px; }
.cb-colors button { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid var(--cream); box-shadow: 0 0 0 1px var(--line-strong); background: var(--sw); cursor: pointer; }
.cb-colors button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.cb-score { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; margin-bottom: var(--s2); padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.cb-score b { font-size: .8125rem; }
.cb-score-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.cb-score-bar i { display: block; height: 100%; width: var(--pct, 0%); border-radius: inherit; background: var(--tone, var(--accent)); transition: width .4s ease; }
.cb-score strong { font-size: .875rem; color: var(--tone, var(--accent)); }
.cb-score p { grid-column: 1 / -1; font-size: .8125rem; color: var(--ink-2); }
.cb-score p button { padding: 0; border: 0; background: none; color: var(--ink); font: 600 .8125rem/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cb-paper-wrap { max-height: calc(100vh - 64px - 3px - var(--s3) - 200px); }

/* Trust strip on step 1 */
.cb-promise { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s3); padding: 0; list-style: none; }
.cb-promise li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--ink); font-size: .8125rem; font-weight: 600; }
.cb-promise li::before { content: "✓"; color: var(--accent); font-weight: 800; }
@media (max-width: 1000px) {
  .cb-paper-wrap { max-height: none; }
}
/* ---------- Templates 4–6: Executive, Timeline, Compact ---------- */
.cb-layouts { flex-wrap: wrap; }
.cb-design-note { flex-basis: 100%; font-size: .8125rem; color: var(--ink-2); }
.cvd.cvx { display: block; }
.cvd h4 { margin: 0; padding: 0; font: inherit; }

/* Executive */
.cvd.lay-executive .x-head { display: flex; align-items: center; justify-content: space-between; gap: 8mm; padding: 12mm 13mm 10mm; background: var(--cv-accent); color: #fff; }
.cvd.lay-executive .name { color: #fff; font-size: 26pt; }
.cvd.lay-executive .name em { color: var(--cv-side); }
.cvd.lay-executive .role { color: var(--cv-side); }
.cvd.lay-executive .contact-line { color: rgba(255, 255, 255, .85); }
.cvd.lay-executive .contact-line b { color: #fff; }
.cvd.lay-executive .x-head .photo { flex: none; width: 28mm; height: 34mm; margin: 0; border-radius: 3mm; box-shadow: 0 0 0 1mm rgba(255, 255, 255, .85); }
.cvd.lay-executive .x-head .mono { flex: none; width: 20mm; height: 20mm; margin: 0; font-size: 18pt; background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
.cvd.lay-executive .x-body { display: grid; grid-template-columns: minmax(0, 1fr) 62mm; }
.cvd.lay-executive main, .cvd.lay-executive aside { grid-area: auto; }
.cvd.lay-executive main { padding: 9mm 9mm 10mm 13mm; }
.cvd.lay-executive aside { padding: 9mm 11mm 10mm 8mm; }
.cvd.lay-executive .summary { border-left: 0; padding-left: 0; font-size: 9.3pt; }

/* Timeline */
.cvd.lay-timeline { padding: 13mm 14mm 10mm; }
.cvd.lay-timeline .t-head { display: flex; align-items: center; gap: 6mm; padding-bottom: 5mm; margin-bottom: 5mm; border-bottom: 1px solid rgba(28, 26, 23, .14); }
.cvd.lay-timeline .t-head .photo { flex: none; width: 26mm; height: 26mm; margin: 0; border-radius: 50%; box-shadow: 0 0 0 1mm #fff, 0 0 0 1.4mm var(--cv-accent); }
.cvd.lay-timeline .t-head .mono { flex: none; width: 20mm; height: 20mm; margin: 0; font-size: 17pt; }
.cvd.lay-timeline .summary { border-left: 0; padding-left: 0; margin-bottom: 5mm; }
.cvd.lay-timeline section { margin-bottom: 4.5mm; }
.cvd .t-item { position: relative; display: grid; grid-template-columns: 30mm minmax(0, 1fr); gap: 0 7mm; padding-bottom: 3.5mm; break-inside: avoid; }
.cvd .t-item::before { content: ""; position: absolute; left: 32.3mm; top: 1.3mm; width: 2.4mm; height: 2.4mm; border-radius: 50%; background: var(--cv-accent); }
.cvd .t-item::after { content: ""; position: absolute; left: calc(33.5mm - .4px); top: 4.2mm; bottom: -1.2mm; width: .8px; background: rgba(28, 26, 23, .2); }
.cvd .t-item:last-child::after { display: none; }
.cvd .t-when { font-size: 8pt; font-weight: 700; color: var(--cv-warm); text-align: right; padding-top: .4mm; }
.cvd .t-what h3 { font-size: 10.4pt; font-weight: 700; }
.cvd .t-what .org { color: var(--cv-accent); font-weight: 600; font-size: 8.8pt; margin: .3mm 0 1.2mm; }
.cvd .t-what ul li { padding-left: 3.6mm; text-indent: -3.6mm; color: #4F4942; }
.cvd .t-what ul li::before { content: ""; display: inline-block; width: 1.8mm; height: 1px; margin-right: 1.8mm; vertical-align: .3em; background: var(--cv-accent); }
.cvd .t-note { color: #4F4942; font-size: 8.4pt; }
.cvd .t-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(48mm, 1fr)); gap: 4mm; }
.cvd .t-skills h4 { font-size: 7.4pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cv-accent); margin-bottom: 1.8mm; }
.cvd .t-pills { display: flex; flex-wrap: wrap; gap: 1.4mm; }
.cvd .t-pills li { padding: .7mm 2.6mm; border-radius: 99px; background: var(--cv-side); font-size: 8pt; }

/* Compact */
.cvd.lay-compact { padding: 12mm 14mm 10mm; font-size: 8.6pt; }
.cvd .c-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; padding-bottom: 4mm; margin-bottom: 1mm; border-bottom: 2px solid var(--cv-accent); }
.cvd.lay-compact .name { font-size: 22pt; }
.cvd .c-contact { text-align: right; font-size: 8.2pt; color: #4F4942; line-height: 1.55; overflow-wrap: anywhere; }
.cvd .c-row { display: grid; grid-template-columns: 28mm minmax(0, 1fr); gap: 0 5mm; padding: 3.2mm 0; border-bottom: 1px solid rgba(28, 26, 23, .1); }
.cvd .c-row:last-child { border-bottom: 0; }
.cvd .c-label { font-size: 7.6pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cv-accent); padding-top: .6mm; }
.cvd.lay-compact .summary { border-left: 0; padding-left: 0; }
.cvd.lay-compact .job { margin-bottom: 2.4mm; }
.cvd.lay-compact .job:last-child { margin-bottom: 0; }
.cvd .c-cols { columns: 3; column-gap: 5mm; }
.cvd .c-cols li { break-inside: avoid; padding-left: 3.4mm; text-indent: -3.4mm; }
.cvd .c-cols li::before { content: ""; display: inline-block; width: 1.4mm; height: 1.4mm; border-radius: 50%; background: var(--cv-accent); margin: 0 2mm .4mm 0; vertical-align: middle; }
.cvd .c-edu li { margin-bottom: 1.6mm; }
.cvd .c-edu li:last-child { margin-bottom: 0; }
.cvd .c-inline { color: #4F4942; }
/* Hide the nav and preview until the builder has laid out (prevents layout shift on load) */
/* CV Builder page only (body.cb): the cover letter page shares this file but never sets .ready */
body.cb .cb-main:not(.ready) .cb-nav, body.cb .cb-main:not(.ready) .cb-saved, body.cb .cb-main:not(.ready) .cb-preview > * { visibility: hidden; }
/* Placeholder text on the CV sidebar: darker on the light sidebar, lighter on Modern's dark sidebar */
.cvd aside .cv-empty { color: #5C554C; }
.cvd.lay-modern aside .cv-empty { color: rgba(255, 255, 255, .8); }
/* ---------- Leftover [example text]: yellow in the preview only ---------- */
.cb-paper mark.cv-fix { padding: 0 1px; border-radius: 2px; background: #FFE98A; color: inherit; }
.cvd.lay-modern aside mark.cv-fix, .cvd.lay-executive .x-head mark.cv-fix { color: #1C1A17; }
.cb-tip.cb-tip-warn { background: #FFF4CC; color: #4A3B00; border-color: #E8CF6A; }
.cb-tip.cb-tip-warn .cb-chip { margin-left: 6px; }
:root[data-theme="dark"] .cb-tip.cb-tip-warn { background: #3A3214; color: #F5E6A8; border-color: #6B5A1C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cb-tip.cb-tip-warn { background: #3A3214; color: #F5E6A8; border-color: #6B5A1C; } }

/* ---------- First screen: privacy line ---------- */
.cb-privacy { margin-top: var(--s2); font-size: .8125rem; color: var(--ink-2); }
.cb-privacy a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Paper size (A4 / US Letter) ---------- */
.cb-paper-pick { margin-bottom: var(--s2); }
.cb-paper-pick .cb-layouts button { min-height: 40px; }
.cb-paper-pick small { margin-left: 4px; font-weight: 500; opacity: .75; }
body.paper-letter .cb-paper-scale, body.paper-letter .cb-paper, body.paper-letter .cvd, body.paper-letter .cva { width: 215.9mm; }
body.paper-letter .cb-paper, body.paper-letter .cvd, body.paper-letter .cva { min-height: 279.4mm; }
body.paper-letter .cb-print-sheet { width: 215.9mm; }
@media print {
  body.paper-letter .cb-print-sheet { width: auto; }
  body.paper-letter .cb-print-sheet .cvd { min-height: 278.4mm; }
  body.paper-letter .cb-print-sheet .cva { min-height: 0; }
}

/* ---------- Your CVs (one per job) ---------- */
.cb-cvs { margin: var(--s3) 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.cb-cvs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cb-cvs-head h2 { font-size: 1.125rem; }
.cb-cvs-head h2 em { font-style: italic; }
.cb-cvs .hint { margin-top: 6px; font-size: .8125rem; color: var(--ink-2); }
.cb-cv-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.cb-cv-list li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 10px; }
.cb-cv-list li.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.cb-cv-open { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border: 0; background: none; color: var(--ink); font: 600 .875rem/1.3 var(--sans); text-align: left; cursor: pointer; }
.cb-cv-open span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cb-cv-open small { flex: none; margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.cb-cv-list li.on .cb-cv-open small { color: var(--accent); }
.cb-cv-del { flex: none; width: 36px; height: 36px; margin-right: 2px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.cb-cv-del:hover, .cb-cv-del:focus-visible { background: var(--line); color: var(--ink); }

/* ---------- Backup file ---------- */
.cb-backup { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.cb-backup .hint { font-size: .875rem; color: var(--ink-2); margin-bottom: var(--s2); }
.cb-backup-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-backup-btns .btn { cursor: pointer; }
#backup-msg { margin-top: 8px; margin-bottom: 0; }

/* ---------- Undo bar ---------- */
#cb-undo { position: fixed; left: 50%; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: .875rem; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); transform: translate(-50%, 140%); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s; }
#cb-undo.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#cb-undo span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#cb-undo button { flex: none; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--cream); color: var(--ink); font: 700 .875rem/1 var(--sans); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { #cb-undo { transition: none; } }