.si-table {

	--si-t-bg: var(--plmbr-surface);
	--si-t-zebra: var(--plmbr-surface-2);
	--si-t-hover: #e9f9fc;
	--si-t-border: var(--plmbr-line);
	--si-t-text: var(--plmbr-ink-soft);
	--si-t-strong: var(--plmbr-ink);
	--si-t-head-bg: var(--plmbr-dark);
	--si-t-head-fg: var(--plmbr-on-dark);
	--si-t-accent: var(--plmbr-accent-strong);
	--si-t-muted: var(--plmbr-ink-mute);

	--si-t-radius: var(--plmbr-r-lg);
	--si-t-colmin: 16rem;
	--si-t-pad-y: 14px;
	--si-t-pad-x: 18px;
	--si-t-peek: min(380px, 46vh);
	--si-t-fade: 84px;

	position: relative;
	margin: 30px auto;

	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--si-t-bg);
	border: 1px solid var(--si-t-border);
	border-radius: var(--si-t-radius);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	scrollbar-width: thin;
	scrollbar-color: #c7ccd4 transparent;
	transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.si-table::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}

.si-table::-webkit-scrollbar-track {
	background: transparent;
}

.si-table::-webkit-scrollbar-thumb {
	background: #c7ccd4;
	border: 3px solid var(--si-t-bg);
	border-radius: 99px;
}

.si-table:focus-visible {
	outline: 2px solid var(--si-t-strong);
	outline-offset: 2px;
}

.si-table table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: transparent;
	font-family: inherit;
	color: var(--si-t-text);
}

.si-table caption {
	caption-side: top;
	padding: 15px var(--si-t-pad-x) 13px;
	background: var(--si-t-bg);
	color: var(--si-t-strong);
	font-size: 15px;
	font-weight: 700;
	text-align: left;
}

.si-table th,
.si-table td {

	min-width: min(var(--si-t-colmin), 42vw);
	padding: var(--si-t-pad-y) var(--si-t-pad-x);
	border: 0;
	text-align: left;
	vertical-align: top;
	line-height: 1.55;
	overflow-wrap: break-word;
}

.si-table thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: var(--si-t-head-bg);
	color: var(--si-t-head-fg);
	padding-top: 16px;
	padding-bottom: 16px;
	font-size: 14px;
	font-weight: 600;

	box-shadow: inset 0 -3px 0 var(--si-t-accent);
}

.si-table.is-sticky-page thead th {
	top: var(--si-t-top, 0px);
}

.si-table thead th strong,
.si-table thead th b {
	font: inherit;
	color: inherit;
}

.si-table tbody th,
.si-table tbody td {
	background: var(--si-t-bg);
	border-top: 1px solid var(--si-t-border);
	font-size: 15px;
	transition: background 0.18s ease;
}

.si-table tbody tr:first-child > * {
	border-top: 0;
}

.si-table tbody tr:nth-child(even) > * {
	background: var(--si-t-zebra);
}

.si-table tbody tr:hover > * {
	background: var(--si-t-hover);
}

.si-table tbody tr > :first-child {
	position: sticky;
	left: 0;
	z-index: 2;
	color: var(--si-t-strong);
	font-weight: 600;
	box-shadow: 1px 0 0 var(--si-t-border);
}

.si-table thead tr > :first-child {
	left: 0;
	z-index: 4;
	box-shadow: inset 0 -3px 0 var(--si-t-accent), 1px 0 0 rgba(255, 255, 255, 0.16);
}

.si-table a {
	color: var(--si-t-accent);
	text-underline-offset: 2px;
	transition: color 0.2s ease;
}

.si-table a:hover {
	color: var(--si-t-strong);
}

.si-table thead a {
	color: inherit;
	text-decoration-color: currentColor;
}

.si-table--zwijana:not(.is-expanded) {
	max-height: var(--si-t-peek);

	overflow-x: auto;
	overflow-y: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--si-t-fade)), transparent 100%);
	        mask-image: linear-gradient(to bottom, #000 calc(100% - var(--si-t-fade)), transparent 100%);
}

.si-table.is-sticky-page {
	overflow: clip;
}

@media (max-width: 700px) {
	.si-table {
		--si-t-colmin: 11rem;
		--si-t-pad-y: 11px;
		--si-t-pad-x: 13px;
		--si-t-radius: 14px;
		--si-t-peek: min(300px, 44vh);
		--si-t-fade: 72px;

		margin: 24px auto;
	}

	.si-table thead th {
		padding-top: 13px;
		padding-bottom: 13px;
		font-size: 13px;
	}

	.si-table tbody th,
	.si-table tbody td {
		font-size: 14px;
	}
}

