/* Change Orders - status pill + client rows (table/modal reuse projects.css + dashboard.css) */
.co-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px; border: 1px solid; }
.co-pending  { color: #e0a84a; border-color: rgba(224,168,74,0.5); background: rgba(224,168,74,0.10); }
.co-draft    { color: #ecc978; border-color: rgba(212,175,95,0.55); border-style: dashed; background: rgba(212,175,95,0.06); }
/* the three CO forms inside the editor */
.co-form-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.co-form-row:last-child { border-bottom: 0; }
.co-form-ck { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.co-form-ck input { accent-color: #d4af5f; width: 16px; height: 16px; }
.co-form-view { padding: 4px 12px !important; font-size: 12px !important; }
.co-tpl { margin-bottom: 16px; }
.co-tpl label { display: block; font-size: 12.5px; color: var(--text-mid); font-weight: 600; margin: 10px 0 4px; }
.co-tpl input, .co-tpl textarea { width: 100%; font: inherit; font-size: 13px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--hair); background: rgba(18,20,24,0.6); color: var(--text-hi); }
.co-tpl textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; resize: vertical; }
.co-approved { color: #8fd8a2; border-color: rgba(143,216,162,0.5); background: rgba(143,216,162,0.10); }
.co-rejected { color: #e88b86; border-color: rgba(224,82,78,0.5); background: rgba(224,82,78,0.10); }

.co-client-row input { min-width: 0; flex: 1; }
.co-client-row .coc-status { font-size: 11.5px; color: #8fd8a2; white-space: nowrap; align-self: center; min-width: 54px; }
.co-client-row .coc-status a { color: #8fd8a2; }
.co-client-row .coc-status span { color: var(--text-dim); }
.coc-bad, .co-client-row .coc-status span.coc-bad { color: #e88b86; cursor: help; }
.co-meta .coc-bad { cursor: default; }

.pj-table-co { min-width: 940px; }
/* Phone register: drop the Contract/Sent/Signed columns so Project, Clients,
   Status, and the Preview / Export PDF buttons all fit on screen - the
   actions used to sit ~600px off the right edge of the viewport. */
@media screen and (max-width: 700px) {
  table.pj-table.pj-table-co { min-width: 0; width: 100%; }
  .pj-table-co th:nth-child(2), .pj-table-co td:nth-child(2),
  .pj-table-co th:nth-child(3), .pj-table-co td:nth-child(3),
  .pj-table-co th:nth-child(5), .pj-table-co td:nth-child(5),
  .pj-table-co th:nth-child(6), .pj-table-co td:nth-child(6) { display: none; }
  .pj-table-co td:last-child .co-prev { display: block; width: 100%; margin: 3px 0; white-space: nowrap; }
  /* contract editor header: let Preview / Export PDF / Send wrap cleanly */
  .pj-modal-head { flex-wrap: wrap; }
  .pj-modal-head h3 { flex: 1 1 100%; }
}
.co-overdue { font-size: 10.5px; font-weight: 700; color: #e88b86; border: 1px solid rgba(224,82,78,0.5); border-radius: 8px; padding: 1px 7px; margin-left: 5px; }
.co-prev {
  font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--hair); background: none; color: var(--text-mid); cursor: pointer;
}
.co-prev:hover { color: var(--gold-bright); border-color: var(--gold-faint); }
.co-meta { font-size: 12px; color: var(--text-dim); margin: -2px 0 8px; }
.co-meta b { color: var(--text-mid); font-weight: 600; }

/* Attachment chips in the CO modal */
.co-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.co-att { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid var(--hair); border-radius: 8px; padding: 4px 9px; background: rgba(255,255,255,0.02); }
.co-att a { color: var(--gold-bright); text-decoration: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-att a:hover { text-decoration: underline; }
.co-att-del { border: 0; background: none; color: var(--text-dim); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.co-att-del:hover { color: #e88b86; }

/* ---- Selections register (shares this stylesheet) ------------------------ */
.sel-delta { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.sel-delta.save { color: #a9e3b8; background: rgba(92,138,73,0.25); }
.sel-delta.over { color: #f0b1ad; background: rgba(191,54,54,0.25); }
.sel-delta.even { color: #e0c274; background: rgba(212,175,95,0.18); }
.sel-deltaline { min-height: 20px; margin-top: 6px; }
.sel-deltaline .sel-delta { font-size: 12.5px; padding: 5px 12px; }
.sel-docrow { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--hair-soft); }
.sel-docrow:last-child { border-bottom: 0; }
.sel-doclab { flex: none; width: 160px; font-size: 12px; color: var(--text-mid); font-weight: 600; }
.sel-docrow input[type=file] { font-size: 12px; color: var(--text-dim); }

/* Multi-file document slots (selections) */
.sel-docfiles { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.sel-docfiles input[type=file] { font-size: 12px; color: var(--text-dim); max-width: 220px; }

/* ---- Billing cost lines (Adaptive import) -------------------------------- */
.ccl-hint { font-size: 10.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-dim); margin-left: 8px; }
.ccl-row { border: 1px solid var(--hair); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: rgba(255,255,255,0.02); }
.ccl-top { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 6px; margin-bottom: 6px; }
.ccl-nums { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 6px; align-items: center; }
.ccl-nums.single { grid-template-columns: minmax(0,1fr) auto; }
.ccl-row select, .ccl-row input { min-width: 0; margin: 0; }
.ccl-totals { font-size: 12px; color: var(--gold-bright); margin: 2px 0 4px; min-height: 1em; }
.ccl-csv { width: auto; margin: 0 0 10px; }
.ccl-csvall { cursor: pointer; }
.ccl-csvall:hover { color: var(--gold-bright); border-color: var(--gold-faint); }
@media (max-width: 640px) {
  .ccl-top { grid-template-columns: 1fr; }
}

/* Allowance-mode cost lines (selections): allowance + actual + live delta */
.ccl-nums.allow { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(72px,auto) auto; }
.ccl-delta { font-size: 11.5px; font-weight: 700; white-space: nowrap; text-align: right; }
.ccl-delta.over { color: #f0b1ad; }
.ccl-delta.save { color: #a9e3b8; }
.ccl-delta.even { color: var(--text-dim); font-weight: 500; }
@media (max-width: 640px) { .ccl-nums.allow { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }

/* Budget allowance picker (selections cost lines) */
.ccl-row { position: relative; }
.ccl-allowwrap { display: flex; gap: 4px; min-width: 0; }
.ccl-allowwrap input { flex: 1; min-width: 0; }
.ccl-pick {
  border: 1px solid var(--hair); background: none; color: var(--gold-bright); border-radius: 8px;
  cursor: pointer; font-size: 12px; padding: 0 9px; flex: none;
}
.ccl-pick:hover { border-color: var(--gold-faint); }
.ccl-budgetpanel {
  position: absolute; left: 8px; right: 8px; top: calc(100% - 6px); z-index: 40;
  background: var(--panel-solid); border: 1px solid var(--hair); border-top: 3px solid var(--gold);
  border-radius: 12px; box-shadow: 0 24px 50px -18px rgba(0,0,0,0.8); padding: 8px 10px 10px;
}
.ccl-bp-head { font-size: 11.5px; font-weight: 700; color: var(--gold-bright); margin-bottom: 6px; }
.ccl-bp-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-mid); padding: 4px 2px; cursor: pointer; }
.ccl-bp-row b { color: var(--text-hi); }
.ccl-bp-row input { accent-color: var(--gold); }
.ccl-bp-used { font-size: 10.5px; color: #e0a84a; border: 1px solid rgba(224,168,74,0.5); border-radius: 7px; padding: 0 6px; }
.ccl-bp-empty { font-size: 12px; color: var(--text-dim); line-height: 1.5; padding: 2px; }
.ccl-bp-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; }
.ccl-bp-foot button {
  font: inherit; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 8px;
  border: 1px solid var(--hair); background: none; color: var(--text-mid); cursor: pointer;
}
.ccl-bp-apply { color: #1a1408 !important; background: var(--gold) !important; border-color: var(--gold-line) !important; }

/* ---- Selection Approval PDF export (GLH letterhead, print only) ---------- */
/* Register checkbox - themed round "bubble" to match the dashboard (like the
   restyled scrollbars): dark well, gold ring, gold fill when checked. */
.sel-ckcell { width: 34px; text-align: center; }
.sel-ck {
  appearance: none; -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1.5px solid var(--gold-line); background: rgba(18,20,24,0.6); cursor: pointer;
  vertical-align: middle; position: relative; transition: background .12s ease, border-color .12s ease;
}
.sel-ck:hover { border-color: var(--gold-bright); }
.sel-ck:checked { background: var(--gold); border-color: var(--gold-bright); }
.sel-ck:checked::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #1a1408; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
#selPrint { display: none; }
/* Off-screen stage for rendering cover sheets to canvas (Export + files). */
#selCapture { position: fixed; left: -12000px; top: 0; width: 816px; background: #fff; z-index: -1; }
/* Cover-sheet styles apply on screen too so the capture stage renders them
   (classes only exist inside #selPrint / #selCapture - nothing leaks). */
.slp-page { font-family: Georgia, "Times New Roman", serif; color: #000; background: #fff; display: flex; flex-direction: column; }
.slp-cap .slp-page { width: 816px; min-height: 1056px; padding: 44px 56px 64px; box-sizing: border-box; position: relative; }
.slp-head { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.slp-logo { height: 108px; width: auto; }
.slp-lines { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.slp-line { display: block; height: 1.6px; background: #C2A15A; }
.slp-title { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #000; margin: 8px 0 3px; }
.slp-sub { text-align: center; font-size: 14.5px; color: #000; margin-bottom: 10px; }
.slp-sec { font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #000; border-bottom: 2.5px solid #DCB772; padding-bottom: 4px; margin: 18px 0 10px; }
.slp-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid #3A3A3A; border-radius: 0; }
.slp-grid.one { grid-template-columns: 1fr; border-top: 0; }
.slp-cell { border: 0.5px solid #3A3A3A; padding: 8px 12px 9px; }
.slp-cl { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #000; margin-bottom: 3px; }
.slp-cv { font-size: 13px; color: #000; line-height: 1.45; }
.slp-cards { display: flex; gap: 12px; }
.slp-card { flex: 1; border: 1px solid #3A3A3A; background: #F7F1E2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 12px 14px; text-align: center; }
.slp-num { font-size: 17px; font-weight: 700; color: #000; margin-top: 4px; }
.slp-docs { font-size: 12.5px; color: #000; line-height: 1.6; }
/* Cost line detail on the final selection sheet (print-safe, black on cream) */
.slp-table { width: 100%; border-collapse: collapse; font-size: 12px; color: #000; margin: 2px 0 6px; }
.slp-table th, .slp-table td { border: 1px solid #3A3A3A; padding: 5px 9px; text-align: left; color: #000; }
.slp-table th { background: #F7F1E2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.slp-table .n { text-align: right; white-space: nowrap; }
.slp-table .d.over { color: #8a1f1a; font-weight: 700; }
.slp-table .d.save { color: #1d5c33; font-weight: 700; }
.slp-table .d.even { font-weight: 600; }
.slp-table .slp-tot td { font-weight: 700; background: #F7F1E2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* small admin renumber affordance in the editor meta */
.sel-renum {
  -webkit-appearance: none; appearance: none; cursor: pointer; font: inherit;
  font-size: 10.5px; padding: 1px 9px; border-radius: 8px; margin-left: 2px;
  border: 1px dashed var(--hair); background: none; color: var(--text-dim);
}
.sel-renum:hover { color: var(--gold-bright); border-color: var(--gold-line); }
.slp-docrow2 { margin: 0 0 3px; }
.slp-docpath { display: block; font-size: 10px; color: #555; word-break: break-all; line-height: 1.3; margin: 0 0 2px 14px; }
.slp-fill { flex: 1; }
/* signed record whose signature image file was lost - truthful attestation */
.slp-siglost {
  font-size: 10.5px; font-style: italic; color: #444; line-height: 1.45;
  border: 1px dashed #999; padding: 8px 10px; margin-bottom: 4px;
  background: #FBF8F0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.slp-sigrow { display: flex; gap: 26px; page-break-inside: avoid; }
.slp-sigblock { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.slp-sig { height: 64px; width: auto; align-self: flex-start; margin-bottom: -6px; }
.slp-signone { height: 58px; }
.slp-sigline { border-bottom: 1.5px solid #000; margin-bottom: 6px; }
.slp-signame { font-size: 13px; font-weight: 700; color: #000; }
.slp-sigmeta { font-size: 11px; color: #000; line-height: 1.5; }
.slp-foot { display: flex; flex-direction: column; gap: 5px; padding-top: 4px; position: relative; }
.slp-foot-in { position: absolute; left: 56px; right: 56px; bottom: 16px; }
.slp-contact {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #C2A15A !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  color: #000; font-family: Georgia, serif; font-size: 9px; letter-spacing: .04em;
  padding: 2px 16px; white-space: nowrap;
}
.selpdf-wrap { position: relative; }
.selpdf-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; display: none;
  min-width: 250px; background: var(--panel-solid); border: 1px solid var(--hair);
  border-top: 3px solid var(--gold); border-radius: 12px; padding: 6px;
  box-shadow: 0 24px 50px -18px rgba(0,0,0,0.8);
}
.selpdf-menu.show { display: flex; flex-direction: column; gap: 4px; }
.selpdf-menu button {
  font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; padding: 8px 11px;
  border-radius: 8px; border: 0; background: none; color: var(--text-mid); cursor: pointer;
}
.selpdf-menu button:hover { background: rgba(255,255,255,0.05); color: var(--gold-bright); }
.selpdf-menu .selpdf-hint { font-size: 10.5px; color: var(--text-dim); font-weight: 400; display: block; margin-top: 1px; }
@media print {
  .app, .nc-overlay, .tt-toast, .notif-panel, .upd-panel, #selCapture { display: none !important; }
  html, body { background: #fff !important; }
  body::before, body::after { display: none !important; content: none !important; }
  #selPrint { display: block; background: #fff; }
  .slp-page { page-break-after: always; min-height: 9.1in; padding-bottom: 46px; }
  .slp-page.slp-last { page-break-after: auto; }
  #selPrint > .slp-foot { position: fixed; bottom: 0; left: 0; right: 0; }
  @page { margin: 0.5in 0.6in 0.62in; }
}

/* Declined-version history on a selection (snapshotted at resubmit).
   Screen-only - print/export keep the clean client-facing document. */
.sel-revs { margin-top: 10px; border: 1px solid var(--hair); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; color: var(--text-mid); }
.sel-revs summary { cursor: pointer; color: var(--gold-bright, #ecc978); font-weight: 600; }
.sel-rev { border-top: 1px solid var(--hair); margin-top: 8px; padding-top: 8px; display: grid; gap: 4px; }
.sel-rev-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.sel-rev-doc { color: var(--gold-bright, #ecc978); text-decoration: none; border: 1px solid var(--hair); border-radius: 8px; padding: 4px 9px; font-size: 12px; }
.sel-rev-doc:hover { border-color: var(--gold-faint, rgba(212,175,95,0.35)); }
@media print { .sel-revs { display: none !important; } }

/* Quote stack on a cost line (sums into the actual cost) */
.ccl-extwrap { display: flex; gap: 4px; min-width: 0; }
.ccl-extwrap input { flex: 1; min-width: 0; }
.ccl-quotes {
  border: 1px solid var(--hair); background: none; color: var(--gold-bright); border-radius: 8px;
  cursor: pointer; font-size: 11.5px; padding: 0 8px; flex: none; white-space: nowrap;
}
.ccl-quotes:hover { border-color: var(--gold-faint); }
.ccl-qrow { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.ccl-qrow .ccl-qlabel { flex: 1; min-width: 0; }
.ccl-qrow .ccl-qamt { width: 110px; flex: none; }
.ccl-bp-addq {
  font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 8px;
  border: 1px dashed var(--hair); background: none; color: var(--text-mid); cursor: pointer;
}
.ccl-bp-addq:hover { color: var(--gold-bright); border-color: var(--gold-faint); }
.ccl-qtotal { margin-right: auto; font-size: 12px; font-weight: 700; color: var(--gold-bright); align-self: center; }

/* Read-only viewer for fully approved selections */
.sel-apprv {
  width: min(920px, calc(100vw - 28px)); max-height: 92vh; overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--hair); border-top: 3px solid var(--gold);
  border-radius: 16px; padding: 14px;
}
.sel-apprv-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sel-apprv-lock { font-size: 12.5px; color: #8fd8a2; font-weight: 600; margin-right: auto; }
.slp-view { background: #fff; border-radius: 6px; overflow: hidden; }
.slp-view .slp-page { padding: 34px 42px 40px; position: relative; min-height: 0; }
.slp-view .slp-foot-in { position: relative; left: 0; right: 0; bottom: 0; margin-top: 28px; }
.slp-doclink {
  display: inline-block; margin: 0 8px 8px 0; padding: 6px 12px; font-size: 12.5px;
  color: #000; text-decoration: none; border: 1px solid #3A3A3A; border-radius: 6px; cursor: pointer;
}
.slp-doclink:hover { border-color: #CCA261; background: #F7F1E2; }

/* Approved-record viewer on phones: full-width document, stacked sections.
   (Scoped to .sel-apprv so print/export covers keep the letter layout.) */
@media screen and (max-width: 700px) {
  .sel-apprv { width: calc(100vw - 10px); max-height: 96vh; padding: 8px; }
  .sel-apprv-bar { gap: 6px; }
  .sel-apprv-lock { flex-basis: 100%; margin-right: 0; }
  .sel-apprv .slp-page { padding: 16px 13px 22px; }
  .sel-apprv .slp-logo { height: 64px; }
  .sel-apprv .slp-head { gap: 10px; margin-bottom: 8px; }
  .sel-apprv .slp-title { font-size: 16px; letter-spacing: .1em; }
  .sel-apprv .slp-sub { font-size: 12px; }
  .sel-apprv .slp-sec { font-size: 12px; margin: 14px 0 8px; }
  .sel-apprv .slp-grid { grid-template-columns: 1fr 1fr; }
  .sel-apprv .slp-grid.one { grid-template-columns: 1fr; }
  .sel-apprv .slp-cv { font-size: 12px; }
  .sel-apprv .slp-cards { flex-direction: column; gap: 8px; }
  .sel-apprv .slp-sigrow { flex-direction: column; gap: 22px; }
  .sel-apprv .slp-doclink { display: block; margin: 0 0 8px; text-align: center; }
}

/* Design-intake letterhead Q&A blocks (share the slp print/view system) */
.ilp-q { margin: 0 0 11px; page-break-inside: avoid; }
.ilp-prompt { font-size: 12.5px; font-weight: 700; color: #000; line-height: 1.4; margin-bottom: 3px; }
.ilp-a { font-size: 12.5px; color: #000; line-height: 1.55; white-space: pre-wrap; }
.ilp-none { color: #666; font-style: italic; }
.ilp-grp { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #000; border-bottom: 1px solid #DCB772; padding-bottom: 2px; margin: 12px 0 8px; page-break-after: avoid; }

/* Design-intake LIVE viewer - dashboard-format Q&A that updates while open */
.dil-modal {
  width: min(1020px, calc(100vw - 28px)); max-height: 92vh; display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--hair); border-top: 3px solid var(--gold);
  border-radius: 16px; padding: 14px;
}
.dil-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dil-title { margin-right: auto; min-width: 0; }
.dil-title h3 { font-size: 17px; color: var(--text-hi); margin: 0 0 3px; }
.dil-sub { font-size: 12px; color: var(--text-dim); }
.dil-sub b { color: var(--gold-bright); }
.dil-upd { color: var(--text-dim); }
.dil-live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; color: #8fd8a2; border: 1px solid rgba(143,216,162,0.4);
  border-radius: 999px; padding: 3px 10px;
}
.dil-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #8fd8a2; animation: dilPulse 1.6s ease-in-out infinite; }
@keyframes dilPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.dil-body { overflow-y: auto; min-height: 0; border: 1px solid var(--hair); border-radius: 12px; }
.dil-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dil-table thead th {
  position: sticky; top: 0; z-index: 2; text-align: left; font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-dim); background: var(--panel-solid);
  padding: 9px 14px; border-bottom: 1px solid var(--hair);
}
.dil-table td { padding: 9px 14px; border-bottom: 1px solid var(--hair-soft); vertical-align: top; }
.dil-table td.q { width: 38%; color: var(--text-mid); font-weight: 600; line-height: 1.45; }
.dil-table td.a { color: var(--text-hi); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.dil-table tr.dil-empty td.a { color: var(--text-dim); }
.dil-table tr.dil-sec td {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-bright); background: rgba(212,175,95,0.07); border-bottom: 1px solid var(--gold-faint);
  padding: 8px 14px;
}
.dil-table tr.dil-grp td { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); padding: 7px 14px 5px; border-bottom: 1px solid var(--hair-soft); }
.dil-table tr.dil-flash td { animation: dilFlash 2s ease-out; }
@keyframes dilFlash { 0% { background: rgba(212,175,95,0.28); } 100% { background: transparent; } }
@media screen and (max-width: 700px) {
  .dil-modal { width: calc(100vw - 10px); padding: 8px; }
  .dil-table td.q { width: 44%; }
  .dil-table td { padding: 8px 9px; }
}

/* Internal review print sheet - deliberately plain (ink-friendly, no
   letterhead). Lives in the shared #selPrint print stage. */
.iqp { font-family: Georgia, "Times New Roman", serif; color: #000; background: #fff; }
.iqp-head { border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; }
.iqp-t { font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.iqp-m { font-size: 10.5px; color: #333; margin-top: 3px; }
.iqp-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.iqp-table th { text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1.5px solid #000; padding: 4px 6px; }
.iqp-table td { border-bottom: 0.5px solid #999; padding: 5px 6px; vertical-align: top; line-height: 1.4; }
.iqp-table td.q { width: 40%; font-weight: 700; }
.iqp-table td.a { white-space: pre-wrap; overflow-wrap: anywhere; }
.iqp-table td.iqp-blank { min-height: 30px; height: 30px; }   /* room to write */
.iqp-table tr { page-break-inside: avoid; }
.iqp-table tr.iqp-sec td { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-bottom: 1px solid #000; padding: 4px 6px; page-break-after: avoid; }
.iqp-table tr.iqp-grp td { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #444; padding: 4px 6px 2px; page-break-after: avoid; }

/* Contract document (shared renderer) */
.ct-doc .ct-body { font-size: 11.5px; color: #000; line-height: 1.55; margin-bottom: 8px; }
.ct-doc .ct-blank { color: #8a6a14; letter-spacing: 2px; }
.ct-initrow { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; page-break-inside: avoid; }
.ct-initbox {
  display: inline-flex; align-items: center; justify-content: center; min-width: 86px; height: 30px;
  border: 1.2px solid #3A3A3A; background: #F7F1E2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  font-family: Georgia, serif; font-style: italic; font-size: 14px; color: #000; padding: 0 10px;
}
.ct-initbox.me { cursor: pointer; border-color: #C2A15A; font-style: normal; font-size: 11px; color: #8a6a14; }
.ct-initbox.me.done { font-style: italic; font-size: 14px; color: #000; }
.ct-initlab { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: #555; margin-right: 12px; }
/* Paginated contract pages - mirror the source PDFs exactly: the real
   letterhead + gold footer band are image crops from the PDF; Georgia
   serif justified body; numbered headings over a gold rule; hanging
   1.1-style subsections with bold run-in titles; "Page N of 18" centered
   under the band. 816px = US Letter at 96dpi. */
.ct-statusline { text-align: center; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #6b6656; margin: 0 0 12px; }
.ct-page { position: relative; margin: 0 auto 26px; width: 816px; max-width: 100%; min-height: 1056px; display: flex; flex-direction: column; padding: 38px 78px 20px; background: #fff; color: #000; font-family: Georgia, "Times New Roman", serif; box-sizing: border-box; }
.ct-lh { display: block; width: 100%; margin: 0 0 24px; }
.ct-pgbody { flex: 1 1 auto; font-size: 14.5px; line-height: 1.38; text-align: justify; }
.ct-page .ct-blank { color: #000; letter-spacing: 1px; }
/* page 1: centered title + two-column parties block over fill-in lines */
.ct-doctitle { text-align: center; font-size: 28px; font-weight: 700; letter-spacing: .01em; margin: 24px 0 2px; }
.ct-docsub { text-align: center; font-size: 16.5px; margin-bottom: 18px; }
.ct-kv { border-top: 1px solid #C9A253; margin: 16px 0 24px; padding-top: 20px; }
.ct-kvrow { display: flex; gap: 10px; margin-bottom: 9px; font-size: 14.5px; text-align: left; }
.ct-kvlab { flex: 0 0 142px; }
.ct-kvval { flex: 1 1 auto; min-height: 19px; overflow-wrap: anywhere; }
.ct-kvval.line { flex: 0 1 360px; border-bottom: 1px solid #000; }
/* headings + subsections */
.ct-h { display: flex; align-items: baseline; border-bottom: 1px solid #C9A253; padding-bottom: 5px; margin: 20px 0 12px; text-align: left; }
.ct-h-n { flex: 0 0 30px; font-size: 13px; }
.ct-h-t { font-size: 18.5px; font-weight: 700; letter-spacing: .01em; }
.ct-sub { display: flex; margin: 0 0 13px; }
.ct-sub-n { flex: 0 0 46px; padding-left: 8px; box-sizing: border-box; font-size: 14.5px; text-align: left; }
.ct-sub-x { flex: 1 1 auto; min-width: 0; }
.ct-page .ct-body { font-size: 14.5px; color: #000; line-height: 1.38; margin: 0 0 13px 46px; }
.ct-bi { font-style: italic; }
/* footer: initials row (e-sign addition) above the real gold band + page number */
.ct-page .ct-pagefoot { margin-top: auto; padding-top: 10px; display: block; }
.ct-pageinit { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 8px; }
.ct-pageinit .ct-initrow { margin: 0; }
.ct-pageinit-lab { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: #555; }
.ct-fb { display: block; width: 100%; }
.ct-pagenum { text-align: center; font-size: 13px; color: #000; margin-top: 4px; white-space: nowrap; }
/* contract-page tables (retainer schedule, §11.3 draw matrix): tan header */
.ct-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 12px; color: #000; page-break-inside: auto; }
.ct-table th { background: #C9A253 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 12px; font-weight: 700; text-align: center; }
.ct-table th, .ct-table td { border: 1px solid #000; padding: 6px 8px; vertical-align: middle; }
.ct-table td { text-align: center; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ct-table .ct-td-lab { text-align: left; font-weight: 400; }
.ct-table tr { page-break-inside: avoid; }
.ct-table .ct-col-sel, .ct-table th.ct-col-sel { background: #F1E6C8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
/* appendix pages: compact lockup header, tighter type, tan/cream tables */
.ct-page.ct-apx { padding: 34px 64px 18px; }
.ct-apxhead { display: flex; align-items: center; margin-bottom: 14px; }
.ct-apxlk { width: 140px; flex: 0 0 auto; }
.ct-apxhead-t { flex: 1 1 auto; text-align: center; font-size: 14.5px; font-weight: 700; padding-right: 70px; }
.ct-apx .ct-pgbody { font-size: 11.5px; }
.ct-apx .ct-body { margin-left: 0; font-size: 11.5px; }
.ct-apx .ct-h { border-bottom: none; justify-content: center; margin: 16px 0 8px; padding-bottom: 0; }
.ct-apx .ct-h-t { font-size: 13.5px; }
.ct-apxtable { font-size: 11.5px; margin: 8px 0 12px; }
.ct-apxtable th { padding: 7px 6px; }
.ct-apxtable td { background: #F5EEDD !important; padding: 6px 6px; }
.ct-apxtable td.ct-td-lab, .ct-apxtable td.ct-c-ni { background: #fff !important; }
.ct-apxtable td.ct-c-chk { color: #2e7d32; font-weight: 700; font-size: 14px; line-height: 1; }
.ct-feetable td:nth-child(3) { text-align: left; }
.ct-apxfoot { display: flex; justify-content: space-between; font-size: 10px; color: #000; margin-top: 6px; }
/* Appendix A acknowledgment row (Client Signature / Date / Goliath / Date) */
.ct-apxsign { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr 1fr; border: 1.4px solid #000; margin-top: 14px; }
.ct-apxsig { display: flex; align-items: flex-end; gap: 8px; padding: 10px 8px 8px; min-height: 46px; min-width: 0; border-left: 1.4px solid #000; box-sizing: border-box; }
.ct-apxsig:first-child { border-left: none; }
.ct-apxsig img { height: 34px; object-fit: contain; flex: 0 1 auto; min-width: 0; }
.ct-apxsig-lab { font-size: 10px; color: #000; white-space: nowrap; }
.ct-apxsig-none, .ct-apxsig-val { flex: 1 1 auto; border-bottom: 1px solid #000; min-height: 16px; font-size: 11px; }
/* Tap-to-place signature lines (never auto-filled; drawn once, tapped in) */
.ct-sigbox.me {
  display: inline-flex; align-items: center; justify-content: center; min-width: 220px; height: 44px;
  border: 1.4px dashed #C2A15A; background: #FBF7EC !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  font-family: Georgia, serif; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #8a6a14; cursor: pointer; padding: 0 14px; margin-bottom: 2px;
}
.ct-sigbox.me.done { border-style: solid; background: #fff !important; padding: 0 4px; text-transform: none; }
.ct-sigbox.me img { height: 42px; object-fit: contain; display: block; }
.ct-apxsig .ct-sigbox.me { flex: 1 1 auto; min-width: 0; height: 38px; }
.ct-apxsig .ct-sigbox.me img { height: 32px; }
/* execution page (page 18): Signature / Printed Name / Date fill-in lines */
.ct-exsec { font-size: 18.5px; font-weight: 700; border-bottom: 1px solid #C9A253; padding-bottom: 5px; margin: 20px 0 16px; text-align: left; }
.ct-exline { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 15px 46px; text-align: left; font-size: 14.5px; }
.ct-exlab { flex: 0 0 auto; }
.ct-exval { flex: 0 1 320px; border-bottom: 1px solid #000; min-height: 24px; display: flex; align-items: flex-end; padding: 0 6px 1px; overflow: hidden; }
.ct-exsig { height: 46px; object-fit: contain; margin-bottom: -3px; }
.ct-exs { font-size: 18px; }
.ct-exmeta { margin: -8px 0 14px 46px; font-size: 10.5px; color: #555; text-align: left; }
/* Appendix A package selection (client picks + initials at signing) */
.ct-choices { display: flex; margin: 10px 0 12px; border: 1.6px solid #000; page-break-inside: avoid; }
.ct-choice {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: none; border-left: 1.6px solid #000; background: #F8F3E4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 700; color: #000; padding: 10px 8px;
}
.ct-choice:first-child { border-left: none; }
.ct-choice.me { cursor: pointer; }
.ct-choice.me:hover { background: #F1E6C8 !important; }
.ct-choice.sel { background: #EFE3C2 !important; box-shadow: inset 0 0 0 2.5px #8a6a14; }
.ct-choice-total { display: block; font-size: 10.5px; font-weight: 400; color: #555; margin-top: 2px; }
.ct-choice.sel .ct-choice-total { font-weight: 700; color: #000; }
.ct-chsel { text-align: left; font-size: 12px; margin: 4px 0 10px; }
.ct-chnote { text-align: left; font-size: 10.5px; color: #555; margin: 2px 0 10px; }
.ct-chmeta { font-size: 11px; color: #555; font-weight: 400; }
/* SCREEN-ONLY (never print: untyped width queries leak into iOS print
   rendering and reflow the sheets) - and suspended while body.ct-fit is on,
   which the print auto-fit uses to measure pages at their PRINT geometry. */
@media screen and (max-width: 700px) {
  body:not(.ct-fit) .ct-page { padding: 20px 18px 14px; min-height: 0; }
  body:not(.ct-fit) .ct-page.ct-apx { padding: 18px 12px 12px; }
  body:not(.ct-fit) .ct-pgbody, body:not(.ct-fit) .ct-page .ct-body, body:not(.ct-fit) .ct-sub-n, body:not(.ct-fit) .ct-kvrow { font-size: 12.5px; }
  body:not(.ct-fit) .ct-page .ct-body { margin-left: 20px; }
  body:not(.ct-fit) .ct-sub-n { flex-basis: 34px; padding-left: 2px; }
  body:not(.ct-fit) .ct-exline { margin-left: 8px; }
  body:not(.ct-fit) .ct-exmeta { margin-left: 8px; }
  body:not(.ct-fit) .ct-kvlab { flex-basis: 108px; }
  body:not(.ct-fit) .ct-doctitle { font-size: 20px; }
  body:not(.ct-fit) .ct-h-t { font-size: 15.5px; }
  body:not(.ct-fit) .ct-apxtable, body:not(.ct-fit) .ct-apxhead-t { font-size: 10px; }
  body:not(.ct-fit) .ct-apxhead-t { padding-right: 0; }
  body:not(.ct-fit) .ct-apxlk { width: 100px; }
  body:not(.ct-fit) .ct-choices { flex-direction: column; }
  body:not(.ct-fit) .ct-choice { border-left: none; border-top: 1.6px solid #000; }
  body:not(.ct-fit) .ct-choice:first-child { border-top: none; }
}
/* Print-geometry measuring mode: pages lay out at full letter width so the
   auto-fit zoom is computed from the heights the print engine will see. */
body.ct-fit .cts-paper { max-width: none; width: 836px; }
body.ct-fit .slp-page.ct-page { max-width: none; }
body.ct-fit { overflow-x: hidden; }
@media print {
  .ct-statusline { display: none !important; }
}
.ct-fieldrow { display: grid; grid-template-columns: 260px 1fr; gap: 8px; align-items: center; margin-bottom: 5px; }
.ct-fieldrow label { margin: 0 !important; font-size: 12px !important; }
.ct-fieldrow input, .ct-fieldrow select, .ct-fieldrow textarea { margin: 0 !important; }
.ct-fieldrow textarea { font: inherit; font-size: 13px; line-height: 1.45; resize: vertical; min-height: 44px; }
/* per-contract amendments (editor) */
.ct-amend-row { display: grid; grid-template-columns: 34px 1fr 28px; gap: 6px 8px; align-items: center; margin: 0 0 10px; padding: 8px 10px; border: 1px dashed var(--hair); border-radius: 10px; }
.ct-amend-row .cta-n { font-size: 11px; font-weight: 700; color: var(--gold-bright); }
.ct-amend-row input, .ct-amend-row textarea { margin: 0 !important; font: inherit; font-size: 13px; }
.ct-amend-row textarea { grid-column: 2 / 4; resize: vertical; line-height: 1.45; min-height: 60px; }
/* per-contract amendments (the document page) */
.ct-amend { margin: 0 0 12px; text-align: left; }
.ct-amend-t { font-weight: 700; margin-bottom: 3px; }
.ct-amend-x { padding-left: 22px; }
.ct-fieldrow label small { display: block; font-size: 10.5px; color: var(--text-dim); font-weight: 400; margin-top: 1px; }
@media (max-width: 640px) { .ct-fieldrow { grid-template-columns: 1fr; } }

/* Selections: manual approval override (v1.1.79) */
.co-client-row .coc-status .coc-manual-ok, .coc-manual-ok { color: #e0c274; }
.coc-manual { font: inherit; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 8px; border: 1px solid rgba(212,175,95,0.5); background: none; color: #e0c274; cursor: pointer; white-space: nowrap; align-self: center; }
.coc-manual:hover { background: rgba(212,175,95,0.12); }
.sel-manual { border: 1px solid rgba(212,175,95,0.5); background: rgba(212,175,95,0.06); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.sel-manual-h { font-weight: 600; font-size: 13.5px; color: var(--text-hi); margin-bottom: 4px; }
.sel-manual-hint { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin: 0 0 8px; }
.sel-manual textarea { width: 100%; box-sizing: border-box; }
.sel-manual .nc-actions { margin-top: 8px; }
.slp-sigmanual { font-size: 10.5px; line-height: 1.45; color: #222; border: 1px solid #b89a52; border-left: 4px solid #b89a52; padding: 6px 9px; margin: 4px 0 6px; background: #faf6ec; min-height: 40px; }
.slp-appr .slp-sigmanual { max-width: 320px; }
@media print { .slp-sigmanual { background: #fff; } }
.coc-decline { color: #e88b86; border-color: rgba(191,54,54,0.5); margin-left: 4px; }
.coc-decline:hover { background: rgba(191,54,54,0.12); }
