:root {
  --print-paper: #ffffff;
  --print-ink: #1b1b1b;
  --print-muted: #666666;
  --print-line: #d7d7d7;
  --print-accent: #2d4a3e;
  --print-accent-soft: #eef3f0;
}

* {
  box-sizing: border-box;
}

html {
  background: #ece8e1;
}

body.print-document-page {
  margin: 0;
  color: var(--print-ink);
  background: #ece8e1;
  font-family: "Inter", sans-serif;
}

.print-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(28, 28, 28, 0.92);
  backdrop-filter: blur(10px);
}

.print-toolbar-link,
.print-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.print-toolbar-link {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.print-toolbar-button {
  border: none;
  cursor: pointer;
  color: #ffffff;
  background: var(--print-accent);
}

.print-shell {
  padding: 32px 20px 48px;
}

.print-doc {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 28mm 22mm 24mm;
  background: var(--print-paper);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

.print-doc__header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--print-line);
}

.print-doc__headline {
  flex: 1 1 auto;
  min-width: 0;
}

.print-doc__eyebrow {
  margin-bottom: 10px;
  color: var(--print-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.print-doc__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 32px;
  line-height: 1.15;
}

.print-doc__lead {
  margin: 14px 0 0;
  color: var(--print-muted);
  font-size: 15px;
  line-height: 1.65;
}

.print-doc__cover {
  margin: 0;
  flex: 0 0 240px;
  width: 240px;
}

.print-doc__cover img {
  display: block;
  width: 100%;
  max-width: 240px;
  max-height: 190px;
  object-fit: cover;
  border-radius: 10px;
}

.print-doc__section {
  margin-top: 24px;
}

.print-doc__section h2,
.print-doc__footer h2 {
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
  font-size: 22px;
  line-height: 1.2;
}

.print-doc__section--avoid-break {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.print-table th,
.print-table td {
  padding: 10px 12px;
  vertical-align: top;
  border: 1px solid var(--print-line);
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
}

.print-table th {
  width: 32%;
  color: var(--print-muted);
  font-weight: 600;
  background: #fafafa;
}

.print-rich-text {
  color: var(--print-ink);
  font-size: 14px;
  line-height: 1.65;
}

.print-rich-text h1,
.print-rich-text h2,
.print-rich-text h3,
.print-rich-text h4 {
  break-after: avoid;
  page-break-after: avoid;
}

.print-rich-text p,
.print-rich-text ul,
.print-rich-text ol,
.print-rich-text table,
.print-rich-text blockquote {
  break-inside: auto;
}

.print-rich-text img {
  max-width: 100%;
  height: auto;
}

.print-rich-text table {
  width: 100%;
  border-collapse: collapse;
}

.print-rich-text table td,
.print-rich-text table th {
  border: 1px solid var(--print-line);
  padding: 8px 10px;
}

.print-rich-text--plain {
  padding: 14px 16px;
  border: 1px solid var(--print-line);
  background: #fafafa;
}

.print-cost-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.print-card {
  padding: 18px;
  border: 1px solid var(--print-line);
  background: var(--print-accent-soft);
}

.print-list {
  margin: 0;
  padding-left: 18px;
}

.print-list li {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
}

.print-doc__footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px solid var(--print-line);
}

@media (max-width: 768px) {
  .print-toolbar {
    padding: 12px 16px;
  }

  .print-shell {
    padding: 20px 10px 32px;
  }

  .print-doc {
    padding: 18px;
  }

  .print-doc__header,
  .print-cost-stack {
    flex-direction: column;
  }

  .print-doc__title {
    font-size: 28px;
  }

  .print-doc__cover,
  .print-card {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }
}

@page {
  size: A4;
  margin: 14mm 12mm 16mm;
}

@media print {
  html,
  body.print-document-page {
    background: #ffffff;
  }

  .print-toolbar {
    display: none !important;
  }

  .print-shell {
    padding: 0;
  }

  .print-doc {
    max-width: none;
    padding: 0;
    box-shadow: none;
  }

  .print-doc__header {
    gap: 18px;
  }

  .print-doc__cover {
    flex-basis: 210px;
    width: 210px;
  }

  .print-doc__cover img {
    width: 210px;
    max-width: 210px;
  }

  .print-card,
  .print-doc__footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-cost-stack {
    gap: 12px;
  }

  .print-doc__section h2,
  .print-doc__footer h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
