/*
 * Egypt Gold Price — public identity layer
 *
 * Load after the Blocksy theme and Gold Country Platform frontend stylesheet.
 * IBM Plex Sans Arabic is served locally from this plugin. No third-party
 * font request is made from the public site.
 */

@font-face {
	font-display: swap;
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 400;
	src: url("fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 600;
	src: url("fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 700 900;
	src: url("fonts/IBMPlexSansArabic-Bold.woff2") format("woff2");
}

:root {
	color-scheme: light;
	--eg-font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
	--eg-ivory: #f7f4ec;
	--eg-ink: #18212b;
	--eg-muted: #5d6670;
	--eg-navy: #123b5d;
	--eg-gold: #8a641a;
	--eg-gold-soft: #f4e8c5;
	--eg-border: #e6e0d3;
	--eg-ink-950: var(--eg-ink);
	--eg-ink-900: #222d38;
	--eg-ink-800: #34414d;
	--eg-ink-700: #4a5662;
	--eg-ink-600: var(--eg-muted);
	--eg-paper: var(--eg-ivory);
	--eg-surface: #ffffff;
	--eg-surface-soft: #fbfaf7;
	--eg-surface-muted: #f2efe8;
	--eg-gold-700: #6b4b00;
	--eg-gold-600: var(--eg-gold);
	--eg-gold-500: #a47720;
	--eg-gold-300: #d8c188;
	--eg-gold-150: var(--eg-gold-soft);
	--eg-gold-100: #faf3df;
	--eg-line: var(--eg-border);
	--eg-line-strong: #c9c1b2;
	--eg-positive: #1f7a4d;
	--eg-positive-soft: #e8f5ed;
	--eg-negative: #b42318;
	--eg-negative-soft: #fcedeb;
	--eg-warning-bg: #fff3cd;
	--eg-warning-text: #6b4b00;
	--eg-warning: var(--eg-warning-text);
	--eg-warning-soft: var(--eg-warning-bg);
	--eg-info: var(--eg-navy);
	--eg-info-soft: #eaf2f7;
	--eg-focus: var(--eg-navy);
	--eg-radius-sm: 8px;
	--eg-radius-md: 12px;
	--eg-radius-lg: 16px;
	--eg-shadow-sm: 0 2px 10px rgba(24, 33, 43, .05);
	--eg-shadow-card: 0 8px 24px rgba(24, 33, 43, .06);
	--eg-shell: 1180px;
	--eg-content: 1040px;
	--eg-reading: 76ch;
}

html {
	scroll-behavior: smooth;
	text-size-adjust: 100%;
}

body {
	--theme-font-family: var(--eg-font-arabic);
	--theme-form-font-family: var(--eg-font-arabic);
	background: var(--eg-paper);
	color: var(--eg-ink-900);
	font-family: var(--eg-font-arabic);
	font-kerning: normal;
	-webkit-font-smoothing: antialiased;
}

body :where(button, input, select, textarea) {
	font-family: inherit;
}

body :where(h1, h2, h3, h4, h5, h6) {
	color: var(--eg-ink-950);
	font-family: var(--eg-font-arabic);
	font-weight: 750;
	letter-spacing: -.015em;
}

body :where(h1, h2, h3, h4)[id] {
	scroll-margin-block-start: 7rem;
}

body :where(a, button, input, select, textarea, summary):focus-visible {
	border-radius: 4px;
	outline: 3px solid var(--eg-focus);
	outline-offset: 3px;
}

body a {
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
}

body a:hover {
	text-decoration-thickness: .12em;
}

.screen-reader-text:focus,
.skip-link:focus {
	background: var(--eg-surface);
	color: var(--eg-ink-950);
	font-weight: 700;
	inset-block-start: .75rem;
	inset-inline-start: .75rem;
	padding: .75rem 1rem;
	z-index: 100000;
}

/* Blocksy shell: quiet, task-focused header and footer. */
#header.ct-header {
	color: var(--eg-ink-900);
	z-index: 50;
}

#header [data-row*="middle"] {
	background: rgba(255, 255, 255, .98);
	border-block-end: 1px solid var(--eg-line);
	box-shadow: 0 5px 24px rgba(24, 33, 43, .05);
}

#header :where(.ct-container, [class*="ct-container"]) {
	max-width: var(--eg-shell);
}

