/* Components. Mobile-first throughout: the base rule is the phone layout and every
   media query is a min-width enhancement. */

/* ---------- Buttons ---------- */

.sl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	padding: 0.5rem 0.875rem;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sl-btn--primary {
	background: var(--sl-red);
	color: var(--sl-red-contrast);
}
.sl-btn--primary:hover { background: var(--sl-red-hover); color: var(--sl-red-contrast); }

.sl-btn--ghost {
	background: transparent;
	border-color: var(--sl-border-strong);
	color: var(--sl-text);
}
.sl-btn--ghost:hover { background: var(--sl-surface-hover); color: var(--sl-text); }

.sl-btn--block { display: flex; width: 100%; }

.sl-btn-icon {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	flex: none;
	padding: 0;
	background: transparent;
	border: 1px solid var(--sl-border);
	border-radius: 8px;
	color: var(--sl-text-muted);
	cursor: pointer;
}
.sl-btn-icon:hover { background: var(--sl-surface-hover); color: var(--sl-text); }

/* The toggle shows the icon for the mode it will switch *to*. */
.sl-icon-moon { display: block; }
.sl-icon-sun { display: none; }
:root[data-theme="dark"] .sl-icon-moon { display: none; }
:root[data-theme="dark"] .sl-icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .sl-icon-moon { display: none; }
	:root:not([data-theme="light"]) .sl-icon-sun { display: block; }
}

/* The CTA label is dead weight on a narrow phone; the + icon carries it. */
.sl-cta-add span { display: none; }
@media (min-width: 560px) {
	.sl-cta-add span { display: inline; }
}

/* ---------- Language switcher ---------- */

.sl-langs { display: flex; gap: 0.125rem; }
.sl-langs__item {
	padding: 0.375rem 0.5rem;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--sl-text-faint);
	text-decoration: none;
}
.sl-langs__item:hover { background: var(--sl-surface-hover); color: var(--sl-text); }
.sl-langs__item.is-current { color: var(--sl-red); }

/* ---------- Card ---------- */

.sl-card {
	background: var(--sl-surface);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius-lg);
	box-shadow: var(--sl-shadow);
	padding: 1rem;
}

@media (min-width: 560px) {
	.sl-card { padding: 1.25rem; }
}

.sl-card > h2 { margin-bottom: 1rem; }

.sl-widget__title {
	font-size: 1rem;
	margin-bottom: 0.875rem;
}

.sl-prose { line-height: 1.7; }
.sl-prose p { color: var(--sl-text-muted); }

.sl-ico { flex: none; }

/* ---------- Hero ---------- */

.sl-hero {
	position: relative;
	background: var(--sl-surface);
	border-bottom: 1px solid var(--sl-border);
	color: var(--sl-text);
}

.sl-hero__inner {
	position: relative;
	z-index: 1;
	padding-block: 1.5rem 1.75rem;
}

.sl-hero--has-image {
	color: var(--sl-text-on-media);
	border-bottom: 0;
}
.sl-hero--has-image .sl-hero__inner {
	padding-block: 3rem 1.75rem;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.sl-hero__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}
.sl-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* Scrim: the title must stay legible over any photo, in either theme. */
.sl-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgb(8 10 14 / 88%) 0%,
		rgb(8 10 14 / 62%) 45%,
		rgb(8 10 14 / 30%) 100%
	);
}

.sl-hero__back {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	margin-bottom: 1rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: inherit;
	opacity: 0.85;
	text-decoration: none;
}
.sl-hero__back:hover { opacity: 1; color: inherit; }

.sl-hero__title {
	font-size: 1.625rem;
	max-width: 20ch;
	margin-bottom: 0.75rem;
}

.sl-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.875rem;
}

.sl-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.3125rem 0.625rem;
	border-radius: 999px;
	font-size: 0.8125rem;
	background: var(--sl-surface-hover);
	color: var(--sl-text-muted);
	border: 1px solid var(--sl-border);
}
.sl-chip .sl-ico { width: 15px; height: 15px; }

.sl-hero--has-image .sl-chip {
	background: rgb(255 255 255 / 14%);
	border-color: rgb(255 255 255 / 22%);
	color: #fff;
	backdrop-filter: blur(4px);
}

.sl-hero__byline,
.sl-hero__updated {
	margin: 0;
	font-size: 0.8125rem;
	opacity: 0.9;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}
.sl-hero__updated { opacity: 0.75; margin-top: 0.25rem; }
.sl-hero__author { font-weight: 600; }

@media (min-width: 700px) {
	.sl-hero__title { font-size: 2.25rem; }
	.sl-hero--has-image .sl-hero__inner { min-height: 380px; padding-block: 4rem 2rem; }
}

/* ---------- Summary cards ---------- */

.sl-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.sl-summary__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	padding: 0.875rem;
	text-align: center;
	background: var(--sl-surface);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
	box-shadow: var(--sl-shadow);
}

.sl-summary__icon { color: var(--sl-text-faint); }

.sl-summary__label {
	font-size: 0.75rem;
	color: var(--sl-text-muted);
}

.sl-summary__value {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
}

@media (min-width: 760px) {
	.sl-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Table ---------- */

.sl-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.sl-table th,
.sl-table td {
	padding: 0.75rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--sl-border);
	vertical-align: middle;
}

.sl-table thead th {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sl-text-faint);
	padding-block: 0.5rem;
}

.sl-table tbody th { font-weight: 500; }

.sl-table__num { text-align: right; }

/* ---------- Budget ---------- */

.sl-budget__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
}

.sl-budget__table-wrap {
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
}

