.wpsg-preferences {
	display: grid;
	gap: 1rem;
	max-width: 36rem;
}

.wpsg-preferences fieldset {
	border: 1px solid #c5ced8;
	border-radius: 6px;
	padding: 1rem;
	margin: 0;
}

.wpsg-preferences legend {
	font-weight: 700;
	padding: 0 0.25rem;
}

.wpsg-choice {
	display: grid;
	grid-template-columns: 1.125rem minmax(0, 1fr);
	column-gap: 0.6rem;
	align-items: center;
	margin: 0.45rem 0;
	line-height: 1.35;
}

form.wpsg-preferences .wpsg-choice input[type="checkbox"],
form.wpsg-preferences .wpsg-choice input[type="radio"] {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	justify-self: center;
	align-self: center;
}

.wpsg-topics[hidden] {
	display: none;
}

.wpsg-topic-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.15rem 1.25rem;
	font-size: 0.8125rem;
	line-height: 1.3;
}

.wpsg-topic-list .wpsg-choice {
	align-items: start;
	margin: 0.3rem 0;
}

.wpsg-topic-list .wpsg-choice input[type="checkbox"] {
	margin-top: 0.12em;
}

@media (max-width: 40rem) {
	.wpsg-topic-list {
		grid-template-columns: 1fr;
	}
}

.wpsg-unsubscribe-all {
	font-weight: 700;
}

.wpsg-preferences input:disabled {
	cursor: not-allowed;
}

.wpsg-choice:has(input:disabled) {
	opacity: 0.45;
}

.wpsg-preferences input[type="email"],
.wpsg-preferences input[type="text"] {
	display: block;
	width: 100%;
	margin-top: 0.25rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid #4b5563;
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
}

.wpsg-preferences button {
	justify-self: start;
	background: #1d4e89;
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 0.6rem 1rem;
	cursor: pointer;
}

.wpsg-note {
	max-width: 36rem;
	padding: 0.75rem 1rem;
	background: #f4f6f8;
	border: 1px solid #c5ced8;
	border-radius: 6px;
}

.wpsg-saved {
	background: #eef6ee;
	border-color: #8fbf8f;
}

html.dark-skin .wpsg-preferences,
html.dark-skin .wpsg-note {
	color: #f8fafc;
	color-scheme: dark;
}

html.dark-skin .wpsg-preferences fieldset {
	border-color: rgba(255, 255, 255, 0.28);
}

html.dark-skin .wpsg-preferences legend,
html.dark-skin .wpsg-preferences label {
	color: #f2f4f7;
}

html.dark-skin .wpsg-preferences .description {
	color: #d0d5dd;
}

html.dark-skin .wpsg-preferences input[type="email"],
html.dark-skin .wpsg-preferences input[type="text"] {
	background: #1b1c20;
	color: #f8fafc;
	border-color: rgba(255, 255, 255, 0.5);
}

html.dark-skin .wpsg-preferences input[type="checkbox"],
html.dark-skin .wpsg-preferences input[type="radio"] {
	accent-color: #6ba5d6;
}

html.dark-skin .wpsg-preferences button {
	background: #1d4e89;
	color: #fff;
	border: 0;
}

html.dark-skin .wpsg-note {
	background: #1b1c20;
	border-color: rgba(255, 255, 255, 0.28);
}

html.dark-skin .wpsg-saved {
	background: #12301c;
	color: #c6f6d5;
	border-color: #3d8b56;
}
