/* =====================================================================
   Integration pages (integrations/*.html), on top of svc4.css and
   s4-svc.css. Generated by scripts/build-integrations.cjs: edit the data
   there, not the HTML.
   Adds the pieces an integration page needs and a service page does not:
   app badges, the today / connected comparison, a record moving from one
   system to the next, a matching ledger, split bars, pipeline stages,
   routing to more than one ledger, related pairs and the hub grid.
   Everything is prefixed .i4- and scoped to body.svc4.
   ===================================================================== */

/* ---------- App badges ---------- */
.i4-app {
  --c: #6d5cf6;
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  display: inline-grid; place-items: center; overflow: hidden;
  background: #fff; box-shadow: 0 0 0 1px rgba(21,19,29,.08);
}
.i4-app img { width: 72%; height: 72%; object-fit: contain; display: block; }
.i4-app.is-mono { background: var(--c); box-shadow: none; color: #fff; font: 700 12px/1 var(--s4-display); letter-spacing: -0.02em; }
.i4-app.is-icon { background: var(--s4-violet-soft); color: var(--s4-violet-ink); box-shadow: none; }
.i4-app svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i4-app-sm { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.i4-app-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 16px; }
.s4-night .i4-app.is-icon, .s4-hero .i4-app.is-icon { background: rgba(139,123,255,.18); color: #d6d0ff; }

/* the pair, in the hero window title and on cards */
.i4-pair { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.i4-pair-arrow { width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(139,123,255,.2), #8b7bff); position: relative; }
.i4-pair-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: #8b7bff; border-right: 0; }
.s4-win-bar .i4-pair { margin-right: 4px; }
.s4-log-ic .i4-app { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.s4-log-ic .i4-app.is-mono { font-size: 11px; }
.s4-log-ic:has(.i4-app:not(.is-icon)) { background: #fff; }

/* ---------- Today / connected ---------- */
.i4-swap-sec { padding-top: clamp(72px, 9vw, 120px); }
.i4-swap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.i4-swap-card { position: relative; border-radius: calc(var(--s4-r) + 4px); padding: clamp(28px, 3.4vw, 46px); display: flex; flex-direction: column; }
.i4-today { background: var(--s4-card); box-shadow: 0 0 0 1px var(--s4-line), 0 24px 50px -40px rgba(40,30,90,.4); }
.i4-after { background: radial-gradient(110% 90% at 85% 0%, #2e2560, #15122a 72%); color: var(--s4-on); box-shadow: 0 40px 80px -40px rgba(40,30,90,.65); overflow: hidden; }
.i4-after::before { content: ""; position: absolute; right: -30%; top: -40%; width: 80%; height: 90%; background: radial-gradient(closest-side, rgba(139,123,255,.35), transparent 75%); pointer-events: none; }
.i4-swap-k { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--s4-ink-3); }
.i4-after .i4-swap-k { color: #c9c2ff; }
.i4-swap-k i { width: 8px; height: 8px; border-radius: 50%; background: #c8c5d3; }
.i4-after .i4-swap-k i { background: #3ddc97; box-shadow: 0 0 0 4px rgba(61,220,151,.16); }
.i4-swap-n { display: block; margin: 16px 0 10px; font-family: var(--s4-display); font-weight: 700; font-size: clamp(44px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.05em; }
.i4-today .i4-swap-n { color: var(--s4-ink); }
.i4-after .i4-swap-n { color: #fff; }
.i4-swap-p { margin: 0 0 26px; font-size: 16.5px; color: var(--s4-ink-2); max-width: 460px; }
.i4-after .i4-swap-p { color: var(--s4-on-2); }
.i4-swap-list { list-style: none; margin: auto 0 0; padding: 0; display: grid; }
.i4-swap-list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--s4-line); font-size: 15.5px; color: var(--s4-ink-2); }
.i4-after .i4-swap-list li { border-color: var(--s4-line-d); color: var(--s4-on); }
.i4-swap-list em { margin-left: auto; flex: none; font-style: normal; font-family: var(--s4-mono); font-size: 12px; padding: 4px 9px; border-radius: 8px; background: var(--s4-paper); color: var(--s4-ink-3); white-space: nowrap; }
.i4-after .i4-swap-list em { background: rgba(61,220,151,.12); color: #7ff0bf; }
.i4-x, .i4-ok { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.i4-x { background: var(--s4-paper-2); }
.i4-x::before, .i4-x::after { content: ""; position: absolute; width: 9px; height: 1.6px; border-radius: 2px; background: #9b98a8; }
.i4-x { position: relative; }
.i4-x::before { transform: rotate(45deg); } .i4-x::after { transform: rotate(-45deg); }
.i4-ok { background: var(--s4-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.i4-swap-go {
  position: absolute; left: 50%; top: 50%; z-index: 3; translate: -50% -50%;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--s4-violet); color: #fff; box-shadow: 0 0 0 8px var(--s4-paper), 0 18px 40px -12px rgba(109,92,246,.7);
}
.i4-swap-go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.i4-facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.i4-facts li { display: flex; align-items: baseline; gap: 14px; padding: 22px 26px; border-radius: 20px; box-shadow: 0 0 0 1px var(--s4-line) inset; }
.i4-facts b { font-family: var(--s4-display); font-weight: 700; font-size: 30px; letter-spacing: -0.04em; color: var(--s4-violet-ink); white-space: nowrap; }
.i4-facts span { font-size: 14.5px; line-height: 1.45; color: var(--s4-ink-2); }

/* ---------- Feature art: a record moving from one system to the next ---------- */
.i4-flow { position: relative; width: 100%; height: 100%; min-height: 330px; }
.i4-flow-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.i4-flow-line path { fill: none; stroke: rgba(76,61,214,.4); stroke-width: 1.6; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; animation: s4-flow 1.6s linear infinite; }
.i4-rec { position: absolute; width: min(60%, 290px); padding: 14px 16px 10px; z-index: 2; }
.i4-rec-a { left: 0; top: 2%; }
.i4-rec-b { right: 0; bottom: 2%; }
.i4-rec-top { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.i4-rec-top div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.i4-rec-top b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-rec-top div span { font-size: 11.5px; color: var(--s4-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-rec dl { margin: 0; }
.i4-rec dl div { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--s4-line); font-size: 12.5px; }
.i4-rec dt { color: var(--s4-ink-3); }
.i4-rec dd { margin: 0 0 0 auto; font-weight: 600; color: var(--s4-ink); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }
.i4-rec dd.ok { color: #0b6d4a; }
.i4-rec dd.ok::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; border-radius: 50%; background: var(--s4-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 9px no-repeat; }
.i4-flow-chip { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--s4-ink); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 14px 30px -12px rgba(21,19,29,.6); }
.i4-flow-chip .s4-live { width: 7px; height: 7px; }

/* ---------- Feature art: a matching ledger ---------- */
.i4-match { width: min(92%, 440px); padding: 16px 18px 12px; }
.i4-match-head { display: grid; grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 64px; align-items: center; gap: 8px; padding-bottom: 8px; font-size: 11.5px; font-weight: 600; color: var(--s4-ink-3); }
.i4-match-head > span { display: inline-flex; align-items: center; gap: 6px; }
.i4-match-row { display: grid; grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 64px; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--s4-line); font-size: 12.5px; }
.i4-match-row > span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.i4-match-row b { font-family: var(--s4-mono); font-weight: 500; font-size: 12.5px; color: var(--s4-ink); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-match-row small { font-size: 11px; color: var(--s4-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-match-link { height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(20,160,111,.25), var(--s4-green)); }
.i4-match-row.is-open .i4-match-link { background: repeating-linear-gradient(90deg, #f0b44c 0 4px, transparent 4px 8px); }
.i4-match-row em { justify-self: end; font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: #0b6d4a; background: var(--s4-green-soft); white-space: nowrap; }
.i4-match-row.is-open em { color: #8a5a00; background: #fff1d1; }
.i4-match-row.is-open > span:nth-child(3) b { color: var(--s4-ink-3); }

/* ---------- Feature art: split bars ---------- */
.i4-split { width: min(90%, 420px); padding: 18px 20px 14px; }
.i4-split-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--s4-line); }
.i4-split-row:first-of-type { border-top: 0; }
.i4-split-row b { font-family: var(--s4-body); font-weight: 600; font-size: 13.5px; letter-spacing: 0; }
.i4-split-row b small { font-weight: 400; color: var(--s4-ink-3); margin-left: 4px; }
.i4-split-row > span { font-family: var(--s4-mono); font-size: 12.5px; color: var(--s4-ink); text-align: right; }
.i4-bar { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 6px; background: var(--s4-paper-2); overflow: hidden; }
.i4-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--b) * 100%); border-radius: inherit; background: rgba(109,92,246,.25); }
.i4-bar i + i { width: calc(var(--c) * 100%); background: linear-gradient(90deg, #8b7bff, #6d5cf6); }
.i4-split-key { display: flex; gap: 14px; margin-top: 8px; font-size: 11.5px; color: var(--s4-ink-3); }
.i4-split-key span { display: inline-flex; align-items: center; gap: 6px; }
.i4-split-key span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: #6d5cf6; }
.i4-split-key span:first-child::before { background: rgba(109,92,246,.25); }

/* ---------- Feature art: pipeline stages ---------- */
.i4-stages { display: grid; gap: 18px; width: min(92%, 440px); }
.i4-track { display: flex; align-items: center; padding: 12px 14px; border-radius: 16px; }
.i4-track span { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--s4-ink-3); text-align: center; line-height: 1.2; }
.i4-track span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #d9d6e4; z-index: 1; }
.i4-track span + span::after { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: #d9d6e4; }
.i4-track span.done::before { background: var(--s4-violet); box-shadow: 0 0 0 2px var(--s4-violet); }
.i4-track span.done + span::after, .i4-track span.done::after { background: var(--s4-violet); }
.i4-track span.now { color: var(--s4-violet-ink); }
.i4-track span.now::before { background: #fff; box-shadow: 0 0 0 2px var(--s4-violet), 0 0 0 7px rgba(109,92,246,.18); }
.i4-stages .s4-mini { width: 100%; }

/* ---------- Feature art: one source, several ledgers ---------- */
.i4-route { position: relative; width: 100%; height: 100%; min-height: 320px; }
.i4-route-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.i4-route-lines path { fill: none; stroke: rgba(201,194,255,.5); stroke-width: 1.6; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; animation: s4-flow 1.6s linear infinite; }
.s4-tint-lilac .i4-route-lines path, .s4-tint-sky .i4-route-lines path, .s4-tint-mint .i4-route-lines path, .s4-tint-sand .i4-route-lines path { stroke: rgba(76,61,214,.4); }
.i4-route-src { position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 40%; padding: 16px; z-index: 2; }
.i4-route-src .s4-mini-row { padding: 7px 0; font-size: 12.5px; }
.i4-route-dst { position: absolute; right: 0; width: 44%; padding: 12px 14px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.i4-route-dst div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.i4-route-dst b { font-size: 14px; }
.i4-route-dst div span { font-size: 11.5px; color: var(--s4-ink-3); }
.i4-route-dst .s4-tick { margin-left: auto; width: 18px; height: 18px; background-size: 11px; }
.i4-route-d1 { top: 6%; } .i4-route-d2 { top: 50%; translate: 0 -50%; } .i4-route-d3 { bottom: 6%; }
.i4-route.is-two .i4-route-d1 { top: 14%; } .i4-route.is-two .i4-route-d3 { bottom: 14%; }

/* a value column in mini rows */
.s4-mini-row > .i4-val { margin-left: auto; font-family: var(--s4-mono); font-size: 12.5px; color: var(--s4-ink); white-space: nowrap; }
.s4-mini-row > .i4-val + em { margin-left: 8px; }
.s4-mini-dark .s4-mini-row > .i4-val { color: #fff; }
.s4-mini-top .i4-app { width: 24px; height: 24px; border-radius: 7px; }
.s4-invoice .i4-app, .s4-sms-card .i4-app { width: 26px; height: 26px; }

/* ---------- Feature numbers and the short paragraph under the art ---------- */
.i4-feat-n { display: block; font-family: var(--s4-mono); font-size: 13px; color: var(--s4-violet-ink); margin-bottom: 10px; }
.s4-feat-wide:not(.is-light) .i4-feat-n { color: #c9c2ff; }
.i4-feat-p { margin: 0 0 18px; font-size: 16.5px; line-height: 1.6; color: var(--s4-ink-2); max-width: 560px; }
.s4-feat-wide:not(.is-light) .i4-feat-p { color: var(--s4-on-2); }

/* ---------- Read this before you pay ---------- */
.i4-honest { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 20px; }
.i4-honest > div { border-radius: var(--s4-r); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; }
.i4-honest h3 { font-size: 21px; margin: 18px 0 12px; }
.i4-honest p { margin: 0; font-size: 16px; color: var(--s4-ink-2); }
.i4-honest-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.i4-honest-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i4-h-use { background: var(--s4-card); box-shadow: 0 0 0 1px var(--s4-line), 0 20px 40px -32px rgba(40,30,90,.35); }
.i4-h-use .i4-honest-ic { background: var(--s4-green-soft); color: #0b6d4a; }
.i4-h-wont { background: var(--s4-night-2); color: var(--s4-on); }
.i4-h-wont h3 { color: #fff; }
.i4-h-wont p { color: var(--s4-on-2); }
.i4-h-wont .i4-honest-ic { background: rgba(255,120,120,.12); color: #ffb4b4; }
.i4-h-half { box-shadow: 0 0 0 1px var(--s4-line) inset; }
.i4-h-half .i4-honest-ic { background: var(--s4-violet-soft); color: var(--s4-violet-ink); }
.i4-h-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }
.i4-h-links a { font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--s4-card); color: var(--s4-ink) !important; text-decoration: none !important; box-shadow: 0 0 0 1px var(--s4-line); transition: background .2s, color .2s; }
.i4-h-links a::after { content: " \2192"; color: var(--s4-violet-ink); }
.i4-h-links a:hover { background: var(--s4-ink); color: #fff !important; }
.i4-h-links a:hover::after { color: #c9c2ff; }

/* ---------- Process: the field map ---------- */
.i4-map { display: grid; gap: 8px; }
.i4-map div { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: center; gap: 10px; }
.i4-map span { font-family: var(--s4-mono); font-size: 12.5px; line-height: 1.35; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--s4-on-2); }
.i4-map span:last-child { background: rgba(139,123,255,.14); color: #fff; box-shadow: 0 0 0 1px rgba(139,123,255,.3) inset; }
.i4-map i { height: 2px; background: var(--s4-violet-2); position: relative; }
.i4-map i::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--s4-violet-2); border-right: 0; }

/* ---------- Related pairs ---------- */
.i4-rel-sec { padding-top: clamp(80px, 9vw, 120px); padding-bottom: clamp(80px, 9vw, 120px); }
.i4-rel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.i4-rel-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 24px; border-radius: var(--s4-r);
  background: var(--s4-card); box-shadow: 0 0 0 1px var(--s4-line), 0 20px 40px -34px rgba(40,30,90,.4);
  text-decoration: none !important; color: var(--s4-ink) !important; transition: transform .45s var(--s4-snap), box-shadow .3s;
}
.i4-rel-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(109,92,246,.35), 0 30px 50px -30px rgba(40,30,90,.45); }
.i4-rel-card .i4-pair { margin-bottom: 8px; }
.i4-rel-card h3 { font-size: 21px; margin: 0; }
.i4-rel-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--s4-ink-2); }
.i4-rel-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--s4-line); font-size: 13px; color: var(--s4-ink-3); }
.i4-rel-meta b { font-family: var(--s4-display); font-size: 14px; color: var(--s4-violet-ink); white-space: nowrap; }
.i4-rel-go { position: absolute; right: 22px; top: 24px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--s4-paper); color: var(--s4-ink); transition: background .2s, color .2s, transform .4s var(--s4-snap); }
.i4-rel-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.i4-rel-card:hover .i4-rel-go { background: var(--s4-violet); color: #fff; transform: translateX(3px); }
.i4-rel-foot { margin-top: 28px; text-align: center; font-size: 15px; color: var(--s4-ink-3); }

/* ---------- Hub: the grid of pairs ---------- */
.i4-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 36px; }
.i4-filter button {
  font: 600 14px/1 var(--s4-body); padding: 11px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--s4-ink-2); box-shadow: 0 0 0 1px var(--s4-line) inset; transition: background .2s, color .2s;
}
.i4-filter button:hover { background: var(--s4-card); color: var(--s4-ink); }
.i4-filter button[aria-pressed="true"] { background: var(--s4-ink); color: #fff; box-shadow: none; }
.i4-filter button span { font-family: var(--s4-mono); font-weight: 500; font-size: 12px; opacity: .6; margin-left: 4px; }
.i4-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.i4-card {
  display: flex; flex-direction: column; border-radius: calc(var(--s4-r) + 2px); overflow: hidden;
  background: var(--s4-card); box-shadow: 0 0 0 1px var(--s4-line), 0 24px 50px -40px rgba(40,30,90,.45);
  text-decoration: none !important; color: var(--s4-ink) !important; transition: transform .45s var(--s4-snap), box-shadow .3s;
}
.i4-card[hidden] { display: none; }
.i4-card:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(109,92,246,.35), 0 34px 60px -36px rgba(40,30,90,.5); }
.i4-card-art { position: relative; height: 250px; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--s4-r) - 6px); }
.i4-card-art > .i4-card-scale { position: absolute; left: 50%; top: 50%; width: 480px; height: 430px; translate: -50% -50%; scale: .56; display: grid; place-items: center; }
.i4-card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 22px; flex: 1; }
.i4-card-body h3 { font-size: 21px; margin: 4px 0 0; }
.i4-card-body p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--s4-ink-2); }
.i4-card .i4-rel-meta { margin-top: auto; }
.i4-grid-note { margin: 34px auto 0; max-width: 640px; text-align: center; font-size: 15px; color: var(--s4-ink-3); }

/* ---------- Tool cloud (hub and pair pages) ---------- */
.s4-tools-logos .i4-app { width: 26px; height: 26px; border-radius: 7px; }
.s4-tools-logos .i4-app.is-mono { font-size: 11.5px; }
.i4-tools-more { list-style: none; margin: 18px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; }
.i4-tools-more li { font-size: 14px; padding: 7px 13px; border-radius: 999px; box-shadow: 0 0 0 1px var(--s4-line) inset; color: var(--s4-ink-2); }

/* ---------- Motion: the new art arrives like the svc4 fragments ---------- */
.js .s4-feat[data-rv] .i4-rec-a { opacity: 0; transform: translate(-14px, 10px); }
.js .s4-feat[data-rv] .i4-rec-b { opacity: 0; transform: translate(14px, 10px); }
.js .s4-feat[data-rv] .i4-flow-chip { opacity: 0; scale: .9; }
.js .s4-feat[data-rv].is-in .i4-rec-a { opacity: 1; transform: none; transition: transform .6s var(--s4-snap) .12s, opacity .2s linear .12s; }
.js .s4-feat[data-rv].is-in .i4-rec-b { opacity: 1; transform: none; transition: transform .6s var(--s4-snap) .3s, opacity .2s linear .3s; }
.js .s4-feat[data-rv].is-in .i4-flow-chip { opacity: 1; scale: 1; transition: scale .5s var(--s4-snap) .5s, opacity .2s linear .5s; }
.js .s4-feat[data-rv] .i4-bar i { transform: scaleX(0); transform-origin: 0 50%; }
.js .s4-feat[data-rv].is-in .i4-bar i { transform: none; transition: transform 1.1s var(--s4-soft-land) .3s; }
.js .s4-feat[data-rv].is-in .i4-bar i + i { transition-delay: .5s; }
.js .s4-feat[data-rv] .i4-match-row { opacity: 0; transform: translateY(8px); }
.js .s4-feat[data-rv].is-in .i4-match-row { opacity: 1; transform: none; transition: transform .5s var(--s4-snap), opacity .2s linear; }
.js .s4-feat[data-rv].is-in .i4-match-row:nth-child(3) { transition-delay: .08s; }
.js .s4-feat[data-rv].is-in .i4-match-row:nth-child(4) { transition-delay: .16s; }
.js .s4-feat[data-rv].is-in .i4-match-row:nth-child(5) { transition-delay: .24s; }
.js .s4-feat[data-rv].is-in .i4-match-row:nth-child(6) { transition-delay: .32s; }
.js .s4-feat[data-rv] .i4-route-dst { opacity: 0; transform: translateX(14px); }
.js .s4-feat[data-rv].is-in .i4-route-dst { opacity: 1; transform: none; transition: transform .55s var(--s4-snap) .25s, opacity .2s linear .25s; }
.js .s4-feat[data-rv].is-in .i4-route-d2 { transition-delay: .38s; }
.js .s4-feat[data-rv].is-in .i4-route-d3 { transition-delay: .5s; }

@media (prefers-reduced-motion: reduce) {
  .js .s4-feat[data-rv] .i4-rec-a, .js .s4-feat[data-rv] .i4-rec-b, .js .s4-feat[data-rv] .i4-flow-chip,
  .js .s4-feat[data-rv] .i4-bar i, .js .s4-feat[data-rv] .i4-match-row, .js .s4-feat[data-rv] .i4-route-dst { opacity: 1 !important; transform: none !important; scale: 1 !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .i4-honest { grid-template-columns: 1fr 1fr; }
  .i4-honest .i4-h-use { grid-column: 1 / -1; }
  .i4-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .i4-swap { grid-template-columns: 1fr; }
  .i4-swap-go { position: relative; left: auto; top: auto; translate: none; margin: -6px auto; rotate: 90deg; }
  .i4-facts { grid-template-columns: 1fr; gap: 10px; }
  .i4-honest { grid-template-columns: 1fr; }
  .i4-rel { grid-template-columns: 1fr; }
  .i4-map div { grid-template-columns: 1fr 22px 1fr; gap: 8px; }
}
@media (max-width: 640px) {
  .i4-grid { grid-template-columns: 1fr; }
  .i4-flow { min-height: 300px; }
  .i4-rec { width: 74%; padding: 12px 13px 8px; }
  .i4-rec dl div { padding: 6px 0; font-size: 12px; }
  .i4-flow-chip { top: 52%; font-size: 11.5px; }
  .i4-match, .i4-split, .i4-stages { width: 100%; }
  .i4-match-head, .i4-match-row { grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 54px; gap: 6px; }
  .i4-route { min-height: 300px; }
  .i4-route-src { width: 46%; padding: 12px; }
  .i4-route-dst { width: 48%; padding: 10px; }
  .i4-route-dst b { font-size: 12.5px; }
  .i4-swap-card { padding: 26px 22px; }
  .i4-swap-list li { font-size: 14.5px; }
  .i4-card-art { height: 200px; }
  .i4-card-art > .i4-card-scale { scale: .56; }
}

/* ---------- Section rhythm: paper sections that follow each other ---------- */
.i4-swap-sec { padding-bottom: clamp(56px, 7vw, 96px); }
.i4-moves { padding-top: clamp(56px, 7vw, 96px); }
.i4-honest-sec { padding-top: 0; }
.i4-grid-sec + .s4-hours { padding-top: 0; }
.i4-tools-sec { padding-bottom: 0; }

/* app badges keep their own box whatever span rules the card around them has */
body.svc4 .i4-app { display: inline-grid; place-items: center; white-space: nowrap; }
body.svc4 .i4-app.is-mono { color: #fff; font: 700 12px/1 var(--s4-display); letter-spacing: -0.02em; }
body.svc4 .i4-app-sm.is-mono, body.svc4 .s4-log-ic .i4-app.is-mono { font-size: 10.5px; }
body.svc4 .i4-app-lg.is-mono { font-size: 16px; }
body.svc4 .s4-chip-card .i4-app { width: 34px; height: 34px; border-radius: 10px; }

/* a reminder card with a chip under it sits a little higher */
.s4-art:has(.s4-pos-br) .s4-remind, .s4-art:has(.s4-pos-bl) .s4-remind { margin-top: -12%; }

@media (max-width: 640px) {
  .i4-route { min-height: 0; height: auto; display: grid; gap: 10px; width: 100%; align-content: center; }
  .i4-route .i4-route-dst, .i4-route.is-two .i4-route-d1, .i4-route.is-two .i4-route-d3 { top: auto; bottom: auto; }
  .i4-route-lines { display: none; }
  .i4-route-src, .i4-route-dst { position: relative; inset: auto; translate: none; width: 100%; }
  .i4-route-src { margin-bottom: 6px; }
  .i4-facts li { padding: 16px 18px; }
  .s4-art:has(.s4-remind) .s4-remind { margin-top: -22%; }
  .s4-art:has(.s4-remind) .s4-pos-tr { top: auto; bottom: 5%; }
}

/* single-column grids shrink to the screen instead of to their widest fragment */
@media (max-width: 1080px) { body.svc4 .s4-feat-wide { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { body.svc4 .s4-feats { grid-template-columns: minmax(0, 1fr); } }
.s4-feat, .s4-feat > * { min-width: 0; }

/* ---------- Feature art: a document being read ---------- */
.i4-paper {
  position: absolute; z-index: 2; width: min(58%, 280px); padding: 16px 16px 18px;
  background: #fff; color: var(--s4-ink); border-radius: 6px 6px 16px 6px; rotate: -2.5deg;
  box-shadow: 0 0 0 1px rgba(21,19,29,.07), 0 24px 50px -24px rgba(40,30,90,.38);
}
.i4-paper.i4-rec-a { left: 0; top: 2%; }
.i4-paper-top { display: flex; gap: 9px; align-items: center; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 2px solid var(--s4-ink); }
.i4-paper-top div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.i4-paper-top b { font-family: var(--s4-display); font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-paper-top div span { font-size: 11px; color: var(--s4-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-paper-ic { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; background: #fdecea; color: #c0392b; }
.i4-paper-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i4-paper-lines div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 5px; border-radius: 4px; font-family: var(--s4-mono); font-size: 11.5px; color: var(--s4-ink-2); }
.i4-paper-lines div span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.i4-paper-lines div b { font-weight: 500; color: var(--s4-ink); white-space: nowrap; }
.i4-paper-lines div.is-hl { background: rgba(255, 214, 102, .5); box-shadow: inset 0 0 0 1px rgba(201,130,31,.35); }
.i4-paper-fold { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; border-radius: 0 0 16px 0; background: linear-gradient(135deg, transparent 50%, #e8e5f1 50%); }

/* ---------- Feature art: a device readout ---------- */
.i4-device { width: min(86%, 380px); padding: 18px 20px 16px; background: linear-gradient(180deg, #1d1932, #14112a); color: var(--s4-on); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 40px 80px -30px rgba(0,0,0,.6); }
.i4-device-top { display: flex; align-items: center; gap: 9px; }
.i4-device-top b { font-size: 15px; color: #fff; }
.i4-device-top > span:last-child { margin-left: auto; font-family: var(--s4-mono); font-size: 11.5px; color: var(--s4-on-3); white-space: nowrap; }
.i4-device-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; }
.i4-device-metrics div { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 8px; border-radius: 10px; background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset; min-width: 0; }
.i4-device-metrics span { font-size: 11px; color: var(--s4-on-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i4-device-metrics b { font-family: var(--s4-mono); font-weight: 500; font-size: 19px; letter-spacing: -0.02em; color: #7ff0bf; white-space: nowrap; }
.i4-device-metrics small { margin-left: 3px; font-size: 11px; color: var(--s4-on-3); }
.i4-spark { display: block; width: 100%; height: 48px; overflow: visible; }
.i4-spark polyline { fill: none; stroke: #8b7bff; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.i4-spark .i4-spark-fill { fill: rgba(139,123,255,.16); stroke: none; }
.i4-device-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--s4-line-d); font-size: 12.5px; color: var(--s4-on-2); }
.i4-device-foot em { font-style: normal; font-family: var(--s4-mono); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(61,220,151,.14); color: #7ff0bf; white-space: nowrap; }

/* ---------- Feature art: a request learned from a front end ---------- */
.i4-req { width: min(92%, 440px); padding: 0; overflow: hidden; background: #0f0d1a; color: #d8d3ff; font-size: 12.5px; box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 40px 80px -30px rgba(0,0,0,.6); }
.i4-req-top { display: flex; align-items: center; gap: 9px; padding: 12px 14px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.07); }
.i4-req-top b { font-size: 13.5px; color: #fff; }
.i4-req-top > span:last-child { margin-left: auto; font-size: 11px; color: var(--s4-on-3); }
.i4-req-m { font-family: var(--s4-mono); font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: rgba(61,220,151,.16); color: #7ff0bf; }
.i4-req-url { display: block; padding: 12px 14px 6px; font-family: var(--s4-mono); font-size: 12px; line-height: 1.5; color: #fff; overflow-wrap: anywhere; }
.i4-req-url span { color: var(--s4-on-3); }
.i4-req-params { display: grid; gap: 4px; padding: 2px 14px 10px; }
.i4-req-params div { display: flex; gap: 10px; font-family: var(--s4-mono); font-size: 11.5px; min-width: 0; }
.i4-req-params span { flex: none; min-width: 74px; color: #c9c2ff; }
.s4-ui .i4-req-params b, .s4-ui .i4-req-json b { font-family: var(--s4-mono); font-weight: 500; letter-spacing: 0; }
.i4-req-params b { color: #ffd38a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i4-req-json { margin: 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); font-family: var(--s4-mono); font-size: 11.5px; line-height: 1.6; color: var(--s4-on-2); white-space: pre; overflow: hidden; }
.i4-req-json span { color: #c9c2ff; }
.i4-req-json b { color: #7ff0bf; }
.i4-req-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 12px; font-size: 11.5px; color: var(--s4-on-2); }

/* ---------- Hub: the directory of every connection ---------- */
.i4-grid-sec { padding-bottom: clamp(48px, 6vw, 88px); }
.i4-dir-sec { padding-top: clamp(48px, 6vw, 88px); }
.i4-dir-tools { display: grid; justify-items: center; gap: 16px; margin: 0 auto 44px; }
.i4-dir-tools[hidden] { display: none; }
.i4-dir-tools .i4-filter { margin: 0; }
.i4-dir-search { display: flex; align-items: center; gap: 10px; width: min(560px, 100%); height: 54px; padding: 0 18px; border-radius: 999px; background: var(--s4-card); box-shadow: 0 0 0 1px var(--s4-line), 0 14px 30px -22px rgba(40,30,90,.4); }
.i4-dir-search:focus-within { box-shadow: 0 0 0 2px var(--s4-violet), 0 14px 30px -22px rgba(40,30,90,.4); }
.i4-dir-search > span { color: var(--s4-ink-3); display: grid; }
.i4-dir-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i4-dir-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px var(--s4-body); color: var(--s4-ink); }
.i4-dir { display: grid; gap: clamp(44px, 5vw, 64px); }
.i4-dir-group[hidden] { display: none; }
.i4-dir-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font-size: clamp(22px, 2vw, 27px); }
.i4-dir-h span { font-family: var(--s4-mono); font-size: 13px; font-weight: 500; color: var(--s4-ink-3); }
.i4-dir-blurb { margin: 0 0 18px; font-size: 15px; color: var(--s4-ink-3); }
.i4-dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.i4-dir-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 15px; border-radius: 18px;
  background: var(--s4-card); box-shadow: 0 0 0 1px var(--s4-line); text-decoration: none !important; color: var(--s4-ink) !important;
  transition: transform .4s var(--s4-snap), box-shadow .25s;
}
.i4-dir-card[hidden] { display: none; }
.i4-dir-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(109,92,246,.35), 0 20px 40px -28px rgba(40,30,90,.45); }
.i4-dir-card .i4-pair { margin-bottom: 4px; }
.i4-dir-card .i4-app { width: 24px; height: 24px; border-radius: 7px; }
.i4-dir-card b { font-family: var(--s4-display); font-weight: 700; font-size: 16.5px; letter-spacing: -0.015em; line-height: 1.25; }
.i4-dir-p { font-size: 13.5px; line-height: 1.5; color: var(--s4-ink-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.i4-dir-card em { margin-top: auto; padding-top: 6px; font-style: normal; font-family: var(--s4-display); font-weight: 700; font-size: 13.5px; color: var(--s4-violet-ink); }
.i4-dir-empty { margin: 24px auto 0; max-width: 560px; text-align: center; font-size: 15px; color: var(--s4-ink-3); }
@media (max-width: 1080px) { .i4-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .i4-dir-grid { grid-template-columns: minmax(0, 1fr); }
  .i4-dir-tools .i4-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: none; }
  .i4-dir-tools .i4-filter button { flex: none; }
  .i4-paper { width: 72%; }
  .i4-device { width: 100%; }
  .i4-device-metrics b { font-size: 16px; }
  .i4-req { width: 100%; }
}

/* ---------- Try one record (scripts/integrations-demos.cjs, assets/int4-try.js) ----------
   A record in the first system the visitor can change, and what lands on the
   other side. Light cards on the paper band, the same surfaces as the swap. */
.i4-try-sec { padding-bottom: clamp(40px, 5vw, 64px); }
.i4-try { display: grid; grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.1fr); gap: 22px; align-items: start; }
.i4-try-from, .i4-try-card {
  background: var(--s4-card); border-radius: var(--s4-r); padding: 26px;
  box-shadow: 0 0 0 1px var(--s4-line), 0 24px 48px -36px rgba(40,30,90,.4);
}
.i4-try-from { display: grid; gap: 16px; box-shadow: 0 0 0 1.5px var(--s4-violet), 0 24px 60px -34px rgba(109,92,246,.55); }
.i4-try-to { display: grid; gap: 14px; }
.i4-try-step { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--s4-display); font-weight: 700; font-size: 18px; letter-spacing: -0.015em; color: var(--s4-ink); }
.i4-try-step span { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 14px; color: #fff; background: var(--s4-violet); }
.i4-try-to > .i4-try-step { padding: 0 4px; min-height: 28px; }
.i4-try-card[hidden] { display: none; }
.i4-try-top { display: flex; align-items: center; gap: 12px; }
.i4-try-top b { font-family: var(--s4-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; line-height: 1.2; }
.i4-try-top .s4-tag { margin-left: auto; flex: none; color: #0c7a55; background: var(--s4-green-soft); box-shadow: none; }
.i4-try-top .s4-tag-in { color: var(--s4-violet-ink); background: var(--s4-violet-soft); }
.i4-try-fld { display: grid; gap: 7px; }
.i4-try-fld > span:first-child { font-size: 14px; font-weight: 600; color: var(--s4-ink-2); }
.i4-try-fld input, .i4-try-fld select {
  width: 100%; height: 50px; padding: 0 14px; border: 0; border-radius: 14px; appearance: none; -webkit-appearance: none;
  font: 500 16px var(--s4-body); color: var(--s4-ink);
  background: var(--s4-paper); box-shadow: 0 0 0 1px var(--s4-line) inset;
}
.i4-try-fld input:focus, .i4-try-fld select:focus { outline: 2px solid var(--s4-violet); outline-offset: 1px; }
.i4-try-money, .i4-try-sel { position: relative; display: block; }
.i4-try-money i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; font-style: normal; font-weight: 600; color: var(--s4-ink-3); pointer-events: none; }
.i4-try-money input { padding-left: 28px; font-variant-numeric: tabular-nums; }
.i4-try-sel::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -7px; border-right: 2px solid var(--s4-ink-3); border-bottom: 2px solid var(--s4-ink-3); rotate: 45deg; pointer-events: none; }
.i4-try-sel select { padding-right: 38px; cursor: pointer; text-overflow: ellipsis; }
.i4-try-go { align-self: center; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--s4-violet); box-shadow: 0 10px 30px -10px rgba(109,92,246,.8); }
.i4-try-go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.i4-try-card dl { margin: 16px 0 0; display: grid; }
.i4-try-card dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; padding: 11px 0; border-top: 1px solid var(--s4-line); font-size: 15.5px; line-height: 1.45; }
.i4-try-card dt { color: var(--s4-ink-3); }
.i4-try-card dd { margin: 0; text-align: right; color: var(--s4-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.i4-try-card .is-total dt, .i4-try-card .is-total dd { font-family: var(--s4-display); font-weight: 700; font-size: 17px; color: var(--s4-ink); }
.i4-try-card .is-ok dd { color: #0c7a55; font-weight: 600; }
.i4-try-card .is-warn dd { color: #9a5f0c; font-weight: 600; }
.i4-try-card.is-flash { animation: i4-try-flash .7s var(--s4-glide); }
@keyframes i4-try-flash { from { box-shadow: 0 0 0 2px var(--s4-violet), 0 24px 48px -36px rgba(40,30,90,.4); } to { box-shadow: 0 0 0 1px var(--s4-line), 0 24px 48px -36px rgba(40,30,90,.4); } }
.i4-try-note { margin: 26px auto 0; max-width: 720px; text-align: center; font-size: 14.5px; color: var(--s4-ink-3); }
.i4-try-note a { font-weight: 600; white-space: nowrap; }
@media (max-width: 900px) {
  .i4-try { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .i4-try-go { display: none; }
  .i4-try-to { margin-top: 10px; }
  .i4-try-from, .i4-try-card { padding: 22px 20px; }
}
@media (max-width: 480px) {
  .i4-try-card dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .i4-try-card dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .i4-try-card.is-flash { animation: none; } }
