/*
 * CleanPeptide — shared styles for the CMS entry templates.
 *
 * Loaded only on single cp_state / cp_comparison, after main.css. Every rule is
 * scoped to the two page wrappers, so none of it can reach any other page.
 *
 * Values are the Figma file's own, at its 1440px artboard (nodes 1:14 and
 * 4860:224): the 1015 / 1238 content columns, the 120px rhythm between
 * sections, the type scale, and the product card at 317 × 473.
 */

:is(.cp-state, .cp-compare) {
	/* The logo pack's colours (October 2026): Navy #001E33 for headings and
	   dark bands, Clean Blue #0054A6 for links, buttons and labels (7.5:1 on
	   white), Bright Blue #2B8BDB only where it decorates. These were the old
	   teal family until 2026-10-25. */
	--c-head: #001E33;
	--c-accent: #0054A6;
	--c-btn: #0054A6;
	--c-go: #0054A6;
	--c-pill: #0054A6;
	--c-name: #0054A6;
	--c-ink: #1C2326;
	--c-ink2: #1D1D1D;
	--c-muted: #56646F;
	--c-kicker: #5B6B78;
	--c-tint: #EAF2FB;
	--c-line: #DCE5EE;
	--c-mark: #2B8BDB;
	--c-deep: linear-gradient(150deg, #001E33 0%, #0A3A66 58%, #0054A6 100%);
	--c-shadow: 0 1px 2px rgba(0, 30, 51, .05), 0 10px 28px -14px rgba(0, 30, 51, .22);

	--w: 1015px;
	--w-wide: 1238px;
	--gutter: clamp(16px, 4vw, 24px);
	--rhythm: clamp(64px, 8.4vw, 120px);

	font-family: var(--body, 'Inter', sans-serif);
	color: var(--c-ink);
	background: #fff;
}

:is(.cp-state, .cp-compare) *,
:is(.cp-state, .cp-compare) *::before,
:is(.cp-state, .cp-compare) *::after { box-sizing: border-box; }

:is(.cp-state, .cp-compare) :is(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; }
:is(.cp-state, .cp-compare) :is(ul, ol) { padding: 0; list-style: none; }
:is(.cp-state, .cp-compare) img { max-width: 100%; }

/* ---------------------------------------------------------------- layout */

:is(.cp-state, .cp-compare) .cms-wrap {
	width: 100%;
	max-width: calc(var(--w) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

:is(.cp-state, .cp-compare) .cms-wrap--wide { max-width: calc(var(--w-wide) + 2 * var(--gutter)); }

/* ------------------------------------------------------------------ type */

:is(.cp-state, .cp-compare) .cms-h2 {
	font-family: var(--body, 'Inter', sans-serif);
	font-weight: 800;
	font-size: clamp(26px, 2.25vw + 0.5px, 32px);
	line-height: 1.16;
	letter-spacing: -0.035em;
	color: var(--c-head);
}

@media (min-width: 1100px) {
	:is(.cp-state, .cp-compare) .cms-h2 { line-height: 30.24px; }
}

:is(.cp-state, .cp-compare) .cms-eyebrow {
	font-family: var(--mono, 'JetBrains Mono', monospace);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--c-accent);
}

:is(.cp-state, .cp-compare) .cms-eyebrow--bold { font-weight: 700; }

:is(.cp-state, .cp-compare) .cms-link {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	color: var(--c-accent);
	text-decoration: none;
	white-space: nowrap;
}

:is(.cp-state, .cp-compare) .cms-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------- buttons */

:is(.cp-state, .cp-compare) .cms-acts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

:is(.cp-state, .cp-compare) .cms-acts--center { justify-content: center; }

:is(.cp-state, .cp-compare) .cms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 45px;
	padding: 12px 24px;
	border-radius: 8px;
	font-family: var(--body, 'Inter', sans-serif);
	font-weight: 600;
	font-size: 15px;
	line-height: 21px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}

:is(.cp-state, .cp-compare) .cms-btn--solid { background: var(--c-btn); color: #fff; }
:is(.cp-state, .cp-compare) .cms-btn--solid:hover { background: var(--c-head); color: #fff; }
:is(.cp-state, .cp-compare) .cms-btn:active { transform: translateY(1px); }

:is(.cp-state, .cp-compare) .cms-btn--line {
	min-width: 260px;
	border: 1px solid var(--c-btn);
	color: var(--c-ink);
	background: transparent;
}

:is(.cp-state, .cp-compare) .cms-btn--line:hover { background: var(--c-btn); color: #fff; }

/* ------------------------------------------------------------ icon boxes */

:is(.cp-state, .cp-compare) .cms-icbox {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 5px;
	background: var(--c-tint);
	color: var(--c-head);
}

:is(.cp-state, .cp-compare) .cms-ic { display: block; }

/* ---------------------------------------------------------- product card */

:is(.cp-state, .cp-compare) .cmsc-grid {
	display: grid;
	/* Cards keep the drawn 317px and centre as a row, so two cards do not sit
	   left of an empty third column. Rows share one height (stretch). */
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 317px));
	justify-content: center;
	gap: 32px;
}

:is(.cp-state, .cp-compare) .cmsc {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--c-line);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: var(--c-shadow);
	transition: box-shadow .2s ease, transform .2s ease;
}

:is(.cp-state, .cp-compare) .cmsc:hover { box-shadow: 0 2px 4px rgba(0, 30, 51, .06), 0 18px 36px -16px rgba(0, 30, 51, .3); transform: translateY(-2px); }

:is(.cp-state, .cp-compare) .cmsc__media {
	position: relative;
	aspect-ratio: 316 / 311;
	background: linear-gradient(105deg, #F5F8FC 0%, #FFFFFF 50%, #EEF4FA 100%);
	border-bottom: 1px solid var(--c-line);
}

/* Sized by height, as drawn: the vial stands 250px tall starting 48px down the
   311px well, centred — which keeps it clear of the badge columns either side
   whatever the product photograph's own proportions. */
:is(.cp-state, .cp-compare) .cmsc__vial {
	position: absolute;
	top: 15.43%;
	left: 12px;
	width: calc(100% - 23px);
	height: 80.39%;
	object-fit: contain;
	object-position: center top;
}

:is(.cp-state, .cp-compare) .cmsc__ruo,
:is(.cp-state, .cp-compare) .cmsc__chip {
	position: absolute;
	top: 9px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 3px;
	font-family: var(--mono, 'JetBrains Mono', monospace);
	font-weight: 700;
	font-size: 8px;
	line-height: 17px;
	text-transform: uppercase;
	text-decoration: none;
}

:is(.cp-state, .cp-compare) .cmsc__ruo { left: 12px; background: rgba(0, 84, 166, 0.07); color: var(--c-head); }
:is(.cp-state, .cp-compare) .cmsc__chip { right: 11px; background: var(--c-accent); color: #fff; }
:is(.cp-state, .cp-compare) .cmsc__chip:hover { background: var(--c-head); color: #fff; }

/* Four badges framing the vial, two each side, as drawn (grid 54px | 54px). */
:is(.cp-state, .cp-compare) .cmsc__badges {
	position: absolute;
	top: 55%;
	left: 12px;
	right: 11px;
	display: grid;
	grid-template-columns: 54px 54px;
	justify-content: space-between;
	row-gap: 16px;
	pointer-events: none;
}

:is(.cp-state, .cp-compare) .cmsc__badges li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

:is(.cp-state, .cp-compare) .cmsc__badges img { width: 34px; height: 34px; }

:is(.cp-state, .cp-compare) .cmsc__badges span {
	font-family: var(--mono, 'JetBrains Mono', monospace);
	font-weight: 700;
	font-size: 8px;
	line-height: 10.6px;
	text-align: center;
	text-transform: uppercase;
	color: var(--c-accent);
}

:is(.cp-state, .cp-compare) .cmsc__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 16px 16px 16px;
}

:is(.cp-state, .cp-compare) .cmsc__kicker {
	font-family: var(--mono, 'JetBrains Mono', monospace);
	font-weight: 600;
	font-size: 10px;
	line-height: 12px;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--c-kicker);
	margin-bottom: 4px;
}

:is(.cp-state, .cp-compare) .cmsc__name {
	font-family: var(--body, 'Inter', sans-serif);
	font-weight: 600;
	font-size: 21px;
	line-height: 22.05px;
	letter-spacing: -0.02em;
	margin-bottom: 10px;
	overflow-wrap: break-word;
}

:is(.cp-state, .cp-compare) .cmsc__name a { color: var(--c-name); text-decoration: none; }

:is(.cp-state, .cp-compare) .cmsc__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 20px;
}

:is(.cp-state, .cp-compare) .cmsc__sizes li {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 25px;
	padding: 4px 11px;
	border: 1px solid rgba(28, 35, 38, 0.18);
	border-radius: 4px;
	font-family: var(--mono, 'JetBrains Mono', monospace);
	font-weight: 500;
	font-size: 11px;
	line-height: 1;
	color: var(--c-muted);
	white-space: nowrap;
}

:is(.cp-state, .cp-compare) .cmsc__sizes li.is-on { background: var(--c-pill); border-color: var(--c-pill); color: #fff; }

:is(.cp-state, .cp-compare) .cmsc__acts { display: flex; gap: 10px; margin-top: auto; min-width: 0; }

:is(.cp-state, .cp-compare) .cmsc__go,
:is(.cp-state, .cp-compare) .cmsc__coa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 44px;
	padding: 11px 10px;
	border-radius: 8px;
	font-family: var(--body, 'Inter', sans-serif);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-wrap: pretty;
	text-align: center;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

/* The label is the editor's own and can be long ("Explore the BPC-157 /
   TB-500 blend"): it takes the row and wraps inside the button rather than
   running out of the card. */
:is(.cp-state, .cp-compare) .cmsc__go { flex: 1 1 auto; background: var(--c-go); color: #fff; overflow-wrap: break-word; }
:is(.cp-state, .cp-compare) .cmsc__go:active,
:is(.cp-state, .cp-compare) .cmsc__coa:active { transform: translateY(1px); }
:is(.cp-state, .cp-compare) .cmsc__go:hover { background: var(--c-head); color: #fff; }
:is(.cp-state, .cp-compare) .cmsc__coa { flex: 0 0 104px; white-space: nowrap; background: #fff; border: 1px solid var(--c-accent); color: var(--c-go); }
:is(.cp-state, .cp-compare) .cmsc__coa:hover { background: var(--c-tint); }

/* ------------------------------------------------------------------- FAQ */

:is(.cp-state, .cp-compare) .cms-faq__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
}

:is(.cp-state, .cp-compare) .cms-faq__h {
	font-family: var(--body, 'Inter', sans-serif);
	font-weight: 800;
	font-size: clamp(26px, 2.25vw + 0.5px, 32px);
	line-height: 1.37;
	letter-spacing: -0.0508em;
	color: var(--c-head);
}

:is(.cp-state, .cp-compare) .cms-faq__list {
	display: grid;
	gap: 9px;
	margin-top: 22px;
}

:is(.cp-state, .cp-compare) .cms-faq__item {
	background: #fff;
	border: 1px solid var(--c-line);
	border-radius: 14px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

:is(.cp-state, .cp-compare) .cms-faq__item:hover { border-color: #C3D4E6; }
:is(.cp-state, .cp-compare) .cms-faq__item[open] { border-color: #C3D4E6; box-shadow: var(--c-shadow); }

:is(.cp-state, .cp-compare) .cms-faq__item > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 23px 20px;
	list-style: none;
	cursor: pointer;
	font-weight: 600;
	font-size: 16px;
	line-height: 23.2px;
	color: var(--c-head);
}

:is(.cp-state, .cp-compare) .cms-faq__item > summary::-webkit-details-marker { display: none; }

/* The + / × from the design, as characters, with no JavaScript. */
:is(.cp-state, .cp-compare) .cms-faq__item > summary::after {
	content: "+";
	flex: none;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--c-tint);
	font-weight: 500;
	font-size: 18px;
	line-height: 1;
	color: var(--c-accent);
}

:is(.cp-state, .cp-compare) .cms-faq__item[open] > summary { padding-top: 18px; padding-bottom: 18px; }
:is(.cp-state, .cp-compare) .cms-faq__item[open] > summary::after { content: "×"; background: var(--c-accent); color: #fff; }

:is(.cp-state, .cp-compare) .cms-faq__a { padding: 0 20px 20px; }

:is(.cp-state, .cp-compare) .cms-faq__a p {
	max-width: 975px;
	font-size: 15px;
	line-height: 1.65;
	color: #3A4954;
}

/* ---------------------------------------------------------- closing band */

:is(.cp-state, .cp-compare) .cms-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 368px;
	padding: 63px var(--gutter);
	background: var(--c-tint);
	text-align: center;
}

:is(.cp-state, .cp-compare) .cms-cta__in {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 672px;
}

:is(.cp-state, .cp-compare) .cms-cta__h {
	font-weight: 800;
	font-size: clamp(26px, 2.25vw + 0.5px, 32px);
	line-height: 1.12;
	color: var(--c-head);
}

:is(.cp-state, .cp-compare) .cms-cta__p {
	margin: 20px 0 15px;
	font-size: 14px;
	line-height: 21px;
	color: var(--c-head);
}

:is(.cp-state, .cp-compare) .cms-cta__tag {
	margin-bottom: 12px;
	font-weight: 500;
	font-size: 14px;
	line-height: 21px;
	color: var(--c-ink2);
}

:is(.cp-state, .cp-compare) .cms-cta__note {
	margin-top: 12px;
	font-size: 12px;
	line-height: 21px;
	color: var(--c-head);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1024px) {
	:is(.cp-state, .cp-compare) .cmsc-grid { gap: 24px; }
}

@media (max-width: 640px) {
	:is(.cp-state, .cp-compare) .cmsc-grid { grid-template-columns: minmax(0, 360px); }
	:is(.cp-state, .cp-compare) .cms-acts { flex-direction: column; align-items: stretch; gap: 12px; }
	:is(.cp-state, .cp-compare) .cms-btn,
	:is(.cp-state, .cp-compare) .cms-btn--line { width: 100%; min-width: 0; }
	:is(.cp-state, .cp-compare) .cms-faq__item > summary { font-size: 15px; line-height: 21px; padding: 18px 16px; }
	:is(.cp-state, .cp-compare) .cms-faq__item[open] > summary { padding-top: 16px; padding-bottom: 14px; }
	:is(.cp-state, .cp-compare) .cms-faq__a { padding: 0 16px 18px; }
	:is(.cp-state, .cp-compare) .cms-faq__a p { font-size: 14px; line-height: 21px; }
	:is(.cp-state, .cp-compare) .cms-cta { min-height: 0; padding-block: 56px; }
}

@media (prefers-reduced-motion: reduce) {
	:is(.cp-state, .cp-compare) * { transition: none !important; }
	:is(.cp-state, .cp-compare) .cmsc:hover { transform: none; }
}

:is(.cp-state, .cp-compare) :is(a, summary):focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 2px;
	border-radius: 4px;
}