#header :where(.menu, .mobile-menu) a {
	font-family: var(--eg-font-arabic);
	font-weight: 650;
}

#header .menu > li > a,
#header .ct-header-trigger {
	min-height: 48px;
}

#header .menu > li > a {
	color: var(--eg-ink-800);
}

#header .menu > li > a:hover,
#header .menu > li.current-menu-item > a,
#header .menu > li.current_page_item > a,
#header .menu > li > a[aria-current="page"] {
	color: var(--eg-gold-700);
}

#header .sub-menu {
	background: var(--eg-surface);
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-md);
	box-shadow: var(--eg-shadow-card);
}

#offcanvas .ct-panel-inner {
	background: var(--eg-surface);
}

#offcanvas .mobile-menu a {
	color: var(--eg-ink-900);
	min-height: 48px;
}

.ct-footer {
	background: var(--eg-ink-950);
	color: #e9edf1;
	margin-block-start: clamp(3rem, 7vw, 6rem);
}

.ct-footer [data-row] {
	background: transparent;
	border-color: rgba(255, 255, 255, .12);
}

.ct-footer :where(.ct-container, [class*="ct-container"]) {
	max-width: var(--eg-shell);
}

.ct-footer :where(h2, h3, h4, .widget-title) {
	color: #ffffff;
}

.ct-footer :where(p, li) {
	color: #cbd2d9;
	line-height: 1.8;
}

.ct-footer a {
	color: #f2d99b;
}

.ct-footer a:hover,
.ct-footer a:focus-visible {
	color: #ffffff;
}

/* Reusable HTML wordmark. The mark can contain text, an SVG, or an image. */
.eg-brand,
.eg-brand__link,
.eg-brand-link,
.eg-gold-identity__link {
	align-items: center;
	display: inline-flex;
	gap: .75rem;
	min-width: 0;
}

/* Blocksy builds its logo markup without calling get_custom_logo(). The
 * plugin therefore replaces only the inner attachment output while Blocksy
 * keeps the safe home link and wrapper. */
.site-logo-container:has(.eg-gold-identity__link) {
	height: auto;
	line-height: normal;
	max-width: min(310px, 40vw);
	text-decoration: none;
}

.site-logo-container .eg-gold-identity__link {
	display: inline-flex;
	max-width: 100%;
}

.eg-gold-identity-active .site-branding > .site-title-container {
	display: none;
}

.eg-brand__link,
.eg-brand-link,
.eg-gold-identity__link {
	color: inherit;
	text-decoration: none;
}

.eg-brand__mark,
.eg-brand-mark,
.eg-brand-logo,
.eg-gold-identity__mark {
	align-items: center;
	background: var(--eg-ivory);
	border: 1px solid var(--eg-gold-300);
	border-radius: 14px;
	box-shadow: 0 2px 8px rgba(24, 33, 43, .05);
	color: var(--eg-gold);
	display: inline-flex;
	flex: 0 0 46px;
	font-size: 1.05rem;
	font-weight: 800;
	height: 46px;
	isolation: isolate;
	justify-content: center;
	line-height: 1;
	overflow: hidden;
	position: relative;
	width: 46px;
}

.eg-brand__mark::after,
.eg-brand-mark::after,
.eg-brand-logo::after {
	border: 1px solid rgba(242, 217, 155, .42);
	border-radius: 50%;
	content: "";
	height: 21px;
	inset-block-end: -8px;
	inset-inline-end: -7px;
	pointer-events: none;
	position: absolute;
	width: 21px;
	z-index: -1;
}

