/* Contract (engagement letter body) on the chrome-fit sheet: 816 x 1054 units, 1u = 1/816 of the page width (the service renders it with ?fit=chrome).
   Letter text, footer, signature and attachment-list rules are taken from the 1245x engagement letter (1245x-internal-tool
   src/components/EngagementLetter/engagement-letter.css), with `.engagement-doc .page` read as `.sheet`. Nothing here depends on rem scaling. */

:root { --u: calc(100vw / 816); }
:root {
  --ink-1: #002e5b; --ink-2: #283a54; --ink-3: #5a6b7c; --ink-deep: #002e5b;
  --blue-1: #2381bf; --blue-2: #0b5697; --violet: #5a5fe3; --tint: #e9f3fb; --hair: #d3e2ee; --on-dark-3: #a9c2d6;
  --letter-ink: #1d1d1f;
  --f-letter: Montserrat, Helvetica, Arial, sans-serif;
  --f-display: "League Spartan", Poppins, Helvetica, Arial, sans-serif;
  --f-label: Montserrat, Poppins, Helvetica, Arial, sans-serif;
  --f-body: Poppins, Helvetica, Arial, sans-serif;
  --f-fig: Barlow, Helvetica, Arial, sans-serif;
}
html, body { margin: 0; padding: 0; background: #fff; }
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-sizing: border-box; }

.sheet { position: relative; width: 100vw; height: calc(1054 * var(--u)); overflow: hidden; break-after: page; page-break-after: always; overflow-wrap: anywhere; }
.sheet:last-child { break-after: auto; page-break-after: auto; }
.sheet .body { position: absolute; top: calc(52 * var(--u)); left: calc(48 * var(--u)); right: calc(48 * var(--u)); bottom: calc(96 * var(--u)); overflow: hidden; }

/* ---------- letter text (1245x letter) ---------- */
.letter { font-family: var(--f-letter); font-weight: 400; color: var(--letter-ink); font-size: calc(12.4 * var(--u)); line-height: 1.32; }
.letter p { margin: 0 0 calc(12 * var(--u)); text-align: justify; }
.letter p.l { text-align: left; }
.letter h3 { font-size: inherit; font-weight: 700; margin: calc(18 * var(--u)) 0 calc(3 * var(--u)); text-transform: uppercase; }
.letter h3:first-child { margin-top: 0; }
.letter b { font-weight: 700; }
.letter .head-logo { position: absolute; top: calc(60 * var(--u)); right: calc(48 * var(--u)); width: calc(112 * var(--u)); }
.letter .addr { max-width: calc(560 * var(--u)); }
.letter .addr p { margin-bottom: calc(13 * var(--u)); text-align: left; }
.letter ul.att { margin: 0 0 calc(12 * var(--u)); padding: 0; list-style: none; display: flex; flex-direction: column; gap: calc(7 * var(--u)); }
.letter ul.att li { display: grid; grid-template-columns: calc(110 * var(--u)) 1fr; gap: calc(10 * var(--u)); }
.letter ul.att .an { font-weight: 700; }
.lfoot { position: absolute; left: calc(48 * var(--u)); right: calc(48 * var(--u)); bottom: calc(26 * var(--u)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-family: var(--f-letter); font-size: calc(12.4 * var(--u)); color: var(--letter-ink); }
.lfoot img { width: calc(188 * var(--u)); display: block; }
.lfoot .pg { text-align: center; }
.lfoot .copy { text-align: right; }

/* Contract additions. Each section is placed whole; a heading section (.keep-next) is placed with the section after it. */
.sheet .body > .contract-section > h3:first-child { margin-top: calc(18 * var(--u)); }
.sheet .body > .contract-section:first-child > h3:first-child { margin-top: 0; }
.letter h4 { font-size: inherit; font-weight: 700; margin: 0 0 calc(3 * var(--u)); color: var(--ink-2); }
.letter .addr .al { display: block; }
.lfoot .copy { font-size: calc(9 * var(--u)); display: flex; flex-direction: column; align-items: flex-end; gap: calc(6 * var(--u)); }
.lfoot .copy img.partner { width: auto; height: calc(36 * var(--u)); }

/* signature blocks (1245x letter) */
.accept { margin-top: calc(18 * var(--u)); }
.accept-h { font-weight: 700; margin-bottom: calc(12 * var(--u)); }
.sigcols { display: grid; grid-template-columns: 1fr 1fr; gap: calc(40 * var(--u)); }
.sigcol { min-width: 0; }
.sigcol .who { font-weight: 700; margin-bottom: calc(10 * var(--u)); }
.sigrow { display: grid; grid-template-columns: calc(70 * var(--u)) 1fr; align-items: end; min-height: calc(34 * var(--u)); border-bottom: 1px solid var(--letter-ink); margin-bottom: calc(10 * var(--u)); padding-bottom: calc(3 * var(--u)); }
/* The signature sits above its line with room to spare, not on it. */
.sigrow.img { min-height: calc(66 * var(--u)); padding-bottom: calc(10 * var(--u)); }
.sigrow img { width: calc(170 * var(--u)); display: block; }
/* Lines are drawn only where someone signs on paper; in the Adobe copy the tags become the fields. */
.sigcol:not(.show-fill-lines) .sigrow, .initials-acknowledgment:not(.show-fill-lines) .sigrow { border-bottom-color: transparent; }
.initials-acknowledgment { margin-top: calc(6 * var(--u)); }
.initials-acknowledgment p { margin-bottom: calc(4 * var(--u)); }
.initials-acknowledgment .sigrow { max-width: calc(300 * var(--u)); }

/* Adobe tags: small, wrapping, never wider than their cell, so the page can never overflow sideways */
.signature-line, .fill-in { font-size: calc(11 * var(--u)); line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.signature-row-signature img { height: calc(40 * var(--u)); }
.sigrow.signature-row-signature img { width: auto; }
