.doc-tool-list {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.coming-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.coming-card {
  min-height: 180px;
}

.cv-app {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  align-items: start;
}

.cv-editor,
.cv-preview-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(13, 17, 26, 0.9);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.26);
}

.cv-editor {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.cv-editor-head,
.cv-preview-head,
.editor-actions,
.item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cv-editor-head,
.cv-preview-head {
  justify-content: space-between;
}

.cv-editor h2,
.cv-preview-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.local-note {
  color: #d3d6db;
  margin: 0;
  font-size: 0.92rem;
}

.editor-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.editor-section h3 {
  margin: 0;
  font-size: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field,
.editor-item {
  display: grid;
  gap: 7px;
}

.field label {
  color: #d8dde5;
  font-size: 0.82rem;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.editor-item {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.photo-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-small {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 0.86rem;
}

.btn-disabled,
.btn-disabled:hover,
.btn-disabled:focus-visible {
  color: #7f8792;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
  box-shadow: none;
}

.cv-preview-panel {
  align-self: start;
  overflow: hidden;
  padding: 18px;
}

@media (min-width: 981px) {
  .cv-preview-panel {
    position: sticky;
    top: 98px;
    height: calc(100vh - 118px);
    max-height: calc(100vh - 118px);
  }

  .cv-preview-scroll {
    max-height: calc(100vh - 192px);
  }
}

.text-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sky);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 4px 0;
  text-decoration: none;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--text);
  outline: none;
  text-decoration: underline;
}

.paper-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.paper-toggle label {
  cursor: pointer;
}

.paper-toggle input {
  position: absolute;
  opacity: 0;
}

.paper-toggle span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.paper-toggle input:checked + span {
  color: #061014;
  background: linear-gradient(90deg, var(--green), var(--teal), var(--sky));
}

.cv-preview-scroll {
  display: grid;
  justify-items: center;
  padding: 16px 0 6px;
  overflow: auto;
  overscroll-behavior: contain;
}

.cv-print-area {
  --paper-width: 216mm;
  --paper-height: 279mm;
  display: grid;
  gap: 18px;
}

body.paper-a4 .cv-print-area {
  --paper-width: 210mm;
  --paper-height: 297mm;
}

.cv-print-area,
.cv-print-area * {
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

.cv-print-area a,
.cv-contact,
.cv-reference-text {
  overflow-wrap: anywhere;
}

.cv-sheet,
.cv-page {
  width: var(--paper-width);
  min-height: var(--paper-height);
  max-width: 100%;
  background: #eef3f7;
  color: #111827;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  transform-origin: top center;
}

.cv-document {
  min-height: inherit;
  background: #eef3f7;
  font-family: Arial, Helvetica, sans-serif;
}

.cv-page-content {
  min-height: inherit;
  background: #eef3f7;
}

.cv-header {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px 30px;
  background: #243653;
  color: #ffffff;
}

.cv-photo {
  position: relative;
  display: grid;
  flex: 0 0 108px;
  place-items: center;
  overflow: hidden;
  contain: paint;
  width: 108px;
  height: 108px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.cv-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover;
  object-position: center;
}

.cv-name {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

.cv-role {
  margin: 6px 0 10px;
  color: #d9e7f5;
  font-size: 14px;
  font-weight: 700;
}

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #edf4fb;
  font-size: 9.8px;
  line-height: 1.42;
}

.cv-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, 0.75fr);
  gap: 22px;
  padding: 28px 30px 32px;
}

.cv-main,
.cv-sidebar,
.cv-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.cv-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

.cv-section h2 {
  margin: 0 0 9px;
  padding-bottom: 7px;
  border-bottom: 2px solid #d7dee8;
  color: #243653;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: 0;
}

.cv-section p {
  color: #374151;
  font-size: 11.8px;
  line-height: 1.45;
}

.cv-section li {
  color: #374151;
  font-size: 11.2px;
  line-height: 1.38;
}

