/*
 * Dress the Archer. The Saddlery colours are fixed here rather than read from
 * the theme, because the figure's three states (chosen, in the kit, not in
 * the kit) were contrast checked against these grounds and no others.
 */
.alf,
.alf-set {
	--alf-ink: #2A1C11;
	--alf-paper: #F7F0E3;
	--alf-sand: #EDE2CF;
	--alf-line: #D8C7A8;
	--alf-muted: #66563F;
	--alf-brass: #C99A3B;
	--alf-tan: #A9682F;
	box-sizing: border-box;
	color: var(--alf-ink);
	font-size: 16px;
	line-height: 1.55;
}

.alf *,
.alf-set * {
	box-sizing: border-box;
}

.alf {
	background: var(--alf-sand);
	border-bottom: 1px solid var(--alf-line);
}

.alf-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 32px 56px;
	max-width: 1248px;
	margin: 0 auto;
	padding: 32px 24px 56px;
}

.alf h1,
.alf h2,
.alf h3,
.alf p,
.alf-set h2,
.alf-set p {
	margin: 0;
}

/* The theme colours headings from its own palette; these sit on fixed grounds. */
.alf h1,
.alf h2,
.alf h3,
.alf-set h2 {
	color: inherit;
}

.alf button,
.alf-set button {
	font: inherit;
	cursor: pointer;
}

.alf button:focus-visible,
.alf a:focus-visible {
	outline: 3px solid var(--alf-ink);
	outline-offset: 2px;
}

.alf-set button:focus-visible,
.alf-set a:focus-visible {
	outline: 3px solid var(--alf-brass);
	outline-offset: 2px;
}

/* The figure. */
.alf-stage {
	flex: 1 1 380px;
	max-width: 520px;
	margin: 0 auto;
}

.alf-board {
	padding: 16px;
	border-radius: 8px;
	background: var(--alf-paper);
	outline: 2px dashed #B98A5A;
	outline-offset: -8px;
}

.alf-fig {
	position: relative;
	max-width: 440px;
	margin: 0 auto;
	aspect-ratio: 480 / 600;
}

.alf-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.alf[data-hand="left"] .alf-svg {
	transform: scaleX(-1);
}

.alf-svg path {
	fill: none;
	stroke-linecap: round;
}

.alf-o {
	stroke: var(--alf-ink);
}

.alf-b {
	stroke: #FBF6EC;
}

.alf-t {
	stroke: #8A4B1F;
}

.alf-z {
	--alf-z: var(--alf-line);
	opacity: 0.4;
}

.alf-z.is-kit {
	--alf-z: var(--alf-tan);
	opacity: 1;
}

.alf-z.is-on {
	--alf-z: var(--alf-brass);
	opacity: 1;
}

.alf-s {
	stroke: var(--alf-z);
}

.alf-f {
	fill: var(--alf-z);
	stroke: var(--alf-ink);
	stroke-width: 3;
}

.alf-mark {
	position: absolute;
	left: calc(var(--x) * 1%);
	top: calc(var(--y) * 1%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	padding: 0;
	border: 2px solid var(--alf-ink);
	border-radius: 50%;
	background: var(--alf-paper);
	color: var(--alf-ink);
	font-size: 16px;
	font-weight: 700;
	box-shadow: 0 2px 6px rgba(42, 28, 17, 0.25);
}

.alf[data-hand="left"] .alf-mark {
	left: calc((100 - var(--x)) * 1%);
}

.alf-mark.is-kit {
	border-color: var(--alf-paper);
	background: var(--alf-ink);
	color: var(--alf-paper);
}

.alf-mark.is-on {
	border-color: var(--alf-ink);
	background: var(--alf-brass);
	color: var(--alf-ink);
}

.alf-note {
	margin-top: 12px;
	color: var(--alf-muted);
	font-size: 13px;
	text-align: center;
}

/* The heading, the switches and the chips. */
.alf-side {
	flex: 1 1 460px;
	min-width: 0;
}

.alf-side > .skc-eyebrow {
	color: #8A4B1F;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.alf-side > h1 {
	margin-top: 12px;
	font-size: clamp(34px, 5vw, 48px);
	line-height: 1.1;
}

.alf-side > h1 + p {
	max-width: 54ch;
	margin-top: 14px;
	color: var(--alf-muted);
	font-size: 18px;
}

.alf-switches {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	margin-top: 24px;
}

.alf-label {
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.alf-segs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.alf-seg {
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--alf-ink);
	border-radius: 4px;
	background: transparent;
	color: var(--alf-ink);
	font-size: 14px;
	font-weight: 600;
}

.alf-seg[aria-pressed="true"] {
	background: var(--alf-ink);
	color: var(--alf-paper);
}

/*
 * Two steps. Step one (is-pick) shows only the hand and kit choices, centred
 * beside the figure. Step two (is-set) swaps them for the zones and products.
 * Without the script neither class is set and everything shows.
 */
.alf.is-pick .alf-chips,
.alf.is-pick .alf-more,
.alf.is-pick .alf-panels {
	display: none;
}

.alf.is-pick .alf-side {
	align-self: center;
}

.alf.is-set .alf-stage {
	position: sticky;
	top: 24px;
	align-self: flex-start;
}

@media (max-width: 900px) {
	.alf.is-pick .alf-side {
		order: -1;
	}

	.alf.is-set .alf-stage {
		position: static;
	}
}

/* The folded switches: one line naming the archer, with a way back. */
.alf.is-set .alf-side > h1 + p,
.alf.is-set .alf-side > .skc-eyebrow {
	display: none;
}

.alf.is-set .alf-side > h1 {
	margin-top: 0;
	font-size: 32px;
}

.alf.is-set .alf-picked {
	margin-top: 4px;
}

.alf.is-set .alf-chips {
	margin-top: 8px;
}

.alf.is-set .alf-chip {
	min-height: 44px;
	padding: 4px 12px;
}

.alf.is-set .alf-panel {
	margin-top: 12px;
	padding: 16px 20px 20px;
}

.alf.is-set .alf-cards {
	margin-top: 12px;
}

.alf-picked {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin-top: 12px;
	font-weight: 600;
}

.alf-picked[hidden],
.alf-switches[hidden] {
	display: none;
}

.alf-change {
	min-height: 44px;
	padding: 0 4px;
	border: 0;
	background: transparent;
	color: #8A4B1F;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
}

.alf-chips {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 8px;
	margin-top: 16px;
}

.alf-chip {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 6px 12px;
	border: 1px solid var(--alf-line);
	border-radius: 4px;
	background: var(--alf-paper);
	color: var(--alf-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
}

.alf-chip small {
	display: block;
	font-size: 12px;
	font-weight: 400;
}

.alf-chip.is-on {
	border-color: var(--alf-ink);
	background: var(--alf-ink);
	color: var(--alf-paper);
}

.alf-num {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
}

.alf-chip.is-kit .alf-num {
	background: var(--alf-ink);
	color: var(--alf-paper);
}

.alf-chip.is-on .alf-num {
	background: var(--alf-brass);
	color: var(--alf-ink);
}

.alf-more {
	margin-top: 8px;
	font-size: 14px;
}

.alf a {
	color: #8A4B1F;
}

.alf a:hover {
	color: #5E3212;
}

/* The zone panels. */
.alf-panel {
	scroll-margin-top: 96px;
	margin-top: 16px;
	padding: 24px;
	border: 1px solid var(--alf-line);
	border-radius: 4px;
	background: var(--alf-paper);
}

.alf-panel-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 16px;
}

.alf-panel h2 {
	font-size: 26px;
	line-height: 1.1;
}

.alf-all {
	font-size: 14px;
	font-weight: 600;
}

.alf-tip {
	margin-top: 8px;
	color: var(--alf-muted);
}

.alf-wear {
	margin-top: 6px;
	font-weight: 600;
}

.alf-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin-top: 20px;
}

