/* QuickCV - shares QuickInvoice's design tokens (navy + orange, Oswald / DM Sans). */

:root {
    --primary: #173D68;
    --primary-dark: #102D4E;
    --accent: #E97825;
    --accent-hover: #D86516;
    --background: #F7F9FC;
    --surface: #FFFFFF;
    --border: #E5E9EF;
    --text: #263445;
    --text-muted: #758195;
    --success: #159B69;
    --danger: #DC4545;
    --font-heading: 'Oswald', 'Arial Narrow', sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --radius: 10px;
    --shadow: 0 4px 22px rgba(23, 61, 104, .06);
    --page-h: 296.5mm; /* A4 minus a hair, so printing never spills a blank page */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--background); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--primary); }
h1 { font-size: 38px; } h2 { font-size: 28px; } h3 { font-size: 22px; } h4 { font-size: 18px; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
button { font-family: var(--font-body); cursor: pointer; font-size: 16px; font-weight: 600; }
input, select, textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #D9DFE8; border-radius: var(--radius);
    background: #fff; color: var(--text); font-family: var(--font-body); font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(233, 120, 37, .15); }
input:disabled { background: #F1F4F8; color: #9AA5B5; }
textarea { resize: vertical; line-height: 1.5; }
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
label small { font-weight: 400; color: var(--text-muted); }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.section-eyebrow { display: inline-block; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px;
    border: 0; border-radius: 12px; color: #fff; font-weight: 700; font-size: 15px;
    transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(23, 61, 104, .18); }
.btn:disabled { opacity: .6; transform: none; box-shadow: none; cursor: default; }
.btn-primary { background: linear-gradient(135deg, #173D68, #245589); }
.btn-orange { background: linear-gradient(135deg, #E97825, #F29547); }
.btn-ghost { background: #fff; color: var(--primary); border: 1px solid var(--border); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(23, 61, 104, .05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-icon {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff;
    background: linear-gradient(135deg, #173D68, #2A5C94);
}
.brand-icon svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--primary); letter-spacing: .3px; }
.brand-name span { color: var(--accent); }
.main-navigation { display: flex; align-items: center; gap: 26px; }
.main-navigation > a { font-weight: 600; font-size: 15px; color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; }
.main-navigation > a:hover, .main-navigation > a.active { color: var(--primary); border-bottom-color: var(--accent); }
.nav-account { display: flex; align-items: center; gap: 18px; margin-left: 10px; }
.nav-login { font-weight: 600; font-size: 15px; color: var(--primary); }
.nav-register { padding: 9px 18px; }
.mobile-menu-toggle { display: none; background: none; border: 0; padding: 8px; }
.mobile-menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--primary); transition: .2s; }
.mobile-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; background: var(--primary-dark); color: #C9D4E3; padding: 56px 0 24px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.site-footer .brand-name { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 360px; font-size: 14px; }
.footer-links h4 { color: #fff; font-size: 16px; margin-bottom: 12px; letter-spacing: .5px; }
.footer-links a { display: block; color: #C9D4E3; font-size: 14px; padding: 4px 0; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; font-size: 13px; color: #93A3B9; }

/* ---------- Ads ---------- */
.ad-slot { margin: 36px auto; max-width: 970px; text-align: center; min-height: 90px; }
.ad-label { display: block; margin-bottom: 6px; color: #9AA5B5; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Landing ---------- */
.hero { padding: 84px 0 70px; background: radial-gradient(circle at 15% 0, #E3ECF8, transparent 55%), radial-gradient(circle at 90% 20%, #FCE9DA, transparent 45%), var(--background); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 56px; margin: 10px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--text-muted); max-width: 520px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn { padding: 15px 28px; font-size: 16px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.hero-card { position: relative; padding: 26px 28px 30px; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(23, 61, 104, .16); border-top: 6px solid var(--accent); transform: rotate(1.5deg); }
.hero-card .hc-name { font-family: var(--font-heading); font-size: 26px; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); }
.hero-card .hc-title { color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.hero-card .hc-h { margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); font-family: var(--font-heading); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); }
.hero-card .hc-line { height: 8px; margin: 7px 0; border-radius: 4px; background: #E9EEF4; }
.hero-card .hc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hero-card .hc-chips span { width: 64px; height: 20px; border-radius: 99px; background: #F1F4F8; border: 1px solid #E1E6ED; }

.section { padding: 72px 0 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 36px; margin-top: 6px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { padding: 28px; background: #fff; border: 1px solid #E8ECF2; border-radius: 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(23, 61, 104, .12); }
.feature-card .num { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 10px; background: #FDEEE2; color: var(--accent); font-family: var(--font-heading); font-size: 18px; font-weight: 700; }
.feature-card h3 { font-size: 21px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 15px; }
.cta-band { margin-top: 72px; padding: 52px 24px; text-align: center; color: #fff; background: linear-gradient(135deg, #173D68, #245589); border-radius: 20px; }
.cta-band h2 { color: #fff; font-size: 34px; margin-bottom: 10px; }
.cta-band p { color: #D5E0EE; margin-bottom: 24px; }

/* ---------- Auth + dashboard ---------- */
.auth-section, .dash-section { padding: 70px 20px 90px; background: radial-gradient(circle at 20% 0, #E9F0F9, transparent 55%), var(--background); min-height: 70vh; }
.auth-card { max-width: 440px; margin: 0 auto; padding: 40px 36px; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 20px 60px rgba(23, 61, 104, .12); }
.auth-card h1, .dash-section h1 { margin: 6px 0 8px; font-size: 34px; }
.auth-sub { color: var(--text-muted); margin-bottom: 22px; }
.auth-card .form-field { margin-bottom: 16px; }
.auth-submit { display: block; width: 100%; margin-top: 6px; padding: 14px; border: 0; font-size: 16px; font-weight: 700; border-radius: 12px; color: #fff; text-align: center; }
.auth-error { margin-bottom: 14px; padding: 11px 14px; border-radius: 10px; background: #FDECEC; color: #B83232; font-size: 14px; }
.auth-alt { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.auth-alt a, .dash-link { color: var(--accent); font-weight: 700; }
.price { margin: 6px 0 14px; color: var(--accent); font-family: var(--font-heading); font-size: 48px; font-weight: 700; line-height: 1; }
.price small { display: block; margin-top: 6px; color: var(--text-muted); font-family: var(--font-body); font-size: 14px; font-weight: 500; }
.upgrade-list { margin: 0 0 22px; padding: 0; list-style: none; }
.upgrade-list li { position: relative; padding: 7px 0 7px 26px; }
.upgrade-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.dash-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 28px; }
.dash-card { padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.dash-card h2 { margin-bottom: 16px; }
.dash-empty { color: var(--text-muted); }
.dash-notice { margin-bottom: 18px; padding: 11px 14px; border-radius: 10px; background: #E7F6EF; color: #0F7A52; font-size: 14px; }
.cv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cv-item { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; border-top: 5px solid var(--accent); box-shadow: var(--shadow); }
.cv-item h3 { font-size: 20px; word-break: break-word; }
.cv-item .meta { color: var(--text-muted); font-size: 13px; }
.cv-item .row { display: flex; gap: 8px; margin-top: auto; }
.cv-item .row .btn { padding: 9px 16px; font-size: 14px; }
.cv-item form { display: inline; }
.btn-danger-ghost { background: #fff; color: var(--danger); border: 1px solid #F1CACA; }

/* ---------- Builder ---------- */
.builder-section { padding: 36px 0 20px; }
.builder-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.builder-heading p { color: var(--text-muted); margin-top: 4px; }
.back-link { font-weight: 600; color: var(--primary); font-size: 14px; }
.builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 28px; align-items: start; }
.builder-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.form-section { padding: 26px; background: #fff; border: 1px solid #E8ECF2; border-radius: 16px; box-shadow: var(--shadow); }
.form-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.form-step { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: #FDEEE2; color: var(--accent); font-family: var(--font-heading); font-weight: 700; font-size: 16px; }
.form-section-heading h2 { font-size: 22px; }
.form-section-heading p { color: var(--text-muted); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full-width { grid-column: 1 / -1; }
.form-field + .form-field { margin-top: 16px; }
.form-grid .form-field + .form-field { margin-top: 0; }
.field-hint { margin-top: 6px; font-size: 13px; color: var(--danger); }

.photo-upload { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #EEF1F5; }
.photo-thumb { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; background: #EEF2F7 center / cover no-repeat; border: 3px solid #fff; box-shadow: 0 0 0 1px #D9DFE8; }
.photo-thumb:not(.has-photo)::after { content: "👤"; display: grid; place-items: center; height: 100%; font-size: 30px; opacity: .35; }
.photo-actions { flex: 1; min-width: 0; }
.photo-label { margin-bottom: 8px; }
.photo-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.photo-row input[type=file] { width: auto; max-width: 100%; padding: 8px; font-size: 14px; }
.link-danger, .link-muted { background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 600; }
.link-danger { color: var(--danger); }
.link-muted { color: var(--text-muted); text-decoration: underline; }
.link-danger[hidden], .field-hint[hidden], .add-item-btn[hidden] { display: none; }

.entry-card { margin-bottom: 16px; padding: 18px; background: #F9FBFD; border: 1px solid #E5EAF1; border-radius: 12px; }
.entry-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: var(--primary); }
.entry-tools { display: flex; gap: 6px; }
.entry-tool { width: 32px; height: 32px; padding: 0; border: 1px solid #D9DFE8; border-radius: 8px; background: #fff; color: var(--primary); font-size: 16px; line-height: 1; }
.entry-tool:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.entry-tool:disabled { opacity: .35; cursor: default; }
.entry-tool.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.add-item-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 2px dashed #C9D4E3; border-radius: 12px;
    background: transparent; color: var(--primary); font-size: 14px; font-weight: 700; transition: .15s;
}
.add-item-btn:hover { border-color: var(--accent); color: var(--accent); background: #FFF7F0; }
.add-item-btn span { font-size: 18px; line-height: 1; }

.chip-input { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border: 1px solid #D9DFE8; border-radius: var(--radius); background: #fff; cursor: text; }
.chip-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(233, 120, 37, .15); }
.chips { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 99px; background: #E9F0F9; color: var(--primary); font-size: 14px; font-weight: 600; }
.chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(23, 61, 104, .12); color: var(--primary); font-size: 14px; line-height: 1; }
.chip button:hover { background: var(--danger); color: #fff; }
.chip-input input { flex: 1; min-width: 160px; width: auto; padding: 6px 4px; border: 0; box-shadow: none !important; background: transparent; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 34px; height: 34px; padding: 0; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #D9DFE8; transition: transform .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on, .swatch-picker.on { box-shadow: 0 0 0 2px var(--primary); }
.swatch-picker { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #F9FBFD; border: 1px solid #E5EAF1; border-radius: 10px; }
.order-row.is-hidden .order-label { color: #9AA5B5; text-decoration: line-through; }
.order-label { flex: 1; font-weight: 600; font-size: 14px; }
.toggle-mini { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.toggle-mini input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- Preview panel ---------- */
.preview-panel {
    position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding: 20px;
    background: #E9EEF5; border: 1px solid #DCE3ED; border-radius: 16px;
}
.preview-panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.preview-panel-heading h2 { font-size: 24px; }
.preview-panel-heading h2 small { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--text-muted); }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: #fff; color: var(--success); font-size: 13px; font-weight: 700; }
.live-indicator span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.preview-action-btn { flex: 1 1 150px; white-space: nowrap; }
.save-status { flex: 1 0 100%; min-height: 20px; font-size: 14px; color: var(--success); font-weight: 600; }
.save-status.is-error { color: var(--danger); }
.print-hint { flex: 1 0 100%; font-size: 13px; color: var(--text-muted); }

/* ---------- CV pages (screen) ---------- */
.cv-stage { position: relative; overflow: hidden; --accent: #E97825; }
.cv-pages { display: flex; flex-direction: column; gap: 14px; width: 210mm; }
.cv-page {
    position: relative; flex: 0 0 auto; width: 210mm; height: var(--page-h); padding: 15mm 16mm 13mm;
    overflow: hidden; background: #fff; box-shadow: 0 10px 34px rgba(23, 61, 104, .16);
    color: #263445; font-family: 'DM Sans', system-ui, sans-serif; font-size: 10pt; line-height: 1.45;
}
.cv-measure { position: absolute; left: -10000px; top: 0; visibility: hidden; pointer-events: none; box-shadow: none; }
.cv-page::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--accent); }

/* Template: classic */
.tpl-classic .cv-block { box-sizing: border-box; }
.tpl-classic .cv-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 6px 0 12px; }
.tpl-classic .cv-head-text { min-width: 0; }
.tpl-classic .cv-name { margin: 0; font-family: 'Oswald', 'Arial Narrow', sans-serif; font-size: 27pt; font-weight: 700; line-height: 1.12; letter-spacing: 1px; text-transform: uppercase; color: #173D68; overflow-wrap: anywhere; }
.tpl-classic .cv-jobtitle { margin-top: 3px; font-size: 12.5pt; font-weight: 600; color: var(--accent); }
.tpl-classic .cv-contact { display: flex; flex-wrap: wrap; margin-top: 8px; font-size: 9pt; color: #4A5668; }
.tpl-classic .cv-contact span + span::before { content: "•"; margin: 0 8px; color: var(--accent); }
.tpl-classic .cv-photo { flex: 0 0 auto; width: 30mm; height: 30mm; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.tpl-classic .cv-heading {
    position: relative; padding: 16px 0 5px; border-bottom: 1px solid #E1E6ED;
    font-family: 'Oswald', 'Arial Narrow', sans-serif; font-size: 11.5pt; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #173D68;
}
.tpl-classic .cv-heading::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 34px; height: 3px; background: var(--accent); }
.tpl-classic .cv-p { padding-top: 6px; }
.tpl-classic .cv-bullet { position: relative; padding: 3px 0 0 14px; }
.tpl-classic .cv-bullet::before { content: ""; position: absolute; left: 3px; top: calc(3px + .6em); width: 4px; height: 4px; border-radius: 1px; background: var(--accent); }
.tpl-classic .cv-entry-head { padding-top: 10px; }
.tpl-classic .cv-entry-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.tpl-classic .cv-entry-title { font-size: 10.5pt; font-weight: 700; color: #173D68; }
.tpl-classic .cv-dates { flex: 0 0 auto; font-size: 9pt; font-weight: 600; color: #758195; white-space: nowrap; }
.tpl-classic .cv-entry-sub { font-size: 9.5pt; font-weight: 500; color: #4A5668; }
.tpl-classic .cv-skills { display: flex; flex-wrap: wrap; gap: 5px 6px; padding-top: 8px; }
.tpl-classic .cv-chip { padding: 2px 10px; border: 1px solid #E1E6ED; border-radius: 99px; background: #F1F4F8; font-size: 9pt; color: #263445; }
.tpl-classic .cv-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 22px; padding-top: 7px; }
.tpl-classic .cv-lang { display: flex; align-items: baseline; gap: 8px; padding-bottom: 2px; border-bottom: 1px dotted #D5DCE6; }
.tpl-classic .cv-lang span { color: #758195; font-size: 9.5pt; }
.tpl-classic .cv-lang span::before { content: "–"; margin-right: 8px; }
.tpl-classic .cv-refs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; padding-top: 8px; }
.tpl-classic .cv-ref { display: flex; flex-direction: column; font-size: 9.5pt; }
.tpl-classic .cv-ref strong { color: #173D68; font-size: 10pt; }
.tpl-classic .cv-ref span { color: #4A5668; }
.tpl-classic .is-placeholder { color: #B5BFCC; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .builder-layout { grid-template-columns: minmax(0, 1fr); }
    .preview-panel { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero h1 { font-size: 42px; }
    .hero-card { display: none; }
    .card-grid { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; }
    .mobile-menu-toggle { display: block; }
    .main-navigation {
        display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
        padding: 12px 24px 20px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 14px 30px rgba(23, 61, 104, .1);
    }
    .main-navigation.open { display: flex; }
    .main-navigation > a { padding: 12px 0; border-bottom: 1px solid #EEF1F5; }
    .nav-account { flex-direction: column; align-items: stretch; gap: 10px; margin: 14px 0 0; }
    .nav-login { padding: 8px 0; }
}
@media (max-width: 640px) {
    h1 { font-size: 30px; }
    .container { padding: 0 16px; }
    .form-grid, .tpl-classic .cv-langs { grid-template-columns: 1fr; }
    .form-section { padding: 20px 16px; }
    .photo-upload { flex-direction: column; align-items: flex-start; }
    .preview-panel { padding: 12px; }
    .preview-action-btn { padding: 12px 10px; font-size: 14px; }
}

/* ---------- Print: only the CV pages, A4, no browser margins ---------- */
@media print {
    @page { size: A4; margin: 0; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
    .site-header, .site-footer, .builder-heading, .builder-form, .preview-panel-heading,
    .preview-actions, .ad-slot, .cv-measure { display: none !important; }
    .builder-section { padding: 0 !important; background: #fff !important; }
    .builder-section > .container { max-width: none !important; padding: 0 !important; margin: 0 !important; }
    .builder-layout { display: block !important; }
    .preview-panel { position: static !important; max-height: none !important; overflow: visible !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; }
    .cv-stage { height: auto !important; overflow: visible !important; }
    .cv-pages { display: block !important; width: auto !important; transform: none !important; }
    .cv-page { box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
    .cv-page:last-child { break-after: auto; page-break-after: auto; }
    .is-placeholder { display: none !important; }
}
