/* Branded document styling, the one treatment every document gets on
   screen, in the review tool and in the PDF. Written to render identically
   in a modern browser AND in wkhtmltopdf's older WebKit: literal colours (no
   CSS variables), table based layouts (no grid/flex), a web-safe font stack
   and an explicit base size, so the PDF matches the screen exactly. */
/* Inter ships with the app (app/assets/fonts/inter, SIL Open Font License) so
   the screen and the PDF use the very same typeface on every machine. The
   PDF layout inlines these faces as data URIs; see ContractPdfHelper. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; src: url("/assets/inter/Inter-Regular-1fce4cf9.ttf") format("truetype"); }
@font-face { font-family: "Inter SemiBold"; font-style: normal; font-weight: 600; src: url("/assets/inter/Inter-SemiBold-2fba5626.ttf") format("truetype"); }
@font-face { font-family: "Inter Bold"; font-style: normal; font-weight: 700; src: url("/assets/inter/Inter-Bold-48e97654.ttf") format("truetype"); }
@font-face { font-family: "Inter ExtraBold"; font-style: normal; font-weight: 800; src: url("/assets/inter/Inter-ExtraBold-c5d5a7ef.ttf") format("truetype"); }

/* One family name per weight: wkhtmltopdf's WebKit keeps only one face per
   family, so the weights are selected by family below (the weight is still
   set, so a browser without the file falls back to the right synthetic). */