.sl-budget__cat {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.sl-budget__swatch {
	flex: none;
	width: 10px;
	height: 10px;
	margin-top: 0.4rem;
	border-radius: 3px;
	background: var(--swatch);
}

.sl-budget__cat-text { display: flex; flex-direction: column; }
.sl-budget__cat-name { color: var(--sl-text); }
.sl-budget__cat-note {
	font-size: 0.75rem;
	color: var(--sl-text-faint);
}

/* The "≈ x/mo" hint under a yearly cost's real (yearly) figure. */
.sl-budget__permo {
	display: block;
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--sl-text-faint);
}

/* The share column: a bar on top of the number, so it reads on a phone too. */
.sl-bar {
	display: block;
	width: 100%;
	max-width: 90px;
	height: 6px;
	margin-left: auto;
	margin-bottom: 0.25rem;
	background: var(--sl-surface-hover);
	border-radius: 999px;
	overflow: hidden;
}
.sl-bar__fill {
	display: block;
	width: var(--pct);
	height: 100%;
	background: var(--swatch);
	border-radius: 999px;
}
.sl-bar__pct {
	font-size: 0.75rem;
	color: var(--sl-text-muted);
}

.sl-budget__total th,
.sl-budget__total td {
	border-bottom: 0;
	border-top: 2px solid var(--sl-border-strong);
	padding-top: 0.875rem;
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--sl-text);
}

@media (min-width: 900px) {
	/* Chart beside the table once there's room; stacked below that. */
	.sl-budget__grid {
		grid-template-columns: 240px minmax(0, 1fr);
		align-items: center;
		gap: 2rem;
	}
}

/* ---------- Donut ---------- */

.sl-donut { margin: 0; }

.sl-donut__chart {
	position: relative;
	width: 100%;
	max-width: 220px;
	margin-inline: auto;
	aspect-ratio: 1;
}

.sl-donut__svg { width: 100%; height: 100%; overflow: visible; }

.sl-donut__track {
	fill: none;
	stroke: var(--sl-surface-hover);
	stroke-width: 20;
}

.sl-donut__seg {
	fill: none;
	stroke-width: 20;
	cursor: pointer;
	transition: stroke-width 0.15s ease, opacity 0.15s ease;
}
.sl-donut__seg:hover,
.sl-donut__seg:focus-visible {
	stroke-width: 24;
	outline: none;
}
/* Dim the rest of the ring so the hovered slice stands out. */
.sl-donut.is-active .sl-donut__seg { opacity: 0.45; }
.sl-donut.is-active .sl-donut__seg:hover,
.sl-donut.is-active .sl-donut__seg:focus-visible { opacity: 1; }

.sl-donut__center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.125rem;
	text-align: center;
	pointer-events: none;
	padding: 0 22%;
}

.sl-donut__label {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--sl-text-faint);
	line-height: 1.3;
}
.sl-donut__value {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.2;
}
.sl-donut__sub {
	font-size: 0.75rem;
	color: var(--sl-text-muted);
}

/* ---------- Cost-factors sidebar chart ---------- */

.sl-costchart__title {
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.3;
	font-size: 1.05rem;
	font-weight: 800;
	margin-bottom: 1.125rem;
}

/* Donut left, legend right — the mockup's arrangement. */
.sl-costchart__body {
	display: flex;
	align-items: center;
	gap: 0.875rem;
}

.sl-costchart__donut {
	flex: 0 0 auto;
	width: 42%;
	max-width: 118px;
}
.sl-costchart__donut .sl-donut__chart { max-width: none; }

/* A thicker ring than the report donut, to match the design's chunkier proportions. */
.sl-costchart .sl-donut__track,
.sl-costchart .sl-donut__seg { stroke-width: 26; }
.sl-costchart .sl-donut__seg:hover,
.sl-costchart .sl-donut__seg:focus-visible { stroke-width: 30; }

.sl-costchart__legend {
	flex: 1 1 0;
	min-width: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sl-costchart__item {
	display: grid;
	grid-template-columns: auto auto 1fr;
	align-items: center;
	gap: 0.4375rem;
	font-size: 0.8125rem;
}

.sl-costchart__swatch {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	background: var(--swatch);
}

.sl-costchart__pct {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	min-width: 2.4em;
}

.sl-costchart__label { color: var(--sl-text-muted); }

.sl-costchart__caption {
	margin-top: 1.125rem;
	font-size: 0.8125rem;
	color: var(--sl-text-faint);
}

/* ---------- Cost comparison (sidebar leaderboard) ---------- */

.sl-costcompare__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 1.125rem;
}

.sl-costcompare__header .sl-widget__title { margin-bottom: 0; }

/* Native select, themed so it reads in dark mode too. */
.sl-costcompare__select {
	flex: none;
	padding: 0.35rem 0.6rem;
	font: inherit;
	font-size: 0.8125rem;
	color: var(--sl-text);
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
	cursor: pointer;
}

.sl-costcompare__select:focus-visible {
	outline: 2px solid var(--sl-red);
	outline-offset: 2px;
}

.sl-costcompare__list {
	display: grid;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The class rule above would otherwise override the [hidden] attribute's
   display:none, leaving the inactive list visible — so restore it explicitly. */
.sl-costcompare__list[hidden] { display: none; }

.sl-costcompare__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.sl-costcompare__name {
	font-weight: 600;
	color: var(--sl-text);
}

.sl-costcompare__value {
	flex: none;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--sl-text);
}

/* The base .sl-bar is capped and right-aligned for the budget table; here it spans
   the row and fills from the left. */
.sl-costcompare .sl-bar {
	max-width: none;
	margin: 0;
}

/* ---------- Earners ---------- */

