/* Group kort. k07 pill buttons (the theme's button system), k08 category/product pill pairs, k11 skin-area tile carousel. Only transform and opacity animate. Loaded right after p3-overrides.css. */
.p3-sheets {
	--p3-in-accent: #a9bdd8;
	--p3-in-accent-ink: #0f1726;
	--p3-in-black: #111620;
}

/* The primary (blue) button follows the page's scene: a light tint of the scene colour with a dark ink, so it reads on the
   dark top of every scene. Natt keeps the blue above. Contrast of ink on tint is at least 7:1 in every scene. */
.p3-sheets.scene-grafit {
	--p3-in-accent: #ddd5c9;
	--p3-in-accent-ink: #1f1d1b;
}

.p3-sheets.scene-espresso {
	--p3-in-accent: #f2c68c;
	--p3-in-accent-ink: #2a1c13;
}

.p3-sheets:is(.scene-oxblood, .scene-vin) {
	--p3-in-accent: #dfab99;
	--p3-in-accent-ink: #2e2125;
}

.p3-sheets.scene-rose {
	--p3-in-accent: #f1d3c6;
	--p3-in-accent-ink: #30302e;
}

.p3-sheets.scene-salvia {
	--p3-in-accent: #c6d8c8;
	--p3-in-accent-ink: #1c261f;
}

.p3-sheets.scene-skymning {
	--p3-in-accent: #cfcbe6;
	--p3-in-accent-ink: #1f1e2c;
}

/* The start card and the wide step card (gradient and tinted materials) follow the page's scene, like the primary button.
   Natt keeps the navy base. White text on the lightest gradient stop is at least 5.1:1, on the tint at least 6.4:1
   (soft .8 text on the tint at least 4.8:1), so AA holds in every scene. Colour is never transitioned. */
