/* The pay page (the "Pay page" boards, approved 2026-10-21): the app's own parts on white. A slim bar
   with ODD01 in the middle; what's owed on the left in large SF Mono, how to pay on the right (stacked
   on a phone, where the lines come after the way to pay); a receipt once paid. Colour only with words:
   red for overdue, green for paid. */
:root {
  color-scheme: light;
  --ink: #1a1a1a; --ink-2: #404040; --mute: #737373; --faint: #a3a3a3;
  --tint: rgba(20, 20, 40, .035); --tint-2: rgba(20, 20, 40, .055); --tint-3: rgba(20, 20, 40, .08);
  --hover: rgba(20, 20, 40, .045); --on: rgba(20, 20, 40, .06); --rule: rgba(20, 20, 40, .07);
  --card: rgba(20, 20, 40, .028);
  --green-ink: #15803d; --red-ink: #b91c1c;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --disp: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 13.5px; line-height: 20px;
  letter-spacing: -.005em; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.quiet { color: var(--mute); font-size: 13.5px; }
.center { text-align: center; padding: 48px 16px; }
.money { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* The bar: ODD01 in the middle, Download PDF or Receipt at the right */
.bar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 56px; padding: 0 24px; background: rgba(255, 255, 255, .96); }
.bar .mid { display: flex; justify-content: center; color: var(--ink); }
.bar .mid svg { width: 72px; height: auto; display: block; }
.bar .end { display: flex; justify-content: flex-end; }
.gb { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--mute); white-space: nowrap; }
.gb svg { color: var(--faint); }
.gb:hover { background: var(--hover); color: var(--ink); }

/* Buttons and chips: soft tints, never outlined */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px;
  background: var(--tint); font-size: 13.5px; white-space: nowrap; color: var(--ink); }
.btn svg { color: var(--mute); flex-shrink: 0; }
.btn:hover { background: var(--tint-2); }
.btn:active { background: var(--tint-3); }
.btn.pri { background: var(--tint-2); font-weight: 500; }
.btn.pri svg { color: var(--ink); }
.btn.pri:hover, .btn.pri:active { background: var(--tint-3); }
.btn.done svg { color: var(--green-ink); }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.n { background: var(--tint-2); color: var(--mute); }
.chip.r { background: rgba(220, 38, 38, .09); color: var(--red-ink); }

/* What's owed (left) and how to pay (right); on a narrow screen one column: owed, pay, then the lines */
.wrap { max-width: 960px; margin: 0 auto; padding: 44px 24px 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "owe pay" "detail pay";
  grid-template-rows: auto 1fr; column-gap: 56px; align-items: start; }
.owe { grid-area: owe; }
.detail { grid-area: detail; }
.pay { grid-area: pay; }
.who { font-size: 13px; color: var(--mute); }
.lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); margin-top: 20px; }
.amt { font-family: var(--mono); font-size: 48px; line-height: 56px; letter-spacing: -.055em; font-variant-numeric: tabular-nums;
  margin: 2px 0 4px; color: var(--ink); overflow-wrap: anywhere; }
