/* Buckingham site-aligned presentation layer. */
.bjs-calculator-mount,
.wp-block-buckingham-jack-slide-calculator {
	--bjs-reference-bg: #111417;
	--bjs-reference-surface: #1c2024;
	--bjs-reference-surface-alt: #292b27;
	--bjs-reference-border: rgb(216 211 199 / 18%);
	--bjs-reference-copy: #f7f5ef;
	--bjs-reference-muted: #c8c5b8;
	--bjs-reference-yellow: #ffd019;
	--bjs-reference-bronze: #9a7b4f;
	--bjs-reference-stone: #d8d3c7;
	--bjs-reference-paper: #fff;
	--bjs-reference-radius: 4px;
	--bjs-reference-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--bjs-navy: #171916;
	--bjs-navy-dark: #111417;
	--bjs-blue: #9a7b4f;
	--bjs-gold: #ffd019;
	--bjs-ink: #171916;
	--bjs-muted: #77766e;
	--bjs-border: #4a4b46;
	--bjs-soft: #292b27;
	--bjs-paper: #fff;
	box-sizing: border-box;
	font-family: "Open Sans", Arial, sans-serif;
	margin-inline: auto;
	max-width: 1800px;
	width: 100%;
}

.bjs-calculator-mount *,
.bjs-calculator-mount *::before,
.bjs-calculator-mount *::after,
.wp-block-buckingham-jack-slide-calculator *,
.wp-block-buckingham-jack-slide-calculator *::before,
.wp-block-buckingham-jack-slide-calculator *::after {
	box-sizing: border-box;
}

