.cv-panel { scroll-margin-top: 88px; }
.cv-panel label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 12px; }
.cv-panel label input, .cv-panel label select, .cv-panel label textarea,
.cv-panel .repeat-row input, .cv-panel .repeat-row textarea, .cv-panel .repeat-row select {
  display: block; width: 100%; margin-top: 4px;
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; background: #fff;
  font: inherit;
}
.cv-panel .grid-2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .cv-panel .grid-2 { grid-template-columns: 1fr 1fr; } }
.cv-layout {
  display: grid;
  gap: 28px;
  padding-bottom: 72px;
}
@media (min-width: 980px) {
  .cv-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.cv-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.cv-panel h2 { font-size: 1.25rem; margin-bottom: 12px; }
.cv-panel h3 { font-size: 1rem; margin: 16px 0 8px; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.repeat-row {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--cream);
}
.cv-upload {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  background: var(--cream);
}
.cv-upload:hover { border-color: var(--teal); }
.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cv-chips .ak-chip, .cv-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 4px 10px; font-size: 0.78rem; font-weight: 700; background: var(--paper);
}
.cv-chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.cv-status { font-size: 0.88rem; color: var(--muted); min-height: 1.2em; }
.cv-status.err { color: var(--danger); }
.tpl-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tpl-switch button {
  border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer;
}
.tpl-switch button[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }
.cv-sheet-wrap { position: relative; }
.cv-sheet {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid var(--line);
  min-height: 400px;
  padding: 28px 26px;
  font-size: 13px;
  line-height: 1.45;
  overflow: auto;
}
.cv-sheet.watermark { position: relative; }
.cv-sheet.watermark::after {
  content: "AgentKaro preview";
  position: absolute;
  inset: 30% auto auto 10%;
  font-family: var(--display);
  font-size: 2.2rem;
  color: rgba(14, 107, 98, 0.14);
  transform: rotate(-28deg);
  pointer-events: none;
  white-space: nowrap;
  font-weight: 700;
}
.cv-sheet h1 { font-size: 1.6rem; margin: 0 0 4px; }
.cv-sheet .headline { color: var(--teal); font-weight: 700; margin-bottom: 6px; }
.cv-sheet .contact { color: #444; font-size: 12px; margin-bottom: 12px; }
.cv-sheet h2 {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); border-bottom: 1px solid var(--line); padding-bottom: 3px; margin: 14px 0 8px;
}
.cv-sheet ul { margin: 0; padding-left: 18px; }
.cv-sheet li { margin: 0 0 4px; }
.cv-sheet .job { margin-bottom: 8px; }
.cv-sheet .job strong { display: block; }
.cv-sheet.tpl-modern { display: grid; grid-template-columns: 34% 1fr; gap: 16px; }
.cv-sheet.tpl-modern .cv-side { background: var(--teal); color: #fff; margin: -28px 0 -28px -26px; padding: 28px 18px; }
.cv-sheet.tpl-modern .cv-side h1, .cv-sheet.tpl-modern .cv-side h2, .cv-sheet.tpl-modern .cv-side .headline { color: #fff; }
.cv-sheet.tpl-modern .cv-side h2 { border-color: rgba(255,255,255,0.35); }
.cv-sheet.tpl-modern .cv-side .contact { color: rgba(255,255,255,0.9); }
.cv-sheet.tpl-simple h1 { font-family: var(--display); text-align: center; }
.cv-sheet.tpl-simple .contact { text-align: center; }
.cv-letter { margin-top: 22px; background: #fff; border: 1px solid var(--line); padding: 28px 26px; white-space: pre-wrap; }
.cv-letter h2 { margin-top: 0; }
@media print {
  body * { visibility: hidden; }
  .cv-print, .cv-print * { visibility: visible; }
  .cv-print { position: absolute; left: 0; top: 0; width: 100%; }
  .cv-sheet.watermark::after { display: none; } /* still show? task wants watermark on free preview; hide in print is nicer for paid. Keep watermark in print for free: */
  .cv-sheet.watermark::after { display: block; }
  .site-header, .site-footer, .ak-chat, .cv-panel, .page-hero, .nav-toggle { display: none !important; }
  .cv-sheet, .cv-letter { border: 0; box-shadow: none; }
  .cv-letter { page-break-before: always; }
}
