/* The pilot's receipt: one sheet a little whiter than the page, set as a fine firm sets an invoice.
   Ink for every line, a dotted leader to each amount, and Syneos orange for the total alone,
   deepened a little from the brand's own so it reads on paper at 3.5:1. */
.receipt {
  --r-ink: var(--dark, #07080A);
  --r-soft: rgba(7, 8, 10, .74);
  --r-muted: rgba(7, 8, 10, .56);
  --r-hair: rgba(7, 8, 10, .12);
  --r-rule: rgba(7, 8, 10, .5);
  --r-dot: rgba(7, 8, 10, .34);
  --r-total: var(--accent-2, #FF671F);
  --r-gap: 14px;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: clamp(36px, 5vw, 56px) clamp(28px, 5vw, 56px) clamp(32px, 4.4vw, 46px);
  background: #FBFAF7;
  color: var(--r-ink);
  border: 1px solid rgba(7, 8, 10, .085);
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 1px 2px rgba(7, 8, 10, .04),
    0 28px 56px -34px rgba(7, 8, 10, .16),
    0 80px 140px -64px rgba(7, 8, 10, .16);
  font: 400 16px/1.45 var(--text, "Inter", system-ui, sans-serif);
  font-feature-settings: "cv11";
  color-scheme: light;
  text-align: left;
}
@supports (color: color-mix(in srgb, red, blue)) { .receipt { --r-total: color-mix(in srgb, var(--accent-2, #FF671F) 88%, #000); } }
.receipt * { box-sizing: border-box; }

/* the head: what is billed, and for how long */
.receipt .receipt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; margin: 0 0 6px; padding: 0 0 22px; border-bottom: 1px solid var(--r-hair); }
.receipt .receipt-title { font: 400 11.5px/1.3 "Theasi Caps", var(--text, sans-serif); letter-spacing: .22em; text-transform: uppercase; color: var(--r-ink); }
.receipt .receipt-term { font-size: 13px; line-height: 1.4; color: var(--r-muted); }

/* a line: its description, the leader, Est. where it is one, its amount on the description's last
   baseline, the detail under; tabular figures for amounts alone, so the words keep their own spacing */
.receipt .receipt-lines { list-style: none; margin: 0; padding: 0; }
.receipt .receipt-line,
.receipt .receipt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 0; align-items: baseline; align-items: last baseline; }
.receipt .receipt-line { padding: 15px 0 14px; }
.receipt .receipt-d { grid-area: 1 / 1; margin: 0 var(--r-gap) 0 0; color: var(--r-ink); overflow: hidden; overflow: clip; text-wrap: balance; }
/* the leader: a run of fine dots that takes no room on the line, so it starts where the words end
   and is cut off where the amount's column begins */
.receipt .receipt-d::after { content: ""; display: inline-block; width: 2000px; height: 1px; margin: 0 -2012px 0 12px; vertical-align: baseline;
  background: linear-gradient(90deg, var(--r-dot) 0 1px, transparent 1px) 0 0 / 5px 1px repeat-x; }
.receipt .receipt-note { grid-area: 2 / 1; margin: 4px 0 0; max-width: 48ch; font-size: 13px; line-height: 1.5; color: var(--r-muted); text-wrap: pretty; }
.receipt .receipt-amt { grid-area: 1 / 3; margin: 0; text-align: right; white-space: nowrap; font-weight: 500; color: var(--r-ink); font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "tnum"; }
.receipt .receipt-est { grid-area: 1 / 2; margin: 0 10px 0 0; font: 400 10px/1 "Theasi Caps", var(--text, sans-serif); letter-spacing: .2em; text-transform: uppercase; color: var(--r-muted); white-space: nowrap; }
.receipt .receipt-est abbr { text-decoration: none; border: 0; cursor: default; }

/* the double rule under the last line */
.receipt .receipt-dbl { display: grid; gap: 3px; margin: 10px 0 12px; }
.receipt .receipt-dbl i { display: block; height: 1px; background: var(--r-rule); transform-origin: 0 50%; }

/* the sums */
.receipt .receipt-sums { margin: 0; }
.receipt .receipt-row { padding: 9px 0; }
.receipt .receipt-row dd { margin: 0; }
.receipt .receipt-list .receipt-d,
.receipt .receipt-list .receipt-amt { font-weight: 500; }
.receipt .receipt-credit .receipt-d,
.receipt .receipt-credit .receipt-amt { color: var(--r-soft); font-weight: 400; }
.receipt .receipt-total { margin-top: 12px; padding: 8px 0 16px; }
.receipt .receipt-total .receipt-d { font-weight: 600; }
.receipt .receipt-total .receipt-amt { font: 600 34px/1 var(--display, "Inter Tight", sans-serif); letter-spacing: -.025em; color: var(--r-total); font-feature-settings: "tnum"; }
.receipt .receipt-heavy { display: block; height: 2px; background: var(--r-ink); transform-origin: 0 50%; }

/* when it is paid */
.receipt .receipt-pay { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; line-height: 1.5; color: var(--r-muted); }
.receipt .receipt-pay-amt { display: inline-block; min-width: 6.4em; font-weight: 500; color: var(--r-soft); font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "tnum"; }

.receipt .receipt-foot { margin: 40px 0 0; padding: 16px 0 0; border-top: 1px solid var(--r-hair); font-size: 12.5px; line-height: 1.55; color: var(--r-muted); text-wrap: pretty; }

/* the phone: its own setting, the head stacked, every detail at full width, Est. under its amount
   beside its arithmetic */
@media (max-width: 559px) {
  .receipt { --r-gap: 12px; padding: 30px 20px 26px; }
  .receipt .receipt-head { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 18px; }
  .receipt .receipt-line { padding: 13px 0 12px; }
  .receipt .receipt-d::after { margin: 0 -2008px 0 8px; }
  .receipt .receipt-note { grid-column: 1 / -1; max-width: none; margin-top: 5px; align-self: baseline; }
  .receipt .is-est .receipt-note { grid-column: 1 / 3; }
  .receipt .receipt-est { grid-area: 2 / 3; justify-self: end; align-self: baseline; margin: 5px 0 0 12px; font-size: 9.5px; }
  .receipt .receipt-total { margin-top: 10px; }
  .receipt .receipt-total .receipt-amt { font-size: 30px; }
  .receipt .receipt-pay { margin-top: 16px; font-size: 13.5px; }
  .receipt .receipt-pay li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .4em; }
  .receipt .receipt-pay-amt { min-width: 0; }
  .receipt .receipt-foot { margin-top: 32px; }
}

@media print {
  .receipt { box-shadow: none; border-color: rgba(7, 8, 10, .3); }
  .receipt .receipt-line, .receipt .receipt-row, .receipt .receipt-pay li, .receipt .receipt-foot,
  .receipt .receipt-dbl i, .receipt .receipt-heavy { opacity: 1 !important; transform: none !important; }
}

/* facts that belong together sit side by side, set apart by a hairline, never by commas. Every
   part carries its hairline on its left; the strip to the left of the text is clipped away, so a
   part that wraps to the start of a line never shows one */
.receipt .facet-row { margin-left: -1.1em; clip-path: inset(0 0 0 1.1em); }
.receipt .facet-row > .facet { display: inline-block; position: relative; margin-left: .55em; padding-left: .55em; }
.receipt .facet-row > .facet::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: .8em; transform: translateY(-50%); background: currentColor; opacity: .3; }
