/**
 * Loupe Diamond Network — shared page chrome (CP53).
 *
 * Structural layout only: spacing, sections, charts, FAQ, tables. All dimensions
 * come from page_chrome in content profiles → CSS vars via LDN_Renderer::theme_style_block().
 * Brand colours come from brand_tokens. Heading presentation variants use
 * .ldn-chrome--{heading_style} (see assets/css/families/*.css).
 */

.ldn-page-shell {
	/* Spacing scale. Every rhythm value resolves to one of these steps — bespoke
	   magnitudes at the call site are how this stylesheet drifted into a dozen
	   unrelated values. If a space needs a size that isn't here, add a step. */
	--ldn-space-1: 0.25rem;
	--ldn-space-2: 0.5rem;
	--ldn-space-3: 0.75rem;
	--ldn-space-4: 1rem;
	--ldn-space-5: 1.5rem;
	--ldn-space-6: 2rem;
	--ldn-space-7: 3rem;

	width: 100%;
	min-height: 100vh;
	background-color: var(--ldn-background, transparent);
}

/* WordPress-compatible visually-hidden text (preview has no theme CSS). */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Aggregate hubs are content-length, not viewport-length — avoid a phantom gap
   above the theme footer once the last body section ends. */
.ldn-page-shell:has(.ldn-top-level-page),
.ldn-page-shell:has(.ldn-diamond-type-page),
.ldn-page-shell:has(.ldn-size-page),
.ldn-page-shell:has(.ldn-size-methodology-page) {
	min-height: 0;
}

/* Theme shells (GeneratePress etc.) pad/margin #content around the LDN body,
   which shows as a white strip above a coloured band or below the footer.
   Flush LDN pages on both edges. */
