/* Shared compare page styles — used by /gold/compare-gold-prices/ and /best-silver-prices. */
:root {
	--cg-ink: #1a1d23;
	--cg-muted: #6b7280;
	--cg-line: #e6e8ec;
	--cg-accent: #337ab7;
	--cg-green: #16a34a;
	--cg-green-bg: #eafaf0;
	--cg-radius: 14px;
}

.cg-page { margin-top: 20px; }

.cg-browse {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 14px 0 30px;
}
.cg-browse a {
	background: #fff;
	border: 1px solid var(--cg-line);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	text-decoration: none;
}
.cg-browse a:hover,
.cg-browse a:focus {
	border-color: var(--cg-accent);
	color: var(--cg-accent);
	text-decoration: none;
}

.cg-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-bottom: 14px;
}
.cg-cards--three {
	grid-template-columns: repeat(3, 1fr);
}
.cg-cards--four {
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1100px) {
	.cg-cards--four { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
	.cg-cards,
	.cg-cards--three,
	.cg-cards--four { grid-template-columns: 1fr; }
}

.cg-card {
	background: #fff;
	border: 1px solid var(--cg-accent);
	border-radius: var(--cg-radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(51, 122, 183, .12);
}
.cg-card h2 {
	font-size: 18px;
	margin: 0;
	padding: 18px 20px;
	border-bottom: 1px solid var(--cg-line);
}

.cg-sortbar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 20px;
	border-bottom: 1px solid var(--cg-line);
	font-size: 13px;
	color: var(--cg-muted);
}
.cg-sortbar .cg-sort-label { font-weight: 600; }
.cg-sortbar button {
	background: none;
	border: none;
	font: inherit;
	cursor: pointer;
	color: var(--cg-muted);
	font-weight: 600;
	padding: 2px 0;
}
.cg-sortbar button.active,
.cg-sortbar button:hover,
.cg-sortbar button:focus {
	color: var(--cg-accent);
	outline: 2px solid var(--cg-accent);
	outline-offset: 2px;
}

.cg-card-row {
	display: grid;
	grid-template-columns: 30px 46px 1fr auto 22px;
	align-items: center;
	gap: 12px;
	padding: 13px 20px;
	border-bottom: 1px solid #f1f2f4;
}
.cg-card-row:last-child { border-bottom: none; }

.cg-rank {
	color: #9aa1ab;
	font-weight: 600;
	font-size: 15px;
	text-align: center;
}
.cg-thumb img {
	width: 42px;
	height: 42px;
	object-fit: contain;
	border-radius: 4px;
}
.cg-pname {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.25;
}
.cg-dealer { color: var(--cg-muted); font-size: 13px; }
.cg-pricewrap { text-align: right; white-space: nowrap; }
.cg-price { font-weight: 700; font-size: 16px; color: var(--cg-accent); }
.cg-prem { font-size: 13px; color: var(--cg-muted); }
.cg-ext {
	color: #c4c8cf;
	font-size: 15px;
	text-align: center;
}
.cg-ext:hover,
.cg-ext:focus { color: var(--cg-accent); }

.cg-card-more {
	display: block;
	text-align: center;
	padding: 14px;
	font-weight: 600;
	font-size: 14px;
	border-top: 1px solid var(--cg-line);
	background: #fafafb;
}
.cg-section-note {
	font-size: 12px;
	color: var(--cg-muted);
	margin: 2px 0 26px;
}

.cg-matrix-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin: 38px 0 6px;
}
.cg-matrix-head h2 { font-size: 22px; margin: 0; }

