/* Round 2 of the template page body (owner answers 2026-10-20): three glass cards, four-step cards, "Relaterat" as a
   glass carousel (k09), and a shorter page on phones. Loaded after every other in-*.css (inc/pricing.php), so the
   phone rules below win without !important. Only transform and opacity animate. */

/* ---------- k09: Relaterat as a glass carousel on a navy sheet ---------- */
.p3-sheets .p3-in-k09 {
	padding-top: 40px;
	padding-bottom: 40px;
}

.p3-sheets .p3-in-k09__stage {
	position: relative;
	grid-column: 2 / 4;
	min-width: 0;
}

.p3-sheets .p3-in-k09 h2 {
	margin: 0 0 28px;
	font-size: clamp(30px, 3.2vw, 44px);
	line-height: 1.04;
	letter-spacing: -.045em;
	font-weight: var(--heading-weight);
}

.p3-in-k09__track {
	display: flex;
	gap: var(--p3-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

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

.p3-in-k09__track:focus-visible {
	outline: 2px solid #9db4e0;
	outline-offset: 4px;
	border-radius: var(--p3-r);
}

.p3-in-k09__card {
	display: flex;
	flex: 0 0 calc((100% - 2 * var(--p3-gap)) / 3);
	min-width: 0;
	border-radius: var(--p3-r);
	background: var(--p3-glass);
	-webkit-backdrop-filter: blur(37px);
	backdrop-filter: blur(37px);
	box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .18);
	scroll-snap-align: start;
	transition: transform .4s var(--p3-spring);
}

.p3-in-k09__card:hover {
	transform: translateY(-4px);
}

.p3-in-k09__card:active {
	transform: scale(.985);
}

.p3-in-k09__card a {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	box-sizing: border-box;
	min-height: 220px;
	padding: 28px 24px 24px;
	border-radius: var(--p3-r);
	color: #fff;
	text-decoration: none;
}

.p3-in-k09__card a:focus-visible {
	outline: 2px solid #9db4e0;
	outline-offset: -4px;
}

.p3-sheets .p3-in-k09__card h3 {
	margin: 0 0 10px;
	font-size: 28px;
	line-height: 1.1;
	letter-spacing: -.04em;
	font-weight: var(--heading-weight);
}

.p3-in-k09__card p {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .8);
}

.p3-in-k09__go {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-top: auto;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
}

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

/* "Läs mer" is the link's name for screen readers; the arrow is the picture of it. */
.p3-in-k09__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.p3-in-k09__stage > .p3-in-arrow {
	position: absolute;
	top: 0;
	right: 0;
	background: rgba(255, 255, 255, .14);
}

.p3-in-k09__stage > .p3-in-arrow--prev {
	right: 48px;
	left: auto;
}