.bjs-calculator {
	background:
		radial-gradient(circle at 70% 12%, rgb(255 208 25 / 16%), transparent 38%),
		linear-gradient(145deg, #292b27, var(--bjs-reference-bg));
	border: 1px solid rgb(216 211 199 / 12%);
	border-radius: 3px;
	box-shadow: 0 26px 70px rgb(17 20 23 / 20%);
	color: var(--bjs-reference-copy);
	font-family: inherit;
	overflow: visible;
	padding: clamp(1.25rem, 2.5vw, 2.25rem);
}

.bjs-calculator button { font: inherit; }

.bjs-calculator__header {
	align-items: flex-end;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgb(216 211 199 / 14%);
	color: var(--bjs-reference-copy);
	display: flex;
	gap: 2rem;
	justify-content: space-between;
	margin: 0 0 1.35rem;
	padding: 0 0 1.25rem;
	position: relative;
}

.bjs-calculator__header::after {
	background: linear-gradient(90deg, var(--bjs-reference-yellow), var(--bjs-reference-bronze));
	bottom: -1px;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	width: 96px;
}

.bjs-calculator__eyebrow {
	color: var(--bjs-reference-yellow);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	margin: 0 0 0.35rem;
	text-transform: uppercase;
}

.bjs-calculator__title {
	color: var(--bjs-reference-copy);
	font-size: clamp(2rem, 3.5vw, 3.25rem);
	font-weight: 400;
	letter-spacing: -0.035em;
	line-height: 1;
	margin: 0;
}

.bjs-calculator__intro {
	color: var(--bjs-reference-muted);
	font-size: 0.88rem;
	line-height: 1.55;
	margin: 0.55rem 0 0;
	max-width: 900px;
}

.bjs-calculator__profile-badge {
	align-items: center;
	background: rgb(216 211 199 / 6%);
	border: 1px solid rgb(216 211 199 / 18%);
	border-radius: 8px;
	box-shadow: inset 0 1px 0 rgb(216 211 199 / 8%);
	color: var(--bjs-reference-stone);
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.76rem;
	font-weight: 400;
	letter-spacing: 0;
	min-height: 40px;
	padding: 0.55rem 0.85rem;
	white-space: nowrap;
}

.bjs-calculator__body {
	align-items: start;
	background: transparent;
	border: 0;
	display: grid;
	gap: 1.25rem;
	grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
	padding: 0;
}

.bjs-controls {
	align-self: start;
	background:
		linear-gradient(90deg, rgb(216 211 199 / 2.5%) 1px, transparent 1px) 0 0 / 24px 24px,
		linear-gradient(135deg, rgb(41 43 39 / 96%), rgb(17 20 23 / 98%));
	border: 1px solid var(--bjs-reference-border);
	border-radius: var(--bjs-reference-radius);
	box-shadow: 0 16px 38px rgb(17 20 23 / 28%), inset 0 1px 0 rgb(216 211 199 / 6%);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
	position: sticky;
	top: 24px;
}

.bjs-reference-capacity {
	background:
		radial-gradient(circle at 88% 28%, rgb(255 208 25 / 10%), transparent 31%),
		linear-gradient(135deg, rgb(154 123 79 / 13%), rgb(17 20 23 / 82%));
	border: 0;
	border-left: 3px solid var(--bjs-reference-yellow);
	min-height: 158px;
	padding: 1.05rem 1.35rem;
	position: relative;
	overflow: hidden;
}

.bjs-reference-capacity::after {
	border: 1px solid rgb(255 208 25 / 18%);
	border-radius: 50%;
	content: "";
	height: 112px;
	position: absolute;
	right: -48px;
	top: -34px;
	width: 112px;
}

.bjs-reference-capacity > strong {
	color: var(--bjs-reference-copy);
	display: block;
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.bjs-reference-capacity__value {
	color: var(--bjs-reference-yellow);
	display: block;
	font-size: clamp(2rem, 3vw, 3.2rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1;
	margin: 0.3rem 0 0;
	text-shadow: 0 0 28px rgb(255 208 25 / 12%);
	white-space: nowrap;
}

.bjs-reference-capacity.is-unavailable .bjs-reference-capacity__value {
	font-size: 1.4rem;
	letter-spacing: 0;
	margin-top: 0.8rem;
}

.bjs-reference-capacity__config {
	color: var(--bjs-reference-stone);
	display: block;
	font-size: 0.72rem;
	margin-top: 0.65rem;
}

.bjs-reference-capacity p {
	align-items: center;
	color: var(--bjs-reference-muted);
	display: flex;
	font-size: 0.72rem;
	gap: 0.45rem;
	margin: 0.65rem 0 0;
}

.bjs-reference-capacity i {
	background: var(--bjs-reference-yellow);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgb(255 208 25 / 10%);
	display: inline-block;
	height: 8px;
	width: 8px;
}

.bjs-option-group {
	border: 0;
	border-bottom: 1px solid var(--bjs-reference-border);
	margin: 0;
	min-width: 0;
	padding: 1.05rem 1.1rem;
	transition: background 180ms ease;
}

.bjs-option-group:hover { background: rgb(154 123 79 / 5%); }

.bjs-option-group:last-of-type { border-bottom: 0; }

.bjs-option-group__legend {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.bjs-option-group__head {
	align-items: flex-start;
	display: flex;
	gap: 0.7rem;
	margin-bottom: 0.8rem;
}

.bjs-step-number {
	align-items: center;
	background: var(--bjs-reference-yellow);
	border: 1px solid var(--bjs-reference-yellow);
	border-radius: 50%;
	box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
	color: #171916;
	display: inline-flex;
	flex: 0 0 30px;
	font-size: 0.8rem;
	font-weight: 800;
	height: 30px;
	justify-content: center;
}

.bjs-option-group__head strong,
.bjs-option-group__head small { display: block; }

.bjs-option-group__head strong {
	color: var(--bjs-reference-copy);
	font-size: 0.9rem;
	font-weight: 700;
	margin: 0;
}

.bjs-option-group__head small {
	color: var(--bjs-reference-muted);
	font-size: 0.7rem;
	font-weight: 400;
	line-height: 1.35;
	margin-top: 0.15rem;
}

.bjs-option-group__options,
.bjs-option-group--profile .bjs-option-group__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	grid-template-columns: none;
}

.bjs-controls .bjs-option {
	align-items: center;
	appearance: none;
	background: rgb(17 20 23 / 72%);
	border: 1px solid rgb(216 211 199 / 24%);
	border-radius: 4px;
	box-shadow: inset 0 1px 0 rgb(216 211 199 / 5%);
	color: var(--bjs-reference-copy);
	cursor: pointer;
	display: inline-flex;
	flex: 1 1 auto;
	font-size: 0.78rem;
	font-weight: 700;
	gap: 0.42rem;
	justify-content: center;
	letter-spacing: 0.005em;
	line-height: 1.2;
	min-height: 40px;
	min-width: 58px;
	padding: 0.46rem 0.62rem;
	position: relative;
	text-align: center;
	transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms var(--bjs-reference-ease);
}

.bjs-option::before {
	background: currentColor;
	content: "";
	display: inline-block;
	flex: 0 0 13px;
	height: 13px;
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	opacity: 0.72;
	transition: opacity 180ms ease, transform 180ms var(--bjs-reference-ease);
	width: 13px;
}

/* Compact technical pictograms keep the choices scannable without competing
   with the option label. */
.bjs-option-group:nth-of-type(1) .bjs-option::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M2 2h12v2H9v8h5v2H2v-2h5V4H2z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M2 2h12v2H9v8h5v2H2v-2h5V4H2z'/%3E%3C/svg%3E");
}

.bjs-option-group:nth-of-type(2) .bjs-option::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M1 3h14v2H1zm2 3h2v7H3zm8 0h2v7h-2zM1 12h14v2H1z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M1 3h14v2H1zm2 3h2v7H3zm8 0h2v7h-2zM1 12h14v2H1z'/%3E%3C/svg%3E");
}

.bjs-option-group:nth-of-type(3) .bjs-option::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M1 7h14v2H1zm0 1 4-4v3h6V4l4 4-4 4V9H5v3z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M1 7h14v2H1zm0 1 4-4v3h6V4l4 4-4 4V9H5v3z'/%3E%3C/svg%3E");
}

