/* Design workflow adapted from unslop by Damir Sokolovsky (@heydamir), CC BY 4.0. */
:root {
  color-scheme: light;
  --bg: #f6f6f5;
  --surface: #fff;
  --ink: #19202a;
  --muted: #555e69;
  --rule: #dce0e4;
  --control: #9ba3ac;
  --accent: #1c2633;
  --hover: #374657;
  --error: #a12b39;
  font: 16px/1.5 "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main { width: min(calc(100% - 48px), 536px); margin: 56px auto; }
.panel { padding: 36px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.brand { display: block; width: 128px; height: auto; margin-bottom: 36px; }
h1 { font-size: clamp(23px, 4.5vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.checkout h1, .status h1 { margin-bottom: 24px; }
.status p { color: var(--muted); }
form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
label { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 500; }
label span, .hint { color: var(--muted); font-size: 13px; font-weight: 400; }
input:not([type=hidden]) { width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
input::placeholder { color: var(--muted); opacity: 1; }
.mono, input.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
input[aria-invalid=true] { border-color: var(--error); }
.error { color: var(--error); font-size: 14px; }
button { min-height: 44px; width: fit-content; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; background: var(--accent); color: var(--surface); border: 1px solid var(--accent); border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
button:hover { background: var(--hover); }
.primary { width: 100%; min-height: 48px; margin-top: 4px; }
.icon { display: inline-flex; }
.icon svg { width: 16px; height: 16px; }
.summary { border: 1px solid var(--rule); border-radius: 12px; padding: 16px; }
.summary dl { display: grid; gap: 16px; }
.summary dt { color: var(--muted); font-size: 13px; }
.summary dd { overflow-wrap: anywhere; font-weight: 500; }
.edit { color: var(--accent); background: var(--surface); border-color: var(--rule); }
.edit:hover { background: var(--bg); }
@media (max-width: 480px) {
  main { width: calc(100% - 32px); margin-block: 24px; }
  .panel { padding: 24px; }
  .brand { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.test-notice { margin: -8px 0 20px; color: var(--error); font-size: 14px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.mandate-text { font-size: 14px; }
.mandate-text p + p { margin-top: 8px; }
.mandate-text h2, .summary h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.mandate-text, .summary { overflow-wrap: anywhere; }
.summary .mono { font-size: 14px; }
.signature-check { display: flex; align-items: flex-start; font-weight: 400; line-height: 1.45; }
.signature-check input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.legal { display: flex; gap: 16px; padding: 12px 4px 0; font-size: 13px; }
.legal a { color: var(--muted); }
