.bp-size-guide {
	display: grid;
	gap: var(--space-l, 2.4rem);
}

.bp-size-guide__title,
.bp-size-guide__description,
.bp-size-guide__notes {
	margin: 0;
}

.bp-size-guide__description > :first-child {
	margin-top: 0;
}

.bp-size-guide__description > :last-child {
	margin-bottom: 0;
}

.bp-size-guide__table-region {
	max-width: 100%;
	overflow-x: auto;
	border-top: 2px solid var(--ink, #000);
	-webkit-overflow-scrolling: touch;
}

.bp-size-guide__table-region:focus-visible {
	outline: 2px solid var(--secondary-on-light, #4c7a00);
	outline-offset: 3px;
}

.bp-size-guide__table {
	width: max(100%, max-content);
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font: inherit;
}

.bp-size-guide__table caption {
	padding: var(--space-s, 1.2rem) 0;
	color: var(--ink, #000);
	font-size: var(--text-l, 1.8rem);
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
}

.bp-size-guide__table th,
.bp-size-guide__table td {
	padding: var(--space-s, 1.2rem) var(--space-m, 1.6rem);
	border: 0;
	border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.14));
	color: var(--ink, #000);
	text-align: left;
	white-space: nowrap;
}

.bp-size-guide__table thead th,
.bp-size-guide__table tbody th {
	font-weight: 600;
}

/*
 * The product accordion already owns the outer top and bottom dividers.
 * Keep internal table separators, but avoid doubled edge lines when the
 * size guide is embedded inside that accordion.
 */
.bp-product-detail__accordion .bp-size-guide > .bp-size-guide__table-region:first-child,
.bp-product-detail__accordion .bp-size-guide > .bp-size-guide__title + .bp-size-guide__table-region,
.bp-product-detail__accordion .bp-size-guide > .bp-size-guide__description + .bp-size-guide__table-region {
	border-top: 0;
}

.bp-product-detail__accordion .bp-size-guide > .bp-size-guide__table-region:last-of-type .bp-size-guide__table tbody tr:last-child > * {
	border-bottom: 0;
}

.bp-product-detail__accordion .bp-size-guide__table caption {
	font-size: var(--text-m, 1.6rem);
}

.bp-size-guide__table th:first-child,
.bp-size-guide__table td:first-child {
	padding-left: 0;
}

.bp-size-guide__table th:last-child,
.bp-size-guide__table td:last-child {
	padding-right: 0;
}

.bp-size-guide__notes {
	display: grid;
	gap: var(--space-2xs, 0.6rem);
	padding-left: 1.25em;
	color: var(--muted, rgba(0, 0, 0, 0.64));
	font-size: var(--text-s, 1.4rem);
}

@media (max-width: 478px) {
	.bp-size-guide__table th,
	.bp-size-guide__table td {
		padding-top: var(--space-xs, 0.9rem);
		padding-bottom: var(--space-xs, 0.9rem);
	}
}