.eg-brand__mark :where(img, svg),
.eg-brand-mark :where(img, svg),
.eg-brand-logo :where(img, svg),
.eg-gold-identity__mark :where(img, svg),
.eg-gold-identity__mark-image {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.eg-gold-identity__mark {
	flex-basis: 48px;
	height: 48px;
	width: 48px;
}

.eg-brand__monogram,
.eg-brand-monogram {
	direction: ltr;
	font-variant-numeric: tabular-nums;
	unicode-bidi: isolate;
}

.eg-brand__copy,
.eg-brand-copy,
.eg-brand-text,
.eg-gold-identity__copy {
	display: grid;
	gap: .08rem;
	min-width: 0;
}

.eg-gold-identity__copy {
	max-width: 245px;
}

.eg-gold-identity__link--has-mark .eg-gold-identity__copy,
.eg-gold-identity__link--text-only .eg-gold-identity__copy {
	min-width: 0;
}

.eg-gold-identity__link--text-only .eg-gold-identity__copy {
	gap: .12rem;
}

.eg-brand__title,
.eg-brand__wordmark,
.eg-brand-title,
.eg-brand-name,
.eg-gold-identity__name {
	color: var(--eg-ink-950);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.25;
}

.eg-brand__tagline,
.eg-brand__kicker,
.eg-brand-tagline,
.eg-brand-kicker,
.eg-gold-identity__tagline {
	color: var(--eg-ink-600);
	font-size: .74rem;
	font-weight: 600;
	line-height: 1.35;
}

.eg-gold-identity__tagline {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.eg-brand--footer .eg-brand__title,
.eg-brand--footer .eg-brand__wordmark,
.eg-brand--footer .eg-brand-title,
.eg-brand--footer .eg-brand-name,
.eg-brand-footer .eg-brand__title,
.eg-brand-footer .eg-brand__wordmark,
.eg-brand-footer .eg-brand-title,
.eg-brand-footer .eg-brand-name {
	color: #ffffff;
}

.eg-brand--footer .eg-brand__tagline,
.eg-brand--footer .eg-brand__kicker,
.eg-brand--footer .eg-brand-tagline,
.eg-brand--footer .eg-brand-kicker,
.eg-brand-footer .eg-brand__tagline,
.eg-brand-footer .eg-brand__kicker,
.eg-brand-footer .eg-brand-tagline,
.eg-brand-footer .eg-brand-kicker {
	color: #cbd2d9;
}

/* Page hierarchy and editorial rhythm. */
body.page .site-main {
	min-width: 0;
}

body.page .hero-section {
	background:
		linear-gradient(105deg, rgba(24, 33, 43, .98), rgba(18, 59, 93, .94)),
		var(--eg-ink-950);
	border-block-end: 1px solid #34546f;
	color: #ffffff;
}

body.page .hero-section :where(.entry-title, h1) {
	color: #ffffff;
	font-size: clamp(2rem, 4.7vw, 3.65rem);
	line-height: 1.18;
	margin: 0;
	max-width: 20ch;
}

body.page .hero-section :where(.page-description, .entry-meta, p) {
	color: #d7e0e7;
}

body.page .entry-content {
	color: var(--eg-ink-900);
	font-size: clamp(1rem, .96rem + .18vw, 1.08rem);
	line-height: 1.9;
}

body.page .entry-content > :where(p, ul, ol, h2, h3, h4, blockquote),
body.page .entry-content > .wp-block-group:not(.alignwide):not(.alignfull) {
	max-width: min(100%, var(--eg-reading));
}

body.page .entry-content > :where(p, ul, ol, h2, h3, h4, blockquote, .wp-block-group),
body.page .entry-content > :where(.wp-block-image, .gcp-card, .gcp-karat-page) {
	margin-inline: auto;
}

body.page .entry-content > :where(h2, h3, h4),
.gcp-shortcode-page .entry-content > :where(h2, h3, h4) {
	background: transparent;
	border-radius: 0;
	display: block;
	padding: 0;
	text-align: start;
}

body.page .entry-content > h2,
.gcp-shortcode-page .entry-content > h2 {
	font-size: clamp(1.55rem, 1.25rem + 1.15vw, 2.25rem);
	line-height: 1.4;
	margin-block-end: .8rem;
	margin-block-start: clamp(2.5rem, 6vw, 4.75rem);
}

body.page .entry-content > h2::after,
.gcp-shortcode-page .entry-content > h2::after {
	background: var(--eg-gold-500);
	border-radius: 999px;
	content: "";
	display: block;
	height: 3px;
	margin-block-start: .65rem;
	width: 46px;
}

body.page .entry-content > h3,
.gcp-shortcode-page .entry-content > h3 {
	font-size: clamp(1.2rem, 1.1rem + .45vw, 1.5rem);
	line-height: 1.5;
	margin-block-end: .55rem;
	margin-block-start: 2rem;
}

body.page .entry-content > :where(ul, ol) {
	padding-inline-start: 1.4rem;
}

body.page .entry-content li {
	margin-block: .35rem;
}

body.page .entry-content li::marker {
	color: var(--eg-gold-600);
	font-weight: 800;
}

body.page .entry-content > figure.wp-block-image {
	background: var(--eg-surface-muted);
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-lg);
	box-shadow: var(--eg-shadow-sm);
	max-width: min(100%, var(--eg-content));
	overflow: hidden;
}

body.page .entry-content > figure.wp-block-image img {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

body.page .entry-content > figure.wp-block-image figcaption {
	color: var(--eg-ink-600);
	font-size: .82rem;
	line-height: 1.65;
	margin: 0;
	padding: .65rem .85rem .8rem;
}

.gcp-editorial-note {
	background: var(--eg-gold-100);
	border: 1px solid var(--eg-gold-300);
	border-inline-start: 5px solid var(--eg-gold-600);
	border-radius: var(--eg-radius-md);
	color: var(--eg-ink-900);
	padding: clamp(1rem, 2.5vw, 1.4rem);
}

.gcp-editorial-note > :first-child,
.gcp-editorial-note p:first-child {
	margin-block-start: 0;
}

.gcp-editorial-note > :last-child,
.gcp-editorial-note p:last-child {
	margin-block-end: 0;
}

/* Gold Country Platform: identity overrides, scoped to its real markup. */
.gcp-card {
	--gcp-gold: var(--eg-gold-600);
	--gcp-ink: var(--eg-ink-950);
	--gcp-muted: var(--eg-ink-600);
	--gcp-line: var(--eg-line);
	--gcp-surface: var(--eg-surface);
	--gcp-positive: var(--eg-positive);
	--gcp-negative: var(--eg-negative);
	--gcp-neutral: var(--eg-ink-600);
	background: var(--eg-surface);
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-lg);
	box-shadow: var(--eg-shadow-card);
	color: var(--eg-ink-950);
	margin-block: clamp(1.35rem, 4vw, 2.5rem);
	margin-inline: auto;
	max-width: var(--eg-content);
	overflow: hidden;
	padding: clamp(1.1rem, 3vw, 2rem);
}

.gcp-karat-page {
	margin-inline: auto;
	max-width: var(--eg-content);
}

.gcp-card__header {
	align-items: flex-start;
	border-block-end: 1px solid var(--eg-line);
	gap: 1rem;
	margin-block-end: 1.2rem;
	padding-block-end: 1rem;
}

.gcp-card h2 {
	color: var(--eg-ink-950);
	font-size: clamp(1.35rem, 1.15rem + .9vw, 2rem);
	font-weight: 780;
	line-height: 1.4;
	margin: 0;
	padding: 0;
	text-align: start;
}

.gcp-eyebrow {
	color: var(--eg-gold-700);
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .025em;
	text-transform: none;
}

.gcp-status {
	align-items: center;
	border: 1px solid transparent;
	display: inline-flex;
	font-size: .82rem;
	gap: .35rem;
	min-height: 34px;
	padding: .38rem .7rem;
}

.gcp-status::before {
	background: currentColor;
	border-radius: 50%;
	content: "";
	height: .48rem;
	width: .48rem;
}

.gcp-status--fresh {
	background: var(--eg-positive-soft);
	border-color: #b9ddc7;
	color: var(--eg-positive);
}

.gcp-status--stale,
.gcp-status--delayed {
	background: var(--eg-warning-soft);
	border-color: #ead28d;
	color: var(--eg-warning);
}

.gcp-status--old {
	background: var(--eg-negative-soft);
	border-color: #e7bdb9;
	color: var(--eg-negative);
}

.gcp-status--unknown {
	background: var(--eg-surface-muted);
	border-color: var(--eg-line);
	color: var(--eg-ink-600);
}

.gcp-direct-answer {
	background: var(--eg-gold-100);
	border: 1px solid var(--eg-gold-300);
	border-inline-start: 5px solid var(--eg-gold-600);
	border-radius: var(--eg-radius-md);
	color: var(--eg-ink-900);
	line-height: 1.85;
	padding: .9rem 1rem;
}

.gcp-direct-answer :where(bdi, time) {
	font-weight: 750;
}

.gcp-featured-prices {
	display: grid;
	gap: .9rem;
	grid-template-columns: minmax(0, 1.28fr) repeat(2, minmax(0, 1fr));
	margin-block: 1.2rem;
}

.gcp-featured-price {
	align-items: flex-start;
	background: var(--eg-surface-soft);
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-md);
	display: grid;
	gap: .65rem;
	justify-content: stretch;
	min-height: 124px;
	padding: 1rem;
}

