.twd-plate {
	--plate-ink: #202020;
	--plate-red: #b5202e;
	--plate-line: #dfddda;
	--plate-rose: #fbefec;
	color: var(--plate-ink);
	margin: 1.5rem 0 2rem;
}
.twd-plate [hidden] { display: none !important; }
.twd-plate * { box-sizing: border-box; }
.twd-plate__layout {
	display: grid;
	grid-template:
		"modes result" auto
		"setup result" 1fr / minmax(0, 1fr) minmax(0, 1.12fr);
	gap: 14px;
	align-items: start;
}
.twd-plate__modes, .twd-plate__units {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.twd-plate__modes { flex-wrap: nowrap; grid-area: modes; }
.twd-plate button {
	background: #fff;
	border: 1px solid #9a9690;
	border-radius: 4px;
	color: var(--plate-ink);
	cursor: pointer;
	font: inherit;
	font-size: .875rem;
	font-weight: 700;
	min-height: 44px;
	padding: 6px 11px;
}
.twd-plate button[aria-pressed="true"] {
	background: var(--plate-rose);
	border-color: var(--plate-red);
	color: var(--plate-red);
}
.twd-plate :is(button, input, select, summary):focus-visible {
	outline: 2px solid var(--plate-red);
	outline-offset: 2px;
}
.twd-plate__setup {
	background: #fff;
	border: 1px solid var(--plate-line);
	border-radius: 4px;
	grid-area: setup;
	padding: 16px;
}
.twd-plate__setup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}
.twd-plate .twd-plate__setup-header h2 {
	color: var(--plate-ink);
	font-size: 1.125rem;
	line-height: 1.25;
	margin: 0;
}
.twd-plate__fields, .twd-plate__plate-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.twd-plate label { display: block; font-size: .8125rem; font-weight: 650; }
.twd-plate :is(input, select) {
	background: #fff;
	border: 1px solid #9a9690;
	border-radius: 4px;
	color: var(--plate-ink);
	display: block;
	font: inherit;
	font-size: 1rem;
	margin: 4px 0 0;
	min-height: 44px;
	min-width: 0;
	padding: 6px 8px;
	width: 100%;
}
.twd-plate__options { border-top: 1px solid var(--plate-line); margin-top: 14px; }
.twd-plate__options summary {
	cursor: pointer;
	font-size: .875rem;
	font-weight: 700;
	padding: 11px 0 3px;
}
.twd-plate__options-content { margin-top: 12px; }
.twd-plate__collars { max-width: 175px; }
.twd-plate .twd-plate__plate-fields { border: 0; margin: 0; min-width: 0; padding: 0; }
.twd-plate__plate-fields legend { font-size: .875rem; font-weight: 700; margin-bottom: 5px; }
.twd-plate .twd-plate__hint { color: #575451; font-size: .8125rem; line-height: 1.4; margin: 0 0 7px; }
.twd-plate__result {
	background: #202022;
	border-radius: 4px;
	color: #fbf8f5;
	grid-area: result;
	padding: 16px;
}
.twd-plate__result-top { align-items: flex-start; display: flex; gap: 8px; }
.twd-plate__result-head { flex: 1; min-width: 0; }
.twd-plate__result-head, .twd-plate__breakdown {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: space-between;
}
.twd-plate__eyebrow {
	color: #e3d8d0;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.twd-plate__weight {
	color: #fbf8f5;
	font-size: clamp(1.8rem, 4vw, 2.7rem);
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	letter-spacing: -.045em;
	line-height: 1.12;
	overflow-wrap: anywhere;
}
.twd-plate__weight small { color: #f6b3b7; font-size: .5em; letter-spacing: 0; }
.twd-plate__badge {
	background: #432b2f;
	border-radius: 4px;
	color: #ffd0d3;
	font-size: .75rem;
	font-weight: 750;
	padding: 4px 7px;
}
.twd-plate__barbell {
	display: block;
	height: auto;
	margin: 7px auto;
	max-height: 115px;
	width: 100%;
}
.twd-plate__breakdown { border-top: 1px solid #615a5a; font-size: .875rem; padding-top: 10px; }
.twd-plate .twd-plate__breakdown ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.twd-plate .twd-plate__breakdown li {
	background: #39383a;
	border-radius: 3px;
	font-size: .8125rem;
	font-weight: 700;
	margin: 0;
	padding: 3px 6px;
}
.twd-plate .twd-plate__breakdown .twd-plate__removable { padding: 0; }
.twd-plate__result :is(.twd-plate__removable button, .twd-plate__disc, .twd-plate__actions button) {
	background: #303033;
	border-color: #6b6768;
	color: #fbf8f5;
}
.twd-plate__result :is(.twd-plate__removable button, .twd-plate__disc, .twd-plate__actions button):hover {
	background: #414043;
}
.twd-plate__result :is(.twd-plate__removable button, .twd-plate__disc, .twd-plate__actions button):focus-visible {
	outline-color: #f6b3b7;
}
.twd-plate__removable button { font-size: .8125rem; padding-inline: 8px; }
.twd-plate__removable button span { color: #f6b3b7; margin-left: 2px; }
.twd-plate__picker { border: 0; margin: 16px 0 0; min-width: 0; padding: 0; }
.twd-plate__picker legend { color: #fbf8f5; font-size: .875rem; font-weight: 750; padding: 0; }
.twd-plate .twd-plate__picker p { color: #e6d9d1; font-size: .8125rem; line-height: 1.4; margin: 4px 0 8px; }
.twd-plate__disc-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 5px;
}
.twd-plate .twd-plate__disc {
	align-items: center;
	display: flex;
	flex-direction: column;
	font-size: .75rem;
	gap: 3px;
	justify-content: center;
	line-height: 1.2;
	padding: 6px 2px;
}
.twd-plate__disc-icon {
	background: var(--disc-color);
	border: 1px solid #ffffff40;
	border-radius: 50%;
	display: grid;
	height: 24px;
	place-items: center;
	width: 24px;
}
.twd-plate__disc-icon::after {
	background: #303033;
	border: 1px solid #ffffff55;
	border-radius: 50%;
	content: '';
	height: 8px;
	width: 8px;
}
.twd-plate__result button[aria-disabled="true"] { cursor: default; opacity: .65; }
.twd-plate__actions { display: flex; flex: none; gap: 6px; margin-inline-start: auto; }
.twd-plate .twd-plate__actions button { font-size: .8125rem; }
.twd-plate__actions [data-undo-plate] { display: grid; min-width: 44px; place-items: center; }
.twd-plate .twd-plate__result-note, .twd-plate .twd-plate__difference, .twd-plate .twd-plate__error {
	color: #e6d9d1;
	font-size: .8125rem;
	line-height: 1.45;
	margin: 8px 0 0;
}
.twd-plate .twd-plate__error { margin: 8px 0 0; }
@media (max-width: 650px) {
	.twd-plate__layout { grid-template: "modes" "setup" "result" / minmax(0, 1fr); }
	.twd-plate__modes { flex-wrap: wrap; }
}
@media (max-width: 355px) {
	.twd-plate__fields { grid-template-columns: 1fr; }
}