.sl-earners {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.875rem;
}

.sl-earner {
	padding: 1rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}

.sl-earner__name {
	margin-bottom: 0.75rem;
	padding-bottom: 0.625rem;
	border-bottom: 1px solid var(--sl-border);
	font-size: 0.9375rem;
}

.sl-earner__list { margin: 0; }

.sl-earner__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.375rem 0;
	font-size: 0.875rem;
}
.sl-earner__row dt { color: var(--sl-text-muted); }
.sl-earner__row dd { margin: 0; font-weight: 600; }

/* Salary-calculator breakdown: uplifts nudge in, gross and net get a rule above. */
.sl-earner__calc .is-add dd { color: var(--sl-positive); font-weight: 500; }
.sl-earner__calc .is-deduct dd { color: var(--sl-negative); font-weight: 500; }
.sl-earner__row--sub,
.sl-earner__row--total {
	border-top: 1px solid var(--sl-border);
	font-weight: 700;
}
.sl-earner__row--sub dt,
.sl-earner__row--total dt { color: var(--sl-text); font-weight: 700; }
.sl-earner__row--total { border-top-width: 2px; }

/* Deliberately one column at every width: side by side, each earner got ~360px and
   the breakdown labels ("Social deductions (AHV/IV/ALV) (6.40%)") wrapped onto two
   lines and crowded their figures. Stacked, every row is label-left / figure-right on
   a single line, and two earners read as two tables rather than one cramped pair. */

/* ---------- Bottom line ---------- */

.sl-bottomline__list { margin: 0; }

.sl-bottomline__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--sl-border);
	font-size: 0.9375rem;
}
.sl-bottomline__row dt { color: var(--sl-text-muted); }
.sl-bottomline__row dd { margin: 0; font-weight: 600; }

.sl-bottomline__row--result {
	border-bottom: 0;
	border-top: 2px solid var(--sl-border-strong);
	margin-top: 0.25rem;
	padding-top: 0.875rem;
	align-items: center;
}
.sl-bottomline__row--result dt {
	display: flex;
	flex-direction: column;
	color: var(--sl-text);
	font-weight: 700;
}
.sl-bottomline__row--result dd { font-size: 1.25rem; font-weight: 700; }

.sl-bottomline__rate {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--sl-text-faint);
}

/* ---------- Tip box ---------- */

.sl-tip {
	display: flex;
	gap: 0.875rem;
	padding: 1.125rem;
	background: var(--sl-positive-bg);
	border: 1px solid color-mix(in srgb, var(--sl-positive) 30%, transparent);
	border-radius: var(--sl-radius-lg);
}
.sl-tip__icon { flex: none; color: var(--sl-positive); }
.sl-tip__title { font-size: 0.9375rem; margin-bottom: 0.25rem; }
.sl-tip__text { font-size: 0.875rem; color: var(--sl-text-muted); }
.sl-tip__text > :first-child { margin-top: 0; }
.sl-tip__text > :last-child { margin-bottom: 0; }
.sl-tip__text p { margin: 0 0 0.5rem; }
.sl-tip__text ul,
.sl-tip__text ol { margin: 0 0 0.5rem; padding-left: 1.25rem; }
.sl-tip__text a { color: var(--sl-red); }

/* ---------- Facts ---------- */

.sl-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 0.75rem;
	margin: 0;
}

.sl-facts__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	text-align: center;
}
.sl-facts__icon { color: var(--sl-text-faint); }

.sl-facts dt {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sl-text-faint);
}
.sl-facts dd {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 500;
}

@media (min-width: 700px) {
	.sl-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Flags (languages & country of origin, inside Key facts) ---------- */

/* The flag drawing: a hairline keeps a white or pale stripe legible on the card. */
.sl-flag {
	display: block;
	width: 1.375rem;
	height: auto;
	border-radius: 2px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* Country of origin: flag + name on one line, in a normal fact cell. */
.sl-flagval {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
}
.sl-flagval__flag { display: inline-flex; flex: none; }

/* Languages: a wrapping row of flag + name + level, spanning the grid. */
.sl-langline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
}
.sl-langline__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4375rem;
}
/* A vertical rule between languages, echoing the mockup. */
.sl-langline__item + .sl-langline__item {
	padding-left: 1.25rem;
	border-left: 1px solid var(--sl-border);
	margin-left: -0.625rem; /* pull back half the row gap so the rule sits mid-gutter */
}
.sl-langline__flag { display: inline-flex; flex: none; }
.sl-langline__flag--none { color: var(--sl-text-faint); }
.sl-langline__name { font-weight: 500; }
.sl-langline__level {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--sl-text-faint);
}

/* The key-facts grid centres each cell, so the wrapping languages row and the
   flag + name pairs centre with it rather than hugging the left edge. */
.sl-facts .sl-langline,
.sl-facts .sl-flagval { justify-content: center; }

/* The languages fact takes a full row on phones; on wider screens it sits beside the
   country of origin, spanning three of the grid's four columns. */
.sl-facts__item--langs { grid-column: 1 / -1; }

@media (min-width: 700px) {
	.sl-facts__item--langs { grid-column: span 3; }
}

/* ---------- Custom sections (author-defined tiles) ---------- */

.sl-tiles {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
}

.sl-tile {
	min-width: 0;
	background: var(--sl-surface-2, var(--sl-bg));
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
	padding: 0.875rem 1rem;
}

.sl-tile__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 0.625rem;
	text-align: center;
}

.sl-tile__icon { color: var(--sl-text-faint); display: inline-flex; }

.sl-tile__title {
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0;
}

.sl-tile__rows { margin: 0; }

