:root { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #172339; background:#eef1f5; font-synthesis:none; }
* {box-sizing:border-box}
body {margin:0; min-width: 320px}
button, input, textarea, select {font:inherit}
button {cursor:pointer}
button:disabled {opacity:.55; cursor:wait}
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {outline:3px solid #c3d4f1;outline-offset:1px}
.app-shell {min-height:100vh;display:flex;flex-direction:column}
.app-header {height:74px; flex-shrink:0; display:flex; align-items:center;justify-content:space-between;gap:20px;padding:0 30px;background:white;border-bottom:1px solid #e3e9f0}
.brand {display:flex;align-items:center;gap:12px}
.brand-icon {width:39px;height:39px;border-radius:11px;background:#283e60;color:white;display:grid;place-content:center;font-size:14px;font-weight:800;letter-spacing:-.05em}
.brand-icon span {color:#a9d2ed}
.brand strong {display:block;font-size:15px;letter-spacing:-.02em}
.brand-tagline {margin:3px 0 0;color:#6b7686;font-size:12px}
@media(max-width:780px) {.brand-tagline {display:none}}
.brand small {display:block;color:#8692a2;font-size:11px;margin-top:2px;letter-spacing:.07em;text-transform:uppercase;font-weight:650}
.header-actions {display:flex;align-items:center;gap:9px}
.local-label {color:#77879a;font-size:12px;margin-right:15px;white-space:nowrap;display:flex;align-items:center;gap:7px}
.dot {display:inline-block;height:7px;width:7px;border-radius:100%;background:#65b68f}
.btn {height:37px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;border:1px solid transparent;border-radius:8px;font-size:12px;font-weight:700;white-space:nowrap;transition:background .15s}
.btn svg,.preview-note svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.btn-quiet {color:#485770;background:transparent;border-color:#e3e9f0}
.btn-quiet:hover,.btn-secondary:hover {background:#f1f5f9}
.btn-primary {background:#2c496d;color:#fff;box-shadow:0 3px 8px #233c5d1e}
.btn-primary:hover {background:#203752}
.btn-secondary {border-color:#d4dee9;background:#fff;color:#29466a}
.btn-icon {height:33px;width:34px;padding:0;border:1px solid #dce4ef;background:#fff;color:#52647a}
.workspace {display:grid;grid-template-columns:minmax(460px, 45%) minmax(440px, 1fr);flex:1;min-height:0;height:calc(100vh - 74px)}
.edit-panel {background:#fff;display:flex;flex-direction:column;min-height:0;border-right:1px solid #e1e6ee}
.eyebrow {font-size:10px;letter-spacing:.145em;font-weight:800;color:#8493a7;margin:0 0 9px}
h1 {font-size:27px;line-height:1.14;letter-spacing:-.055em;font-weight:770;margin:0 0 8px}
.lang-toggle {display:flex;gap:3px;background:#edf2f8;border-radius:9px;padding:4px;flex-shrink:0;margin-top:9px}
.lang-toggle button {border:0;border-radius:6px;font-size:11px;font-weight:750;color:#8493a8;background:transparent;padding:6px 8px}
.lang-toggle button.active {background:white;color:#253f60;box-shadow:0 1px 3px #243c5c20}
.tabbar {display:flex;gap:4px;border-bottom:1px solid #e3eaf2; padding:0 28px;overflow-x:auto;scrollbar-width:none}
.tabbar button {background:none;border:0;border-bottom:2px solid transparent; margin-bottom:-1px;padding:12px 10px 13px;font-size:12px;font-weight:660;color:#8492a5;white-space:nowrap}
.tabbar button.active {border-bottom-color:#375b87;color:#28466e}
.tabbar button:hover {color:#273c5c}
.form-scroll {overflow:auto;flex:1;padding:26px 33px 52px}
.form-section {margin:0 0 28px}
.section-heading {display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px}
.section-heading h3 {font-size:13px;font-weight:790;letter-spacing:-.01em;margin:0}
.section-heading p,.section-hint {font-size:12px;color:#8b98a8;margin:5px 0 0;line-height:1.5}
.field-grid {display:grid;grid-template-columns:1fr 1fr;gap:14px 13px}
.field {display:flex;flex-direction:column;gap:7px;min-width:0;margin-bottom:13px}
.field-grid .field {margin:0}
.field label {font-size:11px;font-weight:710;color:#516078}
.field input,.field textarea,.field select {background:#fcfdff;border:1px solid #dbe3ed;border-radius:8px;color:#253751;padding:10px 12px;font-size:12px;width:100%;min-height:40px;transition:border-color .12s, box-shadow .12s}
.field textarea {line-height:1.6;min-height:80px;resize:vertical}
.field input:focus,.field textarea:focus,.field select:focus {border-color:#6690c6;box-shadow:0 0 0 3px #d6e6f45c;outline:none}
.field input::placeholder,.field textarea::placeholder {color:#a4b1c1}
.note {font-size:11px;color:#8996a6;line-height:1.5;margin:7px 0 0}
.sep {border:0;border-top:1px solid #ecf0f5;margin:24px 0}
.item-card {border:1px solid #e0e7ef;border-radius:11px;margin:0 0 13px;background:#fff;overflow:hidden}
.item-card-head {background:#f8fafc;padding:12px 13px;display:flex;align-items:center;gap:7px;border-bottom:1px solid #e8edf2}
.item-number {background:#e8eef7;color:#4e6480;border-radius:5px;font-size:10px;line-height:23px;width:23px;text-align:center;font-weight:750}
.item-card-head strong {font-size:12px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#394a60}
.item-card-body {padding:17px 15px 5px}
.icon-button {border:1px solid transparent;background:transparent;color:#8292a6;border-radius:6px;padding:5px 6px;font-size:14px;line-height:1}
.icon-button:hover {background:#ebf0f6;color:#385573}
.icon-button.danger:hover {color:#b03e55;background:#ffedf1}
.add-button {width:100%;height:39px;border:1px dashed #bfd0e2;border-radius:8px;background:#f7fafc;color:#456385;font-size:12px;font-weight:730}
.add-button:hover {background:#ebf2fa}
.small-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0, 1fr);gap:12px}
.empty-hint {font-size:12px;line-height:1.5;color:#8293a5;background:#f7f9fc;border-radius:8px;padding:15px;margin-bottom:12px}
.help-card {background:#f6f8fb;border-radius:9px;padding:14px 15px;margin:18px 0;font-size:12px;color:#60748b;line-height:1.6}
.help-card strong {color:#415774}
.text-action {border:0;background:transparent;color:#56759a;font-size:11px;font-weight:690}
.preview-panel {display:flex;flex-direction:column;min-height:0;padding:26px clamp(18px,3vw,46px) 18px;background:#edf1f5}
.preview-toolbar {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 15px;margin-bottom:17px}
.preview-toolbar .eyebrow {margin-bottom:0}
.preview-controls {display:flex;flex-wrap:wrap;align-items:center;gap:8px 13px}
.preview-choice {display:flex;align-items:center;gap:9px}
.color-switch {display:flex;flex-wrap:wrap;gap:5px}
.color-swatch {width:22px;height:22px;padding:0;border-radius:50%;border:2px solid #fff;background:var(--swatch);box-shadow:0 0 0 1px #ced9e7;cursor:pointer}
.color-swatch[aria-pressed="true"] {box-shadow:0 0 0 2px #26476f}
.color-swatch:focus-visible {outline:2px solid #8eb2dc;outline-offset:2px}
/* Design's own colour: a neutral, crossed-out swatch. */
.color-default {background:linear-gradient(135deg,#fff 45%,#9aa8b8 45% 55%,#fff 55%)}
#compile-status {font-size:11px;color:#7b8da1;max-width:300px;line-height:1.4;text-align:right}
#compile-status.error {color:#a54a58}
.preview-frame {background:#e2e8ef;box-shadow:0 7px 28px #2b405019;border:1px solid #dce3eb;border-radius:10px;flex:1;overflow:auto;position:relative;min-height:300px}
.preview-pages {display:flex;flex-direction:column;gap:14px;padding:14px}
.preview-pages[hidden] {display:none}
.preview-pages svg {display:block;width:100%;height:auto;background:#fff;box-shadow:0 1px 5px #2b405029;fill:none}
/* Text outline in font units (1000 per em): compensates for browsers drawing SVG text thinner than a PDF viewer. */
.preview-pages .typst-text {stroke-width:15px;stroke-linejoin:round}
.preview-empty {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;background:#f5f7fa}
.preview-empty[hidden] {display:none}
.preview-placeholder-icon {color:#7d94ae;border:2px solid #b3c0d0;padding:20px 15px;border-radius:10px;font-weight:800}
.preview-empty h3 {font-size:18px;margin:20px 0 5px}
.preview-empty p {font-size:12px;color:#7c8a99;line-height:1.6;max-width:470px;white-space:pre-wrap}
.preview-note {font-size:10px;color:#8d9aab;display:flex;align-items:center;justify-content:center;gap:7px;margin-top:17px;text-align:center}
.preview-note svg {width:14px;height:14px}
@media(max-width:1100px) {.workspace {grid-template-columns:minmax(400px,50%) minmax(350px,1fr)}.header-actions .local-label {display:none}.app-header {padding:0 18px}.form-scroll{padding:24px}.tabbar {padding:0 18px}}
@media(max-width:780px) {.workspace {height:auto;display:flex;flex-direction:column}.edit-panel {min-height:600px;overflow:visible}.form-scroll {overflow:visible}.preview-frame {flex:none}.app-header {height:auto;min-height:73px;flex-wrap:wrap;padding:13px 16px}.header-actions{flex-wrap:wrap}.header-actions .btn{font-size:11px;padding:0 9px}.local-label {display:none}}
@media(max-width:470px) {.field-grid,.small-grid {grid-template-columns:1fr}.form-scroll {padding:20px 17px}.tabbar {padding:0 12px}.preview-panel {padding:21px 12px}}
/* CV-editor v2: concise form for repeated use with different candidates. */
.brand-icon {font-size:13px;letter-spacing:-.04em}
.brand strong {font-size:16px}
.visually-hidden-file {position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.upload-label {cursor:pointer}
.upload-label:focus-visible {outline:3px solid #c3d4f1;outline-offset:2px}
.notice {margin:0 28px 16px;background:#fff0ef;color:#99453e;padding:10px 12px;font-size:12px;line-height:1.5;border-radius:8px;display:flex;align-items:flex-start;gap:10px}
.notice p {margin:0;flex:1}
.notice-success {background:#eaf4ee;color:#25613e}
.notice-close {flex:none;border:0;background:none;color:inherit;font-size:18px;line-height:1;padding:0 2px;cursor:pointer;opacity:.7}
.notice-close:hover {opacity:1}
.notice[hidden] {display:none}
.form-section .section-heading {min-height:24px}
.section-toggle {font-size:11px;font-weight:650;color:#71839b;display:flex;align-items:center;gap:8px;cursor:pointer;white-space:nowrap}
.section-toggle input {width:16px;height:16px;accent-color:#2c496d;cursor:pointer}
.section-muted>.section-content {opacity:.53}
.section-muted>.section-heading h3 {color:#8191a4}
.date-box {border:1px solid #e4eaf2;background:#f8fafc;border-radius:9px;padding:12px 14px 1px;margin-bottom:17px}
.date-box>.field {max-width:250px}
.date-range {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.date-label {font-size:11px;font-weight:760;color:#50617c;margin:0 0 8px}
.date-inputs {display:grid;grid-template-columns:minmax(0,1fr)}
.date-inputs.has-month {grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:8px}
.date-inputs .field {min-width:0}
.date-inputs .field label {font-size:10px}
.date-inputs .field input,.date-inputs .field select {padding:9px 8px}
.ongoing-option {display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;font-weight:660;color:#526781;margin:1px 0 13px}
.ongoing-option input {width:16px;height:16px;accent-color:#2c496d}
.skill-chips {display:flex;flex-wrap:wrap;gap:8px;min-height:14px;margin-bottom:13px}
.skill-chip {display:inline-flex;align-items:center;gap:2px;border-radius:20px;background:#e9eff7;border:1px solid #dae5f1;color:#2e4b70;max-width:100%}
.skill-chip:hover {background:#dfeaf7}
.skill-edit,.skill-remove {background:none;border:0;color:inherit}
.skill-edit {font-size:12px;font-weight:650;padding:7px 1px 7px 12px;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.skill-remove {font-size:16px;line-height:1;padding:6px 10px 8px 5px;color:#6c86a4}
.skill-remove:hover {color:#ad3f4b}
.skill-entry {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.skill-entry>input {flex:1;min-width:175px;min-height:40px;background:#fcfdff;border:1px solid #dbe3ed;border-radius:8px;padding:10px 12px;font-size:12px}
.skill-entry>input:focus {outline:none;border-color:#6690c6;box-shadow:0 0 0 3px #d6e6f45c}
.skill-entry .btn {height:40px}
@media (max-width:950px) {.header-actions {gap:6px}.header-actions .btn {padding:0 10px}}
@media (max-width:550px) {.date-range{grid-template-columns:1fr;gap:0}.app-header .brand{width:100%}.header-actions {width:100%;justify-content:space-between}.header-actions .btn {font-size:10px;padding:0 7px}}

/* Optional portrait: original LaTeX placement, always rectangular. */
.photo-control {display:flex;align-items:center;gap:17px;margin:0 0 21px;padding:14px;border:1px solid #dfe7f0;background:#f8fafc;border-radius:10px}
.photo-preview-box {width:76px;height:94px;flex:none;border:1px solid #d2dbe6;border-radius:0;overflow:hidden;background:#e9edf1}
.photo-preview {width:100%;height:100%;display:block;object-fit:cover}
.photo-placeholder {height:100%;display:flex;align-items:center;justify-content:center;color:#95a4b5}
.photo-options {min-width:0}
.photo-options strong {font-size:12px;color:#32475f}
.photo-options p {font-size:11px;line-height:1.5;color:#74859a;margin:5px 0 10px}
.photo-buttons {display:flex;gap:6px;flex-wrap:wrap}
.photo-buttons .btn {height:33px;font-size:11px;padding:0 11px}

/* Driving-licence categories: compact, keyboard-accessible multiple selection. */
.license-fieldset {border:0;margin:18px 0 20px;padding:0;min-width:0}
.license-fieldset legend {font-size:11px;font-weight:710;color:#516078;padding:0;margin:0 0 10px}
.license-options {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
.license-option {display:flex;align-items:center;gap:7px;cursor:pointer;font-size:12px;color:#364b65;background:#f8fafc;border:1px solid #dfe7f0;padding:9px 8px;border-radius:8px;min-width:0}
.license-option:has(input:checked) {background:#e8f1fc;border-color:#b9cee7;color:#254a77}
.license-option input {margin:0;width:15px;height:15px;accent-color:#2c496d;flex:none}
.license-option:focus-within {outline:2px solid #a4c6ef;outline-offset:2px}
@media(max-width:470px) {.license-options {grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v9: concise date toggle and more discernible repeated entries, with no extra heading height. */
.date-mode-row {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.date-mode-label {font-size:11px;font-weight:710;color:#516078;white-space:nowrap}
.date-mode-options {display:inline-flex;align-items:stretch;min-width:0;border:1px solid #ced9e7;background:#edf2f8;border-radius:8px;padding:2px;gap:2px}
.date-mode-option {min-height:31px;padding:5px 10px;border:0;border-radius:5px;background:transparent;color:#5c718c;font-size:11px;font-weight:700;white-space:nowrap}
.date-mode-option.active {background:white;color:#26476f;box-shadow:0 1px 3px #263d6026}
.date-mode-option:hover:not(.active) {background:#e0e8f2;color:#304d6f}
.date-mode-option:focus-visible {outline:2px solid #8eb2dc;outline-offset:1px}
.item-card {border-color:#b8c6d6;background:#fbfcfe}
.item-card-head {background:#ecf1f7;border-bottom-color:#cfd9e5}
.item-card-head strong {font-weight:800;color:#2d425d}
@media(max-width:550px) {
  .date-mode-row {align-items:flex-start;flex-wrap:wrap;gap:7px}
  .date-mode-option {padding:5px 9px}
}

/* One compact option; section order changes only in the PDF. */
.education-order-option {display:flex;align-items:center;gap:8px;margin:0 0 15px;font-size:12px;font-weight:650;color:#50617c;cursor:pointer}
.education-order-option input {width:16px;height:16px;accent-color:#2c496d;cursor:pointer}