.gcp-featured-price span {
	color: var(--eg-ink-600);
	font-size: .88rem;
	font-weight: 650;
}

.gcp-featured-price strong {
	align-self: end;
	color: var(--eg-gold-700);
	font-size: clamp(1.4rem, 2.2vw, 2rem);
	line-height: 1.25;
}

.gcp-featured-price:first-child {
	background: var(--eg-gold-100);
	border-color: var(--eg-gold-300);
	border-block-start: 4px solid var(--eg-gold-600);
	box-shadow: none;
}

.gcp-featured-price:first-child span {
	color: var(--eg-ink-700);
}

.gcp-featured-price:first-child strong {
	color: var(--eg-ink-950);
	font-size: clamp(2rem, 4.2vw, 3rem);
}

.gcp-ounce-reference,
.gcp-history-chart,
.gcp-offer-comparison {
	background: var(--eg-surface-soft);
	border-color: var(--eg-line);
	border-radius: var(--eg-radius-md);
}

.gcp-ounce-reference {
	min-height: 54px;
	padding: .8rem 1rem;
}

.gcp-ounce-reference span {
	color: var(--eg-ink-600);
}

.gcp-ounce-reference strong {
	color: var(--eg-gold-700);
}

.gcp-history-chart {
	margin-block-end: 1.25rem;
	padding: clamp(.65rem, 2vw, 1rem);
}