.sl-tile__row {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 1rem;
	padding: 0.3125rem 0;
	border-top: 1px solid var(--sl-border);
}

.sl-tile__row:first-child { border-top: 0; }

.sl-tile__row dt {
	min-width: 0;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
}

.sl-tile__row dd {
	min-width: 0;
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	text-align: right;
	white-space: normal;
	overflow-wrap: anywhere;
}

@media (min-width: 560px) {
	.sl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.sl-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Health insurance ---------- */

/* One policy per family member, stacked. */
.sl-insurance {
	display: flex;
	flex-direction: column;
	gap: var(--sl-gap);
}

/* A policy card. On phones it stacks (identity, stat tiles, review); from 700px the
   identity block sits to the left of the stat tiles and the review spans underneath. */
.sl-policy {
	display: grid;
	min-width: 0;
	gap: 0.875rem 1.25rem;
	padding: 1rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}

/* Identity: logo + insurer/person on one side, stars + grade on the other. */
.sl-policy__id {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}
.sl-policy__brand { display: flex; align-items: center; gap: 0.75rem; }
.sl-policy__logo {
	width: auto;
	height: 44px;
	max-width: 8rem;
	object-fit: contain;
	border-radius: 8px;
	background: var(--sl-surface);
	padding: 4px;
	flex: none;
}
.sl-policy__name { display: flex; flex-direction: column; }
.sl-policy__insurer { font-weight: 600; }
.sl-policy__person { font-size: 0.8125rem; color: var(--sl-text-muted); }

.sl-policy__meta { display: flex; align-items: center; gap: 0.625rem; }

/* Plain-word grade beside the stars. Tone tints text and background from the money
   palette (green good, amber fair, red poor) so it holds up in dark mode and greyscale. */
.sl-grade {
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.3125rem 0.5rem;
	border-radius: 999px;
	white-space: nowrap;
}
.sl-grade--good { color: var(--sl-positive); background: var(--sl-positive-bg); }
.sl-grade--warn { color: var(--sl-cat-2); background: color-mix(in srgb, var(--sl-cat-2) 16%, transparent); }
.sl-grade--bad { color: var(--sl-negative); background: var(--sl-negative-bg); }

/* Three compact tiles — model, franchise, premium — kept in one row. */
.sl-policy__stats {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
}
.sl-stat {
	display: grid;
	grid-template-columns: auto minmax(0, 0.75fr) minmax(0, 1.25fr);
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 0.5rem;
	text-align: left;
	background: var(--sl-surface);
	border: 1px solid var(--sl-border);
	border-radius: 8px;
}
.sl-stat__icon { color: var(--sl-text-faint); }
.sl-stat__icon.sl-negative { color: var(--sl-negative); }
.sl-stat dt { min-width: 0; font-size: 0.75rem; color: var(--sl-text-muted); }
.sl-stat dd {
	min-width: 0;
	margin: 0;
	font-weight: 600;
	font-size: 0.875rem;
	text-align: right;
	overflow-wrap: anywhere;
}

@media (min-width: 560px) {
	.sl-policy__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sl-stat {
		display: flex;
		flex-direction: column;
		gap: 0.25rem;
		text-align: center;
	}
	.sl-stat dd { text-align: center; overflow-wrap: normal; }
}

/* Review runs full width beneath the identity and the tiles. */
.sl-policy__review {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--sl-text-muted);
}

.sl-insurance__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: var(--sl-gap) 0 0;
	padding-top: 0.75rem;
	border-top: 2px solid var(--sl-border);
	font-weight: 700;
}

/* Star rating: five stars, the "on" ones filled with the accent, the rest faint. */
.sl-stars {
	display: inline-flex;
	gap: 0.125rem;
	color: var(--sl-text-faint);
}
.sl-stars__star .sl-ico { fill: none; stroke: currentColor; }
.sl-stars__star.is-on { color: var(--sl-cat-3); }
.sl-stars__star.is-on .sl-ico { fill: currentColor; }

/* Accordion: native <details>, so it opens with zero JavaScript. */
.sl-accordion {
	border-top: 1px solid var(--sl-border);
	padding-top: 0.625rem;
}
.sl-accordion__summary {
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--sl-red);
	list-style: none;
}
.sl-accordion__summary::-webkit-details-marker { display: none; }
.sl-accordion__summary::before {
	content: "▸";
	display: inline-block;
	margin-right: 0.375rem;
	transition: transform 0.15s ease;
}
.sl-accordion[open] .sl-accordion__summary::before { transform: rotate(90deg); }
.sl-accordion__body {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	color: var(--sl-text-muted);
}

/* A collapsible that holds a table (the per-earner earnings and deductions detail). The
   body drops the small muted styling — the table brings its own — and scrolls sideways on
   narrow phones so the four columns stay readable instead of overflowing the page. */
.sl-accordion--table { min-width: 0; margin-top: 0.75rem; }
.sl-accordion--table .sl-accordion__body {
	font-size: inherit;
	color: inherit;
}
.sl-table-wrap {
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
}

/* Subtotal and grand-total rows shared by the earnings and deductions tables. */
.sl-table__subtotal th,
.sl-table__subtotal td {
	border-top: 1px solid var(--sl-border-strong);
	font-weight: 600;
	color: var(--sl-text);
}
.sl-table__total th,
.sl-table__total td {
	border-bottom: 0;
	border-top: 2px solid var(--sl-border-strong);
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--sl-text);
}

