/* Contract signing — MaxCommerce brand colours (sampled from the logo) on the main site's layout tokens. */
:root {
  --ink: #1f2152;
  --navy: #1f2152;
  --purple: #7278bb;
  --teal: #0ec7c9;
  --paper: #ffffff;
  --sand: #f4f4f8;
  --yellow: #ffd006;
  --muted: rgba(31, 33, 82, 0.7);
  --muted-2: rgba(31, 33, 82, 0.45);
  --line: rgba(31, 33, 82, 0.16);
  --line-soft: rgba(31, 33, 82, 0.09);
  --error: #b42318;
  --ok: #157f3b;
  --font-display: 'Cabinet Grotesk', 'Archivo Black', Outfit, system-ui, sans-serif;
  --font-body: 'Satoshi', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font-body); color: var(--ink); background: var(--sand); }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { background: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: block; line-height: 0; }
.brand img { width: 148px; height: auto; }
.top-help { color: var(--navy); font-size: 14px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--line); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.top-help:hover { border-color: var(--navy); }
.stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 5px; }
.stripe span:nth-child(1) { background: var(--navy); }
.stripe span:nth-child(2) { background: var(--purple); }
.stripe span:nth-child(3) { background: var(--teal); }
.stripe span:nth-child(4) { background: var(--yellow); }

.intro { padding: 36px 0 8px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); }
h1 { font: 800 clamp(28px, 5vw, 40px)/1.1 var(--font-display); margin: 0 0 10px; letter-spacing: -.01em; }
h2 { font: 800 22px/1.2 var(--font-display); margin: 0 0 8px; }
.lede { margin: 0; color: var(--muted); max-width: 60ch; }

.steps { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-2); border-top: 3px solid var(--line); padding-top: 10px; }
.steps li span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; font-weight: 700; flex: none; }
.steps li.is-done { color: var(--ink); border-top-color: var(--ink); }
.steps li.is-done span { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps li.is-current { color: var(--ink); font-weight: 700; border-top-color: var(--yellow); }
.steps li.is-current span { background: var(--yellow); border-color: var(--yellow); }

.dev-banner { background: #fff8d6; border: 1px solid #f0d36b; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin: 0 0 16px; }
.dev-banner a { color: var(--ink); font-weight: 700; }

.card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); margin: 0 0 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card.narrow { max-width: 560px; }
.hint, .fine { color: var(--muted); font-size: 14px; }
.fine { margin: 14px 0 0; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
label, legend { display: block; font-weight: 600; font-size: 15px; margin: 0 0 6px; padding: 0; }
input:not([type=radio]):not([type=checkbox]), select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 48px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:hover, select:hover { border-color: var(--muted-2); }
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 204, 0, .55); }
[aria-invalid=true] { border-color: var(--error) !important; }
.err { color: var(--error); font-size: 13.5px; margin: 5px 0 0; min-height: 0; }
.err:empty { display: none; }
.help { color: var(--muted); font-size: 13.5px; margin: 5px 0 0; }
.opt { font-weight: 400; color: var(--muted); }
.file-current { font-size: 14px; margin: 6px 0 0; }
input[type=file] { padding: 10px; background: #fff; }
.form-err { color: var(--error); font-weight: 600; margin: 8px 0 0; }
.form-err:empty { display: none; }

.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 18px; min-height: 48px; min-width: 110px; cursor: pointer; font-weight: 500; margin: 0; }
.choice label:has(input:checked) { border-color: var(--ink); background: #fffbe6; box-shadow: inset 0 0 0 1px var(--ink); }
.choice input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }

.rep-note { background: #fffbe6; border: 1px solid #f0d36b; border-left: 4px solid var(--yellow); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; font-size: 14.5px; }
.rep-note p { margin: 0 0 6px; }
.rep-note p:last-child { margin: 0; }
.rep-title { font-weight: 700; font-size: 15.5px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px/1 var(--font-body); color: var(--ink); background: var(--yellow); border: 1.5px solid var(--yellow); border-radius: 999px; padding: 14px 24px; min-height: 48px; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s ease; }
.btn:hover { background: #ffd633; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-busy=true] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 8px 14px; min-height: 36px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

.otp { font: 700 28px/1 ui-monospace, Menlo, monospace !important; letter-spacing: .4em; text-align: center; max-width: 280px; }

/* Agreement */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; margin: 12px 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.facts .rep dd { color: var(--ink); background: #fffbe6; display: inline-block; padding: 0 6px; border-radius: 4px; }

.doc { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(20px, 5vw, 48px); margin: 0 0 16px; font-size: 15px; line-height: 1.6; }
.doc:focus { outline: none; }
.doc .cover { border-top: 6px solid var(--yellow); padding-top: 18px; margin-bottom: 24px; }
.doc .cover .k { font-size: 12px; letter-spacing: .14em; font-weight: 700; color: var(--muted); margin: 0; }
.doc .cover h3 { font: 800 28px/1.15 var(--font-display); margin: 6px 0 4px; text-transform: uppercase; }
.doc .cover p { margin: 2px 0; color: var(--muted); }
.doc h4 { font: 800 16px/1.3 var(--font-display); text-transform: uppercase; letter-spacing: .02em; margin: 28px 0 10px; }
.doc h5 { font: 700 15px/1.3 var(--font-body); margin: 24px 0 8px; }
.doc .schedule { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 28px; font-size: 20px; }
.doc p { margin: 0 0 10px; }
.doc ol.clauses { list-style: none; padding: 0; margin: 0 0 10px; }
.doc ol.clauses li { display: grid; grid-template-columns: 38px 1fr; gap: 4px; margin: 0 0 8px; }
.doc ol.clauses .n { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.doc ul.notes { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.doc ul.notes li { margin: 0 0 3px; }
.doc .tbl { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc caption { text-align: left; font-weight: 700; padding: 0 0 6px; }
.doc th, .doc td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { background: var(--sand); font-weight: 700; white-space: nowrap; }
.doc td:not(:first-child) { white-space: nowrap; }
.doc td.wrap { white-space: normal; }
.doc details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin: 0 0 12px; }
.doc summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.doc .pairs { columns: 4 160px; column-gap: 24px; font-size: 13.5px; padding: 0 0 12px; margin: 0; list-style: none; }
.doc .pairs li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--line); padding: 3px 0; break-inside: avoid; }
.doc .pairs b { font-variant-numeric: tabular-nums; }
.doc .contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; padding: 16px; background: var(--sand); border-radius: 10px; font-size: 14px; }
.doc .contacts p { margin: 0; }
.doc .contacts .t { font-weight: 700; }
.doc .signs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 14px; }
.doc .signs h5 { margin: 0 0 8px; text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.doc .signs p { margin: 0 0 4px; }
.doc .signs .muted { color: var(--muted); }

/* Signature */
.sign { border: 2px solid var(--ink); }
.pad-wrap { position: relative; margin: 14px 0 12px; }
.pad { display: block; width: 100%; height: 200px; background: #fff; border: 1.5px dashed var(--muted-2); border-radius: 12px; touch-action: none; cursor: crosshair; }
.pad.has-ink { border-style: solid; border-color: var(--ink); }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted-2); pointer-events: none; font-size: 18px; }
.pad-wrap::after { content: ''; position: absolute; left: 24px; right: 24px; bottom: 48px; border-bottom: 1px solid var(--line); pointer-events: none; }
.pad-clear { position: absolute; top: 10px; right: 10px; background: #fff; }
.agree { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; cursor: pointer; margin: 4px 0 0; }
.agree input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }

.done { text-align: left; }
.tick { width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); position: relative; margin: 0 0 14px; }
.tick::after { content: ''; position: absolute; left: 20px; top: 13px; width: 12px; height: 22px; border: solid var(--ink); border-width: 0 4px 4px 0; transform: rotate(45deg); }

.foot { color: var(--muted); font-size: 13px; padding: 28px 0 40px; border-top: 1px solid var(--line-soft); margin-top: 24px; }
.foot-in { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.foot-in p { margin: 0; }
.foot-logo { width: 120px; height: auto; }

/* Product questions */
.group { border: 0; padding: 18px 0 0; margin: 6px 0 4px; border-top: 1px solid var(--line-soft); min-width: 0; }
.group-title { font: 800 17px/1.3 var(--font-display); margin: 0 0 12px; }
.choice.stack { flex-direction: column; gap: 8px; }
.choice.stack label { min-width: 0; width: 100%; }
.contact-note { background: #eefbfb; border: 1px solid #a9e6e7; border-left: 5px solid var(--teal); border-radius: 10px; padding: 16px; margin: 0 0 16px; }
.contact-note p { margin: 0 0 10px; font-size: 14.5px; }
.contact-title { font-weight: 800; font-size: 16px !important; }
.btn.wa { background: #25d366; border-color: #25d366; color: #0b3d1f; }
.btn.wa:hover { background: #3ee07a; }
.sign-hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.sign-hint:empty { display: none; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .grid2, .doc .contacts, .doc .signs { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { flex-direction: column; align-items: flex-start; font-size: 12px; gap: 4px; }
  .top-help { font-size: 13px; padding: 6px 10px; }
  .actions .btn { width: 100%; }
  .pad { height: 180px; }
  .doc { font-size: 14.5px; }
  .doc ol.clauses li { grid-template-columns: 32px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; }
}
h2[tabindex="-1"]:focus { outline: none; }

.price-note { margin: 8px 0 0; font-size: 14px; background: #fff9db; border-left: 4px solid var(--yellow); border-radius: 6px; padding: 8px 12px; }
.ok-msg { color: var(--ok); font-size: 14px; margin: 6px 0 0; }
.ok-msg:empty { display: none; }