.alf-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.alf-well {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	padding: 10px;
	border: 1px solid var(--alf-line);
	border-radius: 4px;
	background: #FFFFFF;
}

.alf-well img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.alf-card h3 {
	margin-top: 10px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.alf-card h3 a {
	color: inherit;
	text-decoration: none;
}

.alf-card h3 a:hover {
	text-decoration: underline;
}

.alf-price {
	margin-top: 6px;
	font-size: 16px;
	font-weight: 700;
}

.alf-none {
	grid-column: 1 / -1;
	color: var(--alf-muted);
}

.alf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 10px;
	padding: 0 14px;
	border: 1px solid var(--alf-ink);
	border-radius: 4px;
	background: transparent;
	color: var(--alf-ink);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.alf a.alf-btn {
	color: var(--alf-ink);
}

.alf-btn:hover {
	background: var(--alf-sand);
}

.alf-add[aria-pressed="true"] {
	background: var(--alf-ink);
	color: var(--alf-paper);
}

/* The set band. */
.alf-set {
	background: var(--alf-ink);
	color: #F3E9D8;
}

.alf-set .alf-wrap {
	align-items: center;
	padding: 72px 24px;
}

.alf-set-copy {
	flex: 1 1 360px;
	min-width: 0;
}

.alf-set-copy .skc-eyebrow {
	color: var(--alf-brass);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.alf-set-copy h2 {
	margin-top: 12px;
	color: inherit;
	font-size: 34px;
	line-height: 1.1;
}

.alf-set-copy h2 ~ p {
	max-width: 50ch;
	margin-top: 14px;
	color: #BCAA8E;
}

.alf-set-box {
	flex: 1 1 420px;
	min-width: 0;
	padding: 24px;
	border: 1px solid #4A3626;
	border-radius: 4px;
	background: rgba(51, 35, 22, 0.5);
}

.alf-slots {
	margin: 0;
	padding: 0;
	list-style: none;
}

.alf-slot {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	border-bottom: 1px solid #4A3626;
}

.alf-slot .alf-num {
	color: #BCAA8E;
}

.alf-slot.is-on .alf-num {
	background: var(--alf-brass);
	color: var(--alf-ink);
}

.alf-slot-text {
	flex: 1 1 auto;
	min-width: 0;
}

.alf-slot-label {
	display: block;
	color: #BCAA8E;
	font-size: 12px;
}

.alf-slot-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
}

.alf-slot-price {
	font-size: 14px;
	font-weight: 700;
}

.alf-set-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-top: 20px;
}

.alf-count {
	display: block;
	color: #BCAA8E;
	font-size: 14px;
}

.alf-total {
	display: block;
	font-size: 24px;
	font-weight: 700;
}

.alf-cart {
	margin-top: 0;
	padding: 0 20px;
	border: 0;
	background: var(--alf-brass);
	color: var(--alf-ink);
	font-size: 16px;
}

.alf-cart:hover {
	background: #B48428;
}

.alf-cart:disabled {
	background: #4A3626;
	color: #BCAA8E;
	cursor: not-allowed;
}

.alf-status {
	margin-top: 12px;
	font-size: 14px;
}

.alf-status:empty {
	display: none;
}
