/* Checkout, thanks, download, support and helper pages (round 5: brand forms). Uses the site tokens from site.css; nothing here is global
   except [hidden] and the disabled-button state. */

/* Forms: plain labels (sentence case, no tracking), 44px fields, the brand focus ring */
.pay-form { display: grid; gap: var(--s2); max-width: 36rem; margin: var(--s4) 0 var(--s5); }
.pay-form label { margin-top: var(--s3); font: 500 15px/1.4 var(--font); color: var(--text); }
.pay-form label:first-child { margin-top: 0; }
.pay-form input[type=email], .pay-form input[type=text], .pay-form textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: 400 16px/1.5 var(--font); color: var(--text);
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color var(--d-ui) var(--ease-land), box-shadow var(--d-ui) var(--ease-land); }
.pay-form input::placeholder, .pay-form textarea::placeholder { color: var(--muted); }
.pay-form input:hover, .pay-form textarea:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.pay-form input:focus-visible, .pay-form textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--r-sm); }
.pay-form textarea { min-height: 7.5rem; font: 400 14px/1.5 var(--mono); word-break: break-all; resize: vertical; }
.pay-form input[type=file] { font: 400 15px/1.4 var(--font); color: var(--text-2); }
.pay-form input[type=file]::file-selector-button { margin-right: var(--s3); min-height: 36px; padding: 6px var(--s4); font: 500 15px/1.2 var(--font); color: var(--text);
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; }
.pay-form input[type=file]::file-selector-button:hover { background: var(--surface); }
.pay-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s4) 0 0; }
.pay-state { min-height: 1.5em; margin: var(--s3) 0; font-size: 15px; color: var(--text-2); }
.pay-state.is-error { color: var(--no); }
.pay-state:empty { margin: 0; }

/* The license key, shown after payment */
.license-box { display: block; width: 100%; min-height: 8.5rem; margin: var(--s3) 0 0; padding: var(--s4); font: 400 14px/1.55 var(--mono); word-break: break-all; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); resize: vertical; }
.license-box:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

[hidden] { display: none !important; }
button.btn { cursor: pointer; }
button.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; background: var(--surface); color: var(--muted); border: 1px dashed var(--line-strong); }

/* Download lists: one action per row, the note under it */
.dl-list { list-style: none; padding: 0; margin: var(--s4) 0 var(--s5); display: grid; gap: 0; border-top: 1px solid var(--line); }
.dl-list > li { margin: 0; padding: var(--s4) 0; border-bottom: 1px solid var(--line); max-width: none; }
.dl-list > li::before { display: none; }
.dl-list > li > a:not(.btn) { font-weight: 500; color: var(--text); }
.dl-list small { display: block; margin-top: var(--s2); font-size: 14px; line-height: 1.5; color: var(--text-2); }
.dl-list .soon { color: var(--muted); }

/* File checksums */
.dl-sums { width: 100%; border-collapse: collapse; font-size: 14px; margin: var(--s3) 0 var(--s5); }
.dl-sums th, .dl-sums td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.dl-sums thead th { color: var(--muted); font-weight: 500; }
.dl-sums tbody th { font-weight: 500; word-break: break-all; }
.dl-sums td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl-sums code { word-break: break-all; font-size: 12px; background: none; padding: 0; color: var(--text-2); }
@media (max-width: 600px) {
  .dl-sums thead { display: none; }
  .dl-sums tr { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .dl-sums th, .dl-sums td { border: 0; padding: 0; }
}

/* File picker (QC D7): the native input is hidden; a branded button and the chosen name show instead */
.file-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.file-pick label.btn { margin: 0; cursor: pointer; }
.file-pick input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.file-pick span { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.dl-list .dl-title { display: block; margin-bottom: var(--s3); font-weight: 500; color: var(--text); }

/* /download/: the checksum command stays on one line on phones; section headings get the larger gap */
.dl-cmd { white-space: nowrap; }
h2.dl-gap { margin-top: var(--s7); }
