/* ==========================================================================
 * Single integration page (blocks/integration-details).
 *
 * The hero reuses the landing hero (.lh-*, landing.css). Everything else is
 * prefixed .ip-. Rules that must beat the rich-text and editorial styles
 * carry :not(#ip).
 * ========================================================================== */

.ip-hero,
.ip-section {
	--ip-line: var(--stoke, #ffffff1a);
	--ip-muted: #a5a2b8;
	--ip-soft: #cfcbe0;
	--ip-good: #5ee6a8;
	--ip-ease: cubic-bezier(.2, .8, .2, 1);
	color: var(--text, #f3f3f3);
	font-family: Inter, sans-serif;
}
.ip-section *, .ip-section *::before, .ip-section *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- Hero */

.ip-crumbs {
	display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
	margin-bottom: 26px; color: var(--ip-muted); font-size: 14px; line-height: 1.4;
}
.ip-crumbs a { color: var(--ip-soft); text-decoration: none; transition: color .2s ease; }
.ip-crumbs a:hover, .ip-crumbs a:focus-visible { color: #fff; }

.ip-pair { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 24px; }
.ip-logo {
	position: relative; display: inline-grid; place-items: center; flex: 0 0 auto;
	width: 76px; height: 76px; border-radius: 22px;
	background: linear-gradient(180deg, #ffffff14, #ffffff06);
	border: 1px solid #ffffff24;
	box-shadow: inset 0 0 22px 0 #7350ff40, 0 18px 40px -20px #000;
}
.ip-logo-img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; }
.ip-logo-txt { color: #fff; font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.ip-logo.is-prosyo { background: linear-gradient(145deg, #2a1660, #120a2b); }
.ip-logo.is-sm { width: 52px; height: 52px; border-radius: 16px; }
.ip-logo.is-sm .ip-logo-img { width: 32px; height: 32px; border-radius: 7px; }
.ip-logo.is-xs { width: 22px; height: 22px; border-radius: 7px; box-shadow: none; border: 0; background: #fff; }
.ip-logo.is-xs .ip-logo-img { width: 16px; height: 16px; border-radius: 3px; }
.ip-logo.is-xs .ip-logo-txt { font-size: 10px; color: #120a2b; }

.ip-link {
	position: relative; display: flex; align-items: center; justify-content: space-between;
	width: clamp(70px, 10vw, 120px); height: 2px; margin: 0 6px;
	background: linear-gradient(90deg, #b638ff00, #b638ff 20%, #ff75d4 80%, #ff75d400);
}
.ip-link i {
	position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
	background: #fff; box-shadow: 0 0 12px 3px #ff75d4;
	animation: ip-travel 2.4s linear infinite;
}
.ip-link i:nth-child(2) { animation-delay: -.8s; }
.ip-link i:nth-child(3) { animation-delay: -1.6s; }
@keyframes ip-travel {
	0% { left: 0; opacity: 0; }
	15% { opacity: 1; }
	85% { opacity: 1; }
	100% { left: calc(100% - 8px); opacity: 0; }
}

.ip-hero .lh-title .ip-tail { display: block; margin-top: 4px; }

/* Penny chat in the hero */
.ip-visual { max-width: 660px; }
.ip-chat {
	position: relative; overflow: hidden; text-align: left;
	border-radius: 22px; border: 1px solid #ffffff24;
	background: linear-gradient(180deg, #1b1038f2, #0e0820f2);
	box-shadow: 0 40px 90px -40px #000, inset 0 1px 0 #ffffff14;
}
.ip-chat-head {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 18px; border-bottom: 1px solid #ffffff14; background: #ffffff06;
}
.ip-chat-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #b638ff66; }
.ip-chat-head > span:not(.ip-chat-tag) { display: flex; flex-direction: column; line-height: 1.25; }
.ip-chat-head b { color: #fff; font-size: 15px; font-weight: 600; }
.ip-chat-head i { color: var(--ip-good); font-style: normal; font-size: 12.5px; }
.ip-chat-head > span:not(.ip-chat-tag) { min-width: 0; }
.ip-chat-head b, .ip-chat-head i { white-space: nowrap; }
.ip-chat-av { flex: 0 0 auto; }
.ip-chat-tag {
	flex: 0 0 auto; white-space: nowrap;
	margin-left: auto; padding: 4px 10px; border-radius: 999px;
	background: linear-gradient(135deg, #7350ff, #b638ff); color: #fff; font-size: 12px; font-weight: 600;
}
.ip-chat-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 22px; }

.ip-chat .ip-msg:not(#ip) { margin: 0; font-size: 14.5px; line-height: 1.55; }
.ip-you {
	align-self: flex-end; max-width: 88%;
	padding: 12px 16px; border-radius: 18px 18px 6px 18px;
	background: linear-gradient(135deg, #7350ff, #b638ff); color: #fff;
}
.ip-at { padding: 1px 7px; border-radius: 6px; background: #ffffff2e; font-weight: 600; }
.ip-penny {
	align-self: flex-start; max-width: 92%;
	padding: 14px 16px; border-radius: 18px 18px 18px 6px;
	background: #ffffff0d; border: 1px solid #ffffff14; color: var(--ip-soft);
}
.ip-used {
	display: inline-flex; align-items: center; gap: 8px;
	margin-bottom: 10px; padding: 4px 10px 4px 4px; border-radius: 999px;
	background: #ffffff10; color: #fff; font-size: 12.5px; font-weight: 500;
}
.ip-chat .ip-done:not(#ip) { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ip-chat .ip-done > li:not(#ip) { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 0; color: var(--ip-soft); font-size: 14px; line-height: 1.45; }
.ip-done svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; color: var(--ip-good); }

.ip-approve {
	display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px;
	padding: 14px 16px; border-radius: 16px;
	background: #5ee6a80f; border: 1px solid #5ee6a840;
}
.ip-approve-k { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; color: var(--ip-good); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ip-approve-k svg { width: 14px; height: 14px; }
.ip-approve b { color: #fff; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.ip-approve-btns { display: inline-flex; gap: 8px; }
.ip-yes, .ip-no { padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.ip-yes { background: var(--ip-good); color: #0b1f16; box-shadow: 0 0 0 0 #5ee6a899; animation: ip-pulse 2.4s ease-out 2.6s infinite; }
.ip-no { background: #ffffff10; color: var(--ip-soft); }
@keyframes ip-pulse { 0% { box-shadow: 0 0 0 0 #5ee6a888; } 70%, 100% { box-shadow: 0 0 0 10px #5ee6a800; } }

/* Chat entrance (landing.js adds .ui-armed, then .is-in) */
.ip-chat.ui-armed .ip-you,
.ip-chat.ui-armed .ip-penny,
.ip-chat.ui-armed .ip-done > li,
.ip-chat.ui-armed .ip-approve { opacity: 0; translate: 0 10px; }
.ip-chat.ui-armed.is-in .ip-you { animation: ip-in .6s var(--ip-ease) .2s both; }
.ip-chat.ui-armed.is-in .ip-penny { animation: ip-in .6s var(--ip-ease) .8s both; }
.ip-chat.ui-armed.is-in .ip-done > li { animation: ip-in .5s var(--ip-ease) both; animation-delay: calc(1.2s + var(--i, 0) * .45s); }
.ip-chat.ui-armed.is-in .ip-approve { animation: ip-in .6s var(--ip-ease) 2.7s both; }
@keyframes ip-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* ------------------------------------------------------------- Sections */

.ip-section { position: relative; padding: clamp(56px, 7vw, 96px) 0; }
.ip-section + .ip-section { padding-top: 0; }

.ip-caption {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 5px 12px; border-radius: 999px;
	background: #ffffff08; border: 1px solid #ffffff14; box-shadow: inset 0 0 14px 0 #7350ff33;
	color: var(--quinary, #e9c4ff); font-size: 13px; font-weight: 500; line-height: 1.5;
}
.ip-head { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 760px; margin: 0 auto clamp(32px, 4vw, 48px); text-align: center; }
.ip-head.is-left { align-items: flex-start; margin: 0; text-align: left; }
.ip-section .ip-h2:not(#ip) {
	margin: 0; color: #fff; font-family: Inter, sans-serif;
	font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -.03em; text-wrap: balance;
}
.ip-section .ip-h2 .gradient-span { background-image: linear-gradient(90deg, #c86bff 0%, #ff75d4 55%, #b638ff 100%); }
.ip-section .ip-lead:not(#ip) { margin: 0; max-width: 620px; color: var(--ip-muted); font-size: 17px; line-height: 1.6; }

/* Overview: body + sticky card */
.ip-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.ip-prose { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.ip-prose .w-richtext { width: 100%; }
.ip-prose .w-richtext > :first-child { margin-top: 0; }
.ip-prose .w-richtext h2:not(#ip) { margin: 40px 0 14px; color: #fff; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -.02em; }
.ip-prose .w-richtext h3:not(#ip) { margin: 28px 0 10px; color: #fff; font-size: 20px; line-height: 1.3; }
.ip-prose .w-richtext p:not(#ip) { color: var(--ip-soft); font-size: 17px; line-height: 1.75; }
.ip-prose .w-richtext ul:not(#ip) { display: grid; gap: 12px; margin: 18px 0 24px; padding: 0; list-style: none; }
.ip-prose .w-richtext ul > li:not(#ip) {
	position: relative; margin: 0; padding: 14px 16px 14px 46px;
	border-radius: 14px; border: 1px solid #ffffff14; background: #ffffff06;
	color: var(--ip-soft); font-size: 16px; line-height: 1.6;
}
.ip-prose .w-richtext ul > li:not(#ip)::before {
	content: ""; position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; border-radius: 50%;
	background: #5ee6a826 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235ee6a8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.ip-prose .w-richtext li strong { color: #fff; }
.ip-prose .w-richtext a { color: var(--quinary, #e9c4ff); }

.ip-aside { position: sticky; top: 110px; }
.ip-card {
	display: flex; flex-direction: column; gap: 20px;
	padding: 24px; border-radius: 24px;
	border: 1px solid #ffffff1f;
	background: linear-gradient(180deg, #1b1038, #0f0922);
	box-shadow: 0 40px 80px -50px #b638ff99, inset 0 1px 0 #ffffff14;
}
.ip-card-head { display: flex; align-items: center; gap: 14px; }
.ip-card-head > span:last-child { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.ip-card-head b { color: #fff; font-size: 18px; font-weight: 600; }
.ip-card-head i { color: var(--ip-muted); font-style: normal; font-size: 13.5px; }
.ip-card .ip-facts:not(#ip) { display: grid; gap: 0; margin: 0; padding: 0; }
.ip-facts > div { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid #ffffff12; }
.ip-facts dt { color: var(--ip-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ip-facts dd { margin: 0; color: #fff; font-size: 14.5px; line-height: 1.45; }
.ip-card-cta { display: grid; gap: 10px; }
.ip-card-cta > .button { width: 100%; }
.ip-card .ip-card-links:not(#ip) { display: grid; gap: 8px; margin: 0; padding: 14px 0 0; border-top: 1px solid #ffffff12; list-style: none; }
.ip-card .ip-card-links > li:not(#ip) { margin: 0; padding: 0; }
.ip-card-links a { color: var(--quinary, #e9c4ff); font-size: 14px; text-decoration: none; }
.ip-card-links a:hover, .ip-card-links a:focus-visible { color: #fff; text-decoration: underline; }

/* Prompts */
.ip-prompt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ip-prompt {
	position: relative; display: flex; flex-direction: column; gap: 16px; margin: 0;
	padding: 24px; border-radius: 20px; border: 1px solid #ffffff17;
	background: linear-gradient(180deg, #ffffff0b, #ffffff03);
	transition: border-color .3s ease, transform .4s var(--ip-ease), box-shadow .4s var(--ip-ease);
}
.ip-prompt:hover { border-color: #b638ff66; transform: translateY(-3px); box-shadow: 0 30px 60px -40px #b638ffaa; }
.ip-prompt-n { color: #b638ff; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.ip-prompt blockquote:not(#ip) { margin: 0; padding: 0; border: 0; }
.ip-prompt blockquote p:not(#ip) { margin: 0; color: #fff; font-size: 16.5px; line-height: 1.55; }
.ip-prompt blockquote p::before { content: "“"; color: #ff75d4; }
.ip-prompt blockquote p::after { content: "”"; color: #ff75d4; }
.ip-copy {
	align-self: flex-start; margin-top: auto;
	display: inline-flex; align-items: center; gap: 7px;
	padding: 7px 12px; border-radius: 10px; border: 1px solid #ffffff1f; background: #ffffff08;
	color: var(--ip-soft); font: 500 13px/1.3 Inter, sans-serif; cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ip-copy svg { width: 15px; height: 15px; }
.ip-copy:hover, .ip-copy:focus-visible { color: #fff; border-color: #b638ff88; background: #b638ff1f; outline: none; }
.ip-copy.is-done { color: var(--ip-good); border-color: #5ee6a866; }

/* Steps */
.ip-step-row:not(#ip) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ip-step:not(#ip) {
	position: relative; display: flex; flex-direction: column; gap: 12px; margin: 0;
	padding: 26px; border-radius: 22px; border: 1px solid #ffffff17;
	background: radial-gradient(90% 60% at 0% 0%, #7350ff24, transparent 70%), #ffffff05;
}
.ip-step:not(#ip):not(:last-child)::after {
	content: ""; position: absolute; top: 48px; right: -18px; width: 18px; height: 2px;
	background: linear-gradient(90deg, #b638ff, #ff75d4);
}
.ip-step-top { display: flex; align-items: center; justify-content: space-between; }
.ip-step-ico {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
	background: linear-gradient(135deg, #7350ff, #b638ff); color: #fff;
	box-shadow: 0 10px 30px -10px #b638ff;
}
.ip-step-ico svg { width: 20px; height: 20px; }
.ip-step-n { color: var(--ip-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ip-step h3:not(#ip) { margin: 6px 0 0; color: #fff; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.ip-step p:not(#ip) { margin: 0; color: var(--ip-muted); font-size: 15.5px; line-height: 1.6; }

/* Safety */
.ip-safety-box {
	display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: center;
	padding: clamp(28px, 4vw, 52px); border-radius: 28px; border: 1px solid #ffffff1f;
	background: radial-gradient(70% 90% at 100% 0%, #b638ff2e, transparent 60%), radial-gradient(60% 80% at 0% 100%, #7350ff2e, transparent 60%), #0f0922;
}
.ip-trust-grid:not(#ip) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ip-trust-grid > li:not(#ip) {
	display: flex; flex-direction: column; gap: 6px; margin: 0;
	padding: 18px; border-radius: 18px; border: 1px solid #ffffff14; background: #ffffff07;
}
.ip-trust-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 10px; background: #5ee6a81f; color: var(--ip-good); }
.ip-trust-ico svg { width: 17px; height: 17px; }
.ip-trust-grid b { color: #fff; font-size: 15.5px; font-weight: 600; }
.ip-trust-grid span:not(.ip-trust-ico) { color: var(--ip-muted); font-size: 14px; line-height: 1.55; }

/* Card entrances (landing.js) */
.ip-prompt.ui-armed, .ip-step.ui-armed, .ip-trust-grid > li.ui-armed { opacity: 0; translate: 0 18px; }
.ip-prompt.ui-armed.is-in, .ip-step.ui-armed.is-in, .ip-trust-grid > li.ui-armed.is-in { opacity: 1; translate: 0 0; transition: opacity .7s ease, translate .8s var(--ip-ease); }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 991px) {
	.ip-overview-grid { grid-template-columns: 1fr; }
	.ip-aside { position: static; order: -1; }
	.ip-prompt-grid, .ip-step-row:not(#ip) { grid-template-columns: 1fr; }
	.ip-step:not(#ip)::after { display: none; }
	.ip-safety-box { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	.ip-logo { width: 60px; height: 60px; border-radius: 18px; }
	.ip-logo-img { width: 36px; height: 36px; }
	.ip-link { width: 56px; }
	.ip-chat-body { padding: 16px 14px 18px; }
	.ip-you, .ip-penny { max-width: 100%; }
	.ip-approve { grid-template-columns: 1fr; }
	.ip-trust-grid:not(#ip) { grid-template-columns: 1fr; }
	.ip-prose .w-richtext p:not(#ip) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.ip-link i, .ip-yes { animation: none; }
	.ip-link i { display: none; }
	.ip-chat.ui-armed .ip-you, .ip-chat.ui-armed .ip-penny, .ip-chat.ui-armed .ip-done > li, .ip-chat.ui-armed .ip-approve { opacity: 1; translate: none; animation: none; }
}