@media (max-width: 700px) {
	.si-table.is-cards {
		overflow: visible;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.si-table.is-cards.si-table--zwijana:not(.is-expanded) {
		max-height: var(--si-t-peek);
		overflow: hidden;
	}

	.si-table.is-cards table,
	.si-table.is-cards tbody,
	.si-table.is-cards tfoot,
	.si-table.is-cards tr,
	.si-table.is-cards tbody th,
	.si-table.is-cards td {
		display: block;
		width: auto;
		min-width: 0;
	}

	.si-table.is-cards thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		border: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.si-table.is-cards tbody tr {
		margin-bottom: 14px;
		background: var(--si-t-bg);
		border: 1px solid var(--si-t-border);
		border-radius: 14px;
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
		overflow: hidden;
	}

	.si-table.is-cards tbody tr:last-child {
		margin-bottom: 0;
	}

	.si-table.is-cards tbody tr > * {
		position: static;
		padding: 12px 16px 13px;
		border-top: 0;
		box-shadow: none;
		font-size: 14px;
	}

	.si-table.is-cards tbody tr > * + * {
		border-top: 1px solid var(--si-t-border);
	}

	.si-table.is-cards tbody tr:nth-child(even) > *,
	.si-table.is-cards tbody tr:hover > * {
		background: var(--si-t-bg);
	}

	.si-table.is-cards tbody tr > [data-label]::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 3px;
		color: var(--si-t-muted);
		font-size: 12px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.si-table.is-cards tbody tr > :first-child {
		padding: 14px 16px 15px;
		background: var(--si-t-head-bg);
		color: var(--si-t-head-fg);
		box-shadow: inset 0 -3px 0 var(--si-t-accent);
		font-size: 15px;
		font-weight: 600;
	}

	.si-table.is-cards tbody tr > :first-child::before {
		content: none;
	}

	.si-table.is-cards tbody tr > :first-child strong,
	.si-table.is-cards tbody tr > :first-child b {
		font: inherit;
		color: inherit;
	}
}

.si-table-shell {
	margin: 30px auto;
}

.si-table-shell > .si-table {
	margin: 0;
}

.si-table__toggle {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: -22px auto 0;
	padding: 9px 20px 9px 11px;
	background: #ffffff;
	border: 1px solid var(--plmbr-line);
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(14, 27, 46, 0.12);
	color: var(--plmbr-dark);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.si-table-shell.is-expanded .si-table__toggle {
	margin-top: 14px;
}

.si-table__toggle:hover {
	border-color: var(--plmbr-accent-strong);
	box-shadow: 0 8px 22px rgba(14, 27, 46, 0.18);
}

.si-table__toggle:focus-visible {
	outline: 2px solid var(--plmbr-dark);
	outline-offset: 2px;
}

.si-table__toggle-icon {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	background: var(--plmbr-accent-strong);
	border-radius: 50%;
	transition: transform 0.25s ease;
}

.si-table-shell.is-expanded .si-table__toggle-icon {
	transform: rotate(180deg);
}

.si-table__toggle-icon svg {
	display: block;
	width: 13px;
	height: 13px;
	fill: none;
	stroke: #ffffff;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.si-table__toggle-count {
	color: var(--plmbr-ink-mute);
	font-weight: 500;
}

.si-table-floathead {
	position: fixed;

	top: var(--si-t-top, 0px);
	left: 0;
	z-index: 90;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
	box-shadow: 0 8px 18px rgba(14, 27, 46, 0.18);
}

.si-table-floathead.is-visible {
	visibility: visible;
}

.si-table-floathead table {
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: transparent;

	table-layout: fixed;
}

.si-table-floathead th,
.si-table-floathead td {
	box-sizing: border-box;
	padding: 16px 18px;
	border: 0;
	background: var(--plmbr-dark);
	color: #ffffff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
	text-align: left;
	vertical-align: top;
	overflow-wrap: break-word;
	box-shadow: inset 0 -3px 0 var(--plmbr-accent-strong);
}

.si-table-floathead tr > :first-child {
	position: sticky;
	left: 0;
	z-index: 2;
	box-shadow: inset 0 -3px 0 var(--plmbr-accent-strong), 1px 0 0 rgba(255, 255, 255, 0.16);
}

.si-table-floathead strong,
.si-table-floathead b {
	font: inherit;
	color: inherit;
}

@media (max-width: 700px) {
	.si-table-floathead th,
	.si-table-floathead td {
		padding: 13px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.si-table,
	.si-table tbody th,
	.si-table tbody td,
	.si-table__toggle,
	.si-table__toggle-icon {
		transition: none;
	}
}

@media print {
	.si-table {
		max-height: none !important;
		overflow: visible !important;
		box-shadow: none;
		-webkit-mask-image: none !important;
		        mask-image: none !important;
	}

	.si-table__toggle,
	.si-table-floathead {
		display: none;
	}
}

.plmbr-prose .si-table { margin: 2em 0; }
.plmbr-prose .si-table table { margin: 0; }
.plmbr-prose .si-table thead th:first-child,
.plmbr-prose .si-table thead th:last-child { border-radius: 0; }
