/**
 * Single integration pages (/integration/<name>/), November 2026.
 *
 * The design of the Integration Page Redesign wireframe: the hero with the In this integration card,
 * Recipe items, Connect your AI, Recipe templates, Connections, Related articles and the final card.
 * Everything is scoped to .uai-page, so the header, the footer and the rest of the site are untouched.
 * Light only. Text runs the full width of its column; only the page container and the tooltips have a max-width.
 */

.uai-page {
	--uai-primary: #0790e8;
	--uai-start: #0b87e8;
	--uai-ink: #0d0f12;
	--uai-text: #2b2e33;
	--uai-muted: #676b6f;
	--uai-subtle: #9a9ea3;
	--uai-border: #e4e4e4;
	--uai-grey: #f6f7f9;
	--uai-dark: #0b1220;
	--uai-font: "Figtree", "Avenir", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color-scheme: light;
	background: #fff;
	color: var(--uai-text);
	font-family: var(--uai-font);
	font-size: 16px;
	line-height: 1.6;
}

.uai-page *,
.uai-page *::before,
.uai-page *::after {
	box-sizing: border-box;
}

.uai-page h1,
.uai-page h2,
.uai-page h3 {
	margin: 0;
	color: var(--uai-ink);
	font-family: var(--uai-font);
	text-wrap: balance;
}

.uai-page p {
	margin: 0;
}

/* Text links only: the buttons, the cards and the recipe library's own cards keep their own colours */
.uai-page a:not([class]) {
	color: var(--uai-primary);
	font-weight: 600;
	text-decoration: none;
}

.uai-page img {
	max-width: 100%;
}

