/* ===== Documents (A4 at 96dpi = 794 × 1123 px) ===== */
.cvdoc, .lettdoc, .coverdoc {
  --ink: #1e2024; --soft: #5b616b; --rule: #e6e7ea;
  box-sizing: border-box; width: 794px; min-height: 1123px; background: #fff; color: var(--ink);
  font-family: var(--font); font-size: 13.5px; line-height: 1.5; padding: 56px 60px; position: relative;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; text-align: left;
}
.cvdoc *, .lettdoc *, .coverdoc * { box-sizing: border-box; }
.cvdoc h1, .lettdoc h1, .coverdoc h1 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.01em; font-weight: 700; }
.cvdoc p, .lettdoc p { margin: 0 0 6px; }
.cvdoc h3, .coverdoc h3 { margin: 0 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.sec { margin-top: 20px; break-inside: avoid-page; }
.head { display: flex; gap: 22px; align-items: flex-start; }
.head-text { flex: 1; min-width: 0; }
.headline { font-size: 15px; font-weight: 600; color: var(--soft); margin: 6px 0 8px !important; }
.contact { font-size: 12px; color: var(--soft); }
.contact .sep { color: #c4c7cc; }
.photo { width: 112px; height: 140px; object-fit: cover; border-radius: 6px; flex: none; }
.kv { border-collapse: collapse; }
.kv th { text-align: left; font-weight: 500; color: var(--soft); padding: 1px 18px 1px 0; vertical-align: top; white-space: nowrap; }
.kv td { padding: 1px 0; }
.item { display: grid; grid-template-columns: 128px 1fr; gap: 14px; margin-bottom: 11px; break-inside: avoid; }
.when { color: var(--soft); font-size: 12px; padding-top: 2px; }
.role { font-weight: 700; }
.org { color: var(--soft); font-size: 12.5px; }
.item ul { margin: 4px 0 0; padding-left: 16px; }
.item li { margin: 2px 0; }
.item li::marker { color: var(--accent); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--tint); color: var(--ink); padding: 2px 10px; border-radius: 99px; font-size: 12.5px; min-width: 40px; }
.tags.plain li { background: none; padding: 0; border-radius: 0; }
.tags.plain li:not(:last-child)::after { content: ","; }
.dots { display: inline-flex; gap: 3px; margin-left: 10px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); }
.dots i.on { background: var(--accent); }
.profile { max-width: 62ch; }

