/**
 * F2 "Vinde Aur" page widget ([neogold_sell_gold]).
 * Palette: chart series/silver #2c5a9e (validated with the dataviz
 * six-checks validator on the light surface), Neogold brand red #630606
 * for gold rows, calculator title, selection and the visit button.
 * Status colors (up/down) always ship with an arrow glyph, never color
 * alone.
 */
.ng-sg {
	--ng-sg-ink: #1c2430;
	--ng-sg-ink-2: #5b6472;
	--ng-sg-ink-3: #8b93a1;
	--ng-sg-line: #e7e4de;
	--ng-sg-surface: #fff;
	--ng-sg-bg: #f7f6f3;
	--ng-sg-series: #2c5a9e;
	--ng-sg-brand: #630606;
	--ng-sg-up: #1c7c43;
	--ng-sg-down: #b3261e;
	--ng-sg-radius: 14px;
	--ng-sg-shadow: 0 1px 2px rgba(28, 36, 48, 0.05), 0 8px 24px -18px rgba(28, 36, 48, 0.35);
	color: var(--ng-sg-ink);
	display: grid;
	/* Own type base: the theme sets html{font-size:62.5%} (10px rem), so
	   rem-based sizes render tiny. 16px + em units keep the widget's
	   scale independent of the theme. */
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	gap: 10px;
	margin: 0 auto;
	max-width: 1080px;
}

.ng-sg *,
.ng-sg *::before,
.ng-sg *::after {
	box-sizing: border-box;
}

.ng-sg__panel {
	background: var(--ng-sg-surface);
	border: 1px solid var(--ng-sg-line);
	border-radius: var(--ng-sg-radius);
	box-shadow: var(--ng-sg-shadow);
}

.ng-sg__empty {
	color: var(--ng-sg-ink-2);
	font-size: 1em;
	margin: 0;
	padding: 24px;
	text-align: center;
}

/* ---------- chart panel ---------- */

.ng-sg__chart-panel {
	padding: 12px 14px 8px;
}