.bjs-option::after {
	align-items: center;
	background: #171916;
	border-radius: 50%;
	color: var(--bjs-reference-yellow);
	content: "\2713";
	display: inline-flex;
	font-size: 0.55rem;
	font-weight: 900;
	height: 14px;
	justify-content: center;
	line-height: 1;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	transform: scale(0.65);
	transition: max-width 180ms ease, opacity 180ms ease, transform 180ms var(--bjs-reference-ease);
	width: 14px;
}

.bjs-option small { display: none; }

.bjs-option:hover {
	background: rgb(39 43 47 / 96%);
	border-color: rgb(255 208 25 / 72%);
	color: var(--bjs-reference-copy);
	transform: translateY(-2px);
}

.bjs-option:hover::before { opacity: 1; transform: scale(1.08); }

.bjs-option:focus-visible {
	box-shadow: 0 0 0 3px rgb(255 208 25 / 28%);
	outline: 2px solid var(--bjs-reference-yellow);
	outline-offset: 2px;
}

.bjs-option.is-selected {
	background: var(--bjs-reference-yellow);
	border-color: var(--bjs-reference-yellow);
	box-shadow: 0 5px 14px rgb(0 0 0 / 22%), inset 0 1px 0 rgb(247 245 239 / 38%);
	color: #171916;
	transform: translateY(-1px);
}

.bjs-option.is-selected::before { opacity: 0.9; }

.bjs-option.is-selected::after {
	max-width: 14px;
	opacity: 1;
	transform: scale(1);
}

.bjs-capacity,
.bjs-controls__notice { display: none; }

.bjs-result {
	background: transparent;
	border: 0;
	border-radius: 0;
	min-width: 0;
	padding: 0;
}

.bjs-result__heading {
	align-items: center;
	background:
		linear-gradient(90deg, rgb(154 123 79 / 12%), transparent 42%),
		rgb(17 20 23 / 92%);
	border: 1px solid var(--bjs-reference-border);
	border-bottom: 0;
	border-radius: var(--bjs-reference-radius) var(--bjs-reference-radius) 0 0;
	display: flex;
	justify-content: flex-end;
	margin: 0;
	min-height: 64px;
	padding: 0.75rem 1rem;
}