/* Layout: full-width bands, 1200px content */
.uai-in {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: max(24px, env(safe-area-inset-left, 0px));
	padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.uai-s.is-white {
	background: #fff;
}

.uai-s.is-grey {
	background: var(--uai-grey);
}

/* Section heads: kicker, title and description, 750px wide */
.uai-head {
	max-width: 750px;
	margin: 0 auto 48px;
	text-align: center;
}

.uai-head.is-left {
	margin-left: 0;
	text-align: left;
}

.uai-kicker {
	display: block;
	color: var(--uai-primary);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.uai-page .uai-head h2 {
	margin-top: 14px;
	font-size: 44px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.01em;
}

.uai-sub {
	margin-top: 16px !important;
	color: var(--uai-muted);
	font-size: 18px;
	line-height: 1.6;
}

/* Buttons: pill, Start free blue, the rest white with a blue border */
.uai-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.uai-btns.is-center {
	justify-content: center;
}

.uai-page .uai-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 20px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
	white-space: nowrap;
}

.uai-page .uai-btn.is-hero {
	font-size: 18px;
}

.uai-page .uai-btn.is-blue {
	background: var(--uai-start);
	color: #fff;
}

.uai-page .uai-btn.is-blue:hover {
	background: #0790e8;
	color: #fff;
}

.uai-page .uai-btn.is-sec {
	border-color: var(--uai-start);
	background: #fff;
	color: var(--uai-start);
}

.uai-page .uai-btn.is-sec:hover {
	background: #eaf5fd;
	color: #056caf;
}

/* Hero: the brand colour as a light tint, the name with its icon, and the In this integration card */
.uai-hero {
	padding-top: 72px;
	padding-bottom: 50px;
	background: radial-gradient(110% 90% at 0% 0%, color-mix(in srgb, var(--bc) 16%, #fff) 0%, #fff 62%);
}

.uai-hgrid {
	display: grid;
	grid-template-columns: minmax(0, 62fr) minmax(0, 34fr);
	gap: 56px;
	align-items: start;
	justify-content: space-between;
}

.uai-hl {
	min-width: 0;
}

.uai-id {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 14px;
}

.uai-page .uai-id h1 {
	min-width: 0;
	font-size: 40px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.uai-logo {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid var(--uai-border);
	border-radius: 50%;
	background: #fff;
}

.uai-logo img {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.uai-lead {
	margin-top: 16px;
	color: var(--uai-muted);
	font-size: 17px;
	line-height: 1.6;
}

.uai-lead p {
	margin: 0 0 12px;
}

.uai-lead p:last-child {
	margin-bottom: 0;
}

.uai-hl .uai-btns {
	margin-top: 28px;
}

.uai-glance {
	min-width: 0;
	padding: 28px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 2px 5px rgba(0, 0, 0, 0.04);
}

.uai-nums {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.uai-nums li {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.uai-nums b {
	color: var(--uai-ink);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.uai-nums span {
	color: var(--uai-muted);
	font-size: 14px;
}

.uai-meta {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 8px 16px;
	margin: 18px 0 0;
	font-size: 14px;
}

.uai-meta dt {
	grid-column: 1;
	color: var(--uai-muted);
	font-weight: 400;
}

.uai-meta dd {
	display: flex;
	grid-column: 2;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	color: var(--uai-ink);
	font-weight: 600;
}

.uai-page .uai-meta dd a {
	color: var(--uai-ink);
	text-decoration: none;
}

.uai-page .uai-meta dd a:hover,
.uai-page .uai-meta dd a:focus {
	color: var(--uai-primary);
	text-decoration: none;
}

.uai-mini {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 1px solid var(--uai-border);
	border-radius: 50%;
	background: #fff;
}

.uai-mini img {
	width: 14px;
	height: 14px;
	object-fit: contain;
}

.uai-3pnote {
	margin-top: 18px !important;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--uai-grey);
	color: var(--uai-text);
	font-size: 14px;
	line-height: 1.55;
}

/* Extra content from the editor, under the hero */
.uai-extra {
	padding-bottom: 50px;
}

/* A retired integration: the notice is yellow, and the space under it equals the space above it */
.uai-extra.is-deprecated {
	padding-bottom: 0;
}

.uai-page .deprecated-integration {
	background: #fff6d6;
}

/* Recipe items: Triggers in column 1, Actions in column 2, the rest below in masonry */
.uai-cols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px 64px;
	align-items: start;
}

.uai-col {
	display: flex;
	flex-direction: column;
	gap: 48px;
	min-width: 0;
}

.uai-blk {
	position: relative;
	min-width: 0;
}

.uai-bh {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.uai-bi {
	flex: none;
	width: 20px;
	height: 20px;
}

.uai-page .uai-bh h3 {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.uai-gh {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 20px 0 8px !important;
	color: var(--uai-ink);
	font-size: 16px;
	font-weight: 700;
}

.uai-bh + .uai-gh {
	margin-top: 16px !important;
}

.uai-list {
	display: flex;
	flex-direction: column;
}

/* Long lists: the browser skips the items that are off screen. The margin reset is for the theme, which gives every details element a bottom margin. */
.uai-li {
	margin: 0;
	content-visibility: auto;
	contain-intrinsic-size: auto 44px;
}

.uai-li > summary,
div.uai-li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 0;
	color: var(--uai-ink);
	font-size: 15px;
	line-height: 1.5;
	list-style: none;
}

.uai-li > summary {
	cursor: pointer;
}

.uai-li > summary::-webkit-details-marker {
	display: none;
}

.uai-li > summary:focus-visible {
	outline: 2px solid var(--uai-primary);
	outline-offset: -2px;
}

.uai-cs {
	display: flex;
	flex: none;
}

.uai-lt {
	flex: 1 1 auto;
	min-width: 0;
}

.uai-caret {
	flex: none;
	margin-top: 5px;
	transition: transform 0.2s;
}

.uai-li[open] > summary .uai-caret {
	transform: rotate(180deg);
}

.uai-toks {
	position: relative;
	padding: 2px 0 10px 40px;
}

.uai-tl {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px !important;
	color: var(--uai-muted);
	font-size: 13px;
	font-weight: 600;
}

.uai-toks ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.uai-toks li {
	margin: 0;
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--uai-grey);
	color: var(--uai-text);
	font-size: 13px;
}

.uai-ab .uai-lt small {
	display: block;
	margin-top: 2px;
	color: var(--uai-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* Plan chips, like the recipe library cards */
.uai-chip {
	display: inline-block;
	flex: none;
	padding: 3px 6px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
}

.uai-chip.is-lite {
	background: #eaf5fd;
	color: #0478c3;
}

.uai-chip.is-pro {
	background: #edf7ec;
	color: #1d9216;
}

.uai-chip.is-3p {
	background: #eef1f5;
	color: #2b2e33;
}

/* The grey chip of the recipe library cards */
.uai-chip.is-cat {
	padding: 3px 10px;
	background: #eef1f5;
	color: #2b2e33;
	font-size: 13px;
}

/* Question icons and their tooltips: a popover to the right of the icon, flipped near the edge, with a short fade */
.uai-q {
	display: inline-block;
	flex: none;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background: url("../img/integration/circle-question-regular-grey.svg") no-repeat center / 16px 16px;
	cursor: help;
	interest-delay-start: 100ms;
	interest-delay-end: 300ms;
}

.uai-tip {
	position: fixed;
	inset: auto;
	width: max-content;
	max-width: min(320px, calc(100vw - 32px));
	margin: 0 8px;
	padding: 8px 12px;
	overflow: visible;
	border: 0;
	border-radius: 8px;
	background: #333;
	box-shadow: 0 1em 2em -0.5em rgb(0 0 0 / 0.35);
	color: #fff;
	font: 500 13px/1.45 var(--uai-font);
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	opacity: 0;
	translate: -4px 0;
	position-area: span-all inline-end;
	align-self: anchor-center;
	position-try-fallbacks: flip-inline, --uai-below, --uai-below-wide;
	transition: opacity 0.18s ease, translate 0.18s ease, display 0.18s ease allow-discrete, overlay 0.18s ease allow-discrete;
}

.uai-tip:popover-open {
	opacity: 1;
	translate: 0 0;
}

@position-try --uai-below {
	position-area: block-end;
	align-self: auto;
	justify-self: anchor-center;
	margin: 8px 0;
}

@position-try --uai-below-wide {
	position-area: block-end span-all;
	align-self: auto;
	justify-self: center;
	margin: 8px 16px;
}

@starting-style {
	.uai-tip:popover-open {
		opacity: 0;
		translate: -4px 0;
	}
}

/* Connect your AI: a chat, your messages on the right, and a message box */
.uai-chat {
	max-width: 760px;
	margin: 0 auto;
	padding: 28px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
}

.uai-cmsgs {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.uai-cb {
	max-width: 80%;
	padding: 10px 14px;
	border-radius: 16px;
	background: #eef1f5;
	color: var(--uai-ink);
	font-size: 14px;
	line-height: 1.5;
}

.uai-cmsgs .uai-cb:last-child {
	border-radius: 16px 16px 4px 16px;
}

.uai-comp {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	padding: 8px 8px 8px 18px;
	border: 1px solid var(--uai-border);
	border-radius: 999px;
	color: var(--uai-subtle);
	font-size: 15px;
}

.uai-comp > span:first-child {
	flex: 1 1 auto;
	min-width: 0;
}

.uai-send {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #eaf5fd;
}

.uai-send img {
	display: block;
}

.uai-agent {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 28px;
}

.uai-agent img {
	display: block;
	flex: none;
	width: 44px;
	height: 44px;
}

.uai-agent p {
	color: var(--uai-muted);
	font-size: 15px;
	line-height: 1.5;
}

.uai-agent strong {
	color: var(--uai-ink);
	font-weight: 600;
}

/* Recipe templates (the library's own cards) and sample recipes (the same card, without a link) */
.uai-templates .automator-template-library__grid-content {
	margin: 0;
}

.uai-rgrid,
.uai-agrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}

/* The same gap as the recipe library's grid */
.uai-rgrid {
	gap: 18px;
}

/* One or two cards sit in the middle, each as wide as a column, instead of leaving empty columns */
.uai-templates.is-few .automator-template-library__templates,
.uai-rgrid.is-few,
.uai-agrid.is-few {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.uai-templates.is-few .automator-template-library__template-grid-item,
.uai-rgrid.is-few > .uai-tc {
	flex: 0 1 calc((100% - 36px) / 3);
}

.uai-agrid.is-few > .uai-ac {
	flex: 0 1 calc((100% - 40px) / 3);
}

.uai-tc {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 12px;
	width: 100%;
	min-width: 0;
	padding: 20px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 2px 5px rgba(0, 0, 0, 0.04);
	color: var(--uai-ink);
}

.uai-tc-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.uai-page .uai-tc h3 {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}

.uai-tc-req {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin-top: 4px;
	color: var(--uai-text);
	font-size: 15px;
	line-height: 22px;
}

.uai-tc-rl {
	color: #767676;
	font-size: 14px;
}

.uai-tc-ri {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.uai-tc-ri img {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

.uai-linkline {
	margin-top: 28px !important;
	font-size: 15px;
	text-align: center;
}

/* Connections: each card is the pair, the whole card is the link */
.uai-cgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.uai-page .uai-conn {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 14px 16px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 2px 5px rgba(0, 0, 0, 0.04);
	color: var(--uai-ink);
	text-decoration: none;
}

.uai-s.is-grey .uai-conn,
.uai-s.is-grey .uai-tc,
.uai-s.is-grey .uai-ac {
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
}

.uai-pair {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
}

.uai-plus {
	color: var(--uai-subtle);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
}

.uai-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--uai-border);
	border-radius: 50%;
	background: #fff;
}

.uai-circle img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.uai-cn {
	min-width: 0;
	color: var(--uai-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.uai-cn-plus {
	color: var(--uai-subtle);
}

/* Related articles: a newspaper for a blog post, a book for a knowledge base article */
.uai-ac {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 0;
	padding: 24px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 2px 5px rgba(0, 0, 0, 0.04);
}

.uai-aico {
	width: 32px;
	height: 32px;
}

.uai-page .uai-ac h3 {
	margin: 16px 0 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}

.uai-date {
	margin-top: 6px !important;
	color: var(--uai-muted);
	font-size: 13px;
}

.uai-page .uai-bottom {
	margin-top: auto;
	padding-top: 18px;
	color: var(--uai-primary);
	font-weight: 600;
	text-decoration: none;
}

/* The final card of the other pages */
.uai-ctacard {
	max-width: 1200px;
	margin: 0 auto;
	padding: 80px 32px;
	border-radius: 24px;
	background: radial-gradient(60% 80% at 50% 0%, rgba(7, 144, 232, 0.18) 0%, rgba(7, 144, 232, 0) 70%), var(--uai-dark);
	box-shadow: 0 24px 48px -24px rgba(11, 18, 32, 0.35);
	color: #fff;
	text-align: center;
}

.uai-ctacard .uai-head {
	margin: 0 auto;
}

.uai-page .uai-ctacard .uai-kicker,
.uai-page .uai-ctacard h2,
.uai-page .uai-ctacard .uai-sub {
	color: #fff;
}

@media (max-width: 1024px) {
	.uai-page .uai-head h2 {
		font-size: 38px;
	}

	.uai-hgrid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.uai-cols {
		column-gap: 40px;
	}

	.uai-cgrid,
	.uai-rgrid,
	.uai-agrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.uai-templates.is-few .automator-template-library__template-grid-item,
	.uai-rgrid.is-few > .uai-tc {
		flex-basis: calc((100% - 18px) / 2);
	}

	.uai-agrid.is-few > .uai-ac {
		flex-basis: calc((100% - 20px) / 2);
	}
}

@media (max-width: 767px) {
	.uai-in {
		padding-left: max(20px, env(safe-area-inset-left, 0px));
		padding-right: max(20px, env(safe-area-inset-right, 0px));
	}

	.uai-head {
		margin-bottom: 32px;
	}

	.uai-page .uai-head h2 {
		font-size: 32px;
	}

	.uai-page .uai-id h1 {
		font-size: 32px;
	}

	.uai-logo {
		width: 48px;
		height: 48px;
	}

	.uai-logo img {
		width: 28px;
		height: 28px;
	}

	.uai-hl .uai-btn {
		width: 100%;
	}

	.uai-glance {
		padding: 22px;
	}

	/* One column, in the order Triggers, Actions, Conditions, Loop filters, AI abilities */
	.uai-cols {
		display: flex;
		flex-direction: column;
		gap: 40px;
	}

	.uai-col {
		display: contents;
	}

	.uai-blk[data-k="actions"] {
		order: 2;
	}

	.uai-blk[data-k="conditions"] {
		order: 3;
	}

	.uai-blk[data-k="loops"] {
		order: 4;
	}

	.uai-blk[data-k="abilities"] {
		order: 5;
	}

	.uai-toks {
		padding-left: 0;
	}

	.uai-chat {
		padding: 20px;
	}

	.uai-cb {
		max-width: 90%;
	}

	.uai-cgrid,
	.uai-rgrid,
	.uai-agrid {
		grid-template-columns: minmax(0, 1fr);
	}

	.uai-templates.is-few .automator-template-library__template-grid-item,
	.uai-rgrid.is-few > .uai-tc,
	.uai-agrid.is-few > .uai-ac {
		flex-basis: 100%;
	}

	.uai-ctacard {
		padding: 48px 20px;
	}

	.uai-tip {
		margin: 8px 16px;
		translate: 0 -4px;
		position-area: block-end span-all;
		align-self: auto;
		justify-self: center;
		position-try-fallbacks: flip-block;
	}

	@starting-style {
		.uai-tip:popover-open {
			translate: 0 -4px;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.uai-tip,
	.uai-caret {
		transition: none;
	}
}