.ng-sg__chart-head {
	align-items: baseline;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.ng-sg__chart-title {
	color: var(--ng-sg-ink-2);
	font-size: 1em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ng-sg__spot {
	white-space: nowrap;
}

.ng-sg__spot strong {
	font-size: 1.5em;
	font-weight: 700;
}

.ng-sg__spot-delta {
	font-size: 1em;
	font-weight: 600;
	margin-left: 4px;
}

.ng-sg__spot-delta.is-up {
	color: var(--ng-sg-up);
}

.ng-sg__spot-delta.is-down {
	color: var(--ng-sg-down);
}

.ng-sg__chart {
	margin-top: 8px;
	position: relative;
}

.ng-sg__chart svg {
	display: block;
	height: auto;
	width: 100%;
}

.ng-sg__chart-wait {
	color: var(--ng-sg-ink-3);
	font-size: 0.85em;
	margin: 0;
	padding: 40px 0;
	text-align: center;
}

.ng-sg__chart-grid {
	stroke: var(--ng-sg-line);
	stroke-width: 1;
}

.ng-sg__chart-axis {
	fill: var(--ng-sg-ink-3);
	font-size: 13px;
}

.ng-sg__chart-line {
	fill: none;
	stroke: var(--ng-sg-series);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.ng-sg__chart-area {
	fill: var(--ng-sg-series);
	opacity: 0.06;
}

.ng-sg__chart-dot {
	fill: var(--ng-sg-series);
	stroke: var(--ng-sg-surface);
	stroke-width: 1.5;
}

.ng-sg__chart-live {
	fill: var(--ng-sg-series);
}

.ng-sg__chart-pulse {
	animation: ng-sg-pulse 2.4s ease-out infinite;
	fill: none;
	stroke: var(--ng-sg-series);
	stroke-width: 1.5;
	transform-box: fill-box;
	transform-origin: center;
}

.ng-sg__crosshair {
	stroke: var(--ng-sg-ink-3);
	stroke-dasharray: 3 3;
	stroke-width: 1;
}

.ng-sg__tooltip {
	background: var(--ng-sg-surface);
	border: 1px solid var(--ng-sg-line);
	border-radius: 8px;
	box-shadow: var(--ng-sg-shadow);
	font-size: 0.95em;
	left: 0;
	padding: 6px 10px;
	pointer-events: none;
	position: absolute;
	top: 0;
	transform: translate(-50%, -110%);
	visibility: hidden;
	white-space: nowrap;
	z-index: 2;
}

.ng-sg__tooltip strong {
	font-weight: 700;
}

.ng-sg__tooltip-time {
	color: var(--ng-sg-ink-2);
	margin-right: 6px;
}

.ng-sg__chart-meta {
	color: var(--ng-sg-ink-2);
	display: flex;
	font-size: 0.92em;
	justify-content: space-between;
	margin-top: 6px;
}

.ng-sg__live {
	align-items: center;
	display: inline-flex;
	gap: 5px;
}

.ng-sg__live-dot {
	animation: ng-sg-blink 2.4s ease-in-out infinite;
	background: var(--ng-sg-up);
	border-radius: 50%;
	display: inline-block;
	height: 7px;
	width: 7px;
}

/* ---------- purity cards ---------- */

.ng-sg__cards {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.ng-sg-card {
	background: var(--ng-sg-surface);
	border: 1px solid var(--ng-sg-line);
	border-radius: var(--ng-sg-radius);
	box-shadow: var(--ng-sg-shadow);
	cursor: pointer;
	display: grid;
	font: inherit;
	gap: 10px;
	margin: 0;
	padding: 16px 18px;
	text-align: left;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ng-sg-card:hover {
	border-color: var(--ng-sg-series);
	transform: translateY(-1px);
}

.ng-sg-card:focus-visible {
	outline: 2px solid var(--ng-sg-series);
	outline-offset: 2px;
}

.ng-sg-card[aria-pressed="true"] {
	border-color: var(--ng-sg-brand);
	box-shadow: inset 0 0 0 1px var(--ng-sg-brand), var(--ng-sg-shadow);
}

.ng-sg-card__head {
	align-items: baseline;
	display: flex;
	justify-content: space-between;
}

.ng-sg-card__title {
	color: var(--ng-sg-brand);
	font-size: 1.35em;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.ng-sg-card[data-metal="silver"] .ng-sg-card__title {
	color: var(--ng-sg-series);
}

.ng-sg-card[aria-pressed="true"] .ng-sg-card__title::after {
	content: " ✓";
}

.ng-sg-card__unit {
	color: var(--ng-sg-ink-2);
	font-size: 0.95em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ng-sg-card__price {
	align-items: baseline;
	display: flex;
	gap: 5px;
}

.ng-sg-card__value {
	font-size: 2.3em;
	font-weight: 800;
	line-height: 1;
}

.ng-sg-card__value.is-up,
.ng-sg-card__trend.is-up {
	color: var(--ng-sg-up);
}

.ng-sg-card__value.is-down,
.ng-sg-card__trend.is-down {
	color: var(--ng-sg-down);
}

.ng-sg-card__value.is-up,
.ng-sg-card__value.is-down {
	transition: color 1.6s ease 1.4s;
}

.ng-sg-card__cur {
	color: var(--ng-sg-ink-2);
	font-size: 1.05em;
	font-weight: 600;
}

.ng-sg-card__trend {
	font-size: 1.2em;
}

/* ---------- calculator ---------- */

.ng-sg__calc {
	padding: 12px 14px;
}

.ng-sg__calc-title {
	color: var(--ng-sg-brand);
	font-size: 1.25em;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.ng-sg__calc-body {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 16px 28px;
	justify-content: space-between;
}

.ng-sg__calc-field {
	align-items: center;
	display: inline-flex;
	gap: 12px;
}

.ng-sg__calc-label {
	color: var(--ng-sg-ink-2);
	font-size: 1.15em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ng-sg__calc-input {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.ng-sg__calc-input input {
	border: 1px solid var(--ng-sg-line);
	border-radius: 9px;
	color: var(--ng-sg-ink);
	font-size: 1.3em;
	font-weight: 700;
	max-width: 6.5em;
	padding: 6px 9px;
	text-align: right;
}

.ng-sg__calc-input input:focus-visible {
	border-color: var(--ng-sg-series);
	outline: 2px solid var(--ng-sg-series);
	outline-offset: 1px;
}

.ng-sg__calc-unit {
	color: var(--ng-sg-ink-2);
	font-size: 1.15em;
	font-weight: 600;
}

.ng-sg__calc-total {
	align-items: baseline;
	display: inline-flex;
	gap: 14px;
}

.ng-sg__calc-amount {
	align-items: baseline;
	display: inline-flex;
	gap: 6px;
}

.ng-sg__calc-amount output {
	font-size: 2.3em;
	font-weight: 800;
	line-height: 1;
}

.ng-sg__calc-cur {
	color: var(--ng-sg-ink-2);
	font-size: 1em;
	font-weight: 700;
}

.ng-sg__calc-note {
	color: var(--ng-sg-ink-2);
	font-size: 1em;
	margin: 10px 0 0;
}

/* ---------- visit scheduler (Calendly) ---------- */

.ng-sg__visit {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	justify-content: space-between;
	padding: 16px 18px;
}

.ng-sg__visit-title {
	color: var(--ng-sg-ink);
	font-size: 1.25em;
	font-weight: 800;
	margin: 0;
}

.ng-sg__visit-sub {
	color: var(--ng-sg-ink-2);
	font-size: 1em;
	margin: 4px 0 0;
}

.ng-sg__visit-btn {
	background: var(--ng-sg-brand);
	border: 0;
	border-radius: 12px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 1.1em;
	font-weight: 700;
	padding: 13px 26px;
	transition: background 0.15s ease, transform 0.15s ease;
	white-space: nowrap;
}

.ng-sg__visit-btn:hover {
	background: #7a1212;
	transform: translateY(-1px);
}

.ng-sg__visit-btn:focus-visible {
	outline: 2px solid var(--ng-sg-brand);
	outline-offset: 2px;
}

.ng-sg__visit-btn.is-loading {
	cursor: progress;
	opacity: 0.7;
}

/* ---------- animations & responsive ---------- */

@keyframes ng-sg-pulse {
	0% {
		opacity: 0.9;
		transform: scale(1);
	}

	70% {
		opacity: 0;
		transform: scale(3);
	}

	100% {
		opacity: 0;
		transform: scale(3);
	}
}

@keyframes ng-sg-blink {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ng-sg__chart-pulse,
	.ng-sg__live-dot {
		animation: none;
	}

	.ng-sg-card,
	.ng-sg-card__value {
		transition: none;
	}
}

@media (max-width: 480px) {
	.ng-sg__cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.ng-sg__calc-body {
		align-items: flex-start;
		flex-direction: column;
	}

	.ng-sg__calc-total {
		width: 100%;
		justify-content: space-between;
	}

	.ng-sg__visit-btn {
		width: 100%;
	}
}