.gcp-history-chart__svg {
	color: var(--eg-gold-600);
	max-height: 300px;
}

.gcp-history-chart__grid line {
	stroke: #ddd8ca;
}

.gcp-history-chart__line {
	stroke-width: 3.5;
}

.gcp-history-chart__point {
	fill: var(--eg-surface);
}

.gcp-history-chart figcaption {
	color: var(--eg-ink-600);
	font-size: .8rem;
	line-height: 1.65;
}

.gcp-table-wrap {
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-md);
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scrollbar-color: var(--eg-line-strong) var(--eg-surface-muted);
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.gcp-table {
	background: var(--eg-surface);
	border-collapse: separate;
	border-spacing: 0;
	color: var(--eg-ink-900);
	font-size: .92rem;
}

.gcp-table :where(th, td) {
	border-block-end: 1px solid var(--eg-line);
	padding: .82rem .75rem;
	text-align: start;
	vertical-align: top;
}

.gcp-table thead th {
	background: var(--eg-surface-muted);
	color: var(--eg-ink-700);
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .01em;
}

.gcp-table tbody th {
	color: var(--eg-ink-900);
	font-weight: 750;
}

.gcp-table tbody tr:last-child :where(th, td) {
	border-block-end: 0;
}

.gcp-market-table tbody td:last-child {
	min-width: 230px;
	white-space: normal;
}

.gcp-table caption,
.gcp-market-table caption,
.gcp-bars-table caption {
	background: var(--eg-surface-soft);
	color: var(--eg-ink-600);
	font-size: .78rem;
	line-height: 1.65;
	padding: .7rem .75rem;
	text-align: start;
}

@media (hover: hover) {
	.gcp-table tbody tr:hover :where(th, td) {
		background: #fdf9ee;
	}
}

.gcp-market-context {
	border-block-start-color: var(--eg-line);
}

.gcp-market-section {
	border-block-end-color: var(--eg-line);
}

.gcp-market-section h3,
.gcp-karat-movement h3 {
	color: var(--eg-ink-950);
	font-weight: 750;
	padding: 0;
	text-align: start;
}

.gcp-trend {
	border-width: 1px;
	border-radius: var(--eg-radius-md);
}

.gcp-trend--up {
	background: var(--eg-positive-soft);
	color: var(--eg-positive);
}

.gcp-trend--down {
	background: var(--eg-negative-soft);
	color: var(--eg-negative);
}

.gcp-trend--flat {
	background: var(--eg-info-soft);
	color: var(--eg-info);
}