/* Phones and tablets: shorter page. Rows of cards swipe sideways, step cards sit two by two. */
@media (max-width: 900px) {
	/* One column means every child sits in column 1. Without this the skin-area carousel (k11, "2 / 4" on desktop)
	   made two extra grid columns and squeezed the following cards to 50 px wide. */
	.p3-sheets .p3-sheet.p3-sheet > *,
	.p3-sheets .layer--scene.layer--scene > * {
		grid-column: 1;
	}

	.p3-sheets .p3-in-k09 {
		padding: 20px 0 20px 16px;
	}

	.p3-sheets .p3-in-k09__stage {
		grid-column: 1;
	}

	.p3-sheets .p3-in-k09 h2 {
		margin-bottom: 20px;
	}

	.p3-in-k09__track {
		padding-right: 16px;
		scroll-padding-inline: 16px;
	}

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

	.p3-in-k09__card a {
		min-height: 0;
		gap: 0;
		padding: 20px 20px 18px;
	}

	.p3-in-k09__go {
		margin-top: 20px;
	}

	.p3-in-k09__stage > .p3-in-arrow {
		display: none;
	}

	/* glass row: swipe */
	.p3-sheets .p3-in-glass {
		display: flex;
		margin-right: -8px;
		padding-right: 8px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

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

	.p3-sheets .p3-in-glass__card {
		flex: 0 0 80%;
		padding: 24px 20px 22px;
		scroll-snap-align: start;
	}

	.p3-sheets .p3-in-glass__card h3 {
		font-size: 26px;
	}

	.p3-sheets .p3-in-glass__foot {
		padding-top: 14px;
	}

	/* four steps, two by two */
	.p3-sheets .p3-in-steps {
		padding: 28px 20px;
	}

	.p3-sheets .p3-in-steps__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
	}

	.p3-sheets .p3-in-steps__no {
		width: 32px;
		height: 32px;
		margin-bottom: 12px;
		font-size: 16px;
	}

	.p3-sheets .p3-in-steps h3 {
		margin-bottom: 8px;
		font-size: 20px;
	}

	.p3-sheets .p3-in-steps p {
		font-size: 15px;
		line-height: 1.45;
	}

	/* "Vad händer sen?" two by two */
	.p3-sheets .p3-in-k14__head {
		margin-bottom: 4px;
	}

	.p3-sheets .p3-in-k14__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 16px;
	}

	.p3-sheets .p3-in-k14__card h3 {
		font-size: 19px;
		line-height: 1.15;
	}

	.p3-sheets .p3-in-k14__card p {
		font-size: 15px;
		line-height: 1.45;
	}

	/* the two picture cards swipe */
	.p3-sheets .p3-in-k15 {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

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

	.p3-sheets .p3-in-k15__card {
		flex: 0 0 82%;
		padding-bottom: 8px;
		scroll-snap-align: start;
	}

	.p3-sheets .p3-in-k15__card figure {
		aspect-ratio: 2 / 1;
		margin-bottom: 14px;
	}

	.p3-sheets .p3-in-k15__card p {
		margin-bottom: 16px;
		font-size: 15px;
	}

	/* the pair of question and fact */
	.p3-in-k16__q,
	.p3-in-k16__fact {
		padding: 24px 20px;
	}

	.p3-in-k16__q {
		gap: 16px;
	}

	.p3-in-k16__fact {
		gap: 12px;
	}

	/* hero person: large, nearly the full width of the phone (owner 2026-10-21); the bottom fades out (css/in-topp.css) */
	.p3-sheets .layer--scene > .hero .hero__portrait {
		height: 460px;
	}

	/* offer card rows tighter, less air between the sheets */
	.p3-sheets .p3-offer {
		margin-top: 56px;
	}

	.p3-sheets .p3-offer__rows li {
		padding: 8px 0;
	}

	.p3-sheets .layer--scene,
	.p3-sheets .p3-sheet {
		margin-bottom: 20px;
	}

	.p3-sheets .p3-in-k21--photo {
		min-height: 480px;
	}

	.p3-sheets .p3-warm {
		min-height: 270px;
		padding: 18px 20px 20px;
	}

	.p3-sheets .p3-warm__img svg {
		width: 96px;
		height: 96px;
	}

	.p3-sheets .p3-ways h2 {
		padding: 12px 0 12px;
	}

	/* the white explanation cards inside the pale cards swipe */
	.p3-sheets .p3-minis {
		display: flex;
		margin: 16px -24px 0;
		padding: 0 24px 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.p3-sheets .p3-minis::-webkit-scrollbar {
		display: none;
	}

	.p3-sheets .p3-minis .p3-mini {
		flex: 0 0 84%;
		scroll-snap-align: start;
	}

	.p3-sheets .p3-minis--col {
		margin-top: 0;
	}

	.p3-sheets .p3-prepare-list li,
	.p3-sheets .p3-prepare-list li:first-child {
		padding: 14px 16px;
		font-size: 16px;
	}

	.p3-sheets .p3-k h2 {
		margin-bottom: 16px;
	}

	.p3-sheets .p3-in-k20__row button {
		min-height: 52px;
		padding-block: 8px;
	}

	/* skin-area carousel: lower pictures, tighter card */
	.p3-sheets .p3-in-k11 {
		padding-block: 24px;
	}

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

	.p3-in-k11__tile {
		gap: 10px;
		padding: 16px;
	}

	.p3-in-k11__pic {
		height: 170px;
	}

	/* the two picture cards and the closing picture a little lower */
	.p3-sheets .p3-in-k15__card figure {
		aspect-ratio: 5 / 2;
	}

	.p3-sheets .p3-closing .closing__portrait,
	.p3-sheets .p3-closing > img,
	.p3-sheets .p3-closing img {
		max-height: 170px;
	}
}

/* Phones: cards are as tall as their content (no stretched cards with an empty bottom), also in the swipe rows. */
@media (max-width: 900px) {
	.p3-sheets .p3-in-glass,
	.p3-sheets .p3-in-k15 {
		align-items: flex-start;
	}

	/* "Vi fixar allt.": the four steps sit two by two, like the step card further down, instead of swiping sideways. */
	.p3-in-k13__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
		margin-right: 0;
		padding-right: 0;
		overflow: visible;
	}

	.p3-in-k13__list li {
		flex: none;
	}
}

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

	.p3-in-k09__card:hover,
	.p3-in-k09__card:active {
		transform: none;
	}
}