.contract { font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 11pt; font-weight: 400; color: #18181b; line-height: 1.6; }
.contract-cover__kind, .contract-cover__facts .dd, .contract-amend h2, .contract-refs h2, .contract-toc h2,
.contract-body h3, .contract-body h4, .contract-body strong, .contract-body b, .contract-body th { font-family: "Inter Bold", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; }
.contract-cover__party, .contract-refs a, .contract-body a { font-family: "Inter SemiBold", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 600; }
.contract-cover__brand, .contract-cover__title, .contract-body h1, .contract-body h2 { font-family: "Inter ExtraBold", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 800; }

/* The on-screen sheet: an A4 page with the same margins wkhtmltopdf applies
   to the PDF (20mm top, 18mm sides and bottom), so paddings, line lengths
   and page breaks read the same before and after downloading. */
.contract-sheet { display: block; box-sizing: border-box; width: 100%; max-width: 210mm; margin-left: auto; margin-right: auto; padding: 20mm 18mm 18mm; background: #ffffff; border: 1px solid #e4e4e7; border-radius: 6px; overflow-x: auto; }

.contract-cover { border-bottom: 3px solid #ec4899; padding-bottom: 24px; margin-bottom: 32px; }
.contract-cover__brand { font-size: 25.6px; font-weight: 800; letter-spacing: -0.02em; color: #18181b; }
.contract-cover__brand .dot { color: #ec4899; }
.contract-cover__kind { margin-top: 40px; margin-bottom: 0; text-transform: uppercase; letter-spacing: 0.16em; font-size: 11.52px; font-weight: 700; color: #be185d; }
.contract-cover__title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 6.4px 0 0; line-height: 1.15; color: #18181b; }
.contract-cover__party { color: #52525b; font-weight: 600; margin-top: 9.6px; }
.contract-cover__summary { color: #52525b; margin-top: 12.8px; font-size: 15.2px; }

.contract-cover__facts { width: 100%; border-collapse: collapse; margin-top: 28.8px; }
.contract-cover__facts td { width: 50%; border-top: 1px solid #e4e4e7; padding: 8px 0 11.2px; vertical-align: top; }
.contract-cover__facts .dt { display: block; font-size: 9.92px; text-transform: uppercase; letter-spacing: 0.12em; color: #52525b; }
.contract-cover__facts .dd { display: block; margin-top: 2.4px; font-weight: 700; font-size: 14.72px; color: #18181b; }
.contract-cover__foot { margin-top: 28.8px; font-size: 11.2px; color: #52525b; }

.contract-amend, .contract-refs { border-left: 3px solid #ec4899; background: #fdf2f8; padding: 12.8px 16px; margin: 24px 0; }
.contract-amend h2, .contract-refs h2 { margin: 0 0 6.4px; font-size: 14.4px; color: #be185d; }
.contract-refs ul { margin: 0; padding-left: 17.6px; }
.contract-refs a { color: #be185d; font-weight: 600; }

.contract-toc { border: 1px solid #e4e4e7; padding: 16px 20px; margin: 24px 0 32px; }
.contract-toc h2 { margin: 0 0 8px; font-size: 12.48px; text-transform: uppercase; letter-spacing: 0.12em; color: #52525b; }
.contract-toc ol { list-style: none; margin: 0; padding: 0; }
.contract-toc li { padding: 2.4px 0; }
.contract-toc li.lvl-3 { padding-left: 19.2px; font-size: 14.4px; }
.contract-toc a { color: #18181b; text-decoration: none; }

.contract-body h1 { font-size: 23.2px; font-weight: 800; letter-spacing: -0.01em; margin: 32px 0 9.6px; color: #18181b; }
.contract-body h2 { font-size: 18.4px; font-weight: 800; margin: 28.8px 0 8px; padding-top: 8px; border-top: 1px solid #e4e4e7; color: #18181b; }
.contract-body h4 { font-size: 15.2px; font-weight: 700; margin: 14.4px 0 3.2px; color: #18181b; }
.contract-body blockquote { margin: 12.8px 0; padding: 3.2px 0 3.2px 16px; border-left: 3px solid #e4e4e7; color: #52525b; }
.contract-body code { font-family: Menlo, Consolas, monospace; font-size: 0.85em; background: #f4f4f5; padding: 0.8px 4.8px; border-radius: 3px; }
.contract-body pre { background: #f4f4f5; padding: 11.2px 14.4px; border-radius: 4px; overflow-x: auto; font-size: 13.6px; }
.contract-body pre code { background: none; padding: 0; }
.contract-body img { max-width: 100%; }
.contract-body h3 { font-size: 16px; font-weight: 700; margin: 17.6px 0 4.8px; color: #18181b; }
.contract-body p { margin: 8px 0; }
.contract-body a { color: #be185d; font-weight: 600; }
.contract-body ul, .contract-body ol { padding-left: 22.4px; }
.contract-body li { margin: 4px 0; }
.contract-body strong { font-weight: 700; }
.contract-body hr { border: 0; border-top: 2px solid #ec4899; margin: 25.6px 0; }
.contract-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.6px; }
.contract-body th, .contract-body td { border: 1px solid #e4e4e7; padding: 6.4px 9.6px; text-align: left; }

@page { size: A4; margin: 20mm 18mm 18mm; }
.contract--pdf .contract-cover { page-break-after: always; border-bottom: none; }
.contract--pdf .contract-toc { page-break-after: always; }
.contract--pdf .contract-body h2 { page-break-after: avoid; }
.contract--pdf .contract-body table, .contract--pdf .contract-body li { page-break-inside: avoid; }

/* Printing the screen page from the browser: only the sheet, at the page
   margins above, with the portal chrome (sidebar, header, buttons, notes
   panel) out of the way. The Download PDF button remains the canonical copy. */
@media print {
  body { background: #ffffff !important; }
  aside[data-sidebar-target="panel"], header, .print\:hidden, #document-review aside, #document-review > div:first-child { display: none !important; }
  .lg\:pl-72 { padding-left: 0 !important; }
  main > div { padding: 0 !important; max-width: none !important; }
  #document-review { max-width: none !important; margin: 0 !important; }
  #document-review > div { display: block !important; }
  .contract-sheet { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: visible; }
  .contract-cover { page-break-after: always; border-bottom: none; }
  .contract-toc { page-break-after: always; }
  .contract-body h2 { page-break-after: avoid; }
  .contract-body table, .contract-body li { page-break-inside: avoid; }
  .annot { background: none !important; box-shadow: none !important; }
  .annot__badge { display: none !important; }
}