.gcp-data-notice {
	background: var(--eg-info-soft);
	border: 1px solid #c8dbe7;
	border-radius: var(--eg-radius-md);
	color: var(--eg-info);
}

.gcp-data-notice--warning {
	background: var(--eg-warning-soft);
	border-color: #ead28d;
	color: var(--eg-warning);
}

.gcp-method-note,
.gcp-coverage {
	color: var(--eg-ink-600);
}

.gcp-range-stats {
	gap: .9rem;
}

.gcp-range-stat {
	background: var(--eg-surface-soft);
	border-color: var(--eg-line);
	border-radius: var(--eg-radius-md);
}

.gcp-range-stat--high {
	border-block-start-color: var(--eg-positive);
}

.gcp-range-stat--low {
	border-block-start-color: var(--eg-negative);
}

.gcp-range-stat :where(dt, .gcp-range-stat__secondary, .gcp-range-stat__date, .gcp-range-stat__source) {
	color: var(--eg-ink-600);
}

.gcp-change--up {
	color: var(--eg-positive);
}

.gcp-change--down {
	color: var(--eg-negative);
}

.gcp-change--flat,
.gcp-change--unknown {
	color: var(--eg-ink-600);
}

.gcp-card__footer,
.eg-source-bar,
.eg-freshness-bar {
	background: #f1f4f1;
	border: 1px solid #d8dfda;
	border-radius: var(--eg-radius-md);
	color: var(--eg-ink-700);
	display: grid;
	font-size: .84rem;
	gap: .55rem 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	line-height: 1.65;
	margin-block-start: 1.25rem;
	padding: .85rem 1rem;
}

.gcp-card__footer p,
.eg-source-bar p,
.eg-freshness-bar p {
	margin: 0;
}

.gcp-card__footer p:first-child,
.eg-source-bar strong,
.eg-freshness-bar strong {
	color: var(--eg-ink-950);
}

.gcp-card__footer p:nth-child(n + 4) {
	border-block-start: 1px solid #d8dfda;
	grid-column: 1 / -1;
	padding-block-start: .55rem;
}

.gcp-calculator__grid {
	gap: 1rem;
}

.gcp-calculator label {
	color: var(--eg-ink-800);
	font-weight: 700;
	gap: .45rem;
}

.gcp-calculator :where(input, select) {
	background: var(--eg-surface);
	border: 1px solid var(--eg-line-strong);
	border-radius: 10px;
	color: var(--eg-ink-950);
	min-height: 48px;
	padding: .62rem .75rem;
}

.gcp-calculator :where(input, select):hover {
	border-color: #a9a18f;
}

.gcp-calculator :where(input, select):focus {
	border-color: var(--eg-focus);
	box-shadow: 0 0 0 3px rgba(18, 59, 93, .18);
	outline: none;
}

.gcp-calculator input::placeholder {
	color: var(--eg-muted);
	opacity: 1;
}

.gcp-calculator__result {
	background:
		linear-gradient(145deg, rgba(244, 232, 197, .12), transparent 58%),
		var(--eg-navy);
	border: 1px solid var(--eg-navy);
	border-radius: var(--eg-radius-md);
	color: #ffffff;
	min-height: 86px;
	padding: 1rem 1.15rem;
}

.gcp-calculator__result span {
	color: #dce7ef;
}

.gcp-calculator__result strong {
	color: #f4d994;
	font-size: clamp(1.45rem, 3vw, 2rem);
}

.gcp-karat-price__value,
.gcp-weight-value__amount {
	background: var(--eg-gold-100);
	border-color: var(--eg-gold-300);
	border-radius: var(--eg-radius-md);
}

.gcp-karat-price__value strong,
.gcp-weight-value__amount strong {
	color: var(--eg-gold-700);
}

.gcp-offer-comparison {
	padding: clamp(.85rem, 2vw, 1.15rem);
}

.gcp-offer-comparison__values div {
	border-color: var(--eg-line);
	border-radius: 10px;
}

.gcp-empty {
	color: var(--eg-ink-600);
}

/* Progressive history range controls inserted by identity.js. */
.eg-history-range {
	align-items: center;
	background: var(--eg-surface-soft);
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-md);
	display: grid;
	gap: .85rem 1rem;
	grid-template-columns: minmax(0, 1fr) auto;
	margin-block: 0 1rem;
	padding: .85rem;
}

