/* The printed remisión. Screen prefix py-note-. Prints on half-letter (media carta). */
.py-screen.py-note.py-note-wrap { min-height: 100dvh; display: grid; justify-items: center; align-content: start; gap: var(--py-5); padding: var(--py-5) var(--py-4) var(--py-8); }
.py-screen.py-note .py-note-bar { width: min(100%, 36rem); display: flex; flex-wrap: wrap; gap: var(--py-2) var(--py-3); align-items: center; }
.py-screen.py-note .py-note-bar a:first-child { margin-inline-end: auto; }
.py-screen.py-note .py-note {
  width: min(100%, 36rem); /* half-letter proportions: 5.5 × 8.5 in */
  aspect-ratio: 5.5 / 8.5;
  background: oklch(0.995 0.002 250); color: oklch(0.25 0.04 262);
  box-shadow: var(--py-shadow-sheet);
  padding: 2.2rem 2.2rem 1.8rem;
  display: grid; grid-template-rows: auto auto 1fr auto auto; gap: var(--py-4);
  position: relative;
  --py-print: oklch(0.43 0.12 258);
}
.py-screen.py-note .py-note-lh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--py-3); align-items: start; padding-bottom: var(--py-3); border-bottom: 2px solid var(--py-print); color: var(--py-print); }
.py-screen.py-note .py-note-lh .py-note-name { font-family: var(--py-f-display); font-stretch: 122%; font-weight: 820; font-size: 1.45rem; line-height: 1.05; }
.py-screen.py-note .py-note-lh .py-note-addr { font-size: 0.72rem; line-height: 1.4; margin-top: 3px; }
.py-screen.py-note .py-note-lh .py-note-doc { text-align: end; display: grid; gap: 2px; justify-items: end; }
.py-screen.py-note .py-note-lh .py-note-doc b { font-family: var(--py-f-display); font-stretch: 122%; font-weight: 700; font-size: 0.9rem; border: 1.5px solid currentColor; padding: 0.1em 0.5em; border-radius: 2px; }
.py-screen.py-note .py-note-lh .py-folio { font-size: 1.7rem; }
.py-screen.py-note .py-note-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, auto); gap: 2px var(--py-3); font-size: 0.8rem; }
.py-screen.py-note .py-note-who dt { color: var(--py-print); font-weight: 600; }
.py-screen.py-note .py-note-who dd { margin: 0; font-weight: 600; border-bottom: 1px solid var(--py-ruling); }
.py-screen.py-note .py-note-lines { width: 100%; border-collapse: collapse; font-size: 0.8rem; font-variant-numeric: tabular-nums; align-self: start; }
.py-screen.py-note .py-note-lines th { text-align: start; color: var(--py-print); font-family: var(--py-f-display); font-stretch: 80%; font-weight: 650; border-bottom: 1.5px solid var(--py-print); padding: 0.3rem 0.2rem; }
.py-screen.py-note .py-note-lines td { padding: 0.35rem 0.2rem; border-bottom: 1px solid var(--py-ruling); vertical-align: baseline; }
.py-screen.py-note .py-note-lines .py-note-r { text-align: end; }
.py-screen.py-note .py-note-lines .py-note-free { --py-casl: 1; }
.py-screen.py-note .py-note-tot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--py-4); align-items: center; font-size: 0.8rem; }
.py-screen.py-note .py-note-tot dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 2px var(--py-4); align-items: baseline; }
.py-screen.py-note .py-note-tot dt { color: var(--py-print); text-align: end; }
.py-screen.py-note .py-note-tot dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 5.5rem; }
.py-screen.py-note .py-note-tot .py-note-total { font-family: var(--py-f-display); font-stretch: 70%; font-weight: 750; font-size: 1.35rem; border-top: 2px solid currentColor; padding-top: 2px; }
.py-screen.py-note .py-note-tot .py-note-pay { font-size: 0.75rem; color: var(--py-print); }
.py-screen.py-note .py-note-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--py-5); font-size: 0.68rem; color: var(--py-print); align-items: end; }
.py-screen.py-note .py-note-sign { border-top: 1px solid currentColor; padding-top: 3px; text-align: center; }
.py-screen.py-note .py-note .py-stamp.py-note-big { position: absolute; inset: 52% auto auto 50%; translate: -50% 0; font-size: 1.15rem; padding: 0.25em 0.7em 0.2em; border-width: 4px; rotate: -12deg; opacity: 0.88; }


@media (max-width: 30rem) { .py-screen.py-note .py-note { aspect-ratio: auto; padding: 1.4rem 1.1rem; } .py-screen.py-note .py-note-who { grid-template-columns: auto minmax(0, 1fr); } }
/* Half-letter is the note's own page, named: every sheet loads on every screen. */
@page py-note { size: 5.5in 8.5in; margin: 0.35in; }
.py-screen.py-note.py-note-wrap { page: py-note; }
@media print {
  .py-screen.py-note.py-note-wrap { padding: 0; min-height: 0; }
  .py-screen.py-note .py-note-bar { display: none !important; }
  .py-screen.py-note .py-note { width: 100%; box-shadow: none; padding: 0; aspect-ratio: auto; min-height: 7.7in; }
}

/* ---------- What the product draws beyond the design ---------- */

/* The note is printed from the shell: the desk under the sheet, the bar names the note. */
.py-screen.py-note.py-page.py-note-wrap { background: var(--py-desk); }
.py-screen.py-note .py-note-title { font-family: var(--py-f-display); font-stretch: 112%; font-weight: 750; font-size: var(--py-s-1); }
/* An order's page reads as its note, on screen: the same lines and totals on a sheet,
   its payments and what may be done with it below. */
.py-screen.py-note .py-note-sheet { display: grid; gap: var(--py-4); max-width: 48rem; }
.py-screen.py-note .py-note-payments { list-style: none; margin: 0; padding: 0; display: grid; }
.py-screen.py-note .py-note-payments li { display: flex; justify-content: space-between; gap: var(--py-3); padding: var(--py-2) 0; border-bottom: 1px solid var(--py-ruling); }
.py-screen.py-note .py-note-pay-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--py-3); }
.py-screen.py-note .py-note-pay-form .py-error-text { flex-basis: 100%; }
.py-screen.py-note .py-note-acts { display: flex; flex-wrap: wrap; gap: var(--py-3); }

@media print {
  .py-screen.py-note.py-page.py-note-wrap { background: none; }
  .py-screen.py-note .py-note + .py-note { break-before: page; }
}
