:root {
  --navy: #10233f;
  --navy-2: #16345c;
  --accent: #2f8a63;
  --accent-dark: #256e4f;
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: #e3e6ee;
  --text: #1c2333;
  --text-muted: #5a6478;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 35, 63, 0.08);
  --font: 'Inter', system-ui, sans-serif;
  --font-serif: 'Lora', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; padding: 12px 22px; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--navy); padding: 12px 22px; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.link-btn { background: none; border: none; color: var(--accent-dark); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; text-decoration: none; color: var(--navy); }
.logo span { color: var(--accent-dark); }
.main-nav { display: flex; gap: 26px; }
.main-nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--navy); }

/* Ad slots */
.ad-slot {
  margin: 28px auto; min-height: 90px;
  border: 1px dashed #c9ceda; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #eef0f6; position: relative;
}
.ad-label { position: absolute; top: 6px; left: 12px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa2b5; }

/* Hero */
.hero { padding: 56px 0 40px; background: linear-gradient(180deg, #eaf3ee 0%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pill { display: inline-block; background: #e7f0e9; color: #2f7a45; font-size: .8rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
.hero h1 em { color: var(--accent-dark); font-style: normal; }
.hero p { font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin: 24px 0; flex-wrap: wrap; }
.trust-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 16px 24px; }
.trust-list li { font-size: .9rem; color: var(--text-muted); font-weight: 500; }

.hero-card { display: flex; justify-content: center; }
.mock-cv {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  width: 100%; max-width: 380px; transform: rotate(-1.5deg);
  border: 1px solid var(--border); display: flex; overflow: hidden; min-height: 280px;
}
.mock-cv-side { background: var(--navy); width: 38%; padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; }
.mock-avatar { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.35); margin-bottom: 6px; }
.mock-cv-main { flex: 1; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; }
.mock-line { height: 9px; background: #e7e9f2; border-radius: 6px; }
.mock-line.light { background: rgba(255,255,255,.28); }
.mock-line.dark { background: var(--navy); opacity: .8; height: 12px; }
.mock-line.w40 { width: 40%; } .mock-line.w50 { width: 50%; } .mock-line.w60 { width: 60%; }
.mock-line.w70 { width: 70%; } .mock-line.w80 { width: 80%; } .mock-line.w90 { width: 90%; }
.mock-gap { height: 8px; }

/* How it works */
.how { padding: 50px 0; }
.how h2 { text-align: center; font-size: 1.8rem; margin-bottom: 34px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; }
.how-num { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 14px; }
.how-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.how-step p { font-size: .92rem; margin: 0; }

/* App / generator */
.app-section { padding: 20px 0 60px; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-panel { padding: 28px 30px 22px; }

.progress-bar { height: 6px; background: #eef0f6; border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.progress-fill { height: 100%; width: 20%; background: var(--accent); transition: width .3s ease; }
.steps-labels { display: flex; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 6px; }
.steps-labels span { font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.steps-labels span.active { color: var(--navy); }

fieldset { border: none; padding: 0; margin: 0; display: none; }
fieldset.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
legend { font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; padding: 0; color: var(--navy); }
.step-hint { font-size: .82rem; margin-top: 0; margin-bottom: 14px; }

label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 14px; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px; border: 1.5px solid var(--border);
  border-radius: 9px; font-family: var(--font); font-size: .93rem; color: var(--text); background: #fbfcfe;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.draft-note { font-size: .8rem; color: var(--text-muted); margin: 16px 0 0; text-align: center; }

/* Repeatable entries (experience/education/languages) */
.repeat-item {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 14px; position: relative; background: #fbfcfe;
}
.repeat-item .field-row { margin-bottom: 0; }
.repeat-remove {
  position: absolute; top: 10px; right: 10px; background: none; border: none; color: #c1372f;
  font-size: .78rem; font-weight: 600; cursor: pointer; padding: 4px 8px;
}
.repeat-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 14px; }
.repeat-checkbox input { width: auto; margin: 0; }

/* Preview */
.preview-panel { position: sticky; top: 90px; padding: 22px 24px 26px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.preview-toolbar h3 { font-size: 1rem; margin: 0; }
.cv-preview-wrap { flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: #eef0f6; padding: 16px; }
.cv-preview-wrap .cp-empty { font-family: var(--font); text-align: center; color: var(--text-muted); padding: 60px 10px; }

/* ===== CV document template (shared: preview + print) ===== */
.cv-doc {
  background: #fff; display: flex; min-height: 500px; font-family: var(--font);
  box-shadow: 0 4px 18px rgba(0,0,0,.08); border-radius: 4px; overflow: hidden;
}
.cv-side { width: 34%; background: var(--navy); color: #fff; padding: 28px 20px; }
.cv-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; border: 3px solid rgba(255,255,255,.3); }
.cv-avatar-placeholder {
  width: 88px; height: 88px; border-radius: 50%; margin-bottom: 16px; background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; color: #fff;
}
.cv-side h1 { font-size: 1.3rem; color: #fff; margin: 0 0 4px; letter-spacing: -.01em; }
.cv-side .cv-role { font-size: .85rem; color: #b9c6dc; margin-bottom: 20px; font-weight: 500; }
.cv-side-section { margin-bottom: 22px; }
.cv-side-section h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: #8fa3c2; margin-bottom: 10px; font-weight: 700; }
.cv-side-section p, .cv-side-section li { font-size: .82rem; color: #e4e9f2; margin: 0 0 6px; word-break: break-word; }
.cv-side-section ul { list-style: none; padding: 0; margin: 0; }
.cv-skill-tag {
  display: inline-block; background: rgba(255,255,255,.12); color: #fff; font-size: .74rem;
  padding: 4px 10px; border-radius: 999px; margin: 0 6px 6px 0;
}
.cv-lang-row { display: flex; justify-content: space-between; font-size: .8rem; margin-bottom: 6px; color: #e4e9f2; }
.cv-lang-row span:last-child { color: #9db2d1; }

.cv-main { flex: 1; padding: 30px 28px; }
.cv-main-section { margin-bottom: 22px; }
.cv-main-section h2 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-dark);
  border-bottom: 2px solid var(--accent); padding-bottom: 6px; margin-bottom: 14px; font-weight: 700;
}
.cv-main-section p { font-size: .87rem; color: #333a4a; margin: 0 0 8px; }
.cv-entry { margin-bottom: 16px; }
.cv-entry-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.cv-entry-title { font-weight: 700; font-size: .92rem; color: var(--navy); }
.cv-entry-sub { font-size: .82rem; color: var(--accent-dark); font-weight: 600; }
.cv-entry-date { font-size: .76rem; color: #8a92a3; white-space: nowrap; }
.cv-entry-desc { font-size: .84rem; color: #4b5468; margin-top: 4px; }
.cv-empty { font-family: var(--font); text-align: center; color: var(--text-muted); padding: 40px 10px; }

@media (max-width: 700px) {
  .cv-doc { flex-direction: column; }
  .cv-side { width: 100%; }
}

/* Legal guide */
.legal-guide { padding: 60px 0; background: var(--navy); color: #fff; }
.legal-guide h2 { text-align: center; max-width: 60ch; margin: 0 auto 36px; font-size: 1.8rem; color: #fff; }
.legal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.legal-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; }
.legal-card h3 { font-size: 1rem; color: #fff; margin-bottom: 8px; }
.legal-card p { color: #c4cbdc; font-size: .9rem; margin: 0; }
.legal-card strong { color: #fff; }

/* FAQ */
.faq { padding: 60px 0; }
.faq h2 { text-align: center; margin-bottom: 30px; font-size: 1.8rem; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { font-weight: 700; cursor: pointer; color: var(--navy); }
.faq details p { margin-top: 10px; margin-bottom: 0; }

/* Footer */
.site-footer { background: #0c1830; color: #9aa4bb; padding: 30px 0; }
.site-footer p { color: #9aa4bb; font-size: .82rem; margin: 0 0 8px; }
.footer-links a { color: #c4cbdc; text-decoration: underline; }
.footer-meta { color: #6b7590; }

.print-only { display: none; }

/* Guides / legal pages (reused pattern) */
.legal-page { padding: 50px 0 70px; max-width: 820px; margin: 0 auto; }
.legal-page h1 { font-size: 1.9rem; margin-bottom: 18px; }
.legal-page h2 { font-size: 1.2rem; margin-top: 32px; }
.legal-page p, .legal-page li { color: var(--text-muted); font-size: .95rem; }
.legal-page .updated { font-size: .82rem; color: #9aa2b5; margin-bottom: 30px; }
.back-link { display: inline-block; margin: 24px 0 0 0; font-size: .9rem; font-weight: 600; color: var(--accent-dark); text-decoration: none; }
.legal-disclaimer { text-align: center; font-size: .78rem; color: var(--text-muted); max-width: 70ch; margin: 32px auto 0; }

.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 100;
  max-width: 640px; margin: 0 auto; background: var(--navy); color: #fff;
  border-radius: 14px; padding: 18px 22px; box-shadow: 0 12px 34px rgba(0,0,0,.25);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { color: #dbe0ee; font-size: .85rem; margin: 0; flex: 1 1 320px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cookie-banner .btn-ghost:hover { border-color: #fff; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .app-grid { grid-template-columns: 1fr; }
  .preview-panel { position: static; max-height: none; }
  .how-grid, .legal-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

@media print {
  @page { margin: 1.2cm; }
  body * { visibility: hidden; }
  .print-only, .print-only * { visibility: visible; }
  .print-only {
    display: block; position: absolute; top: 0; left: 0; width: 100%;
  }
  .print-only .cv-doc { box-shadow: none; border-radius: 0; }
}