.cg-matrix-wrap {
	background: #fff;
	border: 1px solid var(--cg-accent);
	border-radius: var(--cg-radius);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: 0 1px 3px rgba(51, 122, 183, .12);
}
.cg-matrix {
	border-collapse: collapse;
	width: 100%;
	min-width: 720px;
	font-size: 14px;
	margin-bottom: 0;
}
.cg-matrix th,
.cg-matrix td {
	padding: 11px 12px;
	text-align: center;
	border-bottom: 1px solid #f1f2f4;
	vertical-align: middle;
}
.cg-matrix thead th {
	background: #fafafb;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #6b7280;
}
.cg-matrix tbody th.cg-dealer-col {
	text-align: left;
	font-weight: 600;
	position: sticky;
	left: 0;
	background: #fff;
	z-index: 2;
	box-shadow: 2px 0 4px rgba(0, 0, 0, .04);
}
.cg-matrix thead th.cg-dealer-col {
	position: sticky;
	left: 0;
	z-index: 3;
	background: #fafafb;
}
.cg-matrix td.cg-best {
	background: var(--cg-green-bg);
	color: var(--cg-green);
	font-weight: 700;
}
.cg-best-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--cg-green);
	margin-left: 4px;
}
.cg-matrix td.cg-na { color: #cbd0d6; }

.cg-legend {
	font-size: 12px;
	color: var(--cg-muted);
	margin: 8px 2px 0;
	display: flex;
	gap: 8px;
	align-items: center;
}
.cg-swatch {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	background: var(--cg-green-bg);
	display: inline-block;
	border: 1px solid #cdeedd;
}

.cg-prose { max-width: 760px; margin: 40px 0 0; }
.cg-prose h2 { font-size: 20px; margin: 26px 0 8px; }
.cg-prose p { color: #374151; margin: 0 0 12px; }
.cg-prose ul { color: #374151; margin: 0 0 12px; padding-left: 1.25rem; }
.cg-prose li { margin-bottom: 6px; }

.cg-intro-framing {
	max-width: 760px;
	margin: 0 0 16px;
	color: #374151;
	font-size: 16px;
	line-height: 1.55;
}

.cg-format-table {
	width: 100%;
	max-width: 560px;
	border-collapse: collapse;
	margin: 12px 0 16px;
	font-size: 14px;
}
.cg-format-table th,
.cg-format-table td {
	border: 1px solid #e6e8ec;
	padding: 8px 10px;
	text-align: left;
}
.cg-format-table th {
	background: #f9fafb;
	font-weight: 700;
	color: #374151;
}

.cg-faq { margin-top: 40px; }
.cg-faq-list { margin: 0; padding: 0; }
.cg-faq-item { margin-bottom: 20px; }
.cg-faq-item dt {
	font-weight: 700;
	color: #1a1d23;
	margin-bottom: 6px;
}
.cg-faq-item dd {
	margin: 0;
	color: #374151;
	line-height: 1.55;
}

.cg-ts {
	font-size: 12px;
	color: #9aa1ab;
	margin-top: 8px;
}

.cg-vendor-icons { white-space: nowrap; }

.cg-metricbar {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	align-items: stretch;
	margin: 0 0 24px;
}
.cg-metricbar--matrix {
	margin: 0 0 16px;
}

.cg-wcard {
	background: #fff;
	border: 1px solid #e6e8ec;
	border-radius: 14px;
	padding: 16px 18px;
	width: 340px;
	max-width: 100%;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	display: flex;
	flex-direction: column;
	flex: 1 1 300px;
}
.cg-wcard-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.cg-wcard-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #374151;
}
.cg-wcard-livedot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #16a34a;
	display: inline-block;
	margin-right: 5px;
	vertical-align: middle;
}
.cg-wcard-chip {
	font-size: 12px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	white-space: nowrap;
}
.cg-wcard-chip--down { background: #fde8e8; color: #dc2626; }
.cg-wcard-chip--up { background: #e7f6ec; color: #16a34a; }
.cg-wcard-chip--flat { background: #eef0f2; color: #4b5563; }
.cg-wcard-chip--tup { background: #fde8e8; color: #dc2626; }
.cg-wcard-chip--tdown { background: #e7f6ec; color: #16a34a; }
.cg-wcard-chip--tvol { background: #fef3e2; color: #b45309; }
.cg-wcard-chip--tstable { background: #eef0f2; color: #4b5563; }

.cg-wcard-sparkline {
	margin: 10px 0 8px;
	width: 100%;
	height: 46px;
	display: block;
	position: relative;
}
.cg-wcard-sparkline canvas {
	display: block;
	width: 100%;
	height: 46px;
}

.cg-wcard-value {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}
.cg-wcard-val {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.5px;
	line-height: 1;
}
.cg-wcard-delta {
	font-size: 13px;
	font-weight: 600;
}
.cg-wcard-delta--down { color: #dc2626; }
.cg-wcard-delta--up { color: #16a34a; }
.cg-wcard-delta--flat { color: #6b7280; }
.cg-wcard-delta--acc { color: #c2410c; }

.cg-wcard-stats {
	display: flex;
	gap: 14px;
	margin-top: 11px;
	padding-top: 11px;
	border-top: 1px solid #f1f2f4;
	font-size: 12px;
	color: #6b7280;
	flex-wrap: wrap;
}
.cg-wcard-stats b {
	display: block;
	color: #1a1d23;
	font-size: 13px;
	font-weight: 700;
	margin-top: 1px;
}

.cg-wcard-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 11px;
	gap: 8px;
	flex-wrap: wrap;
}
.cg-wcard-ts {
	font-size: 11px;
	color: #9aa1ab;
}
.cg-wcard-link {
	font-size: 12px;
	font-weight: 600;
	color: #c2410c;
	text-decoration: none;
}
.cg-wcard-link:hover {
	text-decoration: underline;
}

@media (max-width: 767px) {
	.cg-wcard {
		width: 100%;
		flex-basis: 100%;
	}
}

.cg-page .spot-sponsor-strip-row {
	margin: 28px 0 8px;
}
