/* integrate.html */
.i-head { padding: 56px 0 40px; position: relative; overflow: hidden; }
.i-head::before { content: ""; position: absolute; z-index: -1; width: 900px; height: 700px; left: 50%; margin-left: -450px; top: -420px; border-radius: 50%; background: radial-gradient(closest-side, var(--hero-glow-1), transparent); }
.view { display: none; padding-bottom: 88px; }
.view.on { display: block; animation: fadeUp .6s var(--ease-out); }
.i-grid { display: grid; grid-template-columns: minmax(0, 560px) auto; gap: 88px; justify-content: center; align-items: start; }
@media (max-width: 1000px) { .i-grid { grid-template-columns: 1fr; gap: 36px; } .i-phone { order: -1; } .i-copy { max-width: 640px; margin: 0 auto; } }
.i-phone { display: grid; justify-items: center; position: sticky; top: 72px; }
@media (max-width: 1000px) { .i-phone { position: static; } }
.i-phone .device { --dh: 760px; --dw: 360px; }
@media (max-width: 420px) { .i-phone .device { --dw: calc(100vw - 24px); --dh: 720px; } }
.flow { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 6px; }
.flow li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; border: 1px solid transparent; transition: all .45s var(--spring); }
.flow li b { display: block; font-size: 16px; }
.flow li span { font-size: 14px; color: var(--text-2); }
.flow .f-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--fill-2); color: var(--text-2); flex: 0 0 auto; transition: all .45s var(--spring); }
.flow li.cur { background: var(--card); border-color: var(--hair); box-shadow: var(--shadow-sm); }
.flow li.cur .f-n { background: var(--accent); color: #fff; transform: scale(1.08); }
.flow li.done .f-n { background: var(--green); color: #fff; }
.events { margin-top: 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--hair); padding: 12px 16px; min-height: 64px; }
.ev-h { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; }
.ev { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12.5px; direction: ltr; padding: 4px 0; animation: rowIn .5s var(--ease-out) both; }
.ev i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.ev.ok i { background: var(--green); }
.ev .t { color: var(--text-3); }

/* partner app (deliberately a different brand) */
.papp { position: absolute; inset: 0; background: #fff8f2; color: #2a1b12; padding: 58px 16px 90px; font-size: 14px; overflow: hidden; }
:root[data-theme="dark"] .papp { background: #1a120d; color: #f6ece4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .papp { background: #1a120d; color: #f6ece4; } }
.pa-top { display: flex; justify-content: space-between; align-items: center; }
.pa-hello { font-size: 13px; opacity: .65; }
.pa-brand { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.pa-pts { background: linear-gradient(140deg, #ff8a3d, #ff5e62); color: #fff; padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: 12.5px; }
.pa-chips { display: flex; gap: 6px; margin: 14px 0; }
.pa-chips span { padding: 6px 12px; border-radius: 999px; background: rgba(255, 138, 61, .12); font-size: 12.5px; font-weight: 600; }
.pa-chips span.on { background: #2a1b12; color: #fff8f2; }
:root[data-theme="dark"] .pa-chips span.on { background: #f6ece4; color: #1a120d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-chips span.on { background: #f6ece4; color: #1a120d; } }
.pa-hero { border-radius: 22px; padding: 16px 18px; color: #fff; background: linear-gradient(135deg, #ff8a3d, #ff5e62 60%, #d63384); box-shadow: 0 14px 30px rgba(255, 94, 98, .3); }
.pa-hero-t { font-size: 12.5px; opacity: .9; }
.pa-hero-n { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.pa-hero-s { font-size: 12.5px; opacity: .9; }
.pa-h { font-weight: 700; margin: 18px 2px 8px; }
.pa-card { display: flex; gap: 11px; align-items: center; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .9); box-shadow: 0 2px 10px rgba(80, 40, 10, .06); margin-bottom: 8px; transition: all .5s var(--spring); }
:root[data-theme="dark"] .pa-card { background: rgba(255, 255, 255, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-card { background: rgba(255, 255, 255, .06); } }
.pa-card b { display: block; font-size: 14px; }
.pa-card .grow span { font-size: 12px; opacity: .6; }
.pa-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: 0 0 auto; }
.pa-ic-a { background: linear-gradient(140deg, #ff6b6b, #e5383b); }
.pa-ic-c { background: linear-gradient(140deg, #7bd88f, #2f9e44); }
.pa-ic-d { background: linear-gradient(140deg, #c49a6c, #8b5e34); font-size: 16px; }
.pa-btn { appearance: none; border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; font-size: 13px; color: #fff; background: #2a1b12; cursor: pointer; transition: transform .4s var(--spring), background-color .3s; }
.pa-btn:active { transform: scale(.92); }
.pa-btn.ghost { background: rgba(255, 138, 61, .14); color: #c2410c; }
:root[data-theme="dark"] .pa-btn:not(.ghost) { background: #f6ece4; color: #1a120d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pa-btn:not(.ghost) { background: #f6ece4; color: #1a120d; } }
.pa-btn.done { background: #2f9e44 !important; color: #fff !important; }
.pa-card.done { box-shadow: 0 0 0 2px #2f9e44, 0 8px 20px rgba(47, 158, 68, .18); }
.pa-tabs { position: absolute; inset-inline: 0; bottom: 0; height: 78px; padding: 12px 20px 26px; display: flex; justify-content: space-around; font-size: 11.5px; font-weight: 600; opacity: .9; background: inherit; border-top: 1px solid rgba(120, 60, 20, .1); }
.pa-tabs span { opacity: .5; } .pa-tabs span.on { opacity: 1; color: #ff5e62; }
.pa-toast { position: absolute; top: 54px; inset-inline: 14px; z-index: 50; padding: 12px 14px; border-radius: 16px; background: #2f9e44; color: #fff; font-weight: 700; font-size: 13.5px; text-align: center; transform: translateY(calc(-100% - 80px)); transition: transform .7s var(--spring); box-shadow: 0 10px 30px rgba(47, 158, 68, .35); }
.pa-toast.on { transform: none; }

/* our hosted sheet inside the partner app */
.hsheet { color: var(--text); }
.hsheet .sheet-body { padding: 10px 20px 34px; }
.powered { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-3); margin: 2px 0 10px; }
.brand-mark.sm { width: 18px; height: 18px; border-radius: 6px; box-shadow: none; }
.brand-mark.sm svg { width: 11px; height: 11px; }
.hs-stage { display: none; }
.hs-stage.on { display: block; animation: fadeUp .45s var(--ease-out); }
.hs-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; text-align: center; }
.hs-save { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 10px; padding: 12px 14px; border-radius: 16px; background: var(--green-soft); font-weight: 600; font-size: 14px; }
.hs-save b { font-size: 24px; color: var(--green-ink); }
.kv.mini { display: grid; border-radius: 14px; background: var(--fill-2); padding: 2px 12px; }
.kv.mini div { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--hair); }
.kv.mini div:last-child { border-bottom: 0; }
.kv.mini span { color: var(--text-2); }
.hs-disc { font-size: 12px; color: var(--text-2); line-height: 1.45; margin: 10px 2px 12px; }
.hs-go svg { width: 20px; height: 20px; }
.hs-run { display: grid; justify-items: center; gap: 8px; padding: 6px 0 4px; }
.hs-ring { width: 150px; height: 150px; }
.hs-ring .ring-pct { font-size: 34px; }
.hs-done { position: absolute; inset: 20px; border-radius: 50%; background: var(--green); display: grid; place-items: center; color: #fff; transform: scale(0); transition: transform .6s var(--spring); }
.hs-done svg { width: 54px; height: 54px; }
.hs-ring.done .hs-done { transform: scale(1); }
.hs-step { font-weight: 700; font-size: 16px; margin-top: 6px; min-height: 24px; text-align: center; }
.hs-sub { font-size: 12.5px; color: var(--text-3); text-align: center; min-height: 18px; }

/* headless sequence */
.hl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .hl { grid-template-columns: 1fr; } }
.seq { padding: 22px 20px; }
.lanes { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font-weight: 600; font-size: 14px; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.lanes > div { display: grid; justify-items: center; gap: 8px; }
.lanes .icon-chip { width: 38px; height: 38px; border-radius: 11px; }
.lanes .icon-chip svg { width: 20px; height: 20px; }
.msgs { position: relative; display: grid; gap: 2px; padding-top: 6px; }
.msgs::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(16.66% - 1px), var(--hair) calc(16.66% - 1px), var(--hair) calc(16.66% + 1px), transparent calc(16.66% + 1px), transparent calc(50% - 1px), var(--hair) calc(50% - 1px), var(--hair) calc(50% + 1px), transparent calc(50% + 1px), transparent calc(83.33% - 1px), var(--hair) calc(83.33% - 1px), var(--hair) calc(83.33% + 1px), transparent calc(83.33% + 1px)); pointer-events: none; }
.msg { display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; min-height: 52px; cursor: pointer; border-radius: 12px; position: relative; opacity: .28; transition: opacity .4s, background-color .2s; appearance: none; border: 0; background: none; font: inherit; color: inherit; padding: 0; }
.msg:hover { background: var(--fill-2); }
.msg.shown { opacity: 1; }
.msg.sel { background: var(--accent-soft); }
.msg .bar { position: relative; height: 34px; display: grid; place-items: center; }
.msg .bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: currentColor; opacity: .55; transform-origin: var(--from, right); transform: scaleX(0); transition: transform .6s var(--ease-out); }
.msg.shown .bar::before { transform: scaleX(1); }
.msg .bar::after { content: ""; position: absolute; top: 50%; margin-top: -5px; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; opacity: 0; transition: opacity .2s .45s; }
.msg.shown .bar::after { opacity: .8; }
.msg.to-left .bar::after { left: -1px; border-right: 8px solid currentColor; }
.msg.to-right .bar::after { right: -1px; border-left: 8px solid currentColor; }
.msg .lbl { position: relative; z-index: 1; background: var(--card-solid); padding: 3px 9px; border-radius: 8px; font-family: var(--mono); font-size: 11.5px; direction: ltr; white-space: nowrap; border: 1px solid var(--hair); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.msg.c-api { color: var(--accent); } .msg.c-prov { color: var(--green-ink); } .msg.c-dev { color: var(--orange-ink); }
.msg .lbl { color: var(--text); }
.msg .dev-note { grid-column: 1 / -1; font-size: 12px; color: var(--orange-ink); text-align: center; margin-top: -4px; }
.json { position: sticky; top: 72px; }
@media (max-width: 1000px) { .json { position: static; } }
.ltr-t { direction: ltr; text-align: right; font-family: var(--mono); font-size: 15px; }
.json pre.code { min-height: 240px; max-height: 420px; overflow: auto; }
.note { display: flex; gap: 12px; align-items: center; margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.note .icon-chip { width: 34px; height: 34px; border-radius: 10px; }
.note .icon-chip svg { width: 18px; height: 18px; }
.note code { font-family: var(--mono); font-size: 12px; background: var(--fill-2); padding: 1px 5px; border-radius: 5px; }

.msg .lbl.he { font-family: var(--font); direction: rtl; font-weight: 600; }
.i-head { padding: 44px 0 32px; }
