/**
 * FLUXX — the size guide page.
 *
 * The client's design, in the theme's type and colour: a tailor's worksheet.
 * Tape-measure yellow marks every measurement — the one colour on the page that
 * is not the brand's, kept because it is the idea the whole layout hangs on —
 * and ink marks the garment.
 *
 * Reads tokens.css. Loaded on the size guide only (inc/size-guide.php).
 */

.fx-sg {
	--fx-sg-tape: #E3A700;
	--fx-sg-tape-line: #B77E00;
	--fx-sg-tape-soft: #FBF0C9;
	--fx-sg-on-tape: var(--fx-ink);
}

.fx-sg__head {
	max-width: 960px;
}

.fx-sg__eyebrow {
	color: var(--fx-text-muted);
	margin-top: 8px;
}

.fx-sg__lede {
	max-width: 56ch;
	margin-top: 14px;
	color: var(--fx-text-muted);
}

.fx-sg__intro {
	margin-bottom: 32px;
}

.fx-sg__body {
	display: grid;
	gap: 64px;
	max-width: 960px;
	margin-top: 32px;
}

.fx-sg__sub {
	max-width: 60ch;
	margin: 0 0 20px;
	color: var(--fx-text-muted);
}

.fx-sg__hint {
	margin: 14px 0 0;
	font-size: 14px;
	color: var(--fx-text-muted);
}

.fx-sg__foot {
	padding-top: 16px;
	border-top: 1px solid var(--fx-border);
	font-size: 14px;
	color: var(--fx-text-muted);
}

/* ----------------------------------------------------------------- steps */

.fx-sg-step {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.fx-sg-step__n {
	min-width: 34px;
	padding: 5px 10px;
	border-radius: var(--fx-radius-badge);
	background: var(--fx-sg-tape);
	color: var(--fx-sg-on-tape);
	font-size: 18px;
	font-weight: var(--fx-weight-bold);
	line-height: 1;
	text-align: center;
}

/* ----------------------------------------------------------------- cards */

.fx-sg-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}

.fx-sg-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
	padding: 20px;
	border: 1px solid var(--fx-border-strong);
	background: var(--fx-paper);
}

.fx-sg-card p {
	margin: 0;
	color: var(--fx-text-muted);
}

.fx-sg-card .fx-sg-card__lead {
	color: var(--fx-ink);
}

.fx-sg-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.fx-sg-tag {
	padding: 4px 6px;
	border: 1px solid var(--fx-ink);
	border-radius: var(--fx-radius-badge);
	font-size: 11px;
	font-weight: var(--fx-weight-bold);
	letter-spacing: var(--fx-tracking-badge);
	text-transform: uppercase;
}

.fx-sg-how {
	display: grid;
	gap: 8px;
	margin: 0;
	padding-left: 20px;
}

.fx-sg-how li::marker {
	font-weight: var(--fx-weight-bold);
	color: var(--fx-sg-tape-line);
}

/* --------------------------------------------------------- illustrations */

.fx-sg svg {
	display: block;
	width: 100%;
	max-width: 340px;
	height: auto;
	margin-inline: auto;
}

.fx-sg .o { fill: var(--fx-surface); stroke: var(--fx-ink); stroke-width: 1.5; stroke-linejoin: round; }
.fx-sg .ring-body { fill: var(--fx-sg-tape-soft); stroke: var(--fx-ink); stroke-width: 1.5; }
.fx-sg .seam { fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-dasharray: 4 3; }
.fx-sg .dot { fill: var(--fx-ink); }
.fx-sg .dim { fill: none; stroke: var(--fx-sg-tape-line); stroke-width: 3; stroke-linecap: round; }
.fx-sg .tape { fill: none; stroke: var(--fx-sg-tape-line); stroke-width: 9; stroke-linecap: round; }
.fx-sg .tape-back { fill: none; stroke: var(--fx-sg-tape-line); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 8; opacity: .9; }
.fx-sg .lead { fill: none; stroke: var(--fx-text-muted); stroke-width: 1; }
.fx-sg .t { font: 500 13px var(--fx-font); fill: var(--fx-ink); }
.fx-sg .tm { font: 400 12px var(--fx-font); fill: var(--fx-text-muted); }
.fx-sg .tb { font: 700 16px var(--fx-font); fill: var(--fx-ink); }
.fx-sg .ring-reg { fill: none; stroke: var(--fx-ink); stroke-width: 2; }
.fx-sg .ring-rel { fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-dasharray: 6 4; }

.fx-sg-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	font-size: 14px;
	color: var(--fx-text-muted);
}

.fx-sg-legend span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.fx-sg-legend__sw {
	display: inline-block;
	width: 22px;
	height: 0;
	border-top: 2px solid var(--fx-ink);
}

.fx-sg-legend__sw--dash {
	border-top-style: dashed;
}

