/* Cryosthetics Toolkit — Applications Grid widget. */

.ct-ap {
	--ct-ap-accent: #0EA9D0;
	--ct-ap-accent-deep: #077A99;
	--ct-ap-ink: #112337;
	--ct-ap-line: #E4ECF3;
	--ct-ap-cols: 5;
}

/* Ruled label above the grid — ties the tiles to the heading above them. */
.ct-ap__head {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 22px;
}

.ct-ap__label {
	flex: 0 0 auto;
	font-family: "Sora", "Helvetica Neue", Arial, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 2.4px;
	text-transform: uppercase;
	color: var(--ct-ap-ink);
}

.ct-ap__rule {
	flex: 1 1 auto;
	height: 1px;
	background: var(--ct-ap-line);
}

.ct-ap__grid {
	display: grid;
	grid-template-columns: repeat(var(--ct-ap-cols), minmax(0, 1fr));
	gap: 14px;
}

.ct-ap__tile {
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: #fff;
	border: 1px solid var(--ct-ap-line);
	padding: 20px 18px 18px;
	color: inherit;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ct-ap--hover .ct-ap__tile:hover,
.ct-ap__tile:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(14, 42, 74, 0.10);
	border-color: var(--ct-ap-accent);
}

.ct-ap__tile:focus-visible {
	outline: 2px solid var(--ct-ap-accent-deep);
	outline-offset: 3px;
}

.ct-ap__icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: rgba(14, 169, 208, 0.12);
	color: var(--ct-ap-accent-deep);
	font-size: 22px;
	line-height: 1;
}

.ct-ap__name {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-family: "Sora", "Helvetica Neue", Arial, sans-serif;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.005em;
	color: var(--ct-ap-ink);
	margin: 0;
	/* Long single words ("Microdermabrasion") must wrap inside the tile, not
	   run under its border, once the grid drops to two columns. */
	min-width: 0;
	overflow-wrap: break-word;
}

.ct-ap__ext {
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 1;
	margin-top: 3px;
	color: var(--ct-ap-accent);
	opacity: 0.75;
	transition: opacity 0.2s ease;
}

.ct-ap__tile:hover .ct-ap__ext {
	opacity: 1;
}

/* Standalone-use note — a panel, not another card, so it reads as an aside. */
.ct-ap__note {
	margin-top: 34px;
	background: #F5FAFD;
	border-left: 3px solid var(--ct-ap-accent);
	padding: 26px 32px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 28px;
	align-items: start;
}

.ct-ap__note--untagged {
	grid-template-columns: 1fr;
}

.ct-ap__note-tag {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--ct-ap-accent-deep);
	white-space: nowrap;
	padding-top: 4px;
}

.ct-ap__note-body p {
	margin: 0 0 12px;
	font-size: 16.5px;
	line-height: 1.7;
	color: #5C6B7A;
	max-width: 78ch;
}

.ct-ap__note-body p:last-child {
	margin-bottom: 0;
}

.ct-ap__note-body strong,
.ct-ap__note-body b {
	color: var(--ct-ap-ink);
	font-weight: 600;
}

@media (max-width: 1024px) {
	.ct-ap__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ct-ap__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.ct-ap__tile {
		padding: 16px 14px 14px;
		gap: 12px;
	}

	.ct-ap__icon {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.ct-ap__name {
		font-size: 13.5px;
	}

	.ct-ap__note {
		grid-template-columns: 1fr;
		padding: 22px 20px;
	}

	.ct-ap__note-body p {
		font-size: 15.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ct-ap__tile,
	.ct-ap__ext {
		transition: none;
	}

	.ct-ap--hover .ct-ap__tile:hover {
		transform: none;
	}
}