.sub { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.note { margin-top: 10px; font-size: 13px; line-height: 19px; color: var(--faint); }
.pb { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(20, 20, 40, .07); margin: 16px 0 8px; }
.pb i { display: block; height: 100%; background: #15803d; }
.lg { display: flex; gap: 16px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.lg .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: #15803d; }
.lg .money { color: var(--ink); margin-left: 4px; }
.lg .money.pos { color: var(--green-ink); }
.lg .left { margin-left: auto; }

/* The lines */
.lines { margin-top: 28px; display: flex; flex-direction: column; padding: 4px; border-radius: 14px; background: var(--card); }
.ln { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; font-size: 13.5px; }
.ln .w { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ln .w em { display: block; font-style: normal; font-size: 12px; color: var(--mute); }
.ln .q { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ln .money { font-size: 13px; color: var(--ink-2); min-width: 88px; text-align: right; white-space: nowrap; }
.ln.sum { min-height: 36px; }
.ln.sum .w, .ln.tot .w { color: var(--mute); }
.ln.rule { box-shadow: inset 0 1px 0 var(--rule); }
.ln.tot { min-height: 44px; }
.ln.tot .money { font-size: 15px; color: var(--ink); }
.from { margin-top: 14px; font-size: 12.5px; line-height: 18px; color: var(--faint); }

/* How to pay */
.pay { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 16px; background: var(--card); }
.ph { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 13.5px; color: var(--ink); }
.ph svg { color: var(--ink-2); }
.tabs { display: flex; gap: 2px; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; font-size: 13.5px; color: var(--mute); cursor: default; }
.tabs button svg { color: var(--faint); }
.tabs button.on { background: var(--on); color: var(--ink); }
.tabs button.on svg { color: var(--ink-2); }
.ep { margin: 0; font-size: 13.5px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.et { display: flex; flex-direction: column; padding: 2px 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 .5px rgba(20, 20, 40, .1); }
.et .r { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px 4px 14px; }
.et .r + .r { box-shadow: inset 0 1px 0 var(--rule); }
.et .w { flex: 1; min-width: 0; }
.et .w span { display: block; font-size: 12px; line-height: 16px; color: var(--mute); }
.et .w b { display: block; font-weight: 400; font-size: 14.5px; line-height: 20px; color: var(--ink); overflow-wrap: anywhere; }
.et .w b.money { font-size: 14px; }
.et .btn { height: 30px; font-size: 13px; padding: 0 10px; }
.fine { display: flex; gap: 8px; font-size: 12px; line-height: 17px; color: var(--faint); }
.fine svg { flex-shrink: 0; margin-top: 1px; }

/* A receipt, a cancelled invoice, a link that isn't working: one centred column */
.rc { max-width: 520px; margin: 0 auto; padding: 64px 24px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.well { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.well.g { background: rgba(22, 163, 74, .1); color: var(--green-ink); }
.well.n { background: var(--tint-2); color: var(--mute); }
h1 { margin: 16px 0 0; font-family: var(--disp); font-weight: 400; font-size: 28px; line-height: 34px; letter-spacing: -.02em; color: var(--ink); }
.rc .amt { margin-top: 10px; }
.rc .amt.gone { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 2px; }
.rc p { margin: 14px 0 0; max-width: 400px; font-size: 14px; line-height: 21px; color: var(--mute); }
.kv { width: 100%; margin-top: 26px; display: flex; flex-direction: column; padding: 4px 16px; border-radius: 14px; background: var(--card); text-align: left; }
.kv > div { display: flex; align-items: center; gap: 12px; min-height: 42px; font-size: 13.5px; }
.kv > div + div { box-shadow: inset 0 1px 0 rgba(20, 20, 40, .05); }
.kv > div > :first-child { color: var(--mute); flex-shrink: 0; }
.kv > div > :last-child { margin-left: auto; text-align: right; overflow-wrap: anywhere; }
.kv .money { font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.acts .btn { height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; }
.rc .fine { margin-top: 14px; justify-content: center; }

.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 72px 0 48px; font-size: 12px; color: var(--faint); }
.foot svg { color: var(--mute); }
.foot a { color: var(--mute); }
.foot a:hover { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; padding: 8px 14px;
  border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; white-space: nowrap; }

@media (max-width: 860px) {
  .wrap { max-width: 560px; }
  .two { grid-template-columns: minmax(0, 1fr); grid-template-areas: "owe" "pay" "detail"; grid-template-rows: none; row-gap: 22px; }
  .lines { margin-top: 0; }
}

@media (max-width: 640px) {
  .bar { height: 52px; padding: 0 10px 0 16px; }
  .bar .mid svg { width: 72px; }
  .wrap { padding: 22px 16px 0; }
  .amt { font-size: 40px; line-height: 46px; }
  .lbl { margin-top: 16px; }
  .sub { font-size: 13px; }
  .pay { padding: 14px; margin: 0 -4px; }
  .rc { padding: 56px 20px 0; }
  h1 { font-size: 24px; line-height: 30px; }
}

/* Download receipt prints the page: the receipt, without the buttons */
@media print {
  .bar { position: static; }
  .bar .end, .acts, .rc .fine, .pay, .toast { display: none !important; }
  .foot { padding-top: 40px; }
}
