/* The checkout slip: Stripe's fields on newsprint. Panes slide sideways inside a box that
   follows the height of the pane in view. */
dialog.pay .slip-in { position: relative; padding-top: 24px; }
.pay-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-right: 44px; }
.pay-top h2 { margin-bottom: 6px; }
.pay-amt { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 700; white-space: nowrap; }
.slip-in .pay-what { margin-bottom: 16px; color: var(--ink-soft); }
.pay-view { height: 0; overflow: hidden; transition: height 240ms var(--ease-out); }
.pay-track { display: flex; align-items: flex-start; transition: transform 320ms var(--ease-drawer); }
.pay-pane { flex: 0 0 100%; min-width: 0; display: grid; gap: 12px; padding: 2px 2px 14px; }
.pay-el { min-height: 48px; }
/* The email field, styled like Stripe's fields next to it (appearance "flat" in pay.js). */
.pay-label { display: block; font-size: 0.93em; color: var(--ink-soft); margin-bottom: -6px; }
.pay-input { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 17px; color: var(--ink); background: #FBF7EE; border: 1px solid var(--ink); border-radius: 0; }
.pay-input:focus { outline: none; box-shadow: 0 0 0 2px #A3221B; }
.pay-input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.pay-wide { width: 100%; }
.pay-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: var(--ink-soft); font-style: italic; }
.pay-or::before, .pay-or::after { content: ""; border-top: 1px solid var(--rule); }
.pay-bar { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.pay-bar b { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; outline: none; }
.pay-back { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.slip-in .pay-msg { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--ledger-red); color: var(--ledger-red); background: var(--newsprint-deep); }
.slip-in .pay-tos { margin: 4px 0 0; }
.pay-x { position: absolute; top: 18px; right: max(8px, calc(var(--gut) - 12px)); width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font-size: 1.25rem; cursor: pointer; }
dialog.pay[data-busy] .pay-x { visibility: hidden; }

/* Pay: pulses while Stripe confirms. .buy is a flex box, which drops the space before the total. */
[data-pay="go"] [data-pay="total"] { margin-left: 0.35em; }
[data-pay="go"]:disabled { cursor: progress; animation: pay-pulse 900ms var(--ease-in-out) infinite alternate; }
@keyframes pay-pulse { to { opacity: 0.55; } }

/* The order, under the price */
.pay-paid { display: flex; align-items: center; gap: 12px; font-size: 1.375rem; font-weight: 700; outline: none; }
.pay-check { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--newsprint); font-size: 1.25rem; }
.pay-steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 4px 0; padding: 0; text-align: center; font-size: var(--fs-label); color: var(--ink-soft); }
.pay-steps li { position: relative; display: grid; justify-items: center; gap: 6px; }
.pay-steps li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); background: var(--newsprint); z-index: 1; }
.pay-steps li + li::after { content: ""; position: absolute; top: 7px; right: 50%; width: 100%; height: 2px; background: var(--rule); }
.pay-steps .is-done { color: var(--ink); font-weight: 700; }
.pay-steps .is-done::before { background: var(--ink); border-color: var(--ink); }
.pay-steps li.is-done + li.is-done::after { background: var(--ink); }
/* the download list, self-contained: the front page does not load page.css */
.pay-files { min-height: 48px; border-top: 1px solid var(--ink); }
.pay-files a { display: flex; align-items: baseline; gap: 8px; min-height: 48px; padding: 12px 0 9px; border-bottom: 1px solid var(--rule); text-decoration: none; font-weight: 600; color: var(--ink); }
.pay-files .lead { flex: 1; min-width: 12px; border-bottom: 1px dotted var(--ink-soft); transform: translateY(-4px); }
.pay-files .pg { font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ledger-red); white-space: nowrap; }
dialog.pay.is-paid .pay-tos, dialog.pay.is-paid .pay-what { display: none; }

@media (hover: hover) and (pointer: fine) { .pay-files a:hover { color: var(--ledger-red); } }
@media (prefers-reduced-motion: reduce) {
  .pay-view, .pay-track { transition: none; }
  [data-pay="go"]:disabled { animation: none; opacity: 0.7; }
}