@media (min-width: 700px) {
	.sl-policy {
		grid-template-columns: minmax(160px, 210px) 1fr;
		grid-template-areas:
			"id    stats"
			"review review";
		align-items: center;
	}
	/* On wide cards the identity stacks vertically (brand over rating). */
	.sl-policy__id {
		grid-area: id;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
	}
	.sl-policy__stats { grid-area: stats; }
	.sl-policy__review { grid-area: review; }
}

/* ---------- My car ---------- */

.sl-car__head {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sl-gap);
	align-items: center;
	margin-bottom: var(--sl-gap-lg);
}

/* The photo sits on a faint panel so a cut-out car (transparent PNG) or a dark press
   shot reads cleanly in both themes rather than floating on the card. */
.sl-car__photo {
	margin: 0;
	padding: 0.5rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}
.sl-car__photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: calc(var(--sl-radius) - 4px);
}

.sl-car__model {
	font-size: 1.25rem;
	line-height: 1.3;
	margin-bottom: 0.75rem;
}

.sl-car__specs { margin: 0; }
.sl-car__specrow {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0.3rem 0;
}
.sl-car__specrow + .sl-car__specrow { border-top: 1px solid var(--sl-border); }
.sl-car__specrow dt {
	color: var(--sl-text-muted);
	min-width: 8rem;
}
.sl-car__specrow dt::after { content: ":"; }
.sl-car__specrow dd {
	margin: 0;
	font-weight: 600;
}

.sl-car__costs {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

.sl-car__cost {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}

.sl-car__cost-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--sl-text-muted);
}
.sl-car__cost-icon { flex: none; color: var(--sl-text-faint); }
.sl-car__cost-label { font-size: 0.875rem; }
.sl-car__cost-period { color: var(--sl-text-faint); }

.sl-car__cost-value {
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
}

.sl-car__cost-note {
	font-size: 0.875rem;
	color: var(--sl-text);
}
.sl-car__cost-caveat {
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
}

.sl-car__notes {
	margin-top: var(--sl-gap-lg);
	padding-top: var(--sl-gap);
	border-top: 1px solid var(--sl-border);
}
.sl-car__notes-title {
	font-size: 1.0625rem;
	margin-bottom: 0.625rem;
}
.sl-car__notes-body { color: var(--sl-text-muted); }
.sl-car__notes-body p { margin: 0 0 0.5rem; }
.sl-car__notes-body ul {
	margin: 0;
	padding-left: 1.1rem;
	list-style: disc;
}
.sl-car__notes-body li { margin-bottom: 0.35rem; }
.sl-car__notes-body li::marker { color: var(--sl-text-faint); }

@media (min-width: 560px) {
	.sl-car__costs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 700px) {
	.sl-car__head { grid-template-columns: minmax(0, 42%) 1fr; gap: var(--sl-gap-lg); }
	/* No photo: the spec sheet takes the full width instead of sitting in a 42% column
	   with dead space beside it. */
	.sl-car__head--solo { grid-template-columns: 1fr; }
}

/* Services & subscriptions — one card per provider (phone plan, bank account, TV). */
.sl-service__head {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: var(--sl-gap);
}
.sl-service__logo {
	flex: none;
	width: auto;
	height: 2.25rem;
	max-width: 8rem;
	object-fit: contain;
}
.sl-service__heading { margin: 0; font-size: 1.25rem; }
.sl-service__subtitle {
	margin: 0.15rem 0 0;
	font-size: 0.9375rem;
	color: var(--sl-text-muted);
}

.sl-service__features {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin: 0;
}

.sl-feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 1rem;
	text-align: center;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}
.sl-feature__icon { color: var(--sl-text-faint); }
.sl-feature__label {
	font-size: 0.875rem;
	color: var(--sl-text-muted);
}
.sl-feature__value {
	margin: 0;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
}
.sl-feature__note {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
}

.sl-service__opinion {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-top: var(--sl-gap);
}
.sl-service__thumb { flex: none; margin-top: 0.1rem; }
.sl-service__opinion--positive .sl-service__thumb,
.sl-service__opinion--positive .sl-service__verdict-lead { color: var(--sl-positive); }
.sl-service__opinion--negative .sl-service__thumb,
.sl-service__opinion--negative .sl-service__verdict-lead { color: var(--sl-negative); }
.sl-service__verdict {
	margin: 0;
	color: var(--sl-text-muted);
	line-height: 1.55;
}
.sl-service__verdict-lead { margin-right: 0.3rem; }

@media (min-width: 560px) {
	.sl-service__features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Questions & answers ---------- */

.sl-qa {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sl-gap-lg);
}

.sl-qa__card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem 1.125rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}

.sl-qa__question {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--sl-text);
}

.sl-qa__answer {
	color: var(--sl-text);
	line-height: 1.6;
}
.sl-qa__answer > :first-child { margin-top: 0; }
.sl-qa__answer > :last-child { margin-bottom: 0; }
.sl-qa__answer p { margin: 0 0 0.75rem; }
.sl-qa__answer a { color: var(--sl-red); }

/* Collapsed state (added by theme.js only when the answer overflows).
   line-clamp rather than a max-height: a max-height cuts wherever it lands, which
   slices the last line through the middle of its glyphs and reads as broken. This
   cuts on a line boundary and gets the trailing ellipsis for free. */
.sl-qa__answer.is-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.sl-qa__more {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: -0.25rem 0 0;
	padding: 0.2rem 0;
	background: none;
	border: 0;
	font: inherit;
	font-weight: 600;
	color: var(--sl-red);
	cursor: pointer;
}
/* Chevron drawn from two borders — points down when collapsed, flips up when the
   button reports aria-expanded="true", so the arrow always mirrors the state and
   there is nothing for the JS to keep in sync. */
.sl-qa__more::after {
	content: "";
	width: 0.5em;
	height: 0.5em;
	margin-top: -0.18em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}