.bjs-result__heading > div:first-child:not(.bjs-result-tools) { display: none; }

.bjs-result-tools {
	align-items: center;
	display: flex;
	gap: 0.85rem;
	margin-left: auto;
}

.bjs-calculator .bjs-download {
	align-items: center;
	appearance: none;
	background: linear-gradient(135deg, #ffe05a, var(--bjs-reference-yellow) 58%, #e9b70f);
	border: 1px solid var(--bjs-reference-yellow);
	border-radius: 6px;
	box-shadow: 0 7px 18px rgb(0 0 0 / 24%), inset 0 1px 0 rgb(255 255 255 / 45%);
	color: #171916;
	cursor: pointer;
	display: inline-grid;
	font-size: 0.78rem;
	font-weight: 800;
	grid-template-columns: 34px auto;
	grid-template-rows: auto auto;
	column-gap: 0.65rem;
	justify-content: start;
	letter-spacing: 0.01em;
	line-height: 1.05;
	min-height: 50px;
	min-width: 170px;
	padding: 0.42rem 0.8rem 0.42rem 0.48rem;
	position: relative;
	text-align: left;
	transition: background 180ms ease, box-shadow 180ms ease, transform 180ms var(--bjs-reference-ease);
}

.bjs-calculator .bjs-download::after {
	align-self: start;
	color: rgb(23 25 22 / 66%);
	content: "LETTER-SIZE DRAWING";
	font-size: 0.53rem;
	font-weight: 800;
	grid-column: 2;
	grid-row: 2;
	letter-spacing: 0.085em;
	line-height: 1;
	margin-top: 0.12rem;
}

.bjs-calculator .bjs-download:hover {
	background: linear-gradient(135deg, #ffe77a, #ffd019 56%, #e1aa08);
	border-color: #e9ba16;
	box-shadow: 0 10px 24px rgb(0 0 0 / 28%), 0 0 0 3px rgb(255 208 25 / 10%);
	transform: translateY(-2px);
}

.bjs-calculator .bjs-download:focus-visible {
	outline: 2px solid var(--bjs-reference-yellow);
	outline-offset: 2px;
}

.bjs-calculator .bjs-download:disabled {
	cursor: wait;
	opacity: 0.72;
	transform: none;
}

.bjs-calculator .bjs-download svg {
	align-self: center;
	background: #171916;
	border-radius: 4px;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
	color: var(--bjs-reference-yellow);
	fill: none;
	grid-column: 1;
	grid-row: 1 / 3;
	height: 34px;
	padding: 8px;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 34px;
}

.bjs-drawing-wrap {
	align-items: center;
	aspect-ratio: 11 / 8.5;
	background: var(--bjs-reference-paper);
	border: 1px solid var(--bjs-reference-border);
	border-radius: 0 0 7px 7px;
	display: flex;
	justify-content: center;
	overflow: hidden;
	padding: 0.65rem;
	position: relative;
	width: 100%;
}

.bjs-svg {
	background: #fff;
	display: block;
	height: 100%;
	max-width: 100%;
	min-width: 0;
	transition: background-color 0.2s ease, filter 0.2s ease;
	width: 100%;
}

.bjs-svg text { fill: #171916; }

.bjs-svg__dimension path,
.bjs-svg__profile-callout path {
	stroke: #292b27;
}

.bjs-svg__dimension-marker { fill: #292b27; }

.bjs-svg__title-block path,
.bjs-svg__title-block rect {
	stroke: #292b27;
}

.bjs-svg__brand { fill: #171916 !important; }

.bjs-drawing-caption {
	color: var(--bjs-reference-muted);
	font-size: 0.7rem;
	margin: 0;
	padding: 0.65rem 1rem 0;
}

.bjs-published-table {
	background:
		linear-gradient(135deg, rgb(154 123 79 / 8%), transparent 38%),
		rgb(17 20 23 / 92%);
	border: 1px solid var(--bjs-reference-border);
	border-radius: var(--bjs-reference-radius);
	box-shadow: 0 18px 45px rgb(17 20 23 / 24%), inset 0 1px 0 rgb(216 211 199 / 5%);
	margin-top: 0.85rem;
	overflow: hidden;
	padding: 0.9rem;
}

.bjs-published-table h3 {
	color: var(--bjs-reference-copy);
	font-size: 1rem;
	font-weight: 400;
	margin: 0;
}

.bjs-published-table > p {
	color: var(--bjs-reference-muted);
	font-size: 0.72rem;
	margin: 0.25rem 0 0.85rem;
}

.bjs-table-scroll { overflow-x: auto; }

.bjs-published-table table {
	border-collapse: collapse;
	color: var(--bjs-reference-stone);
	font-size: 0.74rem;
	min-width: 620px;
	width: 100%;
}

.bjs-published-table th,
.bjs-published-table td {
	border: 1px solid rgb(216 211 199 / 14%);
	height: auto;
	padding: 0.65rem;
	text-align: center;
}

.bjs-published-table th {
	background: rgb(154 123 79 / 13%);
	font-weight: 750;
}

.bjs-published-table td { background: transparent; }
.bjs-published-table td.is-data-required { color: #89877e; }

.bjs-published-table td.is-current {
	background: var(--bjs-reference-yellow);
	color: #171916;
	font-weight: 850;
}

.bjs-engineering-notice {
	align-items: start;
	background: linear-gradient(110deg, rgb(41 43 39 / 94%), rgb(17 20 23 / 94%));
	border: 1px solid var(--bjs-reference-border);
	border-radius: 12px;
	display: grid;
	gap: 0.8rem;
	grid-column: 1 / -1;
	grid-template-columns: auto 1fr;
	margin-top: 1rem;
	padding: 0.9rem 1rem;
}

.bjs-engineering-notice strong {
	color: var(--bjs-reference-copy);
	font-size: 1rem;
	white-space: nowrap;
}

.bjs-engineering-notice p {
	color: var(--bjs-reference-muted);
	font-size: 0.75rem;
	line-height: 1.5;
	margin: 0;
}

.bjs-sheet-footer rect,
.bjs-sheet-footer path {
	fill: #fff;
	stroke: #292b27;
	stroke-width: 1;
}

.bjs-sheet-footer path { fill: none; }
.bjs-sheet-heading { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.bjs-sheet-subheading { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.bjs-sheet-label { fill: #6f6d65 !important; font-size: 8px; font-weight: 700; letter-spacing: 0.08em; }
.bjs-sheet-value { font-size: 11px; font-weight: 700; }
.bjs-sheet-note { font-size: 9px; }

.bjs-sheet-frame { pointer-events: none; }

.bjs-sheet-page-border,
.bjs-sheet-frame-lines {
	fill: none;
	stroke: #171916;
	stroke-linecap: square;
	stroke-width: 1.35;
	vector-effect: non-scaling-stroke;
}

.bjs-sheet-header-title {
	fill: #252a2e !important;
	font-family: Arial, sans-serif !important;
	font-weight: 500;
	letter-spacing: 0.08em;
}

.bjs-sheet-header-subtitle {
	fill: #777d86 !important;
	font-family: Arial, sans-serif !important;
	font-weight: 500;
	letter-spacing: 0.12em;
}

@media (max-width: 1200px) {
	.bjs-calculator__body { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
}

@media (max-width: 850px) {
	.bjs-calculator__header { align-items: flex-start; flex-direction: column; }
	.bjs-calculator__body { grid-template-columns: 1fr; }
	.bjs-controls { position: static; }
	.bjs-drawing-wrap { min-height: 0; }
	.bjs-engineering-notice { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
	.bjs-calculator { padding-inline: 0.8rem; }
	.bjs-result__heading { align-items: stretch; flex-direction: column; }
	.bjs-result-tools { align-items: stretch; flex-direction: column; margin-left: 0; width: 100%; }
	.bjs-download { min-height: 44px; width: 100%; }
	.bjs-drawing-wrap { padding: 0.35rem; }
	.bjs-reference-capacity__value { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
	.bjs-calculator * {
		animation: none !important;
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