/* translation + placeholder + editing */
.tr { display: block; font-family: Inter, Arial, sans-serif; font-size: .84em; line-height: 1.4; color: #6b7280; font-style: italic;
  border-left: 2px solid #ffd500; padding-left: 7px; margin: 2px 0 4px; }
.lock { display: inline-block; height: .72em; margin: .25em 0; border-radius: 3px; vertical-align: middle;
  background: repeating-linear-gradient(90deg, #e2e4e8 0 7px, #eceef1 7px 14px); }
.para .lock { display: block; }
.ed[contenteditable="true"] { outline: none; border-radius: 3px; transition: background .15s, box-shadow .15s; cursor: text; }
.ed[contenteditable="true"]:hover { background: rgba(0, 87, 183, .06); box-shadow: 0 0 0 2px rgba(0, 87, 183, .06); }
.ed[contenteditable="true"]:focus { background: rgba(255, 213, 0, .18); box-shadow: 0 0 0 2px rgba(255, 213, 0, .35); }
[data-ml] { white-space: pre-line; display: inline-block; min-width: 200px; }

/* ===== Zürich: classic ===== */
.tpl-zurich h3 { border-bottom: 1px solid var(--rule); padding-bottom: 5px; }
.tpl-zurich .head { padding-bottom: 6px; }

/* ===== Bern: dark sidebar left ===== */
.cv-sidebar { display: grid; grid-template-columns: 250px 1fr; padding: 0; }
.cv-sidebar .side { padding: 46px 26px; font-size: 12.5px; }
.cv-sidebar .main { padding: 50px 42px 50px 38px; }
.cv-sidebar .side .photo { width: 150px; height: 150px; border-radius: 50%; display: block; margin: 0 auto 10px; }
.cv-sidebar .side .kv th { display: block; padding: 6px 0 0; }
.cv-sidebar .side .kv td { display: block; }
.cv-sidebar .side .kv tr { display: block; }
.cv-sidebar .side .langs td { display: flex; align-items: center; justify-content: space-between; }
.cv-sidebar .item { grid-template-columns: 100px 1fr; }
.cv-sidebar .head h1 { font-size: 32px; }
.side-right.cv-sidebar { grid-template-columns: 1fr 245px; }
.side-right .side { order: 2; }
.side-right .main { order: 1; padding: 50px 34px 50px 52px; }
/* dark sidebar styles: accent colour or charcoal */
.side-accent .side { background: var(--accent); color: #fff; }
.side-charcoal .side { background: #23262d; color: #e9eaee; }
.side-accent .side h3 { color: #fff; border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 5px; }
.side-charcoal .side h3 { color: var(--accent-light); border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 5px; }
.side-accent .side .kv th, .side-charcoal .side .kv th { color: rgba(255,255,255,.65); }
.side-accent .side .tags li, .side-charcoal .side .tags li { background: rgba(255,255,255,.13); color: #fff; }
.side-accent .side .dots i, .side-charcoal .side .dots i { background: rgba(255,255,255,.22); }
.side-accent .side .dots i.on { background: #fff; }
.side-charcoal .side .dots i.on { background: var(--accent-light); }
.side-accent .side .photo { border: 4px solid rgba(255,255,255,.25); }
.side-accent .side .tr, .side-charcoal .side .tr { color: rgba(255,255,255,.75); }
.side-accent .side .photo-ph, .side-charcoal .side .photo-ph { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); color: #fff; }
/* light sidebar styles */
.side-tint .side { background: var(--tint); }
.side-light .side { background: #f3f2ef; }

/* ===== Bern ===== */
.tpl-bern .main h1 { color: var(--accent); }
.tpl-bern .main h3 { border-bottom: 2px solid var(--accent); padding-bottom: 5px; display: inline-block; }

/* ===== Lugano: light sidebar right ===== */
.tpl-lugano .side .photo { border-radius: 10px; width: 160px; height: 190px; }
.tpl-lugano .head { border-bottom: 3px solid var(--accent); padding-bottom: 14px; }

/* ===== Zug: charcoal sidebar ===== */
.tpl-zug .side .photo { border-radius: 8px; width: 170px; height: 205px; }
.tpl-zug .main h1 { text-transform: uppercase; letter-spacing: .04em; font-size: 30px; }
.tpl-zug .main .headline { color: var(--accent); }
.tpl-zug .main h3 { color: var(--ink); display: flex; align-items: center; gap: 10px; }
.tpl-zug .main h3::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ===== Chur: accent sidebar right ===== */
.tpl-chur .side .photo { border-radius: 50%; }
.tpl-chur .main h1 { font-size: 34px; }
.tpl-chur .main h3 { color: var(--accent); border-bottom: 1px solid var(--rule); padding-bottom: 5px; }
.tpl-chur .main .when { font-weight: 600; color: var(--accent); }

/* ===== Neuchâtel: light sidebar, serif headings ===== */
.tpl-neuchatel h1, .tpl-neuchatel h3 { font-family: "Lora", Georgia, serif; }
.tpl-neuchatel h1 { font-size: 34px; font-weight: 600; }
.tpl-neuchatel h3 { text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--accent); padding-bottom: 4px; }
.tpl-neuchatel .side .photo { border-radius: 4px; width: 170px; height: 210px; }
.tpl-neuchatel .headline { color: var(--accent); }

/* ===== Winterthur: bold top border ===== */
.tpl-winterthur { border-top: 14px solid var(--accent); }
.tpl-winterthur h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.tpl-winterthur h3 { color: var(--ink); font-size: 12px; }
.tpl-winterthur h3::after { content: ""; display: block; width: 34px; height: 3px; background: var(--accent); margin-top: 6px; border-radius: 2px; }
.tpl-winterthur .when { color: var(--accent); font-weight: 600; }
.tpl-winterthur .photo { border-radius: 10px; }

/* ===== Montreux: tinted header card ===== */
.tpl-montreux.cv-single .head { background: var(--tint); border-radius: 16px; padding: 24px 26px; flex-direction: row-reverse; justify-content: flex-end; align-items: center; }
.tpl-montreux .head .photo { border-radius: 50%; width: 116px; height: 116px; border: 4px solid #fff; }
.tpl-montreux h1 { font-size: 32px; font-weight: 600; color: var(--accent); }
.tpl-montreux h3 { text-transform: none; letter-spacing: 0; font-size: 17px; font-style: italic; font-weight: 600; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }

/* ===== Thun: date pills ===== */
.tpl-thun .head { border-bottom: 2px dashed var(--rule); padding-bottom: 16px; }
.tpl-thun h1 { font-size: 32px; }
.tpl-thun h3 { color: var(--ink); font-size: 12.5px; letter-spacing: .08em; }
.tpl-thun h3::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--accent); border-radius: 2px; margin-right: 8px; vertical-align: 1px; }
.tpl-thun .when .ed { display: inline-block; background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tpl-thun .item { grid-template-columns: 136px 1fr; }

/* ===== Aarau: plain, ATS-friendly ===== */
.tpl-aarau h1 { font-size: 27px; }
.tpl-aarau h3 { color: var(--ink); font-size: 12px; border-bottom: 1.5px solid var(--ink); padding-bottom: 3px; }
.tpl-aarau .headline { color: var(--ink); }
.tpl-aarau .tags li { background: none; padding: 0; border-radius: 0; }
.tpl-aarau .tags li:not(:last-child)::after { content: " ·"; }
.tpl-aarau .dots { display: none; }
.tpl-aarau .item li::marker { color: var(--ink); }
.tpl-aarau .photo { border-radius: 2px; width: 100px; height: 125px; }

/* ===== Fribourg: side stripe + numbered sections ===== */
.tpl-fribourg.cvdoc { border-left: 16px solid var(--accent); padding-left: 48px; counter-reset: sec; }
.tpl-fribourg h1 { font-size: 32px; }
.tpl-fribourg h3 { font-size: 12.5px; }
.tpl-fribourg h3::before { counter-increment: sec; content: counter(sec, decimal-leading-zero); color: var(--soft); margin-right: 10px; font-weight: 600; }
.tpl-fribourg .photo { border-radius: 50%; width: 118px; height: 118px; }

/* photo placeholder (editor only) */
.photo-ph { display: grid; place-items: center; border: 2px dashed #c9ccd2; background: #f6f7f9; color: #7b818b; font: 600 13px Inter, sans-serif; cursor: pointer; }
.photo-ph:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Genève: elegant serif, centered ===== */
.tpl-genf.cv-single .head { flex-direction: column; align-items: center; text-align: center; }
.tpl-genf .head .photo { order: -1; width: 110px; height: 110px; border-radius: 50%; }
.tpl-genf h1 { font-size: 34px; font-weight: 600; letter-spacing: .01em; }
.tpl-genf .headline { color: var(--accent); font-style: italic; font-weight: 500; }
.tpl-genf h3 { text-align: center; letter-spacing: .25em; display: flex; align-items: center; gap: 14px; }
.tpl-genf h3::before, .tpl-genf h3::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.tpl-genf .sec-personal .kv { margin: 0 auto; }
.tpl-genf .when { font-style: italic; }

/* ===== Basel: colour band header ===== */
.tpl-basel.cv-single .head { margin: -56px -60px 6px; padding: 42px 60px 30px; background: var(--accent); color: #fff; align-items: center; }
.tpl-basel .head .headline, .tpl-basel .head .contact, .tpl-basel .head .contact .sep { color: rgba(255,255,255,.85); }
.tpl-basel .head .tr { color: rgba(255,255,255,.8); }
.tpl-basel .head .photo { border: 4px solid #fff; border-radius: 50%; width: 120px; height: 120px; }
.tpl-basel h3 { border-left: 4px solid var(--accent); padding-left: 10px; line-height: 1.2; }

/* ===== Luzern: minimal timeline ===== */
.tpl-luzern h1 { font-weight: 300; font-size: 36px; text-transform: uppercase; letter-spacing: .06em; }
.tpl-luzern .headline { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; }
.tpl-luzern h3 { color: #8a8f98; letter-spacing: .2em; }
.tpl-luzern .sec-experience .what, .tpl-luzern .sec-education .what, .tpl-luzern .sec-training .what { border-left: 2px solid var(--rule); padding-left: 18px; position: relative; }
.tpl-luzern .sec-experience .what::before, .tpl-luzern .sec-education .what::before, .tpl-luzern .sec-training .what::before {
  content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.tpl-luzern .photo { filter: grayscale(.15); border-radius: 2px; }

/* ===== St. Gallen: compact ===== */
.tpl-stgallen { font-size: 12.5px; padding: 44px 50px; }
.tpl-stgallen h1 { font-size: 26px; }
.tpl-stgallen h3 { background: var(--tint); padding: 5px 10px; border-radius: 4px; }
.tpl-stgallen .sec { margin-top: 14px; }
.tpl-stgallen .body { display: flex; flex-wrap: wrap; column-gap: 4%; }
.tpl-stgallen .body > .sec { width: 100%; }
.tpl-stgallen .body > .sec-languages, .tpl-stgallen .body > .sec-skills, .tpl-stgallen .body > .sec-interests, .tpl-stgallen .body > .sec-references { width: 48%; }
.tpl-stgallen .item { grid-template-columns: 112px 1fr; margin-bottom: 8px; }
.tpl-stgallen .photo { width: 96px; height: 120px; }

/* ===== Davos: modern monogram ===== */
.mono { width: 64px; height: 64px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 24px; flex: none; letter-spacing: .02em; }
.tpl-davos h1 { font-size: 32px; font-weight: 800; }
.tpl-davos h3 { color: var(--ink); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.tpl-davos h3::before { content: ""; width: 18px; height: 4px; border-radius: 2px; background: var(--accent); }
.tpl-davos .tags li { background: none; border: 1.5px solid var(--accent); }
.tpl-davos .tags.plain li { border: 0; }
.tpl-davos .photo { border-radius: 14px; }

/* ===== Letter ===== */
.lettdoc { padding: 56px 70px; }
.lhead { display: flex; gap: 16px; align-items: center; padding-bottom: 14px; margin-bottom: 36px; border-bottom: 2px solid var(--accent); }
.lhead h1 { font-size: 24px; color: var(--accent); }
.lhead .contact { margin: 4px 0 0; }
.lettdoc .recipient { min-height: 76px; margin-bottom: 28px; }
.lettdoc .date { text-align: right; margin-bottom: 26px; }
.lettdoc .subject { font-weight: 700; margin-bottom: 18px !important; font-size: 14.5px; }
.lettdoc .para { margin-bottom: 11px !important; text-align: left; }
.lettdoc .closing { margin-top: 18px !important; }
.lettdoc .sign { margin-top: 38px !important; }
.lettdoc .encl { margin-top: 30px !important; font-size: 12px; color: var(--soft); }
.lettdoc.lt-band .lhead, .tpl-basel .lhead { margin: -56px -70px 40px; padding: 34px 70px 26px; background: var(--accent); border: 0; }
.lettdoc.lt-band .lhead h1, .tpl-basel .lhead h1 { color: #fff; }
.lettdoc.lt-band .lhead .contact, .lettdoc.lt-band .lhead .sep, .tpl-basel .lhead .contact, .tpl-basel .lhead .sep { color: rgba(255,255,255,.85); }
.lettdoc.side-charcoal .lhead { background: #23262d; }
.lettdoc.side-tint .lhead { background: var(--tint); }
.lettdoc.side-light .lhead { background: #f3f2ef; }
.lettdoc.side-tint .lhead h1, .lettdoc.side-light .lhead h1 { color: var(--accent); }
.lettdoc.side-tint .lhead .contact, .lettdoc.side-light .lhead .contact { color: var(--soft); }
.tpl-neuchatel .lhead h1 { font-family: "Lora", Georgia, serif; }
.tpl-winterthur.lettdoc { border-top: 14px solid var(--accent); }
.tpl-winterthur .lhead { border-bottom-width: 1px; border-color: var(--rule); }
.tpl-winterthur .lhead h1 { color: var(--ink); font-weight: 800; }
.tpl-montreux .lhead { background: var(--tint); border: 0; border-radius: 14px; padding: 20px 24px; }
.tpl-thun .lhead { border-bottom: 2px dashed var(--rule); }
.tpl-thun .lhead h1 { color: var(--ink); }
.tpl-aarau .lhead { border-bottom: 1.5px solid var(--ink); }
.tpl-aarau .lhead h1 { color: var(--ink); }
.tpl-fribourg.lettdoc { border-left: 16px solid var(--accent); padding-left: 60px; }
.tpl-fribourg .lhead h1 { color: var(--ink); }
.tpl-genf .lhead { flex-direction: column; text-align: center; border-bottom: 1px solid var(--rule); }
.tpl-genf .lhead h1 { color: var(--ink); font-size: 28px; }
.tpl-luzern .lhead h1 { color: var(--ink); font-weight: 300; text-transform: uppercase; letter-spacing: .06em; }
.tpl-luzern .lhead { border-bottom-width: 1px; }
.tpl-davos .lhead h1 { color: var(--ink); }
.tpl-davos .lhead { border: 0; }

/* ===== Cover page (Deckblatt) ===== */
.coverdoc { padding: 0; display: flex; }
.cover-band { width: 22px; background: var(--accent); flex: none; }
.cover-inner { flex: 1; padding: 120px 90px 80px; display: flex; flex-direction: column; }
.cover-photo { width: 190px; height: 238px; object-fit: cover; border-radius: 8px; margin-bottom: 46px; }
.cover-mono { width: 120px; height: 120px; border-radius: 24px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 44px; font-weight: 800; margin-bottom: 46px; }
.coverdoc .kicker { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; color: var(--accent); font-size: 13px; margin: 0 0 10px; }
.coverdoc h1 { font-size: 40px; line-height: 1.15; }
.cover-company { font-size: 20px; color: var(--soft); margin: 12px 0 0; }
.cover-person { margin-top: auto; padding-top: 50px; border-top: 2px solid var(--accent); font-size: 14px; color: var(--soft); }
.cover-name { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.cover-person p { margin: 0; }
.cover-toc { margin-top: 36px; }
.cover-toc ol { margin: 0; padding-left: 20px; color: var(--soft); }
.tpl-genf.coverdoc .cover-inner { align-items: center; text-align: center; }
.tpl-genf .cover-photo { border-radius: 50%; width: 200px; height: 200px; }
.tpl-genf .cover-toc ol { list-style-position: inside; padding: 0; }
.tpl-montreux .cover-photo, .tpl-chur .cover-photo, .tpl-fribourg .cover-photo { border-radius: 50%; width: 200px; height: 200px; }
.tpl-zug .cover-band, .tpl-aarau .cover-band { background: #23262d; }
.cover-photo.photo-ph { border-radius: 8px; }

/* ===== Translation of a reference / diploma ===== */
.trdoc { padding: 64px 70px; }
.trdoc .tr-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.trdoc .tr-title { font-size: 26px; margin: 0 0 18px; color: var(--ink); }
.trdoc .tr-meta { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); width: 100%; }
.trdoc .tr-body .para { margin-bottom: 10px !important; }
.trdoc .tr-note { margin-top: 34px !important; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 11.5px; color: var(--soft); font-style: italic; }

/* ===== RAV / social-office report ===== */
.ravdoc { box-sizing: border-box; width: 794px; min-height: 1123px; background: #fff; color: #1e2024; font-family: Inter, Arial, sans-serif; font-size: 12px; line-height: 1.45; padding: 52px 48px; }
.ravdoc h1 { font-size: 20px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 3px solid var(--accent, #d52b1e); }
.ravdoc table { width: 100%; border-collapse: collapse; }
.ravdoc .rav-head { margin-bottom: 18px; }
.ravdoc .rav-head th { text-align: left; color: #5b616b; font-weight: 500; padding: 3px 10px 3px 0; white-space: nowrap; width: 1%; }
.ravdoc .rav-head td { padding: 3px 16px 3px 0; font-weight: 600; }
.ravdoc .rav-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #5b616b; padding: 7px 6px; border-bottom: 1.5px solid #1e2024; }
.ravdoc .rav-table td { padding: 8px 6px; border-bottom: 1px solid #e6e7ea; vertical-align: top; }
.ravdoc .rav-sum { margin: 14px 0 46px; }
.ravdoc .rav-sign { display: flex; justify-content: space-between; gap: 40px; }
.ravdoc .rav-sign span { flex: 1; border-top: 1px solid #1e2024; padding-top: 4px; color: #5b616b; }
.ravdoc .rav-note { margin-top: 36px; font-size: 10.5px; color: #5b616b; font-style: italic; }