/* Tablets, 701 to 900 px (Kajal 2026-11-19): the glass row (explanation, "Din bedömning" with the start button, "Diskret
   hela vägen") was a swipe strip here, with each card as high as its own text (149 / 192 / 124 px at 768 on
   Klimakteriet; the numbers differ a little per page): three sizes and a clipped second card. It now sits as three
   equal cards side by side. Unlike from 901 px, the text starts at the top of each card and the button sits at the
   bottom. The cards are narrow (223 px at 701), so the padding, the heading and the button are a little tighter and
   the button text stays on one line. The two wrapping lines on the heading change nothing with the site's own font
   (the longest word, "Livmoderslemhinnan", has 18 px to spare at 701); they are there for a wider fallback font.
   Only this row; the other swipe rows of this width are not touched. Phones (up to 700) stay stacked. */
@media (min-width: 701px) and (max-width: 900px) {
	html body .p3-sheets .p3-in-glass {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: stretch;
		margin-right: 0;
		padding-right: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	html body .p3-sheets .p3-in-glass > * {
		flex: none;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	html body .p3-sheets .p3-in-glass__card {
		padding: 22px 14px 16px;
	}

	html body .p3-sheets .p3-in-glass__card h3 {
		font-size: clamp(20px, 2.85vw, 24px);
		overflow-wrap: break-word;
		hyphens: auto;
	}

	html body .p3-sheets .p3-in-glass .button {
		--btn-icon: 32px;
		box-sizing: border-box;
		width: 100%;
		justify-content: space-between;
		gap: 8px;
		padding-right: 6px;
		padding-left: 14px;
		white-space: nowrap;
	}
}

/* TABLET-ROWS start
   Tablets (Kajal 2026-11-19, after the glass row above): the four other short card rows of the treatment pages were swipe
   strips between 701 and 900 px, each with a card clipped at the screen edge. They now sit side by side:
   the two fact cards (.p3-minis, also the --col variant, which was a strip here too) and the two content cards
   (.p3-in-k15) in two columns, the three "ways" cards (.p3-ways__row) in three, and "Relaterat" (.p3-in-k09__track) in
   two or three columns by its number of shown cards. The "ways" row kept scrolling up to about 1075 px (three fixed 320 px cards), so its part runs
   to 1099 px. The Priser page has its own two-card "ways" row (.p3-in-sida__ways, assets/in-r5-sidor.css) and is left
   out of every rule here. Phones (up to 700) stay stacked. The long picture carousels keep their arrows. */
@media (min-width: 701px) and (max-width: 900px) {
	html body .p3-sheets.p3-sheets :is(.p3-minis, .p3-in-k15, .p3-in-k09__track) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: stretch;
		margin-right: 0;
		padding-right: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	/* the swipe rule's side bleed and its room for the scrolling shadow are not needed in a grid */
	html body .p3-sheets.p3-sheets .p3-minis {
		margin-left: 0;
		padding-bottom: 0;
		padding-left: 0;
	}

	/* "Relaterat" has one to six cards, and a card for a closed treatment is hidden (chrome.css). The build writes the
	   number of shown cards on the row (data-p3-count, tools/in_glasrel.py): three columns as a rule (three, five or six
	   cards), two columns for two or four cards so none is left alone on a second row, and a single card is half the
	   row wide, a card and not a banner. */
	html body .p3-sheets.p3-sheets .p3-in-k09__track {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	html body .p3-sheets.p3-sheets .p3-in-k09__track:is([data-p3-count="2"], [data-p3-count="4"]) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	html body .p3-sheets.p3-sheets .p3-in-k09__track[data-p3-count="1"] {
		grid-template-columns: minmax(0, calc(50% - var(--p3-gap, 8px) / 2));
	}

	html body .p3-sheets.p3-sheets .p3-in-k09__card h3 {
		font-size: clamp(20px, 2.85vw, 24px);
		overflow-wrap: break-word;
		hyphens: auto;
	}

	html body .p3-sheets.p3-sheets :is(.p3-minis, .p3-in-k15, .p3-in-k09__track) > * {
		flex: none;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	html body .p3-sheets .p3-in-k09 {
		padding-right: 16px;
	}
}

@media (min-width: 701px) and (max-width: 1099px) {
	html body .p3-sheets.p3-sheets :not(.p3-in-sida__ways) > .p3-ways__row {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: stretch;
		margin-right: 0;
		padding-right: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	html body .p3-sheets.p3-sheets :not(.p3-in-sida__ways) > .p3-ways__row > * {
		flex: none;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	/* The cards are narrower than their fixed 320 px here: the heading is sized so that "Läkare on demand" stays on one
	   line, otherwise its second line runs up under the drawn picture at the top of the card. */
	html body .p3-sheets.p3-sheets :not(.p3-in-sida__ways) > .p3-ways__row .p3-warm h3 {
		font-size: clamp(20px, 2.85vw, 26px);
	}
}

/* In the narrow part of this range the card text takes four or five lines and pushes the heading up under the picture
   at the top of the card (up to 20 px at 701, and only 2 px clear at 768 on the page with the longest text): the three
   cards are 20 px taller up to 819 px, and 34 px taller below 720 px, where the first card's text takes five lines. */
@media (min-width: 701px) and (max-width: 819px) {
	html body .p3-sheets.p3-sheets :not(.p3-in-sida__ways) > .p3-ways__row .p3-warm {
		min-height: 270px;
	}
}

@media (min-width: 701px) and (max-width: 719px) {
	html body .p3-sheets.p3-sheets :not(.p3-in-sida__ways) > .p3-ways__row .p3-warm {
		min-height: 284px;
	}
}
/* TABLET-ROWS end */

/* Phones (Ali 2026-10-22): short card rows are stacked at full width, no swipe rows with a clipped card and an empty strip.
   The long picture carousels (k11, products) keep their arrows. */
@media (max-width: 700px) {
	html body .p3-sheets :is(.p3-in-glass, .p3-minis, .p3-ways__row, .p3-in-k15, .p3-in-k09__track) {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		align-items: stretch;
		margin-right: 0;
		padding-right: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	html body .p3-sheets :is(.p3-in-glass, .p3-minis, .p3-ways__row, .p3-in-k15, .p3-in-k09__track) > * {
		flex: none;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	html body .p3-sheets .p3-in-k09__stage > .p3-in-arrow {
		display: none;
	}

	html body .p3-sheets .p3-in-k09 {
		padding-right: 16px;
	}

	/* Stacked ways cards: each picture sticks up 46 px over its card (in-r5-kort.css) and overlaps the card above, which
	   is the wanted look (Kajal, iPhone 22 Oct). The picture reaches 38 px into that card (46 px minus the 8 px gap), so the
	   cards end their text 56 px above their lower edge and the text is never covered. The last card gets the same room
	   (Kajal 23 Oct): with 20 px it put its title 60 px lower than the others and looked like a bigger card. */
	html body .p3-sheets .p3-ways__row .p3-warm {
		padding-bottom: 56px;
	}

	/* Picture tiles: up to three stack too, the longer rows keep the carousel. The stacked row keeps the 20 px on both
	   sides from in-r5-kort.css, so the cards sit centred under the heading (Kajal 2026-10-26: with the right padding at 0
	   they leaned to the right edge). */
	html body .p3-sheets .p3-in-k11__track:not(:has(> :nth-child(4))) {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		margin-right: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	html body .p3-sheets .p3-in-k11__track:not(:has(> :nth-child(4))) > * {
		flex: none;
		width: auto;
	}

	html body .p3-sheets .p3-in-k11__stage:has(.p3-in-k11__track:not(:has(> :nth-child(4)))) .p3-in-arrow {
		display: none;
	}
}
