/* Helix Merchant Processing */
:root {
  --ink: #0b1b2b;
  --ink-2: #1d3247;
  --text: #1c2833;
  --muted: #5d6b7a;
  --line: #e3e8ee;
  --bg: #f6f8fa;
  --card: #ffffff;
  --accent: #0e8f7e;
  --accent-ink: #076d60;
  --accent-soft: #e3f5f2;
  --gold: #f2b544;
  --bad: #c2412d;
  --bad-soft: #fdecea;
  --wait: #a36b00;
  --wait-soft: #fff4dc;
  --ok: #18794e;
  --ok-soft: #e4f6ec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 27, 43, .06), 0 4px 16px rgba(11, 27, 43, .05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: #fff;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 2.6rem; letter-spacing: -.025em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
code { background: #eef2f6; padding: .1em .35em; border-radius: 5px; }
pre { background: var(--ink); color: #dbe7f3; padding: 1rem 1.2rem; border-radius: 10px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 1rem; } .mt2 { margin-top: 2rem; } .mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem; justify-content: center;
  padding: .62rem 1.1rem; border-radius: 9px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important;
  background: var(--accent); color: #fff; transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-ink); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--bg); }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: var(--ink-2); }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2c4bc; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: .38rem .7rem; font-size: .85rem; }
.btn.lg { padding: .85rem 1.4rem; font-size: 1.05rem; }
.btn.link { background: none; color: var(--accent-ink); padding: 0; border: 0; font-weight: 600; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- public header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; height: 66px; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 750; letter-spacing: -.01em; text-decoration: none !important; }
.brand img { width: 32px; height: 32px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.brand span { line-height: 1.15; }
.site-nav { display: flex; gap: 1.3rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--text); font-weight: 500; font-size: .95rem; }
.site-nav a.active { color: var(--accent-ink); }
.site-nav .btn { color: #fff; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1100px 500px at 80% -10%, #15495a 0%, transparent 60%), linear-gradient(180deg, #0b1b2b 0%, #10283d 100%); color: #d8e4ee; padding: 88px 0 96px; overflow: hidden; }
.hero h1 { color: #fff; font-size: 3.1rem; max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: #b9cad8; }
.hero .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn.secondary:hover { background: rgba(255,255,255,.08); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 22px; color: #e4edf5; }
.hero-card .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.14); font-size: .95rem; }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .row.total { font-weight: 700; color: #fff; font-size: 1.05rem; border-top: 1px solid rgba(255,255,255,.3); border-bottom: 0; margin-top: 4px; padding-top: 12px; }
.hero-card .label { color: #9fb4c6; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.trust { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 2rem; color: #9fb4c6; font-size: .9rem; }
.trust span::before { content: "✓"; color: var(--gold); margin-right: .4rem; font-weight: 700; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.eyebrow { display: inline-block; color: var(--accent-ink); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .6rem; }
.grid { display: grid; gap: 22px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; }
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.cta-band { background: var(--ink); color: #c9d6e2; border-radius: 18px; padding: 44px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .3rem; }

/* ---------- pricing ---------- */
.price-card { border: 2px solid var(--accent); border-radius: 18px; padding: 34px; background: #fff; box-shadow: var(--shadow); }
.price { font-size: 3.4rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.price small { font-size: 1.1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.checks { list-style: none; padding: 0; margin: 1.2rem 0; }
.checks li { padding: .35rem 0 .35rem 1.7rem; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.checks li.no::before { content: "–"; color: var(--muted); }
table.example { width: 100%; border-collapse: collapse; }
table.example td { padding: .55rem 0; border-bottom: 1px solid var(--line); }
table.example td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.example tr.total td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }

/* ---------- prose (legal/docs) ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2.2rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.page-head { padding: 56px 0 28px; border-bottom: 1px solid var(--line); background: var(--bg); }
.page-head p { color: var(--muted); max-width: 680px; font-size: 1.08rem; }
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px 0 80px; }
.docs nav { position: sticky; top: 90px; align-self: start; font-size: .92rem; }
.docs nav a { display: block; padding: .28rem 0; color: var(--muted); }
.docs nav a:hover { color: var(--accent-ink); }
.docs section { scroll-margin-top: 90px; }
.callout { border-left: 4px solid var(--gold); background: #fff9ea; padding: .9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; }
.callout.info { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.auth { max-width: 440px; margin: 56px auto 80px; }
label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin: 0 0 .35rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: .62rem .75rem; border: 1px solid #cfd8e1; border-radius: 8px; font: inherit; font-size: .95rem; background: #fff; color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,143,126,.18); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; font-size: .92rem; }
.check input { margin-top: .3rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.inline-form { display: inline; }

/* ---------- alerts ---------- */
.alert { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1.2rem; font-size: .95rem; border: 1px solid; }
.alert.ok { background: var(--ok-soft); border-color: #bfe6cf; color: #0f5132; }
.alert.err { background: var(--bad-soft); border-color: #f5c6be; color: #8a2a1b; }
.alert.warn { background: var(--wait-soft); border-color: #f3dca5; color: #6b4600; }
.alert.info { background: var(--accent-soft); border-color: #b8e4dc; color: #0b4f46; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #9fb4c6; padding: 48px 0 30px; font-size: .92rem; }
.site-footer a { color: #d3e0eb; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; font-size: .82rem; }

/* ---------- app shell ---------- */
body.app { background: var(--bg); }
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #b6c6d4; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { color: #fff; padding: 4px 8px 18px; }
.sidebar .brand small { color: #8aa2b6; }
.sidebar a.nav { display: flex; align-items: center; gap: .6rem; color: #c8d6e2; padding: .55rem .7rem; border-radius: 8px; font-size: .94rem; font-weight: 500; text-decoration: none; }
.sidebar a.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.nav.active { background: rgba(14,143,126,.22); color: #fff; }
.sidebar .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; padding: 0 .45rem; font-size: .75rem; font-weight: 700; }
.sidebar .sect { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6f879b; padding: 14px 10px 4px; }
.sidebar .foot { margin-top: auto; padding: 12px 8px 0; font-size: .82rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .foot .btn.link { color: #c8d6e2; font-weight: 500; }
.main { padding: 28px 34px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.6rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(11,27,43,.03); }
.card h2 { font-size: 1.1rem; margin-bottom: .9rem; }
.card h2 .sub { font-weight: 500; color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.stat .v { font-size: 1.55rem; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -.02em; }
.stat .v.bad { color: var(--bad); }
.stat .s { font-size: .82rem; color: var(--muted); }
.cols2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.cols2e { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: .65rem .6rem; border-bottom: 1px solid #eef1f4; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fafbfc; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: .5rem 1rem; margin: 0; font-size: .93rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .76rem; font-weight: 650; white-space: nowrap; background: #eef1f4; color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.wait { background: var(--wait-soft); color: var(--wait); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.secret { font-family: var(--mono); font-size: .85rem; background: #f1f4f7; border: 1px solid var(--line); padding: .45rem .6rem; border-radius: 7px; word-break: break-all; display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.secret button { flex: none; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.checklist li:last-child { border-bottom: 0; }
.checklist .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: #e9eef2; color: var(--muted); }
.checklist .dot.done { background: var(--ok); color: #fff; }
.checklist .dot.now { background: var(--accent); color: #fff; }
.checklist .body { flex: 1; }
.checklist .body p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.pager { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; min-width: 180px; }
details.box { border: 1px solid var(--line); border-radius: 10px; padding: .7rem 1rem; background: #fff; margin-bottom: .8rem; }
details.box summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ev-grid .wide { grid-column: 1 / -1; }

@media (max-width: 960px) {
  .hero-grid, .grid.c3, .grid.c4, .steps, .cols2, .cols2e, .stats, .docs, .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .docs nav { position: static; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .sidebar .sect, .sidebar .foot { display: none; }
  .sidebar .brand { padding: 4px 8px; width: 100%; }
}
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .hero { padding: 56px 0; }
  .hero-grid, .grid.c2, .grid.c3, .grid.c4, .steps, .cols2, .cols2e, .stats, .docs, .row2, .ev-grid, .site-footer .cols { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 16px 24px; border-bottom: 1px solid var(--line); align-items: flex-start; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .main { padding: 20px 16px 48px; }
  dl.kv { grid-template-columns: 1fr; }
  .cta-band { padding: 28px; }
}
.site-footer .brand { color: #fff; }
.hero .eyebrow { color: var(--gold); }
.cols2 > *, .cols2e > *, .grid > *, .stats > * { min-width: 0; }
.card .table-wrap, .card > table.data { max-width: 100%; }

/* ---------- provisioning / support ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #c7d1db; border: 2px solid #fff; }
.timeline li.ev-ok::before { background: var(--ok); }
.timeline li.ev-bad::before { background: var(--bad); }
.timeline li.ev-info::before { background: var(--accent); }
.timeline li.ev-wait::before { background: var(--gold); }
.ev-head { font-size: .9rem; }
.pre { white-space: pre-wrap; word-break: break-word; }
.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket-list li { padding: .55rem 0; border-bottom: 1px solid #eef1f4; }
.ticket-list li:last-child { border-bottom: 0; }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; max-height: 280px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.inline-prefix { display: flex; align-items: center; gap: 6px; }
.inline-prefix input { flex: 1; }
.thread .msg { padding: 12px 14px; border-radius: 10px; margin-bottom: 10px; background: var(--bg); }
.thread .msg.merchant { background: var(--accent-soft); margin-left: 32px; }
.thread .msg.customer { margin-right: 32px; }
.msg-head { margin-bottom: 4px; }

/* ---------- customer portal ---------- */
body.portal { background: var(--bg); }
.portal-header { background: #fff; border-bottom: 3px solid var(--accent); }
.portal-bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.portal-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 1.1rem; text-decoration: none !important; }
.portal-brand img { max-height: 40px; max-width: 160px; }
.portal-main { padding-top: 28px; padding-bottom: 48px; min-height: calc(100vh - 140px); }
.portal-main h1 { font-size: 1.6rem; }
.portal-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.portal-grid > * { min-width: 0; }
.portal .btn { background: var(--accent); }
.portal .btn.secondary { background: #fff; color: var(--ink); }
.portal .btn.danger { background: #fff; }
.portal-foot { font-size: .8rem; color: var(--muted); padding-bottom: 24px; text-align: center; }
@media (max-width: 760px) { .portal-grid { grid-template-columns: 1fr; } }
