/* Stratamize invoice checkout. Brand: DM Sans, crimson #d90a2c, midnight #17161a. Mobile-first. */
:root {
  --crimson: #d90a2c;
  --crimson-dark: #b00722;
  --midnight: #17161a;
  --bg: #f5f4f2;
  --card: #ffffff;
  --text: #17161a;
  --muted: #5f5d66;
  --line: #e2e0dc;
  --line-strong: #c9c6bf;
  --ok: #167a3d;
  --ok-bg: #e9f6ee;
  --warn: #8a5a00;
  --warn-bg: #fff6e0;
  --fail: #b3261e;
  --fail-bg: #fdecea;
  --radius: 10px;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
a { color: var(--crimson); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--crimson-dark); }
iframe, img, svg { max-width: 100%; }

/* header */
.top { background: var(--midnight); color: #fff; }
.top-inner {
  max-width: 600px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.wordmark {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; line-height: 1;
}
.wordmark::after { content: ""; display: inline-block; width: 3px; height: 0.9em; background: var(--crimson); margin-left: 3px; vertical-align: -0.1em; }
.secure-tag {
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: #cfcdd4;
  padding-left: 18px; position: relative; white-space: nowrap;
}
.secure-tag::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 10px; height: 12px;
  border: 2px solid #cfcdd4; border-radius: 3px; border-top-width: 0; box-sizing: border-box;
}
.secure-tag::after {
  content: ""; position: absolute; left: 2px; top: -3px; width: 6px; height: 7px;
  border: 2px solid #cfcdd4; border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box;
}

/* layout */
.wrap { max-width: 600px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 14px; letter-spacing: -0.01em; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; margin: 0 0 16px;
}

/* notice */
.notice {
  background: var(--warn-bg); border: 1px solid #f0d58a; border-left: 4px solid var(--warn);
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px;
}
.notice p { margin: 0; }

/* fields */
.field { margin: 0 0 14px; }
label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
input[type="text"], input[type="email"] {
  display: block; width: 100%; font: inherit; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 12px; min-height: 48px;
  background: #fff;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--crimson); outline-offset: 1px; border-color: var(--crimson);
}
input[readonly] { background: var(--bg); color: var(--muted); }
.money { position: relative; }
.money-sym { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; }
.money input { padding-left: 26px; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hf {
  min-height: 48px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px 8px; background: #fff;
}
.hf iframe { display: block; border: 0; width: 100%; }
.stub-field { border: 0; width: 100%; height: 42px; font: inherit; background: transparent; }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.lock-note { padding-left: 20px; position: relative; }
.lock-note::before {
  content: ""; position: absolute; left: 1px; top: 6px; width: 10px; height: 9px;
  border: 2px solid var(--ok); border-radius: 2px; border-top-width: 0; box-sizing: border-box;
}
.lock-note::after {
  content: ""; position: absolute; left: 3px; top: 1px; width: 6px; height: 7px;
  border: 2px solid var(--ok); border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box;
}
.summary { margin: 0 0 12px; }
.summary strong { font-variant-numeric: tabular-nums; }

/* card brands */
.brands { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.brand {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; border: 1px solid; white-space: nowrap;
}
.brand-visa { color: #1a1f71; border-color: #1a1f71; }
.brand-mc { color: #c8102e; border-color: #c8102e; }
.brand-disc { color: #d35400; border-color: #d35400; }
.brand-amex { color: #006fcf; border-color: #006fcf; }

/* consent + pay */
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--crimson); }
.consent label { margin: 0; font-weight: 400; font-size: 15px; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 8px; padding: 14px 18px;
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-dark); }
.btn-primary:focus-visible { outline: 3px solid var(--midnight); outline-offset: 2px; }
.btn-secondary { background: transparent; color: var(--crimson); border: 2px solid var(--crimson); }
.btn:disabled { opacity: .6; cursor: default; }
.hf-submit { min-height: 56px; padding: 0; overflow: hidden; }
.hf-submit iframe { display: block; border: 0; width: 100%; min-height: 56px; }
.stub-pay { width: 100%; min-height: 56px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.pay-wrap { border-radius: 8px; transition: opacity .15s; }
.pay-wrap.locked { opacity: .45; pointer-events: none; }
.pay-wrap.processing { opacity: .7; pointer-events: none; }
.status { min-height: 1.5em; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.descriptor { margin: 14px 0 0; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* result */
.result h2 { font-size: 18px; margin: 0 0 8px; }
.result p { margin: 0 0 8px; }
.result .btn { margin-top: 8px; }
.result.fail { border-color: #f1b7b2; background: var(--fail-bg); }
.result.fail h2 { color: var(--fail); }
.result.warn { border-color: #f0d58a; background: var(--warn-bg); }
.result.warn h2 { color: var(--warn); }
.result.ok { border-color: #b7e0c5; background: var(--ok-bg); }
.result.ok h2 { color: var(--ok); }

/* info list */
.kv { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px 16px; }
.kv dt { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 10px; }
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.info { font-size: 15px; }

/* receipt */
.receipt .paid {
  display: inline-block; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin: 0 0 10px;
}
.receipt h1 { margin-bottom: 4px; }
.receipt .big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.receipt .kv dd { font-variant-numeric: tabular-nums; }
.actions { margin: 16px 0 0; }

/* footer */
.foot { max-width: 600px; margin: 0 auto; padding: 0 16px 40px; font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 6px; }

@media (min-width: 480px) {
  .card { padding: 24px; }
  h1 { font-size: 30px; }
  .kv { grid-template-columns: max-content 1fr; }
  .kv dt, .kv dt:first-child { margin-top: 0; padding: 4px 0; }
  .kv dd { padding: 4px 0; }
}
@media print {
  .top, .foot, .actions { display: none; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}
