:root {
	--cv-bg: #f5f1eb;
	--cv-surface: #fffdfa;
	--cv-surface-soft: #f0e9df;
	--cv-border: #dccfc1;
	--cv-text: #262626;
	--cv-muted: #756a60;
	--cv-accent: #365f85;
	--cv-accent-soft: #dce7f0;
	--cv-shadow: 0 16px 42px rgba(53, 43, 32, 0.08);
	--cv-radius: 18px;
	--cv-radius-sm: 12px;
	--cv-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.cv-builder-app {
	--cv-theme-accent: #365f85;
	--cv-theme-accent-soft: #dce7f0;
	--cv-theme-divider: #8aa7c2;
	--cv-theme-hover: #2f5678;
	background: linear-gradient(180deg, #faf7f2 0%, #f4efe8 100%);
	color: var(--cv-text);
	font-family: var(--cv-font);
	padding: 24px;
}

.cv-builder-app.theme-classic-blue {
	--cv-theme-accent: #365f85;
	--cv-theme-accent-soft: #dce7f0;
	--cv-theme-divider: #8aa7c2;
	--cv-theme-hover: #2f5678;
}

.cv-builder-app.theme-warm-taupe {
	--cv-theme-accent: #8a6d5a;
	--cv-theme-accent-soft: #efe1d7;
	--cv-theme-divider: #c8a892;
	--cv-theme-hover: #755846;
}

.cv-builder-app.theme-forest-sage {
	--cv-theme-accent: #4f6f62;
	--cv-theme-accent-soft: #dce8e1;
	--cv-theme-divider: #8dad9e;
	--cv-theme-hover: #415c51;
}

.cv-builder-app.theme-slate-gray {
	--cv-theme-accent: #556270;
	--cv-theme-accent-soft: #dce2e8;
	--cv-theme-divider: #93a2b2;
	--cv-theme-hover: #46515d;
}

.cv-builder-app.theme-burgundy {
	--cv-theme-accent: #7a4a56;
	--cv-theme-accent-soft: #eadce0;
	--cv-theme-divider: #bc8e99;
	--cv-theme-hover: #663b46;
}

.cv-builder-app.theme-terracotta {
	--cv-theme-accent: #9a624c;
	--cv-theme-accent-soft: #f1dfd5;
	--cv-theme-divider: #d1a088;
	--cv-theme-hover: #80513f;
}

.cv-builder-shell {
	margin: 0 auto;
	max-width: 1440px;
}

.cv-builder-header {
        align-items: flex-start;
        display: flex;
        gap: 20px;
        justify-content: space-between;
        margin-bottom: 20px;
}

.cv-builder-kicker {
	color: var(--cv-theme-accent);
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 6px;
}

.cv-builder-title {
	font-size: 2rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin: 0;
}

.cv-builder-header-actions {
        align-items: end;
        column-gap: 12px;
        display: grid;
        grid-template-columns: repeat(4, max-content);
        justify-content: end;
        row-gap: 12px;
}

.cv-builder-header-actions > * {
        margin: 0;
}

.cv-export-status {
        align-self: center;
        color: var(--cv-muted);
        font-size: 0.88rem;
        grid-column: 4;
        justify-self: end;
        min-height: 1em;
}

.cv-view-toggle {
	background: #efe6dc;
	border: 1px solid #e1d5c7;
	border-radius: 16px;
	display: none;
	gap: 6px;
	padding: 4px;
}

.cv-view-toggle-button {
	background: transparent;
	border: 0;
	border-radius: 12px;
	color: var(--cv-muted);
	cursor: pointer;
	font: inherit;
	font-weight: 500;
	padding: 10px 18px;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.cv-view-toggle-button.is-active {
	background: #fffdfa;
	box-shadow: 0 2px 10px rgba(53, 43, 32, 0.1);
	color: var(--cv-text);
}

.cv-theme-switcher {
        align-items: center;
        display: flex;
        gap: 10px;
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-left: 0;
        order: 6;
        width: auto;
}

.cv-theme-label {
	color: var(--cv-muted);
	font-size: 0.92rem;
}

.cv-theme-swatches {
	align-items: center;
	display: flex;
	gap: 8px;
}

.cv-theme-swatch {
	background: var(--swatch-color, var(--cv-theme-accent));
	border: 2px solid rgba(255, 253, 250, 0.9);
	border-radius: 999px;
	box-shadow: 0 0 0 1px rgba(117, 106, 96, 0.22);
	cursor: pointer;
	height: 20px;
	padding: 0;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: 20px;
}

.cv-theme-swatch:hover {
	transform: translateY(-1px);
}

.cv-theme-swatch.is-active {
	box-shadow: 0 0 0 2px var(--cv-text), 0 0 0 5px rgba(255, 253, 250, 0.9);
}

.cv-theme-swatch[data-theme="classic-blue"] { --swatch-color: #365f85; }
.cv-theme-swatch[data-theme="warm-taupe"] { --swatch-color: #8a6d5a; }
.cv-theme-swatch[data-theme="forest-sage"] { --swatch-color: #4f6f62; }
.cv-theme-swatch[data-theme="slate-gray"] { --swatch-color: #556270; }
.cv-theme-swatch[data-theme="burgundy"] { --swatch-color: #7a4a56; }
.cv-theme-swatch[data-theme="terracotta"] { --swatch-color: #9a624c; }

.cv-builder-language-switch {
        align-items: center;
        color: var(--cv-muted);
        display: flex;
        gap: 10px;
        margin: 0;
}

.cv-builder-header-actions > .cv-builder-language-switch:nth-of-type( 1 ) {
        grid-column: 2;
}

.cv-builder-header-actions > .cv-builder-language-switch:nth-of-type( 2 ) {
        grid-column: 3;
}

#cv-toggle-print-preview {
        grid-column: 4;
}

#cv-reset-draft {
        grid-column: 3;
        justify-self: end;
}

#cv-download-pdf {
        grid-column: 4;
}

.cv-builder-language-switch select {
        height: 48px;
        min-width: 118px;
        width: auto;
}

#cv-export-mode {
        min-width: 146px;
}

.cv-builder-language-switch span {
	line-height: 1;
	margin: 0;
}

.cv-builder-language-switch select,
.cv-builder-form input:not([type="checkbox"]),
.cv-builder-form textarea,
.cv-builder-form select {
	appearance: none;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: 10px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
	color: var(--cv-text);
	font: inherit;
	height: 48px;
	line-height: 1.4;
	padding: 12px 42px 12px 14px;
	width: 100%;
}

.cv-builder-language-switch select,
.cv-builder-form select {
	background-image:
		linear-gradient(45deg, transparent 50%, #7a6f65 50%),
		linear-gradient(135deg, #7a6f65 50%, transparent 50%),
		linear-gradient(to right, #e7ddd1, #e7ddd1);
	background-position:
		calc(100% - 20px) calc(50% - 3px),
		calc(100% - 14px) calc(50% - 3px),
		calc(100% - 40px) 50%;
	background-repeat: no-repeat;
	background-size: 6px 6px, 6px 6px, 1px 22px;
}

.cv-builder-language-switch select:focus,
.cv-builder-form select:focus {
	border-color: #c6b19a;
	box-shadow: 0 0 0 3px rgba(198, 177, 154, 0.18);
	outline: none;
}

.cv-builder-form select {
	background-color: #fffdfa;
	padding-right: 46px;
}

.cv-builder-form textarea {
	min-height: 92px;
	resize: vertical;
}

.cv-builder-form input[type="checkbox"] {
	accent-color: var(--cv-theme-accent);
	appearance: auto;
	height: 16px;
	margin-right: 8px;
	vertical-align: middle;
	width: 16px;
}

.cv-builder-layout {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
}

.cv-builder-editor,
.cv-builder-preview {
	min-width: 0;
}

.cv-builder-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.cv-card,
.cv-preview-frame {
	background: rgba(255, 253, 250, 0.88);
	border: 1px solid rgba(220, 207, 193, 0.85);
	border-radius: var(--cv-radius);
	box-shadow: var(--cv-shadow);
	overflow: hidden;
	padding: 18px;
}

.cv-preview-canvas {
        display: flex;
        justify-content: center;
}

.cv-modal {
        inset: 0;
        position: fixed;
        z-index: 9999;
}

.cv-modal[hidden] {
        display: none;
}

.cv-modal-backdrop {
        backdrop-filter: blur(2px);
        background: rgba(31, 31, 31, 0.32);
        inset: 0;
        position: absolute;
}

.cv-modal-dialog {
        background: rgba(255, 253, 250, 0.98);
        border: 1px solid rgba(220, 207, 193, 0.92);
        border-radius: 24px;
        box-shadow: 0 22px 50px rgba(53, 43, 32, 0.18);
        left: 50%;
        max-width: 760px;
        padding: 26px 26px 24px;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        width: min(calc(100% - 32px), 760px);
}

.cv-modal-close {
        align-items: center;
        background: transparent;
        border: 0;
        color: var(--cv-muted);
        cursor: pointer;
        display: inline-flex;
        font-size: 1.6rem;
        height: 36px;
        justify-content: center;
        padding: 0;
        position: absolute;
        right: 14px;
        top: 12px;
        width: 36px;
}

.cv-modal-kicker {
        color: var(--cv-theme-accent);
        font-size: 0.92rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        margin: 0 0 6px;
}

.cv-modal-title {
        font-size: 2rem;
        letter-spacing: -0.02em;
        line-height: 1.1;
        margin: 0 0 10px;
}

.cv-modal-text {
        color: #403831;
        font-size: 1.05rem;
        line-height: 1.5;
        margin: 0 0 22px;
        max-width: 62ch;
}

.cv-modal-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
}

.cv-modal-actions .cv-button {
        min-width: 0;
}

body.cv-modal-open {
        overflow: hidden;
}

.cv-card-header,
.cv-preview-toolbar {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 16px;
}

.cv-card-body {
	display: block;
}

.cv-card-header h2,
.cv-preview-toolbar {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 0;
}

.cv-grid {
	display: grid;
	gap: 14px;
}

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

.cv-grid-span-2 {
	grid-column: span 2;
}

.cv-builder-form label,
.cv-item-field {
	display: block;
}

.cv-builder-form label span,
.cv-item-field span {
	color: var(--cv-muted);
	display: inline-block;
	font-size: 0.92rem;
	margin-bottom: 8px;
}

.cv-photo-row {
	align-items: center;
	display: flex;
	gap: 18px;
	margin-bottom: 18px;
}

.cv-photo-preview,
.cv-document-photo {
	align-items: center;
	background: var(--cv-surface-soft);
	border: 1px dashed var(--cv-border);
	border-radius: 14px;
	display: flex;
	height: 120px;
	justify-content: center;
	overflow: hidden;
	width: 96px;
}

.cv-photo-preview img,
.cv-document-photo img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.cv-help-text {
	color: var(--cv-muted);
	font-size: 0.88rem;
	margin: 8px 0 0;
}

.cv-field-hint {
	color: var(--cv-muted);
	display: block;
	font-size: 0.82rem;
	margin-top: 6px;
}

.cv-button {
	background: #fff;
	border: 1px solid var(--cv-border);
	box-sizing: border-box;
	border-radius: 10px;
	color: var(--cv-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font: inherit;
	height: 48px;
	padding: 10px 14px;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	white-space: nowrap;
}

.cv-button:hover {
	background: #faf6f0;
	border-color: #c8b8a7;
	transform: translateY(-1px);
}

.cv-button-primary {
	background: var(--cv-theme-accent);
	border-color: var(--cv-theme-accent);
	color: #fff;
}

.cv-button-primary:hover {
        background: var(--cv-theme-hover);
        border-color: var(--cv-theme-hover);
}

.cv-button-dark {
        background: #1f1f1f;
        border-color: #1f1f1f;
        color: #fff;
}

.cv-button-dark:hover {
        background: #384b5f;
        border-color: #384b5f;
}

.cv-button-support {
        background: #ff6111;
        border-color: #ff6111;
        color: #ffffff;
}

.cv-button-support:hover {
        background: #d95412;
        border-color: #d95412;
}

.cv-modal-actions .cv-button:hover {
        color: #ffffff;
}

.cv-modal-actions #cv-download-pdf-confirm:hover {
        background: #384b5f;
        border-color: #384b5f;
}

.cv-upload-label {
	max-width: fit-content;
}

.cv-repeatable-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cv-repeatable-item {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: 14px;
	cursor: grab;
	padding: 14px;
}

.cv-repeatable-item.is-dragging {
	opacity: 0.55;
}

.cv-repeatable-item.is-drop-target {
	border-color: var(--cv-theme-accent);
	box-shadow: 0 0 0 2px rgba(54, 95, 133, 0.12);
}

.cv-repeatable-item-header {
	align-items: center;
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.cv-icon-button {
	align-items: center;
	background: #fbf7f2;
	border: 1px solid #e2d6c9;
	border-radius: 8px;
	color: var(--cv-muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 0.92rem;
	gap: 4px;
	line-height: 1;
	padding: 6px 8px;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cv-icon-button:hover {
	background: #f6eee5;
	border-color: #cfbead;
	color: #5d5248;
}

.cv-drag-handle {
	color: var(--cv-muted);
	cursor: grab;
	font-size: 0.92rem;
	letter-spacing: 0.04em;
	user-select: none;
}

.cv-document {
	background: #ffffff;
	border-radius: 14px;
	box-sizing: border-box;
	color: #1f1f1f;
	margin: 0 auto;
	max-width: 794px;
	min-height: 1122px;
	padding: 38px 42px;
	position: relative;
	width: 100%;
}

.cv-button.is-active {
        background: #f1ebe3;
        border-color: #cbb9a7;
}

.cv-button[data-page-break-toggle] {
        white-space: nowrap;
}

.cv-document-header {
	border-bottom: 1px solid #e9e4de;
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr) 96px;
	margin-bottom: 24px;
	padding-bottom: 22px;
}

.cv-document-photo {
	align-self: start;
	justify-self: end;
	transform: translateX(-10px);
}

.cv-document-identity h1 {
	font-size: 1.85rem;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0 0 8px;
}

.cv-role {
	color: var(--cv-theme-accent);
	font-size: 1.05rem;
	margin: 0 0 18px;
}

.cv-summary {
	color: #403831;
	line-height: 1.45;
	margin: 0 0 18px;
}

.cv-meta-grid {
	color: #5f564f;
	column-gap: 28px;
	display: grid;
	font-size: 0.92rem;
	grid-template-areas:
		"email phone"
		"address birth"
		"nationality marital";
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
	row-gap: 12px;
}

.cv-meta-grid > span {
	background-position: left 0.2em;
	background-repeat: no-repeat;
	background-size: 13px 13px;
	line-height: 1.45;
	min-height: 18px;
	padding-left: 22px;
}

.cv-meta-email {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
	grid-area: email;
}

.cv-meta-phone {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.35 1.78.68 2.62a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.46-1.25a2 2 0 0 1 2.11-.45c.84.33 1.72.56 2.62.68A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
	grid-area: phone;
}

.cv-meta-birth {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
	grid-area: birth;
}

.cv-meta-address {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6-5.33-6-11a6 6 0 1 1 12 0c0 5.67-6 11-6 11z'/%3E%3Ccircle cx='12' cy='10' r='2.2'/%3E%3C/svg%3E");
	grid-area: address;
}

.cv-meta-nationality {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18'/%3E%3C/svg%3E");
	grid-area: nationality;
}

.cv-meta-marital {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23756a60' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.5' cy='8.5' r='3.5'/%3E%3Ccircle cx='15.5' cy='15.5' r='3.5'/%3E%3Cpath d='M11 11l2 2'/%3E%3C/svg%3E");
	grid-area: marital;
}

.cv-document-section {
	margin-top: 28px;
}

.cv-document-section h2 {
	border-bottom: 1px solid var(--cv-theme-divider);
	color: var(--cv-theme-accent);
	font-size: 1.3rem;
	font-weight: 600;
	margin: 0 0 16px;
	padding-bottom: 8px;
}

.cv-timeline-item {
	display: grid;
	gap: 16px;
	grid-template-columns: 140px minmax(0, 1fr);
	margin-bottom: 18px;
}

.cv-timeline-period {
	color: #8f8a84;
	font-size: 0.95rem;
}

.cv-timeline-content h3 {
	font-size: 1.06rem;
	margin: 0 0 4px;
}

.cv-timeline-content p {
	line-height: 1.55;
	margin: 0;
}

.cv-multiline-text {
	white-space: pre-line;
}

.cv-timeline-subtitle {
	color: var(--cv-theme-accent);
	margin-bottom: 6px !important;
}

.cv-two-column-list {
	column-gap: 22px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	row-gap: 10px;
}

.cv-list-item {
	align-items: baseline;
	display: flex;
	font-size: 0.96rem;
	justify-content: space-between;
	gap: 16px;
}

.cv-list-item strong {
	font-weight: 500;
}

.cv-list-item span {
	color: #7e6554;
}

.cv-custom-section-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cv-custom-section-item {
	break-inside: avoid;
	line-height: 1.55;
	page-break-inside: avoid;
}

.cv-document-footer {
        color: #7e6554;
        margin-top: 42px;
        padding-top: 18px;
        border-top: 1px solid #ddd2c5;
}

.cv-document.is-ats-mode {
        color: #1f1f1f;
}

.cv-document.is-ats-mode .cv-document-header {
        gap: 12px;
        grid-template-columns: 1fr;
        margin-bottom: 20px;
        padding-bottom: 16px;
}

.cv-document.is-ats-mode .cv-document-photo {
        display: none;
}

.cv-document.is-ats-mode .cv-role,
.cv-document.is-ats-mode .cv-timeline-subtitle,
.cv-document.is-ats-mode .cv-list-item span,
.cv-document.is-ats-mode .cv-document-footer {
        color: #3f3f3f;
}

.cv-document.is-ats-mode .cv-summary {
        margin-bottom: 14px;
}

.cv-document.is-ats-mode .cv-meta-grid {
        column-gap: 16px;
        display: flex;
        flex-wrap: wrap;
        font-size: 0.92rem;
        row-gap: 6px;
}

.cv-document.is-ats-mode .cv-meta-grid > span {
        background-image: none !important;
        min-height: 0;
        padding-left: 0;
}

.cv-document.is-ats-mode .cv-document-section {
        margin-top: 24px;
    }

.cv-document.is-ats-mode .cv-document-section h2 {
        border-bottom-color: #d7d7d7;
        color: #1f1f1f;
        font-size: 1.12rem;
        margin-bottom: 12px;
        padding-bottom: 6px;
}

.cv-document.is-ats-mode .cv-timeline-item {
        gap: 6px;
        grid-template-columns: 1fr;
        margin-bottom: 16px;
}

.cv-document.is-ats-mode .cv-timeline-period {
        color: #5a5a5a;
        font-size: 0.9rem;
    }

.cv-document.is-ats-mode .cv-two-column-list {
        grid-template-columns: 1fr;
        row-gap: 8px;
}

.cv-document.is-ats-mode .cv-list-item {
        gap: 10px;
}

.cv-document.is-ats-mode .cv-custom-section-list {
        gap: 6px;
}

.cv-document.is-ats-mode .cv-document-footer {
        border-top-color: #d7d7d7;
        margin-top: 28px;
        padding-top: 14px;
}

.cv-document-export {
        border-radius: 0;
        box-shadow: none;
	margin: 0 !important;
	max-width: none;
	min-height: 1122px;
	padding: 38px 42px !important;
	padding-bottom: 12px;
	padding-top: 10px;
	transform: none !important;
	width: 794px !important;
}

.cv-document-export .cv-document-header {
	grid-template-columns: minmax(0, 1fr) 96px !important;
}

.cv-document-export .cv-meta-grid {
	grid-template-areas:
		"email phone"
		"address birth"
		"nationality marital" !important;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) !important;
}

.cv-document-export .cv-two-column-list {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.cv-document-export .cv-timeline-item {
	grid-template-columns: 140px minmax(0, 1fr) !important;
}

.cv-document-export .cv-page-break-markers {
	display: none !important;
}

.cv-page-break-markers {
	display: none;
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 3;
}

.cv-document.is-print-preview .cv-page-break-markers {
	display: block;
}

.cv-page-break-marker {
	left: 0;
	position: absolute;
	right: 0;
}

.cv-page-break-marker::before {
	border-top: 1px dashed rgba(122, 111, 101, 0.45);
	content: "";
	display: block;
}

.cv-page-break-marker::after {
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(220, 207, 193, 0.85);
	border-radius: 999px;
	color: var(--cv-muted);
	content: attr(data-label);
	font-size: 0.72rem;
	padding: 2px 8px;
	position: absolute;
	right: 10px;
	top: -12px;
}

.cv-document-export .cv-document-header,
.cv-document-export .cv-timeline-item,
.cv-document-export .cv-list-item,
.cv-document-export .cv-document-footer {
	break-inside: avoid;
	page-break-inside: avoid;
}

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

.cv-document-export .cv-document-section.cv-force-page-break {
        break-before: page;
        page-break-before: always;
}

.cv-document-export .cv-timeline-content h3,
.cv-document-export .cv-timeline-content p,
.cv-document-export .cv-list-item,
.cv-document-export .cv-document-footer {
	orphans: 3;
	widows: 3;
}

.cv-document-export .cv-timeline-content,
.cv-document-export .cv-two-column-list {
	break-inside: avoid;
	page-break-inside: avoid;
}

.cv-document-export .cv-export-paired-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cv-document-export .cv-export-paired-row {
	break-inside: avoid;
	column-gap: 22px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	page-break-inside: avoid;
}

.cv-document-export .cv-export-paired-row .cv-list-item {
	margin: 0;
}

.cv-document-export .cv-document-section {
	break-inside: auto;
	page-break-inside: auto;
}


.cv-document-export .cv-document-photo.is-empty {
        background: transparent;
        border: 0;
}

.cv-document-export.is-ats-mode .cv-document-header {
        grid-template-columns: 1fr !important;
}

.cv-document-export.is-ats-mode .cv-meta-grid {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px 16px;
        grid-template-areas: none !important;
        grid-template-columns: none !important;
    }

.cv-document-export.is-ats-mode .cv-two-column-list,
.cv-document-export.is-ats-mode .cv-export-paired-row,
.cv-document-export.is-ats-mode .cv-timeline-item {
        grid-template-columns: 1fr !important;
}

@media (max-width: 1280px) {
        .cv-view-toggle {
                display: inline-flex;
        }

        .cv-builder-header-actions {
                grid-template-columns: repeat(2, minmax(0, max-content));
                justify-content: end;
        }

        .cv-builder-header-actions > .cv-builder-language-switch:nth-of-type( 1 ),
        .cv-builder-header-actions > .cv-builder-language-switch:nth-of-type( 2 ),
        #cv-toggle-print-preview,
        #cv-reset-draft,
        #cv-download-pdf,
        .cv-export-status {
                grid-column: auto;
                justify-self: auto;
        }

        .cv-theme-switcher {
                order: 10;
                grid-column: 1 / -1;
                justify-content: flex-end;
                width: 100%;
        }

        .cv-builder-layout {
                grid-template-columns: 1fr;
        }

	.cv-builder-layout[data-active-view="edit"] .cv-builder-preview {
		display: none;
	}

	.cv-builder-layout[data-active-view="preview"] .cv-builder-editor {
		display: none;
	}

	.cv-document {
		transform-origin: top left;
	}
}

@media (max-width: 860px) {
        .cv-builder-app {
                padding: 14px;
        }

	.cv-builder-header {
		gap: 16px;
		flex-direction: column;
	}

        .cv-builder-title {
                font-size: 1.55rem;
                line-height: 1.2;
                max-width: none;
        }

	.cv-builder-kicker {
		font-size: 0.9rem;
		margin-bottom: 8px;
	}

	.cv-builder-header-actions,
	.cv-photo-row {
		align-items: stretch;
		flex-direction: column;
	}

        .cv-builder-header-actions {
                display: grid;
                gap: 10px;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                justify-content: stretch;
                width: 100%;
        }

        .cv-view-toggle {
                grid-column: 1 / -1;
                display: flex;
                width: 100%;
        }

        .cv-view-toggle-button {
                flex: 1 1 0;
		text-align: center;
	}

        .cv-builder-language-switch {
                align-items: center;
                display: grid;
                gap: 8px;
                grid-template-columns: 70px minmax(0, 1fr);
                width: 100%;
        }

        .cv-builder-language-switch select {
                min-width: 0;
                width: 100%;
        }

        .cv-builder-header-actions > .cv-builder-language-switch:nth-of-type( 1 ) {
                grid-column: 1 / -1;
        }

        .cv-builder-header-actions > .cv-builder-language-switch:nth-of-type( 2 ) {
                grid-column: 1 / -1;
        }

        .cv-theme-switcher {
                align-items: flex-start;
                flex-direction: column;
                grid-column: 1 / -1;
                justify-content: flex-start;
                margin-left: 0;
                width: 100%;
        }

        .cv-theme-swatches {
                display: flex;
                flex-wrap: wrap;
                width: 100%;
        }

        #cv-toggle-print-preview {
                grid-column: 1 / -1;
                width: 100%;
        }

        #cv-reset-draft {
                grid-column: 1 / -1;
                justify-self: stretch;
                width: 100%;
        }

        #cv-download-pdf {
                grid-column: 1 / -1;
                width: 100%;
        }

	.cv-export-status {
		grid-column: 1 / -1;
		min-height: 0;
	}

	.cv-builder-form .cv-grid-2 {
		grid-template-columns: 1fr;
	}

	.cv-builder-form .cv-grid-span-2 {
		grid-column: auto;
	}

        .cv-card-header[data-card-toggle] {
                cursor: pointer;
                display: grid;
                gap: 10px;
                grid-template-columns: minmax(0, 1fr) auto;
                margin-bottom: 0;
                padding-right: 34px;
                position: relative;
                row-gap: 10px;
        }

        .cv-card-header[data-card-toggle]::after {
                color: var(--cv-muted);
                content: "+";
		font-size: 1.1rem;
		font-weight: 600;
		line-height: 1;
		position: absolute;
		right: 0;
                top: 50%;
                transform: translateY(-50%);
        }

        .cv-card-header[data-card-toggle] h2 {
                align-self: center;
                font-size: 1rem;
                line-height: 1.3;
                margin: 0;
        }

        .cv-card.is-expanded .cv-card-header[data-card-toggle] {
                margin-bottom: 16px;
        }

	.cv-card.is-expanded .cv-card-header[data-card-toggle]::after {
		content: "\2212";
	}

        .cv-card:not(.is-expanded) .cv-card-body {
                display: none;
        }

        .cv-card-header[data-card-toggle] .cv-button {
                margin: 0;
                position: relative;
                z-index: 1;
        }

        .cv-card-header[data-card-toggle] > .cv-button {
                min-width: 0;
        }

        .cv-card-header[data-card-toggle] > .cv-button[data-page-break-toggle],
        .cv-card-header[data-card-toggle] > .cv-button[data-add-item] {
                height: 42px;
                padding: 8px 12px;
        }

        .cv-card-header[data-card-toggle] > .cv-button[data-page-break-toggle] {
                grid-column: 1;
                justify-self: start;
        }

        .cv-card-header[data-card-toggle] > .cv-button[data-add-item] {
                grid-column: 2;
                justify-self: start;
                margin-right: 18px;
        }

        .cv-card-header[data-card-toggle]:has( > .cv-button[data-page-break-toggle] ) h2 {
                grid-column: 1 / -1;
        }

        .cv-card-header[data-card-toggle]:has( > .cv-button[data-page-break-toggle] ) > .cv-button[data-page-break-toggle],
        .cv-card-header[data-card-toggle]:has( > .cv-button[data-add-item] ) > .cv-button[data-add-item] {
                width: auto;
        }

        .cv-preview-frame {
                overflow-x: hidden;
                overflow-y: auto;
                padding: 14px 10px;
        }

        .cv-preview-canvas {
                display: block;
                height: auto;
                margin: 0 auto;
                min-height: var(--cv-mobile-preview-height, auto);
                width: 100%;
        }

        .cv-builder-preview .cv-document {
                margin: 0;
                min-height: 1122px;
                padding: 38px 42px;
                transform: scale(var(--cv-mobile-preview-scale, 1));
		transform-origin: top left;
		width: 794px;
	}

	.cv-builder-preview .cv-document-header {
		grid-template-columns: minmax(0, 1fr) 96px;
	}

	.cv-builder-preview .cv-meta-grid {
		grid-template-areas:
			"email phone"
			"address birth"
			"nationality marital";
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
	}

	.cv-builder-preview .cv-two-column-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cv-builder-preview .cv-timeline-item {
		grid-template-columns: 140px minmax(0, 1fr);
	}

        .cv-builder-preview .cv-document h1,
        .cv-builder-preview .cv-document h2,
        .cv-builder-preview .cv-document h3,
        .cv-builder-preview .cv-document p,
        .cv-builder-preview .cv-document span,
        .cv-builder-preview .cv-document strong,
        .cv-builder-preview .cv-document div {
                overflow-wrap: normal;
                word-break: normal;
        }

        .cv-modal-dialog {
                border-radius: 20px;
                padding: 22px 18px 18px;
        }

        .cv-modal-title {
                font-size: 1.6rem;
        }

        .cv-modal-text {
                font-size: 0.98rem;
        }

        .cv-modal-actions {
                flex-direction: column;
        }

        .cv-modal-actions .cv-button {
                width: 100%;
        }
}
