:root{
  color-scheme:light;
  --forest:#243d34;--forest-2:#315449;--sage:#e8efe8;--paper:#f4f6f2;--white:#fff;
  --brand-green:#217c2c;--brand-gold:#e0c22e;--brand-red:#bd3b46;
  --ink:#1d2823;--muted:#68766e;--line:#dfe6df;--amber:#8c6619;--amber-soft:#f8f1df;
  --red:#a7483f;--red-soft:#fbefed;--radius:14px;
  font-family:'DM Sans','Segoe UI',Arial,sans-serif;font-synthesis:none;
}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.5}
button,input,select{font:inherit}
button{cursor:pointer}
a{color:inherit}
.skip-link{position:absolute;left:16px;top:-60px;z-index:10;padding:10px 14px;background:#fff;color:var(--forest);border-radius:8px}
.skip-link:focus{top:12px}
.workspace-bar{height:60px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 clamp(18px,5vw,70px);background:#fff;border-bottom:1px solid var(--line)}
.back-link{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--forest);font-size:12px;font-weight:700}
.back-link:hover{text-decoration:underline}
.workspace-label{display:flex;align-items:center;gap:8px;color:#768379;font-size:9px;font-weight:700;letter-spacing:.12em}
.workspace-dot{width:7px;height:7px;border-radius:50%;background:#6c9c76}
.page-shell{width:min(1120px,calc(100% - 36px));margin:0 auto;padding:34px 0 58px}
.page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;margin:0 2px 19px}
.eyebrow{margin:0 0 6px;color:var(--forest-2);font-size:9px;font-weight:800;letter-spacing:.15em;text-transform:uppercase}
h1,h2,h3,p{margin-top:0}
h1{margin-bottom:6px;color:#1d3027;font:800 clamp(25px,3vw,33px)/1.2 'Segoe UI',Arial,sans-serif;letter-spacing:-.045em}
.intro-copy{max-width:630px;margin:0;color:var(--muted);font-size:12px}
.page-actions{display:flex;gap:8px;flex:none}
.button{min-height:39px;display:inline-flex;align-items:center;justify-content:center;padding:0 15px;border:1px solid transparent;border-radius:9px;font-size:11px;font-weight:700;transition:background .15s,border-color .15s,transform .12s}
.button:active{transform:translateY(1px)}
.button-primary{background:var(--forest);color:#fff}
.button-primary:hover:not(:disabled){background:var(--forest-2)}
.button-secondary{background:#fff;border-color:var(--line);color:#415046}
.button-secondary:hover:not(:disabled){background:#f4f7f3}
.button-quiet{background:transparent;color:var(--forest)}
.button-quiet:hover{background:var(--sage)}
.button:disabled{cursor:not-allowed;opacity:.48}
.session-note{display:flex;align-items:flex-start;gap:10px;margin:0 2px 19px;padding:12px 14px;border:1px solid #e5dcc1;border-radius:10px;background:#fbf8ef;color:#5b553f;font-size:10px}
.session-note p{margin:0}.session-note strong{color:#3f473d}
.note-icon{display:grid;place-items:center;flex:none;width:18px;height:18px;border-radius:50%;background:#eee2bf;color:#6c571c;font-size:11px;font-weight:800}
.signing-steps{display:flex;align-items:center;gap:12px;overflow:auto;margin:0 3px 18px;color:#65736a;font-size:9px;font-weight:600;white-space:nowrap}
.signing-steps span{display:flex;align-items:center;gap:6px}
.signing-steps b{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#e6ece6;color:var(--forest);font-size:9px}
.signing-steps i{width:24px;height:1px;background:#d7dfd8}
.receipt-paper{position:relative;overflow:hidden;padding:0 34px 24px;border:1px solid #dfe5df;border-radius:16px;background:var(--white);box-shadow:0 14px 40px rgba(28,48,38,.07)}
.receipt-accent{height:6px;margin:0 -34px;background:linear-gradient(90deg,var(--brand-green) 0%,#5a9c43 48%,var(--brand-gold) 78%,var(--brand-red) 100%)}
.receipt-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 -34px;padding:18px 34px;background:linear-gradient(115deg,#193e2c 0%,#24583a 100%);border-bottom:3px solid var(--brand-gold);color:#fff}
.brand-lockup{display:flex;align-items:center;justify-content:center;width:min(480px,58%);min-height:88px;padding:5px 10px;border:1px solid rgba(255,255,255,.35);border-radius:11px;background:#fff}
.brand-logo{display:block;width:100%;max-height:92px;object-fit:contain}
.receipt-title-block{text-align:right}
.receipt-title-block .eyebrow{margin-bottom:3px;color:#f0d95a;font-size:8px}
.receipt-title-block h2{margin:0;color:#fff;font:800 24px/1.2 'Segoe UI',Arial,sans-serif;letter-spacing:-.04em}
.currency-note{margin:5px 0 0;color:#d9e8dc;font-size:10px}
.receipt-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 18px;padding:20px 0 22px;border-bottom:1px solid var(--line)}
.field{display:grid;align-content:start;gap:5px;min-width:0}
.field-wide{grid-column:1/-1}
.field label,.signature-label{color:#47564c;font-size:10px;font-weight:700}
.optional{color:#839087;font-size:8px;font-weight:500}
.field input,.field select{width:100%;min-width:0;min-height:38px;padding:8px 10px;border:1px solid #d7dfd8;border-radius:8px;background:#fff;color:#243128;font-size:12px}
.field input::placeholder{color:#a0aaa2}
.field input:focus,.field select:focus,.money-input input:focus{outline:3px solid #a7c9ad;outline-offset:1px;border-color:#6a9472}
.field input[readonly]{background:#f7f8f6;color:#506057}
.field-error{display:none;margin:0;color:var(--red);font-size:9px;font-weight:600}
.field.invalid .field-error,.field-error.visible{display:block}
.receipt-section{padding:21px 0;border-bottom:1px solid var(--line)}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.section-heading h3{margin:0;color:#26372d;font-size:15px;font-weight:750;letter-spacing:-.02em}
.section-heading .eyebrow{margin-bottom:3px;font-size:8px}
.text-button{padding:3px 0;border:0;background:transparent;color:#315d40;font-size:10px;font-weight:800}
.text-button:hover{text-decoration:underline}
.table-scroll{overflow-x:auto}
.items-table{width:100%;border-collapse:collapse;text-align:left}
.items-table th{padding:9px 8px;color:#738174;font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;border-bottom:1px solid var(--line)}
.items-table th:first-child,.items-table td:first-child{padding-left:0}
.items-table th:nth-child(2){width:68px}
.items-table th:nth-child(3){width:150px}
.items-table th:nth-child(4){width:135px;text-align:right}
.items-table th:last-child{width:38px}
.items-table td{padding:9px 8px;border-bottom:1px solid #edf1ed;vertical-align:middle}
.items-table tbody tr:last-child td{border-bottom:0}
.items-table input{width:100%;min-width:0;min-height:36px;padding:7px 8px;border:1px solid #dce3dc;border-radius:7px;background:#fff;color:#25332b;font-size:11px}
.items-table input:focus{outline:3px solid #a7c9ad;outline-offset:1px;border-color:#6a9472}
.items-table .item-name{min-width:180px}
.items-table .item-qty{min-width:55px;text-align:center}
.items-table .item-price{min-width:104px;text-align:right;font-variant-numeric:tabular-nums}
.items-table tr.item-invalid input{border-color:#c97c73;background:#fff9f8}
.items-table td:nth-child(4){text-align:right;color:#33463a;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.remove-row{width:30px;height:30px;border:1px solid #eadfdd;border-radius:7px;background:#fff;color:#9b5148;font-size:15px}
.remove-row:hover{background:var(--red-soft)}
.table-error{margin-top:7px}
.totals-section{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(270px,.8fr);gap:35px;padding:22px 0;border-bottom:1px solid var(--line)}
.compact-heading{margin-bottom:13px}
.payment-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.payment-hint{margin:12px 0 0;color:#77847a;font-size:9px}
.payment-warning{margin-top:6px}
.amount-panel{align-self:start;padding:16px 17px;border:1px solid #dce8dc;border-radius:12px;background:#f5f9f4}
.amount-row,.amount-input-row{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:32px;color:#536157;font-size:10px}
.amount-row output{color:#2b3e32;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.amount-input-row label{font-size:10px}
.money-input{display:flex;align-items:center;width:142px;min-height:30px;padding-left:9px;border:1px solid #d8e0d9;border-radius:7px;background:#fff;color:#536f58;font-size:10px;font-weight:700}
.money-input input{width:100%;min-width:0;padding:5px 8px 5px 3px;border:0;border-radius:7px;background:transparent;color:#27372d;text-align:right;font-size:10px;font-variant-numeric:tabular-nums}
.total-row{margin-top:5px;padding:10px 0;border-top:1px solid #dfe6df;border-bottom:1px solid #dfe6df;color:#25372c;font-size:12px;font-weight:800}
.total-row output{color:#234832;font-size:16px;font-weight:800}
.balance-row{padding-top:4px}
.change-row{color:#315d40}
.signature-section{padding-bottom:23px;border-bottom:0}
.signature-order{padding:5px 9px;border-radius:999px;background:#edf4ed;color:#45684c;font-size:8px;font-weight:700;white-space:nowrap}
.acknowledgment{max-width:730px;margin:-3px 0 16px;color:#68766e;font-size:10px}
.signature-grid{display:grid;grid-template-columns:minmax(0,1fr);max-width:720px;gap:14px}
.signature-card{min-width:0;margin:0;padding:15px;border:1px solid #dfe6df;border-radius:12px;background:#f7faf6}
.signature-card legend{padding:0 6px;color:#2d3e33;font-size:10px;font-weight:800}
.sign-number{display:inline-grid;place-items:center;width:19px;height:19px;margin-right:5px;border-radius:50%;background:#e7eee7;color:#315740;font-size:9px}
.customer-signature-option{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,1fr);align-items:end;gap:18px;max-width:720px;margin-top:14px;padding:13px 15px;border:1px dashed #d2ddd2;border-radius:11px;background:#fbfcfa}
.customer-signature-option .eyebrow{margin-bottom:3px;color:#748275;font-size:7px}
.customer-signature-option h3{margin:0 0 3px;color:#33453a;font-size:12px}
.customer-signature-option p:not(.eyebrow){margin:0;color:#68766e;font-size:8px;line-height:1.45}
.optional-signature-lines{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:14px}
.optional-signature-line{display:flex;min-width:0;flex-direction:column-reverse;gap:4px;color:#69776c;font-size:8px}
.optional-signature-line div{height:38px;border-bottom:1px solid #aeb9ae}
.signer-name-field{margin-bottom:10px}
.signer-spacer{height:70px}
.signature-label{display:block;margin-bottom:4px}
.signature-help{margin:0 0 7px;color:#839087;font-size:8px}
.signature-pad{display:block;width:100%;height:116px;border:1px dashed #bfcbbf;border-radius:7px;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,#e3e9e3 50%,transparent 50%) border-box;touch-action:none;cursor:crosshair}
.signature-card[disabled] .signature-pad{background-color:#f4f6f3;cursor:not-allowed;opacity:.58}
.signature-controls{display:flex;justify-content:space-between;gap:8px;margin-top:8px}
.signature-controls .button{min-height:32px;padding:0 10px;font-size:9px}
.signed-at{min-height:15px;margin:6px 0;color:#718075;font-size:8px}
.signed-at.is-signed{color:#32613d;font-weight:700}
.sign-confirm{display:flex;align-items:flex-start;gap:8px;margin-top:4px;color:#4d5c51;font-size:9px;line-height:1.45}
.sign-confirm input{width:15px;height:15px;flex:none;margin:0;accent-color:#315b42}
.signature-card[disabled] .sign-confirm{opacity:.58}
.signature-error{margin-top:12px;padding:10px 12px;border:1px solid #efceca;border-radius:8px;background:var(--red-soft);color:#8e3f37;font-size:10px}
.receipt-footer{padding:15px 16px;border-radius:10px;background:#f4f7f3;color:#66736a;text-align:center;font-size:9px}
.receipt-footer p{margin:0 0 5px}
.receipt-footer p:last-child{margin:8px 0 0}
.receipt-footer strong{color:#35483a;font-size:10px}
.receipt-footnote{color:#88938b;font-size:8px}
.bottom-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:15px 3px 0}
.receipt-status{margin:0;color:#68766e;font-size:10px}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:focus-visible{outline:3px solid #8cbb9b;outline-offset:2px}
@media(max-width:850px){
  .page-intro{align-items:flex-start;flex-direction:column}
  .page-actions{width:100%;justify-content:flex-start}
  .receipt-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  .totals-section{grid-template-columns:1fr;gap:22px}
  .amount-panel{max-width:440px;width:100%;justify-self:end}
}
@media(max-width:580px){
  .workspace-bar{height:52px;padding:0 16px}.workspace-label{font-size:0}.workspace-dot{width:8px;height:8px}
  .page-shell{width:calc(100% - 22px);padding:23px 0 38px}
  .page-actions{display:grid;grid-template-columns:1fr 1.4fr}
  .button{padding:0 10px;font-size:10px}
  .signing-steps{gap:8px}.signing-steps i{width:12px}
  .receipt-paper{padding:0 15px 16px;border-radius:12px}
  .receipt-accent{margin:0 -15px 18px}
  .receipt-heading{align-items:flex-start;flex-direction:column;gap:11px;margin:0 -15px;padding:14px 15px}
  .brand-lockup{width:min(390px,100%);min-height:78px;padding:4px 7px;border-radius:8px}.brand-logo{max-height:82px}
  .receipt-title-block{text-align:left}.receipt-title-block h2{font-size:19px}.receipt-title-block .eyebrow{font-size:7px}.currency-note{font-size:9px}
  .receipt-meta{gap:11px 10px;padding:16px 0}.field label{font-size:8px}.field input,.field select{min-height:34px;padding:7px;font-size:10px}
  .items-table{min-width:650px}.items-table th:first-child,.items-table td:first-child{padding-left:0}
  .totals-section{gap:18px;padding:18px 0}.payment-grid{grid-template-columns:1fr}
  .signature-grid{grid-template-columns:1fr}
  .customer-signature-option{grid-template-columns:1fr;gap:11px;margin-top:11px;padding:12px}
  .optional-signature-lines{grid-template-columns:minmax(0,1fr) 85px;gap:12px}
  .signature-card{padding:12px}.signature-pad{height:108px}
  .bottom-actions{align-items:flex-start;flex-direction:column}.bottom-actions .button{width:100%;min-height:40px}
}
@media print{
  @page{size:A4 portrait;margin:11mm}
  body{background:#fff;font-size:10pt;color:#17241c;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .workspace-only,.workspace-bar,.page-intro,.session-note,.signing-steps,.bottom-actions,.text-button,.remove-row,.signature-controls,.skip-link{display:none!important}
  .page-shell{width:100%;margin:0;padding:0}
  .receipt-paper{overflow:visible;padding:0 8mm 7mm;border:0;border-radius:0;box-shadow:none}
  .receipt-accent{height:4px;margin:0 -8mm 6mm}
  .receipt-heading{padding-bottom:4mm}
  .receipt-heading{margin:0 -8mm;padding:3mm 8mm;min-height:29mm;background:#193e2c!important;border-bottom:1mm solid var(--brand-gold)}
  .brand-lockup{width:92mm;min-height:0;padding:1mm 2mm;border-radius:2mm}
  .brand-logo{max-height:22mm}
  .receipt-title-block h2{font-size:16pt}.receipt-title-block .eyebrow,.currency-note{font-size:6.5pt}
  .receipt-meta{gap:3mm 5mm;padding:4mm 0}
  .field{gap:1mm}.field label,.signature-label{font-size:7pt}
  .field input,.field select,.items-table input,.money-input input{min-height:0;height:auto;padding:0;border:0;border-radius:0;background:transparent;color:#18251d;font-size:8pt;appearance:none;-webkit-appearance:none;box-shadow:none}
  .field input[readonly]{background:transparent}
  .optional{display:none}
  .field-error,.table-error,.payment-warning{display:none!important}
  .receipt-section{padding:4mm 0}
  .section-heading{margin-bottom:2mm}.section-heading h3{font-size:10pt}
  .items-table th{padding:1.5mm 1mm;font-size:6pt}.items-table td{padding:1.5mm 1mm}
  .items-table th:nth-child(2){width:12mm}.items-table th:nth-child(3){width:28mm}.items-table th:nth-child(4){width:28mm}
  .items-table .item-name,.items-table .item-qty,.items-table .item-price{min-width:0}
  .items-table td:nth-child(4){font-size:7.5pt}
  .totals-section{grid-template-columns:1.1fr .9fr;gap:7mm;padding:4mm 0}
  .payment-grid{gap:2mm 3mm}.payment-hint{margin-top:2mm;font-size:6.5pt}
  .amount-panel{padding:3mm;border-radius:2mm}.amount-row,.amount-input-row{min-height:6mm;font-size:7pt}.amount-row output{font-size:7pt}
  .money-input{width:34mm;min-height:0;padding:0;border:0;background:transparent}.total-row{padding:2mm 0}.total-row output{font-size:10pt}
  .signature-section{padding:4mm 0}
  .acknowledgment{margin:0 0 2mm;font-size:7pt}
  .signature-grid{gap:3mm}.signature-card{padding:2.5mm;border-radius:2mm;break-inside:avoid}
  .customer-signature-option{grid-template-columns:1.1fr .9fr;gap:5mm;max-width:none;margin-top:3mm;padding:2.5mm 3mm;border-radius:2mm;background:#fff!important;break-inside:avoid}
  .customer-signature-option .eyebrow{margin-bottom:1mm;font-size:5.5pt}
  .customer-signature-option h3{margin-bottom:1mm;font-size:8pt}
  .customer-signature-option p:not(.eyebrow){font-size:6pt}
  .optional-signature-lines{grid-template-columns:minmax(0,1fr) 28mm;gap:4mm}
  .optional-signature-line{gap:1mm;font-size:6pt}
  .optional-signature-line div{height:12mm}
  .signature-card legend{font-size:7.5pt}.sign-number{width:14px;height:14px;font-size:7pt}
  .signer-name-field{margin-bottom:2mm}.signer-spacer{height:13mm}
  .signature-help{margin-bottom:1mm;font-size:6pt}.signature-pad{height:21mm;border:0;border-bottom:1px solid #aab6aa;border-radius:0;background:#fff}
  .signature-card[disabled]{opacity:1}.signature-card[disabled] .signature-pad,.signature-card[disabled] .sign-confirm{opacity:1;background:#fff}
  .signed-at{min-height:0;margin:1.5mm 0;font-size:6pt}.sign-confirm{margin-top:1mm;font-size:6pt}.sign-confirm input{width:10px;height:10px}
  .receipt-footer{padding:3mm;border-radius:2mm;font-size:6.5pt}.receipt-footer strong{font-size:7pt}.receipt-footer p{margin-bottom:1mm}.receipt-footnote{font-size:6pt}
  .signature-error{display:none!important}
}

/* Standalone handoff package has no parent workspace to return to. */.workspace-bar{display:none}