.p3-sheets.scene-grafit {
	--p3-grad: linear-gradient(180deg, #746c64 0%, #58524c 55%, #433f3a 100%);
	--p3-tint: rgba(98, 91, 84, .8);
}

.p3-sheets.scene-espresso {
	--p3-grad: linear-gradient(180deg, #8c5f3e 0%, #65412b 55%, #46301f 100%);
	--p3-tint: rgba(122, 86, 58, .8);
}

.p3-sheets:is(.scene-oxblood, .scene-vin) {
	--p3-grad: linear-gradient(180deg, #985856 0%, #684246 55%, #473136 100%);
	--p3-tint: rgba(133, 78, 79, .8);
}

/* Wine pages (Kvinnlig behåring i ansiktet, Preventivmedel, Skjuta upp mensen): the terracotta tint clashed with the cooler wine
   ground, so the steps card is a deeper translucent wine (Kajal 2026-10-26). White text on it stays above 10:1. Oxblood keeps the tint above. */
.p3-sheets.scene-vin {
	--p3-tint: rgba(46, 33, 37, .55);
}

.p3-sheets.scene-rose {
	--p3-grad: linear-gradient(180deg, #86645e 0%, #6d504b 55%, #58403c 100%);
	--p3-tint: rgba(120, 92, 86, .8);
}

.p3-sheets.scene-salvia {
	--p3-grad: linear-gradient(180deg, #5d7365 0%, #4a5d50 55%, #3a483e 100%);
	--p3-tint: rgba(86, 110, 95, .8);
}

.p3-sheets.scene-skymning {
	--p3-grad: linear-gradient(180deg, #6c6894 0%, #54507a 55%, #403e5e 100%);
	--p3-tint: rgba(104, 100, 142, .8);
}

/* ---------- k07: five pill variants, 48 px, Albert Sans ----------
   Applied by context to the page's own buttons (no markup change); the .p3-in-k07--* classes give the same looks to new buttons.
   blue: hero start button and the floating button. white: on glass, gradient and tinted cards. black: on pale and wide cards.
   ghost: second hero button, start-card choices, secondary buttons on dark cards. ghost-dark: secondary button on pale cards. */
.p3-sheets :is(.button, .p3-pill, .p3-in-k07) {
	position: relative;
	min-height: 48px;
	border-radius: 999px;
	font-family: var(--font, 'Albert Sans', Arial, sans-serif);
	font-size: 15px;
	font-weight: 400;
}

.p3-sheets .p3-pill {
	padding: 8px 28px;
	font-size: 16px;
}

.p3-sheets :is(.hero .actions .button:not(.button--secondary), .p3-in-k07--blue) {
	min-height: 54px;
	background: #fff;
	color: #000;
	box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .45);
}

/* The floating button stays dark (same as the "Läs mer" buttons) and gets a warm glow in the cards' signal colour around it,
   so it stands out on the dark sheets, where a plain dark pill measured 1.7:1 and merged with Safari's dark bottom bar
   (Kajal, iPhone 22 Oct). On pale cards the dark pill reads by itself. */
.p3-sheets .p3-float__button {
	min-height: 54px;
	background: var(--p3-in-black);
	color: #fff;
	box-shadow:
		0 0 0 1px color-mix(in srgb, var(--r5-sig, #ffc978) 60%, transparent),
		0 0 14px 2px color-mix(in srgb, var(--r5-sig, #ffc978) 45%, transparent),
		0 0 44px 14px color-mix(in srgb, var(--r5-sig, #ffc978) 34%, transparent),
		0 14px 28px -14px rgba(0, 0, 0, .45);
}

/* The arrow circle: the oxblood scene paints it cream (klimakteriet-v1.css, --btn-icon-bg), which hid the white arrow on
   this dark pill (review of the Kvinnohälsa colour change, 2026-10-26). The same translucent circle as every other scene. */
.p3-sheets .p3-float__button .button__icon {
	background: rgba(255, 255, 255, .125);
}

/* Its focus ring: a white ring at the edge and a dark ring outside it, so the ring shows on dark sheets and pale cards alike
   (the shared .button:focus-visible ring is currentColor alone, white here, which vanishes on pale cards). */
.p3-sheets .p3-float .p3-float__button:focus-visible {
	outline: 3px solid var(--p3-in-black);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff, 0 0 44px 14px color-mix(in srgb, var(--r5-sig, #ffc978) 34%, transparent);
}

.p3-sheets :is(.p3-k--glass, .p3-k--grad, .p3-k--tint) .button:not(.button--secondary),
.p3-sheets .p3-in-k07--white {
	background: #fff;
	color: #000;
}

.p3-sheets :is(.p3-k--pale, .p3-k--wide) .button:not(.button--secondary),
.p3-sheets .p3-in-k07--black {
	background: var(--p3-in-black);
	color: #fff;
	box-shadow: none;
}

.p3-sheets :is(.hero .button--secondary, .p3-pill, .p3-k--glass .button--secondary, .p3-k--grad .button--secondary, .p3-k--tint .button--secondary, .p3-in-k07--ghost) {
	background: rgba(255, 255, 255, .07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .17);
	color: #fff;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.p3-sheets :is(.p3-k--pale .button--secondary, .p3-k--wide .button--secondary, .p3-in-k07--ghost-dark) {
	background: rgba(17, 22, 32, .82);
	box-shadow: none;
	color: #fff;
}

.p3-sheets .p3-pill:hover,
.p3-sheets .button--secondary:hover {
	background-color: rgba(255, 255, 255, .16);
}

.p3-sheets .p3-pill:focus-visible,
.p3-sheets .p3-in-k07:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.p3-sheets .p3-in-k07:hover {
	transform: translateY(-2px);
}

.p3-sheets .p3-in-k07:active {
	transform: scale(.97);
}

/* Both hero buttons: text left, round arrow in the right edge (same as the floating button). */
.p3-sheets .hero .actions .button--secondary:has(.button__icon) {
	justify-content: space-between;
	padding: 8px 8px 8px 24px;
}

.p3-sheets .hero .actions .button--secondary .button__icon {
	background: color-mix(in srgb, currentColor 14%, transparent);
}

/* The pair of hero buttons: one under the other on phones, so "Starta bedömningen" always fits on one line. */
@media (max-width: 700px) {
	.p3-sheets .hero .actions {
		flex-direction: column;
		align-items: stretch;
	}

	.p3-sheets .hero .actions .button {
		min-width: 0;
		min-height: 54px;
		white-space: nowrap;
	}

	.p3-sheets .hero .actions .button:not(.button--secondary),
	.p3-sheets .hero .actions .button--secondary:has(.button__icon) {
		justify-content: space-between;
		padding: 8px 8px 8px 24px;
		text-align: left;
	}

	.p3-sheets .hero .actions .button--secondary:not(:has(.button__icon)) {
		justify-content: center;
		padding-inline: 14px;
		text-align: center;
	}
}

/* ---------- k08: category and product pills, 48 px, radius 999, mirrored on phones ---------- */
.p3-in-k08__row {
	display: flex;
	gap: 8px;
}

.p3-in-k08__btn {
	position: relative;
	display: inline-flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 8px 24px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: 400 16px/1.2 var(--font, 'Albert Sans', Arial, sans-serif);
	text-align: center;
	text-decoration: none;
	transition: transform .3s var(--p3-spring, cubic-bezier(.34, 1.56, .64, 1));
}

.p3-in-k08__btn svg {
	flex: none;
	width: 14px;
	height: 14px;
}

.p3-in-k08__btn--solid {
	background: var(--p3-in-black, #111620);
	color: #fff;
}

.p3-in-k08__btn--outline {
	border-color: rgba(0, 0, 0, .19);
	background: transparent;
	color: rgba(0, 0, 0, .89);
}

.p3-in-k08__btn--soft {
	background: rgba(0, 0, 0, .06);
	color: rgba(0, 0, 0, .89);
}

.p3-in-k08__btn--outline:hover,
.p3-in-k08__btn--soft:hover {
	background: rgba(0, 0, 0, .06);
	transform: translateY(-2px);
}

.p3-in-k08__btn--solid:hover {
	background: #2b3446;
	transform: translateY(-2px);
}

.p3-in-k08__btn:active {
	transform: scale(.97);
}

.p3-in-k08__btn:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

@media (max-width: 700px) {
	.p3-in-k08__row {
		flex-direction: row-reverse;
	}
}

/* ---------- shared carousel controls ---------- */
.p3-in-arrow {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--p3-in-black, #111620);
	color: #fff;
	cursor: pointer;
	transition: transform .3s var(--p3-spring, cubic-bezier(.34, 1.56, .64, 1)), opacity .25s ease;
}

.p3-in-arrow svg {
	width: 16px;
	height: 16px;
}

.p3-in-arrow:hover {
	transform: scale(1.1);
}

.p3-in-arrow:active {
	transform: scale(.94);
}

.p3-in-arrow:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.p3-in-arrow:disabled {
	opacity: .3;
	cursor: default;
	transform: none;
}

/* ---------- k11: skin-area tiles in the wide card ---------- */
.p3-sheets .p3-sheet > .p3-in-k11 {
	grid-column: 2 / 4;
}

.p3-sheets .p3-in-k11 h2 {
	margin-bottom: 28px;
}

.p3-in-k11__stage {
	position: relative;
}

.p3-in-k11__track {
	display: flex;
	gap: 10px;
	margin-right: calc(var(--p3-pad) * -1);
	padding-right: var(--p3-pad);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.p3-in-k11__track::-webkit-scrollbar {
	display: none;
}

.p3-in-k11__track:focus-visible {
	outline: 3px solid var(--p3-ink);
	outline-offset: 4px;
	border-radius: 16px;
}

/* The strip's keyboard ring is drawn by the stage's ::after, above the tiles: the tiles are positioned and paint over an
   outline on the strip itself, and an outline outside the strip was cut at the sides on phones (Kajal 2026-10-26).
   Browsers without :has() keep the outline above as it was. */
@supports selector(:has(a)) {
	.p3-in-k11__track:focus-visible {
		outline: none;
	}
}

.p3-in-k11__stage::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1; /* above the tiles, below the arrows (2) */
	border: 3px solid var(--p3-ink);
	border-radius: 16px;
	opacity: 0;
	pointer-events: none;
}

.p3-in-k11__stage:has(> .p3-in-k11__track:focus-visible)::after {
	opacity: 1;
}

.p3-in-k11__tile {
	display: flex;
	flex: 0 0 min(340px, 82%);
	flex-direction: column;
	gap: 14px;
	box-sizing: border-box;
	padding: 20px;
	border-radius: 20px;
	background: #f3f5f8;
	box-shadow: 0 22px 34px -28px rgba(31, 39, 54, .5);
	color: var(--p3-ink);
	scroll-snap-align: start;
}

.p3-sheets .p3-in-k11__tile h3 {
	font-size: 23px;
}

.p3-in-k11__pic {
	height: 260px;
	overflow: hidden;
	border-radius: 12px;
	background: #e3e9f0;
}

.p3-in-k11__pic img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.p3-in-k11__stage > .p3-in-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	margin-top: -20px;
	box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .5);
}

.p3-in-arrow--prev {
	left: -14px;
}

.p3-in-arrow--next {
	right: -14px;
}

@media (max-width: 700px) {
	.p3-in-k11__stage > .p3-in-arrow {
		display: none;
	}

	.p3-in-k11__tile {
		flex-basis: 78%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.p3-in-k08__btn,
	.p3-in-arrow {
		transition: none;
	}

	.p3-sheets .p3-in-k07:hover,
	.p3-in-k08__btn:hover,
	.p3-in-arrow:hover {
		transform: none;
	}
}

/* Soft text on the dark materials (glass, gradient, tint, scene sections): every soft white is at least 94 % white, so it
   reaches 4.5:1 against the lightest gradient stop in all eight scenes. The doubled class beats the load order of the
   group files that set the softer values. Colour is never transitioned. */
.p3-sheets.p3-sheets :is(
	.p3-in-glass__card p,
	.p3-in-k09__card p,
	.p3-in-steps p,
	.p3-in-card p,
	.p3-in-k16__small,
	.p3-process__step p,
	.p3-phone .p3-phone__l p,
	.p3-phone .p3-phone__r p
) {
	color: rgba(255, 255, 255, .94);
}