.sl-qa__more[aria-expanded="true"]::after {
	margin-top: 0.12em;
	transform: rotate(-135deg);
}
.sl-qa__more:hover .sl-qa__more-label,
.sl-qa__more:focus-visible .sl-qa__more-label { text-decoration: underline; }
.sl-qa__more:focus-visible {
	outline: 2px solid var(--sl-red);
	outline-offset: 2px;
	border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
	.sl-qa__more::after { transition: none; }
}

/* Up to five photos in a responsive grid below the answer. */
.sl-qa__photos {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

.sl-qa__photo {
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--sl-radius);
	background: var(--sl-surface);
}

.sl-qa__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sl-qa__photo-btn {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}
.sl-qa__photo-btn:focus-visible {
	outline: 2px solid var(--sl-red);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
	.sl-qa__photo-btn img { transition: transform 0.2s ease; }
	.sl-qa__photo-btn:hover img { transform: scale(1.04); }
}

@media (min-width: 560px) {
	.sl-qa__photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	/* Two photos never stretch full-bleed — keep them at a comfortable size. */
	.sl-qa__photos[data-count="1"] { grid-template-columns: minmax(0, 60%); }
	.sl-qa__photos[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Q&A photo lightbox ---------- */

.sl-lightbox {
	width: 100%;
	height: 100%;
	max-width: 100vw;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
}
.sl-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.82);
}

.sl-lightbox__inner {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 3.25rem;
}

.sl-lightbox__figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
}
.sl-lightbox__img {
	max-width: 100%;
	max-height: calc(100vh - 7rem);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--sl-radius);
	box-shadow: var(--sl-shadow-lg);
	touch-action: pan-y;
}

/* Controls sit on the dark scrim, so they stay light in both themes. */
.sl-lightbox__close,
.sl-lightbox__nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	cursor: pointer;
	line-height: 1;
}
.sl-lightbox__close {
	top: 0.75rem;
	right: 0.75rem;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	font-size: 1.75rem;
}
.sl-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	font-size: 2rem;
}
.sl-lightbox__nav--prev { left: 0.5rem; }
.sl-lightbox__nav--next { right: 0.5rem; }
.sl-lightbox__close:hover,
.sl-lightbox__nav:hover { background: rgba(0, 0, 0, 0.7); }
.sl-lightbox__close:focus-visible,
.sl-lightbox__nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.sl-lightbox__nav[hidden] { display: none; }

.sl-lightbox__counter {
	position: absolute;
	top: 1.1rem;
	left: 1.1rem;
	margin: 0;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.sl-lightbox__dots {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.4rem;
}
.sl-lightbox__dots[hidden] { display: none; }
.sl-lightbox__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
}
.sl-lightbox__dot.is-active { background: #fff; }

@media (min-width: 700px) {
	.sl-lightbox__inner { padding: 4rem 5rem; }
}

/* ---------- Gallery ---------- */

.sl-gallery {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.625rem;
}

.sl-gallery__link {
	display: block;
	border-radius: var(--sl-radius);
	overflow: hidden;
}
.sl-gallery__img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.25s ease;
}
.sl-gallery__link:hover .sl-gallery__img { transform: scale(1.04); }

@media (min-width: 700px) {
	.sl-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Quote ---------- */

.sl-quote {
	margin: 0;
	padding: 1.5rem;
	border-radius: var(--sl-radius-lg);
	background: #14171d;
	color: #f0f2f5;
	border: 1px solid #262b34;
}

.sl-quote__text {
	margin: 0 0 1rem;
	font-size: 1.0625rem;
	line-height: 1.6;
}
.sl-quote__text p { margin: 0; }
.sl-quote__text::before { content: "“"; }
.sl-quote__text::after { content: "”"; }

.sl-quote__by {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.sl-quote__avatar { width: 40px; height: 40px; }
.sl-quote__name { display: block; font-weight: 600; font-size: 0.875rem; }
.sl-quote__role { display: block; font-size: 0.8125rem; color: #9aa2ae; }

/* ---------- Author / sidebar ---------- */

.sl-avatar { border-radius: 999px; }

.sl-author {
	display: flex;
	gap: 0.875rem;
	margin-bottom: 1rem;
}
.sl-author__avatar { width: 56px; height: 56px; flex: none; }
.sl-author__name { margin: 0 0 0.25rem; font-weight: 700; }
.sl-author__line {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	margin: 0;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
}
.sl-author__line .sl-ico { width: 14px; height: 14px; }
.sl-author__joined { color: var(--sl-text-faint); margin-top: 0.25rem; }

/* ---------- Stats ---------- */

.sl-stats { margin: 0; }
.sl-stats__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	font-size: 0.875rem;
}
.sl-stats__row + .sl-stats__row { border-top: 1px solid var(--sl-border); }
.sl-stats__row dt {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--sl-text-muted);
}
.sl-stats__row dd { margin: 0; font-weight: 700; }

/* ---------- Related ---------- */

.sl-related { list-style: none; margin: 0; padding: 0; }
.sl-related__item + .sl-related__item {
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--sl-border);
}

.sl-related__link {
	display: flex;
	gap: 0.625rem;
	text-decoration: none;
	color: inherit;
}
.sl-related__thumb {
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 8px;
	object-fit: cover;
}
.sl-related__title {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--sl-text);
}
.sl-related__link:hover .sl-related__title { color: var(--sl-red); }
.sl-related__canton {
	display: block;
	font-size: 0.75rem;
	color: var(--sl-text-faint);
}

/* ---------- Share ---------- */

.sl-share {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.5rem;
}

