.rghp-card {
	display: grid;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 18px;
	border: 1px solid #d8dde3;
	border-radius: 8px;
	padding: 16px;
	background: #fff;
	color: #202124;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rghp-header {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
}

.rghp-header-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	margin-left: auto;
}

.rghp-header h2 {
	margin: 0;
	color: #1f2933;
	font-size: 20px;
	line-height: 1.2;
}

.rghp-title-toggle {
	border: 0;
	padding: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 900;
	text-align: left;
	cursor: pointer;
}

.rghp-title-toggle::after {
	content: "+";
	display: inline-block;
	margin-left: 8px;
	color: #52616f;
	font-weight: 900;
}

.rghp-card:not(.is-collapsed) .rghp-title-toggle::after {
	content: "-";
}

.rghp-collapsible-body[hidden] {
	display: none;
}

.rghp-card.is-collapsed .rghp-header p {
	display: none;
}

.rghp-header p,
.rghp-login-cta {
	margin: 6px 0 0;
	color: #52616f;
	font-size: 13px;
	font-weight: 700;
}

.rghp-login-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0;
	border-left: 4px solid #246b5f;
	padding: 10px 12px;
	background: #eef8f6;
}

.rghp-login-cta a {
	color: #246b5f;
	font-weight: 900;
	text-decoration: none;
}

.rghp-form {
	display: grid;
	gap: 12px;
}

.rghp-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.rghp-field {
	display: grid;
	gap: 6px;
	min-width: 0;
	color: #1f2933;
	font-size: 13px;
	font-weight: 800;
}

.rghp-field input,
.rghp-field select {
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	border: 1px solid #c8d0d8;
	border-radius: 6px;
	padding: 8px 10px;
	background: #fff;
	color: #202124;
	font: inherit;
}

.rghp-field input[type="range"] {
	min-height: 24px;
	padding: 0;
}

.rghp-gender-labels,
.rghp-unit-field,
.rghp-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.rghp-gender-labels {
	justify-content: space-between;
	color: #52616f;
	font-size: 12px;
}

.rghp-unit-field input {
	min-width: 0;
}

.rghp-unit-field select {
	width: 88px;
	flex: 0 0 88px;
}

.rghp-button {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border: 1px solid #1f2933;
	border-radius: 6px;
	padding: 8px 14px;
	background: #fff;
	color: #1f2933;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
}

.rghp-card button,
.rghp-settings-entry button,
.rghp-card a.rghp-button,
.rghp-settings-entry a.rghp-button,
.rghp-button {
	text-decoration: none !important;
}

.rghp-button:visited,
.rghp-button:hover,
.rghp-button:focus,
.rghp-button:active {
	text-decoration: none !important;
}

.rghp-button-primary {
	border-color: #246b5f;
	background: #246b5f;
	color: #fff;
}

.rghp-button-secondary {
	background: #fff;
	color: #1f2933;
}

.rghp-button:disabled {
	cursor: default;
	opacity: 0.65;
}

.rghp-message {
	color: #52616f;
	font-size: 13px;
	font-weight: 800;
}

.rghp-message.is-success {
	color: #246b5f;
}

.rghp-message.is-error {
	color: #b42318;
}

.rghp-settings-entry {
	margin: 0 0 18px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rghp-modal[hidden] {
	display: none;
}

.rghp-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 20px;
}

.rghp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.5);
}

.rghp-modal-panel {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 14px;
	box-sizing: border-box;
	width: min(760px, calc(100vw - 32px));
	max-height: min(820px, calc(100vh - 32px));
	overflow: auto;
	border: 1px solid #d8dde3;
	border-radius: 8px;
	padding: 18px;
	background: #fff;
	color: #202124;
}

.rghp-modal-header {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
}

.rghp-modal-header h2,
.rghp-modal-copy {
	margin: 0;
}

.rghp-modal-header button {
	min-height: 36px;
	border: 1px solid #1f2933;
	border-radius: 6px;
	background: #fff;
	color: #1f2933;
	font-weight: 800;
	cursor: pointer;
}

.rghp-modal-copy {
	color: #52616f;
	font-size: 13px;
	font-weight: 700;
}

.rghp-modal-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rghp-field-wide {
	grid-column: 1 / -1;
}

.rghp-field textarea {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid #c8d0d8;
	border-radius: 6px;
	padding: 8px 10px;
	background: #fff;
	color: #202124;
	font: inherit;
	resize: vertical;
}

body.rghp-modal-open {
	overflow: hidden;
}

@media (max-width: 820px) {
	.rghp-header,
	.rghp-login-cta,
	.rghp-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.rghp-header-actions {
		justify-content: stretch;
		margin-left: 0;
	}

	.rghp-grid {
		grid-template-columns: 1fr;
	}

	.rghp-field-wide {
		grid-column: auto;
	}
}