.cv-sidebar .cv-section p,
.cv-side .cv-section p {
  font-size: 11.2px;
}

.cv-entry {
  margin-bottom: 12px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.cv-entry h3 {
  margin: 0;
  color: #111827;
  font-size: 12px;
  line-height: 1.25;
}

.cv-meta {
  margin: 2px 0 6px;
  color: #6b7280;
  font-size: 10.8px;
  font-weight: 700;
  line-height: 1.3;
}

.cv-entry ul {
  margin: 6px 0 0;
  padding-left: 17px;
}

.skill-list,
.language-list {
  display: grid;
  gap: 9px;
}

.skill-row,
.language-row {
  display: grid;
  gap: 5px;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: #d7dee8;
  overflow: hidden;
}

.bar span {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: inherit;
  background: #006aa8;
}

.cv-references {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

.cv-reference-text {
  width: 100%;
  max-width: 100%;
  line-height: 1.4;
}

.cv-extra-page {
  display: block;
  padding: 0;
}

.cv-extra-page .cv-page-content {
  min-height: var(--paper-height);
  padding: 16mm;
}

.cv-extra-page .cv-section {
  width: 100%;
  max-width: 100%;
}

.cv-extra-page .references,
.cv-extra-page .cv-references {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.seo-content {
  display: grid;
  gap: 18px;
}

@media (max-width: 980px) {
  .doc-tool-list,
  .cv-app {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .field-grid,
  .coming-grid {
    grid-template-columns: 1fr;
  }

  .cv-preview-panel {
    padding: 12px;
  }

  .cv-sheet,
  .cv-page {
    width: 216mm;
    transform: scale(0.46);
    transform-origin: top left;
    margin-right: calc(216mm * -0.54);
    margin-bottom: calc(279mm * -0.54);
  }

  body.paper-a4 .cv-sheet,
  body.paper-a4 .cv-page {
    width: 210mm;
    margin-right: calc(210mm * -0.54);
    margin-bottom: calc(297mm * -0.54);
  }
}

@page {
  margin: 0;
}

@media print {
  @page {
    margin: 0;
  }

  body.paper-letter {
    width: 216mm;
  }

  body.paper-a4 {
    width: 210mm;
  }

  html,
  body {
    width: auto;
    min-height: auto;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.printing-cv .site-header,
  body.printing-cv .tool-hero,
  body.printing-cv .cv-editor,
  body.printing-cv .builder-actions,
  body.printing-cv .seo-content,
  body.printing-cv .faq-section,
  body.printing-cv .site-footer,
  body.printing-cv .footer,
  body.printing-cv .skip-link,
  body.printing-cv .cv-preview-head,
  body.printing-cv .no-print {
    display: none !important;
  }

  body.printing-cv {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.printing-cv::before {
    display: none !important;
  }

  body.printing-cv > main,
  body.printing-cv .page-shell,
  body.printing-cv .cv-app,
  body.printing-cv .cv-preview-panel,
  body.printing-cv .cv-preview-scroll {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body.printing-cv .cv-print-area {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.printing-cv .cv-page,
  body.printing-cv .cv-sheet {
    width: var(--paper-width) !important;
    min-height: var(--paper-height) !important;
    height: auto !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    page-break-after: always;
    break-after: page;
  }

  body.printing-cv .cv-page:last-child,
  body.printing-cv .cv-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  body.printing-cv * {
    visibility: hidden !important;
  }

  body.printing-cv .cv-print-area,
  body.printing-cv .cv-print-area * {
    visibility: visible !important;
  }

  body.printing-cv .cv-print-area {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.printing-cv .cv-page,
  body.printing-cv .cv-sheet {
    width: var(--paper-width) !important;
    min-height: var(--paper-height) !important;
    max-width: none !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.printing-cv .cv-header {
    display: grid !important;
  }

  body.printing-cv .cv-photo,
  body.printing-cv .cv-photo img {
    overflow: hidden !important;
  }
}