.fx-sg-legend__sw--fill {
	width: 14px;
	height: 14px;
	border: 1.5px solid var(--fx-ink);
	border-radius: var(--fx-radius-round);
	background: var(--fx-sg-tape-soft);
}

/* ---------------------------------------------------------------- finder */

.fx-sg-finder {
	display: grid;
	gap: 20px;
	padding: 24px;
	border: 1px solid var(--fx-border-strong);
	background: var(--fx-sand);
}

.fx-sg-finder__controls {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	align-items: start;
}

.fx-sg-finder__field label,
.fx-sg-finder__pref legend {
	display: block;
	margin-bottom: 8px;
	padding: 0;
	font-size: 12px;
	letter-spacing: var(--fx-tracking-nav);
	text-transform: uppercase;
	color: var(--fx-text-muted);
}

.fx-sg-finder__field input {
	width: 100%;
	height: var(--fx-control-cta);
	padding: 0 14px;
	border: 1px solid var(--fx-border-control);
	background: var(--fx-paper);
	color: var(--fx-ink);
	font-size: 26px;
	font-weight: var(--fx-weight-bold);
	font-variant-numeric: tabular-nums;
}

.fx-sg-finder__error {
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--fx-danger);
}

.fx-sg-finder__pref {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.fx-sg-finder__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fx-sg-finder__options input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.fx-sg-finder__options label {
	display: inline-flex;
	align-items: center;
	height: var(--fx-control-md);
	padding: 0 14px;
	border: 1px solid var(--fx-border-control);
	background: var(--fx-paper);
	font-size: 14px;
	cursor: pointer;
}

.fx-sg-finder__options input:checked + label {
	border-color: var(--fx-ink);
	background: var(--fx-ink);
	color: var(--fx-text-on-dark);
}

.fx-sg-finder__options input:focus-visible + label,
.fx-sg-finder__field input:focus-visible {
	outline: 2px solid var(--fx-ink);
	outline-offset: 2px;
}

.fx-sg-finder__results {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.fx-sg-result {
	display: grid;
	gap: 4px;
	padding: 16px 18px;
	border: 1px solid var(--fx-border-strong);
	background: var(--fx-paper);
}

.fx-sg-result p {
	margin: 0;
}

.fx-sg-result__fit {
	font-size: 12px;
	letter-spacing: var(--fx-tracking-nav);
	text-transform: uppercase;
	color: var(--fx-text-muted);
}

.fx-sg-result__size {
	font-size: 56px;
	font-weight: var(--fx-weight-bold);
	line-height: 1;
}

.fx-sg-result__detail {
	font-variant-numeric: tabular-nums;
}

.fx-sg-result__pieces,
.fx-sg-result__note {
	font-size: 14px;
	color: var(--fx-text-muted);
}

/* ---------------------------------------------------------------- charts */

.fx-sg-tables {
	display: grid;
	gap: 36px;
}

.fx-sg-table {
	overflow-x: auto;
}

.fx-sg-table table {
	width: 100%;
	min-width: 420px;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.fx-sg-table caption {
	padding-bottom: 10px;
	text-align: left;
}

.fx-sg-table__title {
	display: block;
	font-size: 20px;
	font-weight: var(--fx-weight-bold);
	text-transform: uppercase;
}

.fx-sg-table__pieces {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	color: var(--fx-text-muted);
}

.fx-sg-table th,
.fx-sg-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--fx-border-strong);
	text-align: left;
}

.fx-sg-table thead th {
	border-bottom: 2px solid var(--fx-ink);
	font-size: 12px;
	font-weight: var(--fx-weight-regular);
	letter-spacing: var(--fx-tracking-nav);
	text-transform: uppercase;
	color: var(--fx-text-muted);
}

.fx-sg-table tbody th {
	font-size: 18px;
	font-weight: var(--fx-weight-bold);
}

.fx-sg-table tr.is-model {
	background: var(--fx-sg-tape-soft);
}

.fx-sg-badge {
	margin-left: 8px;
	padding: 3px 5px;
	border-radius: var(--fx-radius-badge);
	background: var(--fx-sg-tape);
	color: var(--fx-sg-on-tape);
	font-size: 10px;
	font-weight: var(--fx-weight-bold);
	letter-spacing: var(--fx-tracking-badge);
	text-transform: uppercase;
	vertical-align: middle;
}

/* ----------------------------------------------------------------- notes */

.fx-sg-notes {
	display: grid;
	gap: 12px 32px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--fx-border);
}

.fx-sg-notes p {
	margin: 0;
	font-size: 15px;
	color: var(--fx-text-muted);
}

.fx-sg-notes strong {
	display: block;
	color: var(--fx-ink);
}

@media print {
	.fx-sg__body { gap: 32px; }
	.fx-sg section, .fx-sg-card, .fx-sg-finder, .fx-sg-table { break-inside: avoid; }
}
