/*
 * Suwarna Gold Rates: card styles.
 * Self contained, no framework. The card inherits the host theme's
 * font and uses neutral colours that sit well on most themes.
 * Themes: light, dark, and auto (follows the visitor's device).
 */

.sgr-card {
	--sgr-bg: #ffffff;
	--sgr-border: #e3ddcf;
	--sgr-text: #26241f;
	--sgr-muted: #6f6a5e;
	--sgr-accent: #9a7b1c;
	--sgr-row-border: #f0ebdd;

	box-sizing: border-box;
	max-width: 420px;
	margin: 0 0 1em;
	padding: 16px 18px 12px;
	background: var(--sgr-bg);
	border: 1px solid var(--sgr-border);
	border-radius: 12px;
	color: var(--sgr-text);
	font-family: inherit;
	line-height: 1.45;
}

.sgr-card *,
.sgr-card *::before,
.sgr-card *::after {
	box-sizing: inherit;
}

.sgr-theme-dark {
	--sgr-bg: #1d1b16;
	--sgr-border: #3d382c;
	--sgr-text: #f2eee2;
	--sgr-muted: #b3ac9a;
	--sgr-accent: #d9b64a;
	--sgr-row-border: #35311f;
}

@media (prefers-color-scheme: dark) {
	.sgr-theme-auto {
		--sgr-bg: #1d1b16;
		--sgr-border: #3d382c;
		--sgr-text: #f2eee2;
		--sgr-muted: #b3ac9a;
		--sgr-accent: #d9b64a;
		--sgr-row-border: #35311f;
	}
}

.sgr-title {
	margin: 0 0 10px;
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--sgr-text);
}

.sgr-rows {
	border-top: 1px solid var(--sgr-row-border);
}

.sgr-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid var(--sgr-row-border);
}

.sgr-name {
	font-weight: 600;
}

.sgr-unit {
	font-weight: 400;
	font-size: 0.85em;
	color: var(--sgr-muted);
}

.sgr-value {
	font-weight: 700;
	font-size: 1.12em;
	color: var(--sgr-accent);
	white-space: nowrap;
}

.sgr-date {
	margin-top: 10px;
	font-size: 0.85em;
	color: var(--sgr-muted);
}

.sgr-note {
	margin: 0 0 8px;
	color: var(--sgr-muted);
}

.sgr-foot {
	margin-top: 6px;
	font-size: 0.82em;
	color: var(--sgr-muted);
}

.sgr-foot a {
	color: var(--sgr-accent);
	text-decoration: underline;
}
