/* Contract document styles. Shared by the editor preview, the signing page and the PDF. */
@font-face { font-family: 'Suisse'; src: url('../assets/fonts/SuisseIntl-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Suisse'; src: url('../assets/fonts/SuisseIntl-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

.doc {
  --g: #55791a; --g2: #6f9a24; --gd: #202714; --gl: #f4f8ec; --gb: #dbe6c6; --ink: #1d2118; --mut: #5f6857; --line: #e4e9da; --paper: #fff;
  font-family: 'Suisse', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--paper);
  max-width: 860px; margin: 0 auto; font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.doc *, .doc *::before, .doc *::after { box-sizing: border-box; }
.doc svg { width: 1em; height: 1em; flex: none; }
.doc a { color: var(--g); }
.doc p { margin: 0 0 10px; }
.doc .muted { color: var(--mut); }
.doc .small { font-size: 12.5px; }
.doc .lead { font-size: 15.5px; color: #3b4234; }

/* Header */
.dh { padding: 34px 40px 0; }
.dh-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dh .logo { height: 58px; width: auto; }
.dh-meta { text-align: right; }
.dn { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--g); }
.dnum { font-size: 22px; font-weight: 700; color: var(--gd); }
.hero { margin: 24px -40px 0; height: 300px; background: #2c3a16 center/cover no-repeat; position: relative; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,12,.05) 20%, rgba(20,26,12,.78) 100%); }
.hero-in { position: absolute; left: 40px; right: 40px; bottom: 26px; z-index: 1; color: #fff; }
.hero .pf { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.hero .pn { font-size: 34px; line-height: 1.1; font-weight: 700; margin-top: 4px; }
.hero .ps { font-size: 16px; margin-top: 4px; opacity: .92; }
.hero .pa { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 8px; opacity: .9; }
.parties { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 22px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.party { padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.party:last-child { border-right: 0; }
.pl { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--g); margin-bottom: 4px; }
.pv { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.ps2 { font-size: 12.5px; color: var(--mut); overflow-wrap: anywhere; }

/* Blocks */
.blk { padding: 26px 40px 4px; }
.sec { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gd); margin: 0 0 14px; font-weight: 700; }
.sec::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--g), rgba(85,121,26,0)); }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--g); font-weight: 700; }
.big { font-size: 28px; line-height: 1.15; margin: 4px 0 10px; color: var(--gd); }
.sub { font-size: 17px; margin: 18px 0 2px; color: var(--gd); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fact { background: var(--gl); border: 1px solid var(--gb); border-radius: 10px; padding: 10px 12px; }
.fk { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--g); font-weight: 700; }
.fv { font-weight: 700; font-size: 14px; color: var(--gd); }
.sumtxt { background: #fafbf7; border-left: 4px solid var(--g); padding: 12px 16px; border-radius: 0 10px 10px 0; white-space: normal; }

/* Line items */
.lines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lines th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--gd); padding: 9px 10px; }
.lines th:first-child { border-radius: 8px 0 0 8px; } .lines th:last-child { border-radius: 0 8px 8px 0; }
.lines td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .num { text-align: right; white-space: nowrap; }
.lines .in { font-weight: 700; }
.lines .u { display: block; font-size: 11px; color: var(--mut); }
.lines .amt { font-weight: 700; }
.lines .empty { color: var(--mut); text-align: center; padding: 22px; }
.ld { margin: 3px 0 0; padding: 0; list-style: none; color: var(--mut); font-size: 12px; line-height: 1.4; }
.ld li::before { content: '\2022'; color: var(--g2); margin-right: 6px; }
.tot-wrap { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.totals { min-width: 290px; background: var(--gl); border: 1px solid var(--gb); border-radius: 12px; padding: 12px 16px; }
.tr { display: flex; justify-content: space-between; gap: 18px; padding: 4px 0; font-size: 14px; }
.tr small { display: block; color: var(--mut); font-size: 11.5px; }
.tr.disc b { color: var(--g); }
.tr.grand { border-top: 2px solid var(--gd); margin-top: 6px; padding-top: 9px; font-size: 19px; font-weight: 700; color: var(--gd); }
.save { margin-top: 6px; text-align: right; font-size: 12.5px; color: var(--g); font-weight: 700; }
.sched { min-width: 290px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; align-self: flex-start; }
.sched .sh { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--g); font-weight: 700; margin-bottom: 4px; }
.sched .sr { display: flex; justify-content: space-between; gap: 18px; padding: 3px 0; font-size: 13.5px; }
.sched em { font-style: normal; color: var(--mut); font-size: 12px; margin-left: 4px; }
.chosen-flag { display: inline-flex; align-items: center; gap: 6px; background: var(--g); color: #fff; font-weight: 700; padding: 5px 12px; border-radius: 99px; margin-bottom: 12px; font-size: 13px; }

/* Options */
.opt-grid { display: grid; gap: 14px; margin: 6px 0 22px; }
.opt-grid.n2 { grid-template-columns: repeat(2, 1fr); } .opt-grid.n3 { grid-template-columns: repeat(3, 1fr); }
.opt-card { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.m-sign .opt-card { cursor: pointer; }
.m-sign .opt-card:hover { border-color: var(--g2); }
.opt-card.sel { border-color: var(--g); box-shadow: 0 0 0 4px rgba(85,121,26,.18); }
.oc-img { height: 120px; background: #dfe8cd center/cover no-repeat; position: relative; }
.oc-tag { position: absolute; top: 10px; left: 10px; background: var(--gd); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; }
.oc-body { padding: 12px 14px 14px; }
.oc-name { font-weight: 700; font-size: 16px; color: var(--gd); }
.oc-blurb { font-size: 12.5px; color: var(--mut); margin-top: 2px; }
.oc-total { font-size: 24px; font-weight: 700; color: var(--g); margin-top: 8px; }
.oc-sub { font-size: 11px; color: var(--mut); }
.oc-pick { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; font-size: 13px; color: var(--gd); }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--g); display: inline-block; }
.opt-card.sel .radio { background: var(--g); box-shadow: inset 0 0 0 3px #fff; }
.opt-detail { margin-bottom: 20px; }
.od-h { font-size: 16px; margin: 6px 0 8px; color: var(--gd); }

/* Attachments */
.gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gal figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f6f7f3; }
.gal img { width: 100%; display: block; max-height: 520px; object-fit: contain; background: #f6f7f3; }
.gal figcaption { padding: 8px 12px; font-size: 12.5px; color: var(--mut); }
.files { list-style: none; padding: 0; margin: 10px 0 0; }
.files li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fnote { margin-left: auto; font-size: 12px; color: var(--mut); }

/* Commitment + warranty */
.std-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 12px 0 16px; }
.std { display: flex; gap: 10px; align-items: flex-start; }
.std .ck { width: 24px; height: 24px; border-radius: 50%; background: var(--g); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none; margin-top: 2px; }
.std b { font-size: 14.5px; color: var(--gd); } .std p { margin: 1px 0 0; font-size: 13px; color: var(--mut); }
.callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.callout { background: var(--gd); color: #eef3e4; border-radius: 12px; padding: 14px 16px; }
.callout b { color: #fff; font-size: 15px; } .callout p { margin: 4px 0 0; font-size: 13px; }
.w-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 10px; }
.wc { border: 1px solid var(--gb); border-radius: 12px; padding: 12px 14px; background: var(--gl); }
.wh { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gd); margin-bottom: 4px; }
.wh svg { color: var(--g); font-size: 18px; }
.wc ul { margin: 0; padding-left: 18px; font-size: 13px; } .wc li { margin: 3px 0; } .wc small { display: block; color: var(--mut); font-size: 11.5px; }

/* Terms */
.terms .tcols { font-size: 11.6px; line-height: 1.5; color: #30352a; }
.terms p { margin: 0 0 7px; } .terms .ti { font-weight: 700; }
.terms .tl { padding-left: 20px; margin: 0 0 8px; } .terms .tl li { margin: 0 0 6px; padding-left: 2px; }
.terms .tsec { break-inside: avoid-column; } .terms h4 { font-size: 11.8px; margin: 12px 0 4px; color: var(--gd); letter-spacing: .02em; }
.terms .sub { padding-left: 14px; margin-bottom: 3px; } .terms ul { padding-left: 18px; margin: 0 0 7px; }

/* Checklist */
.cl { display: grid; gap: 8px; margin: 10px 0 14px; }
.cli { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.m-sign .cli { cursor: pointer; }
.cli input { position: absolute; opacity: 0; pointer-events: none; }
.cli .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--g); flex: none; display: grid; place-items: center; color: #fff; margin-top: 1px; }
.cli.on { border-color: var(--gb); background: var(--gl); } .cli.on .box { background: var(--g); }
.clt b { display: block; color: var(--gd); } .clt span { font-size: 13.5px; } .clt small { display: block; color: #8a5a00; font-size: 12px; margin-top: 3px; }
.nbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 52px; font-size: 13.5px; }

/* Signatures */
.sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 18px 0 6px; }
.sig-line { height: 92px; border-bottom: 2px solid var(--gd); display: flex; align-items: flex-end; padding-bottom: 6px; }
.sig-img { max-height: 84px; max-width: 100%; }
.sig-empty { color: #a3ab98; font-size: 13px; padding-bottom: 6px; }
.sig-iss { padding-bottom: 4px; } .sig-iss span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); } .sig-iss b { font-size: 18px; color: var(--gd); }
.sig-cap { margin-top: 6px; } .sig-cap b { display: block; } .sig-cap span { font-size: 12px; color: var(--mut); }

/* Audit + footer */
.aud { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aud th { text-align: left; width: 34%; color: var(--mut); font-weight: 400; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.aud td { padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.df { margin-top: 30px; padding: 22px 40px 28px; background: var(--gd); color: #c9d3b8; font-size: 12px; text-align: center; line-height: 1.7; }
.df .badges { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.df .badges img { height: 64px; width: auto; border-radius: 6px; }

/* Small screens */
@media (max-width: 720px) {
  .doc { font-size: 14px; }
  .dh { padding: 20px 18px 0; } .dh .logo { height: 42px; } .dnum { font-size: 17px; }
  .hero { margin: 18px -18px 0; height: 230px; } .hero-in { left: 18px; right: 18px; bottom: 18px; } .hero .pn { font-size: 26px; }
  .parties { grid-template-columns: 1fr 1fr; } .party:nth-child(2) { border-right: 0; } .party:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .blk { padding: 22px 18px 4px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .lines thead { display: none; } .lines, .lines tbody, .lines tr, .lines td { display: block; width: 100%; }
  .lines tr { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  .lines td { border: 0; padding: 0; } .lines td.it { grid-column: 1 / -1; }
  .lines td.q { text-align: left; color: var(--mut); } .lines td.q .u { display: inline; margin-left: 4px; }
  .lines td.num:nth-child(3) { display: none; } .lines td.amt { grid-column: 2; grid-row: 2; }
  .totals, .sched { min-width: 0; width: 100%; }
  .opt-grid.n2, .opt-grid.n3 { grid-template-columns: 1fr; }
  .std-grid, .callouts, .w-cols, .sig-row, .gal { grid-template-columns: 1fr; }
  .df { padding: 20px 18px 24px; }
}

/* Print / PDF */
@media print {
  @page { size: Letter; margin: 0.55in 0.5in 0.65in; }
  .doc { max-width: none; font-size: 12.5px; }
  .dh { padding: 0; } .hero { margin: 18px 0 0; border-radius: 14px; overflow: hidden; height: 250px; } .hero-in { left: 26px; right: 26px; }
  .blk { padding: 18px 0 2px; }
  .pb { break-before: page; }
  .lines tr, .opt-card, .std, .callout, .wc, .sig-row, .totals, .sched, .fact, .cli, figure { break-inside: avoid; }
  .sec, .od-h { break-after: avoid; }
  .keep, .opt-detail, .warranty, .tot-wrap { break-inside: avoid; }
  .terms .tcols { column-count: 2; column-gap: 26px; font-size: 9.6px; }
  .terms h4 { font-size: 10px; }
  .df { margin-top: 14px; padding: 10px 16px; border-radius: 10px; break-inside: avoid; font-size: 9.5px; line-height: 1.5; }
  .df .badges { display: none; }
  .accept { break-inside: avoid; }
  a { text-decoration: none; }
  .doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