.eg-history-range__copy {
	display: grid;
	gap: .15rem;
	min-width: 0;
}

.eg-history-range__title {
	color: var(--eg-ink-950);
	font-size: .92rem;
	font-weight: 800;
}

.eg-history-range__hint,
.eg-history-range__status {
	color: var(--eg-ink-600);
	font-size: .8rem;
	line-height: 1.55;
	margin: 0;
}

.eg-history-range__buttons {
	display: inline-grid;
	gap: .35rem;
	grid-template-columns: repeat(3, minmax(72px, auto));
}

.eg-history-range__button {
	align-items: center;
	background: var(--eg-surface);
	border: 1px solid var(--eg-line-strong);
	border-radius: 999px;
	color: var(--eg-ink-800);
	cursor: pointer;
	display: inline-flex;
	font-size: .82rem;
	font-weight: 750;
	justify-content: center;
	min-height: 48px;
	padding: .45rem .75rem;
	white-space: nowrap;
}

.eg-history-range__button:hover:not(:disabled) {
	background: var(--eg-gold-100);
	border-color: var(--eg-gold-500);
	color: var(--eg-gold-700);
}

.eg-history-range__button[aria-pressed="true"] {
	background: var(--eg-ink-950);
	border-color: var(--eg-ink-950);
	color: #ffffff;
}

.eg-history-range__button:disabled {
	background: var(--eg-surface-muted);
	color: #76847e;
	cursor: not-allowed;
	opacity: .72;
}

.eg-history-range__status {
	grid-column: 1 / -1;
}

.gcp-history .gcp-market-table tbody tr[hidden] {
	display: none !important;
}

/* Manual placements only. No AdSense selector is hidden or restyled. */
.eg-ad-slot {
	align-items: center;
	background: var(--eg-surface-soft);
	border: 1px solid var(--eg-line);
	border-radius: var(--eg-radius-md);
	display: flex;
	justify-content: center;
	margin-block: clamp(1.5rem, 4vw, 2.5rem);
	min-height: 100px;
	min-width: 0;
	width: 100%;
}

.eg-ad-slot--leaderboard {
	min-height: 100px;
}

.eg-ad-slot--rectangle {
	min-height: 280px;
}

.eg-ad-slot--in-content {
	min-height: 180px;
}