.sl-share__link {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--sl-border);
	border-radius: 8px;
	color: var(--sl-text-muted);
	transition: background-color 0.15s ease, color 0.15s ease;
}
.sl-share__link:hover {
	background: var(--sl-surface-hover);
	color: var(--sl-text);
}
.sl-share__link.is-copied {
	background: var(--sl-positive-bg);
	border-color: var(--sl-positive);
	color: var(--sl-positive);
}

/* ---------- Comments ---------- */

.sl-comments__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--sl-border);
}
.sl-comments__count { margin: 0; font-size: 1rem; }

.sl-comments__sort {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
	text-decoration: none;
}
.sl-comments__sort:hover { color: var(--sl-text); }

/* Threading geometry. `--sl-thread-x` is where the connector drops (measured
   from the parent card's left edge); `--sl-thread-gutter` is the horizontal
   reach across to the reply. Mobile-first: a tight indent so deep threads stay
   readable on a phone; the desktop bump below aligns the drop under the parent
   avatar (card padding-left 16px + avatar radius 20px = 36px). */
.sl-comments {
	--sl-thread-x: 20px;
	--sl-thread-gutter: 16px;
}
@media (min-width: 700px) {
	.sl-comments {
		--sl-thread-x: 36px;
		--sl-thread-gutter: 22px;
	}
}

.sl-comment-list,
.sl-comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sl-comment-list { margin-top: 1rem; }

/* Nested replies indent under the parent avatar; the gutter holds the elbow. */
.sl-comment-list .children {
	margin: 0.75rem 0 0 var(--sl-thread-x);
	padding-left: var(--sl-thread-gutter);
}

/* Gap between sibling comments. */
.sl-comment + .sl-comment { margin-top: 0.75rem; }

/* Each comment is a card. The <li> is positioned so the connector lines can
   be drawn in the gutter to its left. */
.sl-comment { position: relative; }
.sl-comment__body {
	position: relative;
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
	padding: 0.875rem 1rem;
}
.sl-comment__content { flex: 1; min-width: 0; }

/* Both parts of the connector are anchored to the same box (the <li>) so they
   share one 2px column and meet exactly at the avatar's centre — no doubled or
   offset lines. The elbow sits above the card (z-index) so its horizontal run
   can reach across the card padding to touch the avatar. */

/* The elbow: drops from the gap above, rounds the corner, meets the avatar. */
.sl-comment-list .children > .sl-comment::before {
	content: "";
	position: absolute;
	z-index: 1;
	left: calc(-1 * var(--sl-thread-gutter));
	top: -14px;
	width: calc(var(--sl-thread-gutter) + 14px);
	height: 48px; /* -14px (into the gap) down to the avatar centre (34px). */
	border-left: 2px solid var(--sl-red);
	border-bottom: 2px solid var(--sl-red);
	border-bottom-left-radius: 12px;
}

/* For a reply that has a following sibling, the branch continues straight down
   from the avatar centre (past any of its own replies) to the next sibling. */
.sl-comment-list .children > .sl-comment:not(:last-child)::after {
	content: "";
	position: absolute;
	left: calc(-1 * var(--sl-thread-gutter));
	top: 34px;
	bottom: 0;
	width: 2px;
	background: var(--sl-red);
}

/* Keep the avatar a fixed circle — as a flex child it was stretched to the
   full comment height (40x79), turning the round avatar into a tall pill. */
.sl-comment__body .sl-avatar {
	flex: none;
	width: 40px;
	height: 40px;
	object-fit: cover;
}

.sl-comment__meta {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 0.25rem;
}
.sl-comment__author { font-weight: 600; font-size: 0.875rem; }
.sl-comment__date { font-size: 0.75rem; color: var(--sl-text-faint); }

.sl-comment__text { font-size: 0.9375rem; }
.sl-comment__text p { margin-bottom: 0.5rem; }

.sl-comment__pending { font-size: 0.8125rem; color: var(--sl-text-faint); }

.sl-comment__actions { font-size: 0.8125rem; margin-top: 0.375rem; }
.sl-comment__actions a { color: var(--sl-red); text-decoration: none; font-weight: 500; }
.sl-comment__actions a:hover { color: var(--sl-red-hover); }

/* Comment form / compose panel */

/* The compose box — the top form and every inline reply — is a contained panel
   so it reads as a distinct "write here" surface instead of loose fields
   dropped into the thread. WordPress moves this same #respond block under a
   comment when you reply, so styling it once covers both places. */
.sl-comments .comment-respond {
	margin-top: 1rem;
	padding: 1.25rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border);
	border-radius: var(--sl-radius);
}
/* Inline under a comment it also needs a gap below, and a red edge to signal
   "you're replying to this one". */
.sl-comment-list .comment-respond {
	margin: 1rem 0;
	border-left: 3px solid var(--sl-red);
}

.sl-comments .comment-reply-title { font-size: 1rem; margin: 0 0 0.875rem; }
/* "Cancel reply" is a <small> tacked onto the reply title; give it room and a
   quieter weight so it reads as a secondary action, not part of the heading. */
.sl-comments .comment-reply-title small { margin-left: 0.625rem; font-weight: 400; }
.sl-comments .comment-reply-title small a { color: var(--sl-text-muted); text-decoration: none; }
.sl-comments .comment-reply-title small a:hover { color: var(--sl-red); }

/* Identity / notes line above the fields — present but understated so it never
   competes with the thread. */
.sl-comments .logged-in-as,
.sl-comments .comment-notes {
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
	margin: 0 0 0.875rem;
}
.sl-comments .logged-in-as a { color: var(--sl-red); text-decoration: none; }
.sl-comments .logged-in-as a:hover { text-decoration: underline; }