body:has(.ldn-page-shell) #page,
body:has(.ldn-page-shell) #content,
body:has(.ldn-page-shell) .site-content,
body:has(.ldn-page-shell) .site-main,
body:has(.ldn-page-shell) .inside-article {
	margin-top: 0 !important;
	padding-top: 0 !important;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

body:has(.ldn-page-shell) #content > *:last-child,
body:has(.ldn-page-shell) .site-content > *:last-child {
	margin-bottom: 0 !important;
}

.ldn-price-page {
	--ldn-table-border: var(--ldn-border, #e5e7eb);
	--ldn-table-header-bg: var(--ldn-primary, #706cc8);
	--ldn-table-header-fg: var(--ldn-shell-on-primary, #fff);
	--ldn-table-row-alt: var(--ldn-surface-muted, #f8f7fc);
	--ldn-title-size: 1.75rem;
	--ldn-title-size-mobile: 1.25rem;

	box-sizing: border-box;
	max-width: var(--ldn-max-width, 1000px);
	width: 100%;
	margin: 0 auto;
	padding: var(--ldn-padding, 1.25rem);
	color: var(--ldn-text, #333);
	background-color: var(--ldn-background, transparent);
	font-family: var(--ldn-font-body, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
	font-size: 1rem;
	line-height: 1.6;
}

.ldn-price-page *,
.ldn-price-page *::before,
.ldn-price-page *::after {
	box-sizing: border-box;
}

/* ----- Heading variants (structure shared; skin from page_chrome + brand_tokens) ----- */

.ldn-price-page > h1.ldn-page-title {
	margin: 0 0 1.5rem;
	font-family: var(--ldn-font-title, var(--ldn-font-body));
	font-size: var(--ldn-title-size);
	font-weight: 600;
	line-height: 1.35;
}

.ldn-chrome--minimal > h1.ldn-page-title {
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--ldn-primary, #333);
}

.ldn-homepage-tagline {
	margin: -0.75rem 0 1.5rem;
	max-width: 42rem;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--ldn-secondary-text, var(--ldn-text, #333));
}

.ldn-type-nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

/* Diamond-type hubs: three cards in one row on desktop. */
.ldn-diamond-type-explore .ldn-type-nav-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media screen and (max-width: 768px) {
	.ldn-diamond-type-explore .ldn-type-nav-grid {
		grid-template-columns: 1fr;
	}
}

.ldn-type-nav-card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--ldn-table-border, #ddd);
	border-radius: 4px;
	text-decoration: none;
	color: var(--ldn-text, #333);
	background: var(--ldn-background, transparent);
	transition: border-color 0.15s ease;
}

/* Full-height price table shell.
 *
 * House data table: every LDN-generated table is `.ldn-table-card` wrapping
 * `table.ldn-data-table`. The look is the size-hub chart on
 * `/diamond-size/{shape}/`: brand-colour header, hairline rows, muted zebra,
 * 12px card, no drop shadow. Cell chrome lives here so a style change is
 * reproduced on price pages, size pages and editorial ring-guide injects.
 * Family skins may tint tokens or the highlight row; they must not invent
 * a second cell style.
 *
 * Colour/clarity heatmaps (`.ldn-cc-table`) are a different component and
 * do not use this wrapper. Size-matrix extras (sticky header, outline
 * column) stay on `.ldn-size-matrix`.
 */
.ldn-table-card {
	margin: 0 0 1.25rem;
	overflow: hidden;
	background-color: #fff;
	border-radius: 12px;
	box-shadow: none;
}

/* Hub nat/lab table is five columns; allow sideways scroll at ~320px rather
   than clipping the discount and sample cells inside the rounded card. */
.ldn-carat-price-table .ldn-table-card {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ldn-data-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0;
	font-size: 0.95rem;
}

/* `.ldn-price-page table` (back-compat, below) adds a 1rem margin that showed as
   a white strip above the header inside the card. Repeat collapse/spacing here so
   theme `.entry-content table` rules cannot open gaps between rows. */
.ldn-table-card > .ldn-data-table {
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
}

.ldn-data-table th,
.ldn-data-table td {
	border: 0;
	border-bottom: 1px solid var(--ldn-table-border, var(--ldn-border, #e5e7eb));
	padding: 0.6rem 0.55rem;
	text-align: center;
	vertical-align: middle;
}

/* Paint the header on cells only. A `thead tr` fill is a square box and
   hides the 12px radii (the natural-prices purple bar looked cut). */
.ldn-data-table thead th {
	background-color: var(--ldn-table-header-bg, var(--ldn-primary, #706cc8));
	color: var(--ldn-table-header-fg, var(--ldn-shell-on-primary, #fff));
	font-weight: 700;
}

/* Tables do not clip to a parent’s border-radius. Paint the 12px card
   corners on the header and last row, same as the size-hub matrix. */
.ldn-data-table thead th:first-child {
	border-top-left-radius: 12px;
}

.ldn-data-table thead th:last-child {
	border-top-right-radius: 12px;
}

/* Reset any theme-level cell corner radius so rows stay flush inside the card. */
.ldn-data-table tbody tr:not(:last-child) > td,
.ldn-data-table tbody tr:not(:last-child) > th {
	border-radius: 0;
}

.ldn-data-table tbody tr:last-child > :first-child {
	border-top-left-radius: 0;
	border-bottom-left-radius: 12px;
}

.ldn-data-table tbody tr:last-child > :last-child {
	border-top-right-radius: 0;
	border-bottom-right-radius: 12px;
}

.ldn-data-table tbody tr:nth-of-type(even) td,
.ldn-data-table tbody tr:nth-of-type(even) th {
	background-color: var(--ldn-table-row-alt, var(--ldn-surface-muted, #f8f7fc));
}

.ldn-data-table tbody tr:nth-of-type(odd) td,
.ldn-data-table tbody tr:nth-of-type(odd) th {
	background-color: #fff;
}

.ldn-data-table tbody th {
	text-align: left;
	font-weight: 600;
}

.ldn-data-table tbody tr:last-child th,
.ldn-data-table tbody tr:last-child td {
	border-bottom: none;
}

.ldn-data-table tbody tr.ldn-row-highlight td,
.ldn-data-table tbody tr.ldn-row-highlight th {
	background-color: var(--ldn-table-row-highlight, rgba(112, 108, 200, 0.12));
	font-weight: 600;
}

.ldn-type-nav-card:hover,
.ldn-type-nav-card:focus-visible {
	border-color: var(--ldn-primary, #333);
}

.ldn-type-nav-card__title {
	font-weight: 600;
	color: var(--ldn-primary, #333);
}

.ldn-type-nav-card__desc {
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--ldn-secondary-text, var(--ldn-text, #333));
}

.ldn-popular-shapes-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.5rem 1.25rem;
}

.ldn-popular-shapes-list a {
	color: var(--ldn-primary, #333);
	text-decoration: none;
}

.ldn-popular-shapes-list a:hover {
	text-decoration: underline;
}

.ldn-popular-shape-price {
	color: var(--ldn-secondary-text, inherit);
	font-size: 0.9em;
}

/* ----- Most-traded combos (top-level internal-link block) ----- */

/* auto-fit rather than 1fr 1fr: a single-type site (BDI is lab-grown only) renders
   one group, which should fill the row instead of leaving a gap beside it. */
.ldn-most-traded-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: var(--ldn-space-5, 1.5rem) var(--ldn-space-6, 2rem);
}

.ldn-most-traded .ldn-data-table td:first-child {
	white-space: nowrap;
}

.ldn-carat-price-table .ldn-discount-chart,
.ldn-carat-price-table .ldn-hub-chart,
.ldn-carat-tiers-table .ldn-hub-chart {
	margin-top: var(--ldn-space-6, 2rem);
}

.ldn-carat-price-table .ldn-discount-chart > h2,
.ldn-carat-price-table .ldn-hub-chart > h2,
.ldn-carat-tiers-table .ldn-hub-chart > h3 {
	margin-top: 0;
}

.ldn-most-traded-group {
	min-width: 0;
}

.ldn-most-traded-group > h3 {
	margin-top: 0;
	margin-bottom: var(--ldn-space-3, 0.75rem);
}

@media screen and (max-width: 768px) {
	.ldn-most-traded-grid {
		grid-template-columns: 1fr;
	}
}

/* Stacked data tables on narrow viewports (most-traded block). */
@media screen and (max-width: 640px) {
	.ldn-data-table--stacked thead {
		display: none;
	}

	.ldn-data-table--stacked tbody tr {
		display: block;
		margin-bottom: 0.75rem;
		padding: 0.85rem 1rem;
		border: 1px solid var(--ldn-table-border, #ddd);
		border-radius: 4px;
		background: #fff;
	}

	.ldn-table-card > .ldn-data-table--stacked tbody tr {
		margin-bottom: 0;
		border: 0;
		border-bottom: 1px solid var(--ldn-table-border, #e5e7eb);
		border-radius: 0;
	}

	.ldn-table-card > .ldn-data-table--stacked tbody tr:last-child {
		border-bottom: 0;
	}

	.ldn-data-table--stacked tbody td,
	.ldn-data-table--stacked tbody th {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.35rem 0;
		border: none;
		text-align: right;
		background: transparent;
	}

	.ldn-data-table--stacked tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		text-align: left;
		color: var(--ldn-secondary-text, inherit);
	}

	.ldn-data-table--stacked tbody tr:last-child > :first-child,
	.ldn-data-table--stacked tbody tr:last-child > :last-child {
		border-radius: 0;
	}
}

/* ----- Price calculator / position checker (CP 123) ----- */

/* White card for interactive controls. On Ringspo tint/accent bands the heading
   and lead stay on the coloured band; this surface keeps fields readable. */
.ldn-price-calculator__surface {
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 12px;
	background: #fff;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-price-calculator__surface .ldn-shape-picker {
	margin-bottom: var(--ldn-space-4, 1rem);
}

/* Two columns on desktop (colour/clarity | cut/quote); one column on phone. */
.ldn-price-calculator__controls {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--ldn-space-4, 1rem) var(--ldn-space-5, 1.5rem);
	margin: var(--ldn-space-5, 1.5rem) 0;
}

@media (max-width: 640px) {
	.ldn-price-calculator__controls {
		grid-template-columns: 1fr;
	}
}

.ldn-price-calculator__col {
	display: flex;
	flex-direction: column;
	gap: var(--ldn-space-4, 1rem);
	min-width: 0;
}

.ldn-price-calculator__field {
	display: flex;
	flex-direction: column;
	gap: var(--ldn-space-1, 0.25rem);
	font-size: 0.9em;
}

.ldn-price-calculator__field-label,
.ldn-grade-slider__label {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
}

.ldn-price-calculator__field-title {
	font-weight: 600;
}

.ldn-price-calculator__field em {
	color: var(--ldn-secondary-text, #666);
	font-weight: 400;
	font-style: normal;
}

.ldn-price-calculator__field--disabled {
	opacity: 0.72;
}

.ldn-price-calculator__field--disabled .ldn-grade-slider__input {
	cursor: not-allowed;
}

.ldn-price-calculator__disabled-note {
	margin: 0;
	font-size: 0.85em;
	line-height: 1.35;
	color: var(--ldn-secondary-text, #666);
}

.ldn-field-help {
	position: relative;
	display: inline-block;
	margin: 0;
	font-weight: 400;
}

.ldn-field-help__summary {
	list-style: none;
	cursor: help;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15rem;
	height: 1.15rem;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 50%;
	color: var(--ldn-secondary-text, #666);
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	user-select: none;
}

.ldn-field-help__summary::-webkit-details-marker {
	display: none;
}

.ldn-field-help__summary:focus-visible {
	outline: 2px solid var(--ldn-accent, #706cc8);
	outline-offset: 1px;
}

.ldn-field-help__tip {
	position: absolute;
	z-index: 2;
	left: 0;
	top: calc(100% + 0.35rem);
	width: min(16rem, 70vw);
	margin: 0;
	padding: var(--ldn-space-2, 0.5rem) var(--ldn-space-3, 0.75rem);
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	color: var(--ldn-secondary-text, #444);
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.4;
	/* Closed <details> hide non-summary children; override so hover/focus work. */
	display: none;
}

details.ldn-field-help:hover > .ldn-field-help__tip,
details.ldn-field-help:focus-within > .ldn-field-help__tip,
details.ldn-field-help[open] > .ldn-field-help__tip {
	display: block;
}

.ldn-grade-slider {
	display: flex;
	flex-direction: column;
	gap: var(--ldn-space-2, 0.5rem);
}

.ldn-grade-slider__label {
	font-size: 0.9em;
}

/*
 * Brand range: soft grey track + purple thumb, no progress fill.
 * Input background stays transparent so WebKit does not draw a second rail
 * (which read as a dark outline around the grey bar).
 */
.ldn-brand-range {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 1.25rem;
	margin: 0.35rem 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	outline: none;
	cursor: pointer;
}

.ldn-brand-range:focus-visible {
	outline: 2px solid var(--ldn-accent, var(--ldn-primary, #706cc8));
	outline-offset: 2px;
}

.ldn-brand-range::-webkit-slider-runnable-track {
	height: 0.5rem;
	border: 0;
	border-radius: 999px;
	background: #d8dce3;
	box-shadow: none;
}

.ldn-brand-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: calc((0.5rem - 1.25rem) / 2);
	border: 0;
	border-radius: 50%;
	background: var(--ldn-accent, var(--ldn-primary, #706cc8));
	box-shadow: none;
	cursor: pointer;
}

.ldn-brand-range::-moz-range-track {
	height: 0.5rem;
	border: 0;
	border-radius: 999px;
	background: #d8dce3;
	box-shadow: none;
}

.ldn-brand-range::-moz-range-progress {
	/* No fill — keep the whole rail grey like the carat control. */
	height: 0.5rem;
	border: 0;
	border-radius: 999px;
	background: #d8dce3;
}

.ldn-brand-range::-moz-range-thumb {
	width: 1.25rem;
	height: 1.25rem;
	border: 0;
	border-radius: 50%;
	background: var(--ldn-accent, var(--ldn-primary, #706cc8));
	box-shadow: none;
	cursor: pointer;
}

.ldn-price-calculator__field--disabled .ldn-brand-range {
	cursor: not-allowed;
}

.ldn-price-calculator__field--disabled .ldn-brand-range::-webkit-slider-thumb,
.ldn-price-calculator__field--disabled .ldn-brand-range::-moz-range-thumb {
	background: #94a3b8;
}

.ldn-grade-slider__stops {
	/* Absolute stops at i/max % so labels sit under native range thumbs. */
	position: relative;
	min-height: 1.35em;
	margin-top: 0.15rem;
}

.ldn-grade-slider__stop {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	max-width: 4.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ldn-secondary-text, #94a3b8);
	/* Explicit size — avoid font:inherit so theme button rules cannot inflate labels. */
	font-family: inherit;
	font-size: 0.65rem;
	font-weight: 500;
	line-height: 1.15;
	/* Never ellipsize: adjacent stops were reading as "Fair G…" / "Id…". */
	white-space: normal;
	overflow: visible;
	cursor: pointer;
	text-align: center;
	hyphens: manual;
}

/* Keep end labels inside the track rather than hanging past the page edge. */
.ldn-grade-slider__stop:first-child {
	transform: translateX(0);
	text-align: left;
}

.ldn-grade-slider__stop:last-child {
	transform: translateX(-100%);
	text-align: right;
}

.ldn-grade-slider__stop:only-child {
	transform: translateX(-50%);
	text-align: center;
}

.ldn-grade-slider__stop--active {
	color: var(--ldn-accent, var(--ldn-primary, #706cc8));
	font-weight: 700;
}

.ldn-price-calculator__field--quote {
	/* Sit with cut in the right column; do not stretch edge-to-edge. */
	max-width: 16rem;
}

.ldn-price-calculator__quote-hint {
	margin: var(--ldn-space-1, 0.25rem) 0 0;
	font-size: 0.85em;
	line-height: 1.35;
	font-weight: 400;
	color: var(--ldn-secondary-text, #666);
}

.ldn-price-calculator__field select,
.ldn-price-calculator__field input:not([type="range"]) {
	box-sizing: border-box;
	width: 100%;
	padding: var(--ldn-space-2, 0.5rem) var(--ldn-space-3, 0.75rem);
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 6px;
	background-color: #fff;
	color: inherit;
	font-family: inherit;
	/* 16px minimum: iOS Safari zooms the viewport on focus below it. */
	font-size: 1rem;
	line-height: 1.4;
}

.ldn-price-calculator__field select:focus,
.ldn-price-calculator__field input:not([type="range"]):focus {
	outline: 2px solid var(--ldn-primary, #333);
	outline-offset: 1px;
}

.ldn-grade-slider__input.ldn-brand-range,
.ldn-carat-picker__slider.ldn-brand-range {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.ldn-price-calculator__result {
	margin-top: var(--ldn-space-6, 2rem);
	padding: var(--ldn-space-5, 1.5rem);
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 8px;
	/* Literal rather than a token: there is no tint brand token, and inventing
	   one no profile can set would be a dead variable. */
	background-color: #f8fafc;
}

.ldn-price-calculator__result > p {
	margin: 0 0 var(--ldn-space-2, 0.5rem);
}

.ldn-price-calculator__result > p:last-child {
	margin-bottom: 0;
}

.ldn-price-calculator__headline {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
	line-height: 1.1;
}

.ldn-price-calculator__headline-value {
	font-size: 2.25em;
	font-weight: 700;
}

.ldn-price-calculator__price-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: end;
	gap: var(--ldn-space-3, 0.75rem);
	margin-top: var(--ldn-space-2, 0.5rem);
}

.ldn-price-calculator__bound {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	color: var(--ldn-secondary-text, #666);
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
}

.ldn-price-calculator__bound-label {
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ldn-secondary-text, #666);
}

.ldn-price-calculator__sample {
	margin-top: 2.25rem;
	padding-top: 0.35rem;
	color: var(--ldn-secondary-text, #666);
	font-size: 0.95em;
}

.ldn-calculator-how__steps {
	margin: 0;
	padding-left: 1.25rem;
	display: grid;
	gap: 0.65rem;
}

.ldn-calculator-how__steps li {
	line-height: 1.45;
}

.ldn-calculator-drivers__list {
	margin: 0.75rem 0 0;
	padding-left: 1.25rem;
	display: grid;
	gap: 0.5rem;
}

.ldn-calculator-drivers__list li {
	line-height: 1.45;
}

.ldn-calculator-drivers__note {
	margin: 0.75rem 0 0;
	font-size: 0.9em;
	color: var(--ldn-secondary-text, #666);
}

.ldn-price-calculator__bound--low {
	text-align: left;
	align-items: flex-start;
}

.ldn-price-calculator__bound--high {
	text-align: right;
	align-items: flex-end;
}

.ldn-price-calculator__price-row .ldn-price-calculator__headline {
	justify-self: center;
	text-align: center;
}

.ldn-calculator-destination__pickers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--ldn-space-3, 0.75rem) var(--ldn-space-4, 1rem);
	margin-bottom: var(--ldn-space-4, 1rem);
	align-items: end;
}

.ldn-seg-toggle {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.ldn-seg-toggle__legend,
.ldn-carat-picker__label {
	display: block;
	padding: 0;
	margin: 0 0 var(--ldn-space-2, 0.5rem);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ldn-secondary-text, #666);
}

.ldn-seg-toggle__options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: var(--ldn-radius, 6px);
	overflow: hidden;
	background: #fff;
}

.ldn-seg-toggle__option {
	display: block;
	margin: 0;
	cursor: pointer;
	text-align: center;
}

.ldn-seg-toggle__option input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ldn-seg-toggle__label {
	display: block;
	padding: var(--ldn-space-2, 0.5rem) var(--ldn-space-3, 0.75rem);
	font-size: 1rem;
	font-weight: 600;
	color: var(--ldn-secondary-text, #666);
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease;
}

.ldn-seg-toggle__option:focus-within .ldn-seg-toggle__label {
	outline: 2px solid var(--ldn-accent, #706cc8);
	outline-offset: -2px;
}

.ldn-seg-toggle__option:has(input:checked) .ldn-seg-toggle__label {
	background: var(--ldn-accent, #706cc8);
	color: #fff;
}

.ldn-carat-picker__controls {
	display: grid;
	grid-template-columns: 1fr 5.5rem;
	gap: var(--ldn-space-3, 0.75rem);
	align-items: center;
}

.ldn-carat-picker__slider {
	/* Track/thumb: .ldn-brand-range */
	width: 100%;
}

.ldn-carat-picker__number {
	box-sizing: border-box;
	width: 100%;
	padding: var(--ldn-space-2, 0.5rem) var(--ldn-space-3, 0.75rem);
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 6px;
	background-color: #fff;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.4;
}

.ldn-shape-picker {
	border: 0;
	margin: 0 0 var(--ldn-space-4, 1rem);
	padding: 0;
	min-width: 0;
}

.ldn-shape-picker__legend {
	padding: 0;
	margin-bottom: var(--ldn-space-2, 0.5rem);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ldn-secondary-text, #666);
}

/* One row of shapes however many there are; two rows of five on phones, where
   ten across would leave ~30px per option. */
.ldn-shape-picker__options {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: var(--ldn-space-2, 0.5rem);
}

@media (max-width: 640px) {
	.ldn-shape-picker__options {
		grid-auto-flow: row;
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.ldn-shape-picker__option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: var(--ldn-space-2, 0.5rem) 0.25rem;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: var(--ldn-radius, 6px);
	cursor: pointer;
	color: var(--ldn-secondary-text, #666);
	background: #fff;
	font: inherit;
	transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

button.ldn-shape-picker__option {
	width: 100%;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
}

.ldn-shape-picker__option:hover {
	border-color: var(--ldn-primary, #333);
	color: var(--ldn-primary, #333);
}

/* Radio stays in the accessibility tree and keeps keyboard behaviour; the
   visible selected state is drawn on the surrounding label. */
.ldn-shape-picker__option input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ldn-shape-picker__option:focus-within,
button.ldn-shape-picker__option:focus-visible {
	box-shadow: 0 0 0 2px var(--ldn-accent, #706cc8);
	outline: none;
}

.ldn-shape-picker__option:has(input:checked),
.ldn-shape-picker__option--active {
	border-color: var(--ldn-accent, #706cc8);
	color: var(--ldn-accent, #706cc8);
	box-shadow: inset 0 0 0 1px var(--ldn-accent, #706cc8);
}

/* Mask rather than <img> so the facet line-art inherits the brand colour,
   including the selected and hover states above. */
.ldn-shape-picker__icon {
	width: 1.9rem;
	height: 1.9rem;
	background-color: currentColor;
	-webkit-mask-image: var(--ldn-shape-icon);
	mask-image: var(--ldn-shape-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.ldn-shape-picker__label {
	font-size: 0.75rem;
	line-height: 1.2;
	text-align: center;
}

.ldn-calculator-destination__lead {
	margin: 0 0 var(--ldn-space-4, 1rem);
	color: var(--ldn-secondary-text, #666);
}

.ldn-price-calculator__spectrum {
	margin-top: var(--ldn-space-4, 1rem);
}

.ldn-price-calculator__spectrum-track {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--ldn-space-3, 0.75rem);
}

.ldn-price-calculator__spectrum-line {
	position: relative;
	height: 0.35rem;
	border-radius: 999px;
	background: var(--ldn-accent, var(--ldn-primary, #706cc8));
}

.ldn-price-calculator__spectrum-marker {
	position: absolute;
	top: 50%;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	background: var(--ldn-accent, #706cc8);
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
	transform: translate(-50%, -50%);
}

.ldn-price-calculator__spectrum-bound {
	color: var(--ldn-secondary-text, #666);
	font-size: 0.9em;
	font-weight: 600;
}

.ldn-price-calculator__spectrum-quote {
	margin: var(--ldn-space-4, 1rem) 0 0;
	text-align: center;
}

.ldn-price-calculator__spectrum-analysis {
	margin: var(--ldn-space-3, 0.75rem) 0 0;
	text-align: left;
	font-size: 0.95em;
	line-height: 1.45;
	color: var(--ldn-secondary-text, #444);
}

.ldn-price-calculator__analysis {
	margin: var(--ldn-space-4, 1rem) 0 0;
	font-size: 0.95em;
	line-height: 1.45;
	color: var(--ldn-secondary-text, #444);
}

.ldn-price-calculator__basis,
.ldn-price-calculator__noscript {
	color: var(--ldn-secondary-text, #666);
	font-size: 0.9em;
}

/* ----- Shape hub cards (CP53_08) ----- */

.ldn-shape-cards__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.75rem;
	margin-top: 1rem;
}

@media screen and (max-width: 899px) {
	.ldn-shape-cards__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 480px) {
	.ldn-shape-cards__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.ldn-shape-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--ldn-border, #e2e2e8);
	border-radius: 4px;
	background: #fff;
	color: var(--ldn-text, #1a1a2e);
	overflow: hidden;
}

.ldn-shape-card__main {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
	padding: 1rem 1.1rem;
	color: var(--ldn-text, #1a1a2e);
	text-decoration: none;
	transition: background 0.15s ease;
}

.ldn-shape-card:hover,
.ldn-shape-card:focus-within {
	border-color: var(--ldn-primary, #333);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ldn-shape-card__main:hover,
.ldn-shape-card__main:focus-visible {
	text-decoration: none;
	background: rgba(0, 0, 0, 0.02);
}

.ldn-shape-card__shape,
.ldn-shape-card__sample,
.ldn-shape-card__range,
.ldn-shape-card__price,
.ldn-shape-card__change {
	display: block;
}

.ldn-shape-card__shape {
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.3;
	color: var(--ldn-primary, #333);
}

.ldn-shape-card__sample,
.ldn-shape-card__range {
	font-size: 0.8125rem;
	color: var(--ldn-secondary-text, #666);
	line-height: 1.35;
}

.ldn-shape-card__price {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

.ldn-shape-card__change {
	font-size: 0.85rem;
	font-weight: 600;
}

.ldn-shape-card__change--up {
	color: #1a7f37;
}

.ldn-shape-card__change--down {
	color: #c0392b;
}

.ldn-shape-card__change--flat {
	color: var(--ldn-secondary-text, #666);
}

.ldn-shape-cards__hint {
	margin: 0 0 0.5rem;
	font-size: 0.9375rem;
	color: var(--ldn-secondary-text, inherit);
}

.ldn-shape-card__size-link {
	display: block;
	padding: 0.5rem 1.1rem;
	font-size: 0.8125rem;
	font-weight: 600;
	border-top: 1px solid var(--ldn-border, #e2e2e8);
	color: var(--ldn-primary, #333);
	text-decoration: none;
}

.ldn-shape-card__size-link:hover,
.ldn-shape-card__size-link:focus-visible {
	text-decoration: underline;
	background: rgba(0, 0, 0, 0.02);
}

.ldn-partial-coverage {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-left: 3px solid var(--ldn-accent, #706cc8);
	background: rgba(112, 108, 200, 0.08);
	font-size: 0.9375rem;
}

.ldn-partial-coverage p {
	margin: 0;
}

.ldn-explore-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
}

.ldn-explore-link {
	font-weight: 600;
	text-decoration: none;
}

.ldn-explore-link:hover,
.ldn-explore-link:focus-visible {
	text-decoration: underline;
}

.ldn-explore-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.ldn-explore-card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--ldn-table-border, #ddd);
	border-radius: 4px;
	text-decoration: none;
	color: var(--ldn-text, #333);
	background: var(--ldn-background, transparent);
	transition: border-color 0.15s ease;
}

.ldn-explore-card:hover,
.ldn-explore-card:focus-visible {
	border-color: var(--ldn-primary, #333);
}

.ldn-explore-card__title {
	font-weight: 600;
	color: var(--ldn-primary, #333);
}

.ldn-explore-card__desc {
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--ldn-secondary-text, var(--ldn-text, #333));
}

.ldn-all-shapes-calculator__lead {
	margin: 0 0 1rem;
	color: var(--ldn-secondary-text, #475569);
}

/* Visually hidden chart fallback for crawlers (CP54_04). */
.ldn-chart-fallback--sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Sticky table header inside scroll container (desktop/tablet).
   Prefer .ldn-table-card for short full-height tables (carat tiers). */
@media screen and (min-width: 641px) {
	.ldn-table-scroll {
		max-height: min(70vh, 32rem);
		overflow: auto;
		margin: 0 0 1.25rem;
		-webkit-overflow-scrolling: touch;
	}

	.ldn-table-scroll .ldn-data-table thead th {
		position: sticky;
		top: 0;
		z-index: 2;
		background: #fff;
		box-shadow: 0 1px 0 var(--ldn-table-border, #ddd);
	}
}

.ldn-nat-lab-toggle {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 1rem;
	padding: 0.25rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
}

.ldn-nat-lab-toggle__pill {
	display: inline-block;
	padding: 0.45rem 1rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	color: #fff;
	background: transparent;
}

.ldn-nat-lab-toggle__pill:hover,
.ldn-nat-lab-toggle__pill:focus-visible {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	text-decoration: none;
}

.ldn-nat-lab-toggle__pill--active {
	background: #fff;
	color: var(--ldn-primary, #706cc8);
}

/*
 * Click feedback while the sibling type loads. The delay means a swap served
 * from cache finishes before the dim is ever visible, so the common case does
 * not flicker; pointer-events blocks a second click racing the first.
 */
.ldn-nat-lab-toggle--pending {
	opacity: 0.85;
	pointer-events: none;
	transition: opacity 0.15s ease 0.12s;
}

.ldn-diamond-type-hero-tools {
	margin-top: 0.5rem;
}

.ldn-type-carat-lookup {
	margin: 0 0 0.5rem;
	padding: 1rem 1.1rem;
	border-radius: var(--ldn-card-radius, 12px);
	background: rgba(255, 255, 255, 0.95);
	color: var(--ldn-ink, #1a1a2e);
}

.ldn-type-carat-lookup__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem 1.25rem;
	align-items: end;
}

@media screen and (max-width: 640px) {
	.ldn-type-carat-lookup__fields {
		grid-template-columns: 1fr;
	}
}

.ldn-type-carat-lookup__label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: var(--ldn-muted, #4a4a68);
}

.ldn-type-carat-lookup__input {
	width: 100%;
}

.ldn-type-carat-lookup__carat {
	display: block;
	margin-top: 0.35rem;
	font-size: 1.1rem;
	font-weight: 700;
}

.ldn-type-carat-lookup__outputs {
	display: grid;
	gap: 0.75rem;
}

.ldn-type-carat-lookup__value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
}

.ldn-type-carat-lookup__footnote {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	color: var(--ldn-muted, #4a4a68);
}

.ldn-type-carat-lookup__link-wrap {
	margin: 0.5rem 0 0;
}

.ldn-type-carat-lookup__link {
	font-weight: 600;
}

.ldn-price-per-carat-block {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(26, 26, 46, 0.1);
}

.ldn-price-per-carat__heading {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
	font-weight: 600;
}

.ldn-shapes-ranking-table--extended .ldn-data-table {
	margin-top: 0.5rem;
}

/* ----- Sections ----- */

.ldn-section {
	margin: var(--ldn-section-spacing, 2rem) 0;
}

.ldn-section:first-of-type {
	margin-top: 1.25rem;
}

/* Only a top-level section owns band spacing. A section id may render sibling
   or nested sections (e.g. colour/clarity emits a table plus a size card) and
   they all inherit the band class, so nested ones must not double the padding. */
.ldn-section .ldn-section {
	padding-top: 0;
	padding-bottom: 0;
}

/* Reading measure. Inert until a profile sets page_chrome.measure — body copy
   otherwise runs the full content width, which is ~110 characters per line on a
   1000px column against a comfortable 65–75. */
.ldn-section > p,
.ldn-section > ul,
.ldn-section > ol,
.ldn-section > dl {
	max-width: var(--ldn-measure, none);
}

.ldn-section h2 {
	margin: 0 0 1rem;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
}

.ldn-section h3 {
	margin: 1.25rem 0 0.5rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.ldn-section p {
	margin: 0 0 1rem;
}

.ldn-section p:last-child {
	margin-bottom: 0;
}

.ldn-section a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Card-as-link: decoration on <a> paints through every child line. Kill it on
   the anchor itself (!important beats family `.ldn-section a` and UA underline). */
.ldn-shape-card a,
.ldn-explore-card,
.ldn-type-nav-card,
.ldn-size-price-card,
.ldn-price-size-card {
	text-decoration: none !important;
}

.ldn-shape-card a.ldn-shape-card__size-link:hover,
.ldn-shape-card a.ldn-shape-card__size-link:focus-visible {
	text-decoration: underline !important;
}

.ldn-intro-dynamic {
	font-size: 1.05rem;
}

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

.ldn-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: 0.75rem 1.5rem;
	margin: 0;
	padding: 1rem 1.25rem;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 4px;
}

.ldn-stats dt {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ldn-secondary-text, #475569);
}

.ldn-stats dd {
	margin: 0.15rem 0 0;
	font-size: 1.125rem;
	font-weight: 600;
}

.ldn-stats--cards {
	background: transparent;
	padding: 0;
	gap: 0.75rem;
}

.ldn-stat-card {
	margin: 0;
	padding: 0.85rem 1rem;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
}

.ldn-stat-card dt {
	color: rgba(255, 255, 255, 0.82);
}

.ldn-stat-card dd {
	color: #fff;
	font-size: 1.35rem;
}

/* ----- Charts ----- */

.ldn-chart {
	margin: 1.5rem 0;
	padding: 0;
	border: 0;
}

.ldn-chart__title {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ldn-text, #333);
}

.ldn-chart figcaption {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	font-style: italic;
	color: var(--ldn-secondary-text, #475569);
}

.ldn-chart-target {
	width: 100%;
	min-height: 380px;
	overflow: hidden;
}

.ldn-chart .gtitle {
	display: none !important;
}

/* ----- Breadcrumbs ----- */

.ldn-breadcrumbs {
	font-size: 0.875rem;
	margin: 0 0 1rem;
	color: var(--ldn-secondary-text, #475569);
}

.ldn-breadcrumbs a {
	color: var(--ldn-primary, #333);
	text-decoration: none;
}

.ldn-breadcrumbs a:hover {
	text-decoration: underline;
}

.ldn-breadcrumbs__sep {
	margin: 0 0.35rem;
}

/* ----- Freshness ----- */

.ldn-freshness {
	font-size: 0.9rem;
	margin: 0 0 1.25rem;
	color: var(--ldn-secondary-text, #475569);
}

.ldn-freshness time {
	font-weight: 600;
	color: var(--ldn-text, #333);
}

/* ----- FAQ ----- */

.ldn-faq dl {
	margin: 0;
}

.ldn-faq dt {
	margin: 1.25rem 0 0.35rem;
	font-weight: 600;
}

.ldn-faq dt:first-child {
	margin-top: 0;
}

.ldn-faq dd {
	margin: 0 0 0.75rem;
	color: var(--ldn-text, #333);
}

/* ----- Tables -----
 *
 * House cell chrome is `.ldn-data-table` above. `.ldn-price-page table` is
 * the back-compat alias for any unmarked table inside the price shell.
 */

.ldn-price-page table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 1rem 0;
	font-size: 0.95rem;
}

.ldn-price-page th,
.ldn-price-page td {
	border: 0;
	border-bottom: 1px solid var(--ldn-table-border);
	padding: 0.6rem 0.55rem;
	text-align: center;
	vertical-align: middle;
}

.ldn-price-page thead th {
	background-color: var(--ldn-table-header-bg);
	color: var(--ldn-table-header-fg, var(--ldn-shell-on-primary, #fff));
	font-weight: 700;
}

.ldn-price-page tbody tr:nth-of-type(even) td,
.ldn-price-page tbody tr:nth-of-type(even) th {
	background-color: var(--ldn-table-row-alt);
}

/* ----- Placeholder / debug ----- */

.ldn-placeholder-note {
	margin: 0 0 1rem;
	font-size: 0.85rem;
	color: var(--ldn-secondary-text, #475569);
}

.ldn-debug-payload {
	background: #0d1117;
	color: #c9d1d9;
	padding: 1rem;
	overflow: auto;
	border-radius: 6px;
	font-size: 0.8rem;
}

/* ----- Colour x clarity heatmap ----- */

.ldn-cc-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ldn-cc-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
}

.ldn-cc-table th,
.ldn-cc-table td {
	border: 1px solid var(--ldn-border, #e2e8f0);
	padding: 0.4rem 0.55rem;
	text-align: right;
	white-space: nowrap;
}

.ldn-cc-table thead th,
.ldn-cc-table tbody th {
	text-align: center;
	font-weight: 600;
	color: var(--ldn-text, #333);
	background: var(--ldn-background, #f8fafc);
}

/* Heatmap tables carry both classes after the house-table unification. The
   purple header + white label from `.ldn-data-table` must not apply here. */
.ldn-data-table.ldn-cc-table tbody tr:nth-of-type(even) th,
.ldn-data-table.ldn-cc-table tbody tr:nth-of-type(odd) th {
	background: var(--ldn-background, #f8fafc);
}

.ldn-cc-table tbody th {
	position: sticky;
	left: 0;
	z-index: 1;
}

.ldn-cc-table .ldn-cc-empty {
	color: var(--ldn-secondary-text, #94a3b8);
	text-align: center;
}

/* Fewer than 5 diamonds: muted and dotted so it reads as a rough guide. The
   footnote below the table says why, since a title tooltip never shows on touch. */
.ldn-cc-table .ldn-cc-thin {
	color: var(--ldn-secondary-text, #94a3b8);
	font-style: italic;
	text-decoration: underline dotted;
	text-underline-offset: 0.2em;
	cursor: help;
}

.ldn-cc-footnote {
	margin: var(--ldn-space-2, 0.5rem) 0 0;
	font-size: 0.8rem;
	color: var(--ldn-secondary-text, #666);
}

/* ----- Responsive ----- */

@media screen and (max-width: 768px) {
	.ldn-price-page {
		padding: calc(var(--ldn-padding, 1.25rem) * 0.75);
	}

	.ldn-price-page > h1.ldn-page-title {
		font-size: var(--ldn-title-size-mobile);
	}

	.ldn-stats {
		grid-template-columns: 1fr 1fr;
	}
}

@media screen and (max-width: 480px) {
	.ldn-stats {
		grid-template-columns: 1fr;
	}
}

/* ----- Size module (Ringspo chrome + size-specific layout) ----- */

.ldn-size-page > .ldn-size-intro {
	margin-bottom: 0;
}

.ldn-size-variation-note {
	margin: 0 0 0.75rem;
	color: var(--ldn-text-muted, #4b5563);
	font-size: 0.95rem;
	line-height: 1.55;
}

.ldn-size-table-thumb-cell {
	width: 3.5rem;
	text-align: center;
	vertical-align: middle;
}

.ldn-size-table-thumb {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.ldn-size-table-thumb svg {
	display: block;
	max-height: 44px;
	width: auto;
}

.ldn-size-table-thumb-col {
	width: 3.5rem;
}

.ldn-size-page > .ldn-size-factual {
	margin: 0 0 1.5rem;
}

.ldn-size-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.5rem 2rem;
	align-items: start;
}

/* Narrow: stack the key-dimensions table under the coin/diamond figure. */
@media screen and (max-width: 768px) {
	.ldn-size-hero {
		grid-template-columns: 1fr;
	}
}

.ldn-size-hero__heading {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
}

.ldn-size-outline {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1.25rem;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 4px;
	overflow: auto;
}

.ldn-size-outline svg {
	display: block;
	max-width: 100%;
	height: auto;
}

.ldn-size-outline--scale svg {
	max-width: 420px;
	margin: 0 auto;
}

.ldn-size-outline--spread svg {
	max-width: 520px;
	margin: 0 auto;
}

/* Figure wrapper: SVG + HTML labels/caption (text never lives inside the
   mm-scaled SVGs because it renders at unpredictable pixel sizes). */
.ldn-size-figure {
	margin: 0;
	padding: 1rem;
	background: #fff;
	border-radius: 4px;
}

.ldn-size-figure .ldn-size-outline {
	background: transparent;
	padding: 0.5rem 0 0.75rem;
}

.ldn-size-figure__caption {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: var(--ldn-text-muted, #6b7280);
	text-align: center;
}

.ldn-size-spread-labels {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	max-width: 560px;
	margin: 0 auto;
	text-align: center;
	color: var(--ldn-text, #1f2937);
}

.ldn-size-spread-label {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: 0.85rem;
}

.ldn-size-spread-label strong {
	font-size: 0.9rem;
}

.ldn-size-spread-label span {
	color: var(--ldn-text-muted, #4b5563);
	font-variant-numeric: tabular-nums;
}

/* Live price snapshot cards on size pages (link through to pricing pages). */
.ldn-size-price-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.ldn-size-price-card {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 4px;
	text-decoration: none;
	color: var(--ldn-text, #1f2937);
}

.ldn-size-price-card__type {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ldn-text-muted, #4b5563);
}

.ldn-size-price-card__price {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.ldn-size-price-card__range,
.ldn-size-price-card__samples {
	font-size: 0.85rem;
	color: var(--ldn-text-muted, #4b5563);
	font-variant-numeric: tabular-nums;
}

.ldn-size-price-card__cta {
	margin-top: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ldn-primary, #706cc8);
}

/* Size snapshot cards on pricing pages (link through to size pages). */
.ldn-price-size-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin-top: 0.75rem;
}

.ldn-price-size-card {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 4px;
	text-decoration: none;
	color: var(--ldn-text, #1f2937);
}

.ldn-price-size-card__label {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ldn-text-muted, #4b5563);
}

.ldn-price-size-card__dimension {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.ldn-price-size-card__detail {
	font-size: 0.85rem;
	color: var(--ldn-text-muted, #4b5563);
	font-variant-numeric: tabular-nums;
}

.ldn-price-size-card__cta {
	margin-top: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ldn-primary, #706cc8);
}

.ldn-size-explore-link {
	margin-top: 0;
}

.ldn-size-explore-link__copy {
	margin: 0 0 0.75rem;
}

/* Beat `.ldn-section a` (class+element) so this CTA is not a default underline. */
.ldn-size-explore-link a.ldn-size-explore-link__anchor {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--ldn-primary, #706cc8);
	text-decoration: none;
	white-space: nowrap;
}

.ldn-size-explore-link a.ldn-size-explore-link__anchor:hover,
.ldn-size-explore-link a.ldn-size-explore-link__anchor:focus-visible {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ldn-size-explore-link__arrow {
	line-height: 1;
}

@media screen and (max-width: 600px) {
	.ldn-size-spread-labels {
		grid-template-columns: 1fr;
	}
}

.ldn-size-spread__lead,
.ldn-size-spread__note,
.ldn-size-percentile-note,
.ldn-size-chart__lead,
.ldn-size-segmentation__lead {
	margin: 0 0 1rem;
	color: var(--ldn-text-muted, #4b5563);
	font-size: 0.95rem;
	line-height: 1.5;
}

.ldn-size-spread {
	margin-top: 0.5rem;
}

.ldn-size-ideal-real {
	padding: 0;
	background: transparent;
}

.ldn-size-ideal-real p {
	margin: 0;
	line-height: 1.55;
}

.ldn-size-internal-links ul {
	margin: 0;
	padding-left: 1.25rem;
}

.ldn-size-internal-links li {
	margin: 0.35rem 0;
}

.ldn-size-internal-links a,
.ldn-size-copy-notes p {
	color: var(--ldn-text, #1f2937);
	line-height: 1.55;
}

.ldn-size-internal-links a {
	color: var(--ldn-primary, #706cc8);
	font-weight: 600;
	text-decoration: none;
}

.ldn-size-internal-links a:hover {
	text-decoration: underline;
}

.ldn-size-methodology {
	font-size: 0.95rem;
	/* Inherit the section band. Hardcoding muted grey made "About this data"
	   unreadable on purple/green bands (size chart-vs-real, tint sections). */
	color: inherit;
}

.ldn-size-proportions p {
	margin: 0 0 0.75rem;
	line-height: 1.55;
}

.ldn-size-proportions p:last-child {
	margin-bottom: 0;
}

/* Note: never blanket-recolour `svg [fill]` here — the size SVGs contain
   multi-colour elements (coin, guides); stone colour is injected upstream
   via currentColor on the wrapping group. */

.ldn-size-table {
	margin: 0;
}

/* Size layout only. Cell chrome is `.ldn-data-table` (house table). */
.ldn-size-table th,
.ldn-size-table td {
	text-align: left;
}

.ldn-size-table td {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.ldn-size-segmentation .ldn-table-card,
.ldn-size-comparison-table .ldn-table-card,
.ldn-size-hub-table:not(.ldn-size-hub-table--ladder) .ldn-table-card:not(.ldn-size-matrix-scroll) {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ldn-size-hub-table a {
	color: var(--ldn-primary, #706cc8);
	font-weight: 600;
	text-decoration: none;
}

.ldn-size-hub-table a:hover,
.ldn-size-price-links a:hover {
	text-decoration: underline;
}

.ldn-size-shape-selector {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}

.ldn-size-shape-tile {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 4px;
	color: var(--ldn-primary, #706cc8);
	font-weight: 600;
	text-decoration: none;
	background: var(--ldn-surface, #fff);
}

.ldn-size-shape-tile:hover {
	border-color: var(--ldn-primary, #706cc8);
	text-decoration: none;
}

.ldn-size-hub-scale {
	margin-bottom: 1.5rem;
}

.ldn-size-muted {
	color: var(--ldn-text-muted, #6b7280);
	font-weight: 400;
	font-size: 0.9em;
}

/* Hub tables use the house card. Do not add a second outline on the table. */

.ldn-size-comparison-visual,
.ldn-size-comparison-table,
.ldn-size-comparison-delta,
.ldn-size-comparison-callout,
.ldn-size-comparison-prices,
.ldn-size-comparison-links {
	margin-bottom: 1.5rem;
}

.ldn-size-compare-cta {
	margin-bottom: 1.5rem;
	padding: 1.25rem 1.5rem;
	border-radius: 8px;
	background: var(--ldn-surface-muted, #f8f7fc);
}

/* ------------------------------------------------------------------
   Diamond Size Checker (merged tool + drop-in widget)
   ------------------------------------------------------------------ */
.ldn-size-checker {
	margin-bottom: 2rem;
}

.ldn-size-checker--widget {
	padding: 1.25rem 1.5rem;
}

.ldn-size-checker__surface {
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--ldn-border, #e5e7eb);
	border-radius: 12px;
	background: #fff;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-checker--widget .ldn-size-chart__lead {
	margin-bottom: 1rem;
}

.ldn-size-checker-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	align-items: stretch;
	margin-bottom: 1rem;
}

.ldn-size-checker-row--shape-carat {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 0.25rem;
}

.ldn-size-checker-row--shape-carat label {
	margin-top: 0 !important;
}

.ldn-size-checker-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 0.75rem;
}

.ldn-size-checker-panel {
	position: relative;
	margin: 0;
	padding: 1.5rem 1.25rem 1.25rem;
	border: 2px solid var(--ldn-primary, #706cc8);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(26, 26, 46, 0.08);
	box-sizing: border-box;
	height: 100%;
}

/* Sit on the top border without shifting panel content — keeps A/B fields aligned. */
.ldn-size-checker-panel legend.ldn-size-checker-panel__title {
	position: absolute;
	top: 0;
	left: 1rem;
	transform: translateY(-50%);
	float: none;
	display: block;
	width: auto;
	max-width: calc(100% - 2rem);
	margin: 0;
	padding: 0 0.4rem;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
	background: #fff;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-checker-panel--b {
	border-color: #6cc8be;
}

/* Match panel A as a grid cell so both fieldsets share the same top edge. */
#ldn-checker-panel-b-wrap {
	min-height: 100%;
}

#ldn-checker-panel-b-wrap:not([hidden]) {
	display: flex;
	flex-direction: column;
}

#ldn-checker-panel-b-wrap .ldn-size-checker-panel {
	flex: 1 1 auto;
	width: 100%;
}

.ldn-size-checker-panel__title {
	font-size: 1.05rem;
	font-weight: 700;
	padding: 0;
}

.ldn-size-checker-panel label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin: 0.75rem 0 0.35rem;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-checker-panel select,
.ldn-size-checker-panel input[type="number"] {
	width: 100%;
	padding: 0.55rem 0.7rem;
	font-size: 1rem;
	border: 1px solid var(--ldn-border-strong, #c7c3e8);
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
}

.ldn-size-checker-panel select:focus,
.ldn-size-checker-panel input[type="number"]:focus {
	outline: 2px solid var(--ldn-primary, #706cc8);
	outline-offset: 1px;
}

.ldn-size-checker-mode {
	display: flex;
	gap: 1rem;
	margin: 0.85rem 0 0.25rem;
	flex-wrap: wrap;
}

.ldn-size-checker-mode__option {
	display: inline-flex !important;
	align-items: center;
	gap: 0.4rem;
	margin: 0 !important;
	font-weight: 500 !important;
	cursor: pointer;
}

.ldn-size-checker-mm {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.6rem;
}

.ldn-size-checker-hint {
	font-size: 0.8rem;
	color: var(--ldn-text-muted, #6b7280);
	margin: 0.5rem 0 0;
}

.ldn-size-checker-second {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.ldn-size-checker-actions {
	margin: 0.5rem 0 0;
}

.ldn-size-checker-actions .ldn-btn {
	font-size: 1.05rem;
	padding: 0.75rem 2rem;
}

/* Results sit below the form without a divider line. */
.ldn-size-checker-results {
	margin: 1.75rem 0 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
}

.ldn-size-checker-results__title {
	margin: 0 0 1rem;
}

.ldn-size-checker-results__cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
	align-items: stretch;
}

.ldn-size-checker-card {
	padding: 1rem 1.25rem;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--ldn-border, #e5e7eb);
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.ldn-size-checker-card h3 {
	margin: 0 0 0.25rem;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ldn-text-muted, #6b7280);
}

.ldn-size-checker-card__stone {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 700;
}

.ldn-size-checker-card__quality {
	margin: 0 0 0.6rem;
	color: var(--ldn-primary, #706cc8);
}

.ldn-size-checker-card__stats {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.7;
	flex: 1;
}

.ldn-size-checker-card__note {
	font-size: 0.82rem;
	color: var(--ldn-text-muted, #6b7280);
	margin: 0.6rem 0 0;
}

.ldn-size-checker-card--error p {
	color: #b91c1c;
	margin: 0;
}

.ldn-size-checker-results__comparison {
	text-align: center;
}

.ldn-size-compare-svg--compact {
	max-width: 280px;
	margin: 0 auto;
}

.ldn-size-comparison-columns__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: stretch;
}

.ldn-size-comparison-column {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Equal-height scale wells so the two spec tables share one baseline. */
.ldn-size-comparison-column__scale {
	flex: 1 1 auto;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	max-width: 320px;
	width: 100%;
	margin: 0 0 1rem;
	box-sizing: border-box;
	background: #fff;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-comparison-column__scale svg {
	max-width: 100%;
	max-height: 180px;
	width: auto;
	height: auto;
}

.ldn-size-comparison-column .ldn-size-table {
	margin-top: 0;
}

.ldn-size-comparison-prices__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
}

.ldn-size-comparison-prices__stone h3 {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

.ldn-size-price-card__per-carat {
	display: block;
	font-size: 0.9rem;
	opacity: 0.9;
	margin-top: 0.15rem;
}

/* Comparison-page result line: no card / outline — inherits the section band. */
.ldn-size-comparison-callout .ldn-faceup-callout {
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	color: inherit;
}

.ldn-size-chart__subheading {
	font-size: 1.1rem;
	margin: 1.5rem 0 0.75rem;
}

.ldn-size-methodology--inline {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--ldn-border, #e5e7eb);
}

.ldn-size-methodology--inline h3 {
	margin-top: 0;
	font-size: 1.1rem;
}

.ldn-size-checker-full-link {
	margin: 1rem 0 0;
	font-weight: 600;
}

.ldn-size-checker-how {
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--ldn-border, #e5e7eb);
}

.ldn-size-checker-how__title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
}

.ldn-size-checker-steps {
	margin: 0;
	padding-left: 1.25rem;
	display: grid;
	gap: 0.5rem;
}

.ldn-size-checker-steps li {
	line-height: 1.45;
}

.ldn-size-checker-empty {
	margin-bottom: 1.25rem;
	padding: 1rem 1.25rem;
	border-radius: 10px;
	background: var(--ldn-surface-muted, #f8f9fc);
}

.ldn-size-checker-empty__lead {
	margin: 0 0 1rem;
	color: var(--ldn-text-muted, #4b5563);
}

.ldn-size-checker-empty__preview .ldn-size-compare-svg {
	margin: 0 auto;
}

/* Explore links use shared .ldn-explore-card-grid (see explore_cards_section_html). */

@media (min-width: 768px) {
	.ldn-size-checker-steps {
		grid-template-columns: repeat(3, 1fr);
		padding-left: 0;
		list-style: none;
		counter-reset: ldn-checker-step;
	}

	.ldn-size-checker-steps li {
		counter-increment: ldn-checker-step;
		padding: 0.75rem 1rem;
		border: 1px solid var(--ldn-border, #e5e7eb);
		border-radius: 10px;
		background: #fff;
	}

	.ldn-size-checker-steps li::before {
		content: counter(ldn-checker-step);
		display: block;
		width: 1.75rem;
		height: 1.75rem;
		margin-bottom: 0.5rem;
		border-radius: 50%;
		background: var(--ldn-primary, #706cc8);
		color: #fff;
		font-weight: 700;
		font-size: 0.9rem;
		line-height: 1.75rem;
		text-align: center;
	}
}

@media (max-width: 700px) {
	.ldn-size-checker-panels {
		grid-template-columns: 1fr;
	}

	.ldn-size-checker-mm {
		grid-template-columns: 1fr;
	}
}

/* CTA band under the mega-hub matrix: white box on brand purple. */
.ldn-size-checker-cta-band {
	background: var(--ldn-primary, #706cc8);
	border-radius: 12px;
	padding: 2rem 1.5rem;
}

.ldn-size-checker-cta {
	max-width: 560px;
	margin: 0 auto;
	padding: 1.5rem 1.75rem;
	border-radius: 10px;
	background: #fff;
	text-align: center;
	box-shadow: 0 2px 8px rgba(26, 26, 46, 0.18);
}

.ldn-size-checker-cta h2 {
	margin: 0 0 0.5rem;
}

.ldn-size-checker-cta p {
	margin: 0 0 1rem;
	line-height: 1.55;
}

.ldn-size-checker-cta p:last-child {
	margin-bottom: 0;
}

/* Face-up comparison block (overlay + bars) — shared by compare + spread tools */
.ldn-faceup-visual,
.ldn-size-comparison-visual {
	text-align: center;
}

.ldn-faceup-callout {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border-radius: 8px;
	background: #ecfdf5;
	border: none;
	font-size: 1.05rem;
	line-height: 1.45;
}

.ldn-faceup-callout--tie {
	background: #f8fafc;
}

.ldn-faceup-legend {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.5rem;
	font-size: 0.95rem;
}

.ldn-faceup-legend__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ldn-faceup-legend__swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
	flex-shrink: 0;
}

.ldn-faceup-legend__swatch--a,
.ldn-faceup-legend__item--a .ldn-faceup-legend__swatch {
	background: var(--ldn-primary, #706cc8);
}

.ldn-faceup-legend__swatch--b,
.ldn-faceup-legend__item--b .ldn-faceup-legend__swatch {
	background: #6cc8be;
}

.ldn-faceup-overlay {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0.5rem auto 1.25rem;
	min-height: 120px;
	max-width: min(100%, 480px);
	overflow: hidden;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
}

.ldn-faceup-overlay svg {
	max-width: min(100%, 420px);
	max-height: min(50vh, 280px);
	width: auto;
	height: auto;
}

/* Dedicated pair pages: same painted size as the size-checker overlay
   (maxPx 200). width: auto would honour the artefact's width="Nmm" and
   collapse the graphic to ~25px. */
.ldn-size-comparison-visual .ldn-faceup-overlay svg,
.ldn-size-outline--comparison svg {
	width: 100%;
	max-width: 200px;
	height: auto;
	max-height: min(50vh, 280px);
}

.ldn-faceup-bars {
	max-width: 520px;
	margin: 0 auto;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	background: #fff;
	text-align: left;
	box-sizing: border-box;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-faceup-bar {
	margin-bottom: 0.85rem;
}

.ldn-faceup-bar__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
}

.ldn-faceup-bar__label {
	font-weight: 600;
}

.ldn-faceup-bar__value {
	color: var(--ldn-text-muted, #6b7280);
	font-size: 0.85rem;
	white-space: nowrap;
}

.ldn-faceup-bar__track {
	height: 12px;
	border-radius: 6px;
	background: #e5e7eb;
	overflow: hidden;
}

.ldn-faceup-bar__fill {
	height: 100%;
	border-radius: 6px;
	min-width: 4px;
}

.ldn-faceup-bar__fill--a {
	background: var(--ldn-primary, #706cc8);
}

.ldn-faceup-bar__fill--b {
	background: #6cc8be;
}

.ldn-faceup-bars__diff {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: var(--ldn-text-muted, #6b7280);
	text-align: center;
}

.ldn-faceup-footnote {
	margin: 1rem 0 0;
	font-size: 0.9rem;
	color: var(--ldn-text-muted, #6b7280);
	line-height: 1.5;
}

.ldn-size-compare-preview__overlay {
	display: flex;
	justify-content: center;
	margin: 1rem 0;
	min-height: 120px;
}

.ldn-size-compare-popular ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.5rem 1rem;
}

/* ------------------------------------------------------------------
   Mega-hub matrix table (full height + sticky shape column)
   ------------------------------------------------------------------ */
.ldn-size-matrix-scroll {
	/* Mega hub only. Grow with the rows so the page scrolls. overflow-x
	   only: eleven outline+mm columns are wider than the card. A
	   max-height here would clip ~10 rows behind an inner scrollbar.
	   Phone: same full-height table; swipe sideways if columns do not fit. */
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

.ldn-size-matrix {
	width: max-content;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.ldn-size-matrix th,
.ldn-size-matrix td {
	padding: 0.6rem 0.55rem;
	border-bottom: 1px solid var(--ldn-border, #e5e7eb);
	text-align: center;
	vertical-align: middle;
}

.ldn-size-matrix thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: var(--ldn-primary, #706cc8);
	color: #fff;
	font-weight: 700;
	white-space: nowrap;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

/* Corner radii on header/footer cells — belt-and-suspenders when a sticky
   paint path ignores the scroll wrapper’s radius. */
.ldn-size-matrix thead th:first-child {
	border-top-left-radius: 10px;
}

.ldn-size-matrix thead th:last-child {
	border-top-right-radius: 10px;
}

.ldn-size-matrix tbody tr:last-child > :first-child {
	border-bottom-left-radius: 10px;
}

.ldn-size-matrix tbody tr:last-child > :last-child {
	border-bottom-right-radius: 10px;
}

.ldn-size-matrix tbody tr:nth-child(even) td,
.ldn-size-matrix tbody tr:nth-child(even) th {
	background: var(--ldn-surface-muted, #f8f7fc);
}

.ldn-size-matrix tbody tr:nth-child(odd) td,
.ldn-size-matrix tbody tr:nth-child(odd) th {
	background: #fff;
}

.ldn-size-matrix .ldn-size-matrix__shape-col {
	position: sticky;
	left: 0;
	z-index: 2;
	text-align: left;
	font-weight: 700;
	white-space: nowrap;
}

.ldn-size-matrix thead .ldn-size-matrix__shape-col {
	z-index: 4;
	background: var(--ldn-primary, #706cc8);
}

.ldn-size-matrix__shape-col a {
	color: var(--ldn-primary, #706cc8);
	text-decoration: none;
}

.ldn-size-matrix__shape-col a:hover {
	text-decoration: underline;
}

.ldn-size-matrix__cell--empty {
	color: var(--ldn-text-muted, #9ca3af);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
}

.ldn-size-matrix__link {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	text-decoration: none;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-matrix__link:hover .ldn-size-matrix__dims,
.ldn-size-matrix__link:hover .ldn-size-matrix__carat {
	text-decoration: underline;
	color: var(--ldn-primary, #706cc8);
}

.ldn-size-matrix__carat {
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-matrix__outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ldn-size-matrix__outline svg {
	display: block;
}

.ldn-size-matrix__dims {
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	color: var(--ldn-text, #1a1a2e);
}

.ldn-size-matrix__lead {
	margin: 0 0 1rem;
	line-height: 1.55;
}

/* Shape-hub carat ladder: same matrix look as the mega hub (purple header,
   alternating rows, true-to-scale outlines). overflow: visible so
   position:sticky on thead sticks to the page (the house card's overflow:
   hidden and the hub overflow-x rule would trap it). Phone: table is
   100% wide and columns shrink; do not overflow-x or sticky dies again. */
.ldn-size-hub-table--ladder .ldn-table-card {
	margin-top: 0.5rem;
	overflow: visible;
}

.ldn-size-hub-table--ladder .ldn-size-matrix {
	width: 100%;
	max-width: 100%;
	table-layout: fixed;
}

.ldn-size-hub-table--ladder .ldn-size-matrix th,
.ldn-size-hub-table--ladder .ldn-size-matrix td {
	min-width: 0;
}

.ldn-size-hub-table--ladder .ldn-size-matrix thead th {
	white-space: normal;
}

.ldn-size-hub-table--ladder .ldn-size-matrix th,
.ldn-size-hub-table--ladder .ldn-size-matrix td {
	text-align: center;
}

.ldn-size-hub-table--ladder .ldn-size-matrix td:not(.ldn-size-matrix__cell) {
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   Shape-hub scale explorer (carat slider + shape switch)
   ------------------------------------------------------------------ */
.ldn-size-scale-controls {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	gap: 1rem 1.5rem;
	align-items: end;
	margin: 0 0 1.25rem;
	padding: 1rem 1.25rem;
	border-radius: 10px;
	background: var(--ldn-surface-muted, #f8f7fc);
	border: 1px solid var(--ldn-border, #e5e7eb);
}

/* Server-rendered empty, unhidden by size-checker.js once it has a manifest to
   populate them from. An author `display` beats the UA `[hidden]` rule, so
   without this a failed enhancement paints a dead dropdown and slider. */
.ldn-size-scale-controls[hidden] {
	display: none;
}

.ldn-size-scale-control label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.ldn-size-scale-control select {
	width: 100%;
	padding: 0.5rem 0.65rem;
	font-size: 1rem;
	border: 1px solid var(--ldn-border-strong, #c7c3e8);
	border-radius: 6px;
	background: #fff;
}

.ldn-size-scale-control--slider input[type="range"] {
	width: 100%;
	accent-color: var(--ldn-primary, #706cc8);
}

.ldn-size-scale-control--slider output {
	font-weight: 700;
	color: var(--ldn-primary, #706cc8);
}

@media (max-width: 640px) {
	.ldn-size-scale-controls {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------
   Methodology page
   ------------------------------------------------------------------ */
.ldn-size-methodology-stats {
	margin: 1.1rem 0 0;
}

.ldn-size-methodology-section p {
	line-height: 1.6;
	margin: 0 0 0.65rem;
}

.ldn-size-methodology-section p:last-child {
	margin-bottom: 0;
}

.ldn-size-figure--methodology {
	margin: 1.25rem 0 0.25rem;
	max-width: 36rem;
}

.ldn-size-figure--methodology .ldn-size-outline--fill svg {
	width: 100%;
	height: auto;
	display: block;
}

.ldn-size-figure--methodology .ldn-size-spread-labels {
	margin-top: 0.75rem;
}

.ldn-btn {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	border-radius: 6px;
	border: none;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.ldn-btn--primary {
	background: var(--ldn-primary, #706cc8);
	color: #fff;
}

@media screen and (max-width: 768px) {
	.ldn-size-compare-panels {
		grid-template-columns: 1fr;
	}

	.ldn-size-compare-vs {
		text-align: center;
	}
}

.ldn-size-price-links a {
	color: var(--ldn-primary, #706cc8);
	font-weight: 600;
	text-decoration: none;
}

/* Display ads (CP 55) */
.ldn-ad-row {
	margin: 1.25rem 0;
	text-align: center;
}

.ldn-ad-row--multi {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.ldn-ad-slot {
	display: block;
	margin: 1rem auto;
	max-width: 100%;
}

.ldn-ad-link {
	display: block;
	line-height: 0;
}

.ldn-ad-image {
	max-width: 100%;
	height: auto;
}

.ldn-ad-label {
	display: block;
	font-size: 0.75rem;
	color: var(--ldn-muted-text, #666);
	margin-top: 0.25rem;
}

/* Facet Intelligence alternatives panel (PRD-009 Epic 5.4) */
.ldn-fi-panel {
	margin: 2rem 0;
}

.ldn-fi-panel__title {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	line-height: 1.3;
}

.ldn-fi-panel__status {
	margin: 0;
	color: var(--ldn-muted-text, #666);
}

.ldn-fi-panel__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ldn-fi-panel__item {
	min-width: 0;
	padding: 1rem;
	border-radius: 12px;
	background: var(--ldn-surface, #fff);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ldn-fi-panel__item-title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	line-height: 1.35;
}

.ldn-fi-panel__item-meta {
	margin: 0 0 0.5rem;
	font-size: 0.9375rem;
	color: var(--ldn-muted-text, #666);
}

.ldn-fi-panel__reasons {
	margin: 0 0 0.75rem;
	padding-left: 1.1rem;
	font-size: 0.875rem;
	color: var(--ldn-muted-text, #666);
}

.ldn-fi-panel__item-link {
	font-weight: 600;
	text-decoration: none;
	color: var(--ldn-primary, #706cc8);
}

.ldn-fi-panel__item-link:hover,
.ldn-fi-panel__item-link:focus {
	text-decoration: underline;
}

@media (max-width: 480px) {
	.ldn-fi-panel__list {
		grid-template-columns: 1fr;
	}
}