/* 768px: compact two-column cards without squeezing controls. */
@media (max-width: 768px) {
	body.page .hero-section :where(.entry-title, h1) {
		font-size: clamp(1.9rem, 8vw, 2.75rem);
	}

	.gcp-card {
		border-radius: 14px;
		box-shadow: 0 8px 24px rgba(24, 33, 43, .06);
	}

	.gcp-featured-prices {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gcp-featured-price:first-child {
		grid-column: 1 / -1;
	}

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

	.gcp-calculator__grid > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.gcp-card__footer,
	.eg-source-bar,
	.eg-freshness-bar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gcp-card__footer p:nth-child(n + 3) {
		grid-column: 1 / -1;
	}

	.gcp-card__footer p:nth-child(n + 4) {
		border-block-start: 1px solid #d8dfda;
	}

	.gcp-table :where(th, td) {
		padding: .7rem .62rem;
	}

	.gcp-table :where(th, td):first-child {
		background: var(--eg-surface);
		box-shadow: -1px 0 0 var(--eg-line);
		inset-inline-start: 0;
		position: sticky;
		z-index: 1;
	}

	.gcp-table thead th:first-child {
		background: var(--eg-surface-muted);
		z-index: 2;
	}

	.eg-history-range {
		grid-template-columns: 1fr;
	}

	.eg-history-range__buttons {
		width: 100%;
	}
}

/* 390px and 360px: one clear task per row and touch-safe controls. */
@media (max-width: 519px) {
	:root {
		--eg-radius-lg: 14px;
	}

	#header [data-row*="middle"] {
		box-shadow: 0 3px 16px rgba(24, 33, 43, .05);
	}

	.eg-brand,
	.eg-brand__link,
	.eg-brand-link,
	.eg-gold-identity__link {
		gap: .58rem;
	}

	.site-logo-container:has(.eg-gold-identity__link) {
		max-width: min(230px, 68vw);
	}

	.eg-brand__mark,
	.eg-brand-mark,
	.eg-brand-logo,
	.eg-gold-identity__mark {
		border-radius: 12px;
		flex-basis: 40px;
		height: 40px;
		width: 40px;
	}

	.eg-brand__title,
	.eg-brand__wordmark,
	.eg-brand-title,
	.eg-brand-name,
	.eg-gold-identity__name {
		font-size: .94rem;
	}

	.eg-brand__tagline,
	.eg-brand__kicker,
	.eg-brand-tagline,
	.eg-brand-kicker,
	.eg-gold-identity__tagline {
		display: none;
	}

	body.page .entry-content {
		font-size: 1rem;
		line-height: 1.84;
	}

	body.page .entry-content > figure.wp-block-image {
		border-radius: 15px;
	}

	.gcp-card {
		border-radius: 14px;
		margin-block: 1.25rem;
		overflow: hidden;
		padding: .9rem;
	}

	.gcp-card__header,
	.gcp-featured-price,
	.gcp-calculator__result,
	.gcp-ounce-reference {
		align-items: stretch;
		flex-direction: column;
	}

	.gcp-card__header {
		gap: .7rem;
	}

	.gcp-status {
		align-self: flex-start;
	}

	.gcp-direct-answer {
		font-size: .94rem;
		padding: .78rem .82rem;
	}

	.gcp-featured-prices,
	.gcp-calculator__grid,
	.gcp-range-stats,
	.gcp-offer-comparison__values {
		grid-template-columns: 1fr;
	}

	.gcp-featured-price:first-child,
	.gcp-calculator__grid > :last-child:nth-child(odd) {
		grid-column: auto;
	}

	.gcp-featured-price {
		min-height: 108px;
	}

	.gcp-card__footer,
	.eg-source-bar,
	.eg-freshness-bar {
		grid-template-columns: 1fr;
		padding: .78rem .82rem;
	}

	.gcp-card__footer p:nth-child(n + 2) {
		grid-column: auto;
	}

	.gcp-card__footer p:nth-child(n + 4) {
		grid-column: auto;
	}

	.gcp-history-chart {
		padding: .45rem;
	}

	.gcp-history-chart__svg {
		min-height: 170px;
	}

	.gcp-table {
		font-size: .82rem;
	}

	.gcp-market-table tbody td:last-child {
		min-width: 210px;
	}

	.gcp-trend {
		gap: .55rem;
		padding: .75rem;
	}

	.eg-history-range {
		padding: .72rem;
	}

	.eg-history-range__buttons {
		gap: .28rem;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.eg-history-range__button {
		font-size: .78rem;
		min-height: 48px;
		padding-inline: .35rem;
	}

	.eg-ad-slot,
	.eg-ad-slot--leaderboard {
		min-height: 100px;
	}
}

@media (max-width: 390px) {
	.gcp-card {
		padding: .78rem;
	}

	.gcp-featured-price:not(:first-child) strong,
	.gcp-calculator__result strong {
		font-size: 1.35rem;
	}

	.eg-history-range__button {
		font-size: .76rem;
		padding-inline: .25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.gcp-card *,
	.gcp-card *::before,
	.gcp-card *::after,
	.eg-history-range *,
	.eg-history-range *::before,
	.eg-history-range *::after,
	.eg-brand *,
	.eg-brand *::before,
	.eg-brand *::after,
	.eg-gold-identity__link *,
	.eg-gold-identity__link *::before,
	.eg-gold-identity__link *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}

@media (forced-colors: active) {
	.gcp-card,
	.gcp-featured-price,
	.gcp-direct-answer,
	.gcp-card__footer,
	.eg-history-range,
	.eg-ad-slot {
		border: 1px solid CanvasText;
	}

	.gcp-status::before {
		background: CanvasText;
	}

	.gcp-history-chart__line,
	.gcp-history-chart__point {
		stroke: CanvasText;
	}
}

@media print {
	body {
		background: #ffffff;
		color: #000000;
	}

	.gcp-card {
		box-shadow: none;
		break-inside: avoid;
	}

	.gcp-table-wrap {
		overflow: visible;
	}

	.gcp-table {
		font-size: 8.5pt;
	}
}