/* Field labels sit above their inputs. */
.sl-comments .comment-form-author label,
.sl-comments .comment-form-email label,
.sl-comments .comment-form-url label {
	display: block;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
	margin-bottom: 0.25rem;
}
.sl-comments .comment-form .required { color: var(--sl-red); }

.sl-comments textarea,
.sl-comments input[type="text"],
.sl-comments input[type="email"],
.sl-comments input[type="url"],
.sl-search__input {
	width: 100%;
	padding: 0.625rem 0.75rem;
	background: var(--sl-surface-2);
	border: 1px solid var(--sl-border-strong);
	border-radius: 8px;
	color: var(--sl-text);
	font: inherit;
	font-size: 0.9375rem;
}
/* Inputs sit on the base surface so they read as fields against the surface-2
   panel rather than blending into it. */
.sl-comments textarea,
.sl-comments input[type="text"],
.sl-comments input[type="email"],
.sl-comments input[type="url"] {
	background: var(--sl-surface);
}
.sl-comments textarea { resize: vertical; min-height: 4.5rem; }
/* Themed focus ring in place of the browser's default blue. */
.sl-comments textarea:focus,
.sl-comments input:focus {
	outline: none;
	border-color: var(--sl-red);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sl-red) 22%, transparent);
}

.sl-comments .comment-form > p { margin-bottom: 0.875rem; }
.sl-comments .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
}
.sl-comments .comment-form-cookies-consent input { width: auto; }
.sl-comments .comment-form-cookies-consent label { color: var(--sl-text-muted); }

.sl-comments .form-submit { margin: 0; }

.sl-comments__closed { color: var(--sl-text-muted); font-size: 0.875rem; }

/* ---------- Search ---------- */

.sl-search {
	display: flex;
	gap: 0.5rem;
	max-width: 480px;
}

/* ---------- Archive ---------- */

.sl-archive { padding-block: 2rem 3rem; }

.sl-archive__head { margin-bottom: 1.5rem; }
.sl-archive__sub { color: var(--sl-text-muted); margin: 0; }

.sl-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.sl-teaser {
	display: block;
	padding: 0;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.sl-teaser:hover {
	box-shadow: var(--sl-shadow-lg);
	transform: translateY(-2px);
}

.sl-teaser__thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.sl-teaser__body { padding: 1rem; }
.sl-teaser__title { font-size: 1.0625rem; margin-bottom: 0.625rem; }
.sl-teaser__chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.75rem; }
.sl-teaser__excerpt { font-size: 0.875rem; color: var(--sl-text-muted); margin: 0; }

.sl-teaser__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0;
	padding-top: 0.75rem;
	border-top: 1px solid var(--sl-border);
	font-weight: 700;
}
.sl-teaser__total-label {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--sl-text-muted);
}

.sl-empty { color: var(--sl-text-muted); }

@media (min-width: 640px) {
	.sl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
	.sl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Pagination ---------- */

.pagination,
.comments-pagination {
	margin-top: 1.5rem;
	display: flex;
	justify-content: center;
}
.pagination .nav-links,
.comments-pagination .nav-links {
	display: flex;
	gap: 0.25rem;
	flex-wrap: wrap;
}
.pagination .page-numbers,
.comments-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	padding-inline: 0.5rem;
	border: 1px solid var(--sl-border);
	border-radius: 8px;
	font-size: 0.875rem;
	color: var(--sl-text);
	text-decoration: none;
}
.pagination .page-numbers:hover { background: var(--sl-surface-hover); }
.pagination .page-numbers.current {
	background: var(--sl-red);
	border-color: var(--sl-red);
	color: var(--sl-red-contrast);
}

/* Offers — a card per link the household uses. Mobile-first: the card is a single column
   and the two actions stack full-width, since a thumb hits a wide target far more reliably
   than two half-width ones. */
.sl-offers__title { margin: 0 0 0.35rem; font-size: 1.25rem; }
.sl-offers__intro {
	margin: 0 0 var(--sl-gap);
	font-size: 0.9375rem;
	color: var(--sl-text-muted);
}

.sl-offers__list {
	display: grid;
	gap: var(--sl-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sl-offer {
	padding: var(--sl-gap);
	border: 1px solid var(--sl-border);
	border-radius: 12px;
	background: var(--sl-surface-alt, var(--sl-surface));
}

.sl-offer__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.sl-offer__logo {
	flex: none;
	width: auto;
	height: 2rem;
	max-width: 7rem;
	object-fit: contain;
}
.sl-offer__heading { margin: 0; font-size: 1.0625rem; }
/* The host, not the heading, is what tells the reader whose page they are about to open —
   so it is always shown, even when the author gave the card a name of their own. */
.sl-offer__host {
	margin: 0.1rem 0 0;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
	word-break: break-word;
}
.sl-offer__description {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
}

.sl-offer__actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: var(--sl-gap);
}

.sl-offer__frame { margin-top: var(--sl-gap); }
.sl-offer__iframe {
	display: block;
	width: 100%;
	/* Tall enough to be a usable window on a phone without swallowing the whole screen;
	   the frame scrolls internally. */
	height: min(70vh, 30rem);
	border: 1px solid var(--sl-border);
	border-radius: 8px;
	background: var(--sl-surface);
}
/* Sits under the frame on purpose: a refused frame is blank and silent, and this is the
   only thing that explains it. It costs one muted line when the frame did load. */
.sl-offer__note {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: var(--sl-text-muted);
}

@media (min-width: 700px) {
	.sl-offer__actions { flex-direction: row; }
}
