* { box-sizing: border-box; }
body { margin: 0; background: #141414; color: #ede8df; font: 1rem/1.48 "Segoe UI", sans-serif; }
.document-tools { max-width: 8.5in; margin: 1rem auto; padding: 0 1rem; display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.document-tools a { color: #dfa83a; }
.document-tools button { padding: .65rem .9rem; background: #c8952a; color: #141414; border: 0; border-radius: 3px; font: inherit; font-weight: 650; cursor: pointer; }
.agreement { width: min(calc(100% - 2rem), 8.5in); margin: auto; padding: clamp(1.25rem, 5vw, 3rem); color: #181818; background: #fff; }
header { border-bottom: 2px solid #a16f15; margin: 0 0 1rem; padding: 0 0 .65rem; }
header p { margin: 0 0 .3rem; color: #77521a; font-size: .83rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.35rem); margin: 0; line-height: 1.13; }
h2 { margin: .75rem 0 .25rem; font-size: 1rem; }
p { margin: 0 0 .55rem; }
.fill { display: flex; align-items: baseline; gap: .6rem; font-weight: 600; }
.fill span { flex: 1; border-bottom: 1px solid #555; }
.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: .8rem; }
.signature-line { border-top: 1px solid #555; margin: 1.25rem 0 .55rem; font-size: .85rem; }
footer { text-align: center; padding: 1rem; font-size: .87rem; }
@media (max-width: 540px) {
  .signature-grid { grid-template-columns: 1fr; gap: .5rem; }
}
@page { size: Letter; margin: .65in; }
@media print {
  body, .agreement { width: auto; color: #111; background: #fff; font: 10.5pt/1.34 "Segoe UI", sans-serif; }
  .document-tools, footer { display: none; }
  .agreement { padding: 0; margin: 0; }
  h1 { font-size: 25pt; }
  h2 { font-size: 11pt; }
  header { padding-bottom: .12in; }
  section { break-inside: avoid; }
  .signature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); break-inside: avoid; }
}
