/* Approved compact, white-and-emerald marketplace reference. */

html {
	scrollbar-gutter: auto;
}

body {
	background: var(--color-background);
}

body::before {
	display: none;
}

.shell {
	width: min(1180px, calc(100% - 64px));
}

.site-header {
	padding: 0;
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	box-shadow: 0 2px 12px rgba(var(--color-foreground-rgb), 0.035);
}

.site-header__inner,
.site-header--with-menu .site-header__inner {
	display: grid;
	grid-template-areas: "actions navigation brand";
	grid-template-columns: minmax(144px, 1fr) auto minmax(172px, 1fr);
	min-height: 70px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
}

.brand-mark,
.brand-mark--custom {
	height: 52px;
}

.brand-mark--custom {
	width: var(--brand-logo-width);
	max-width: 220px;
}

.brand-mark--custom .brand-mark__image {
	height: 48px;
}

.brand-mark--wordmark {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	width: auto;
}

.brand-mark--wordmark > svg {
	width: 30px;
	height: 30px;
}

.brand-mark__wordmark {
	color: var(--color-primary-strong);
	font-size: 21px;
	font-weight: 800;
	white-space: nowrap;
}

.brand-mark__wordmark > span {
	color: var(--color-foreground);
}

.site-navigation {
	grid-area: navigation;
	align-self: stretch;
	direction: rtl;
}

.site-menu,
.site-menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(18px, 2.6vw, 34px);
	height: 100%;
}

.site-menu > li {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
}

.site-menu a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--color-muted);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: color 180ms ease-out;
}

.site-menu a:hover,
.site-menu a:focus-visible,
.site-menu .current-menu-item > a,
.site-menu .current-menu-ancestor > a {
	color: var(--color-primary);
}

.site-menu .sub-menu {
	position: absolute;
	top: calc(100% - 8px);
	right: 0;
	z-index: 4;
	display: none;
	min-width: 180px;
	padding: 8px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	box-shadow: 0 12px 34px rgba(var(--color-foreground-rgb), 0.08);
}

.site-menu li:hover > .sub-menu,
.site-menu li:focus-within > .sub-menu {
	display: block;
}

.site-menu .sub-menu a {
	width: 100%;
	padding-inline: 10px;
}

.header-actions {
	justify-self: start;
	gap: 8px;
}

.account-button,
.menu-toggle {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	color: var(--color-foreground);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	cursor: pointer;
	transition: color 160ms ease-out, border-color 160ms ease-out;
}

.account-button:hover,
.menu-toggle:hover {
	color: var(--color-primary);
	border-color: var(--color-primary);
}

.menu-toggle {
	display: none;
	place-items: center;
}

.menu-toggle svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.8;
}

.hero,
body.admin-bar .hero {
	min-height: 0;
	padding-block: 28px 8px;
}

.hero-layout {
	display: grid;
	grid-template-areas: "exchange intro";
	grid-template-columns: minmax(350px, 0.82fr) minmax(0, 1.18fr);
	gap: clamp(28px, 4.3vw, 60px);
	align-items: center;
	direction: ltr;
}

.exchange-panel {
	grid-area: exchange;
	justify-self: start;
	width: 100%;
	max-width: 448px;
	padding: 20px;
	direction: rtl;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 18px;
	box-shadow: 0 8px 32px rgba(var(--color-foreground-rgb), 0.055);
	backdrop-filter: none;
}

.exchange-tabs {
	gap: 6px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 9px;
}

.exchange-tab {
	min-height: 44px;
	padding: 8px;
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
}

.exchange-tab.is-active {
	background: var(--color-primary-strong);
	border-color: var(--color-primary-strong);
	box-shadow: none;
}

.exchange-form {
	padding-top: 14px;
}

.quantity-card,
.amount-card {
	background: transparent;
	border: 0;
	border-radius: 0;
}

.quantity-card {
	padding: 0;
}

.field-heading {
	min-height: 24px;
	color: var(--color-muted);
	font-size: 13px;
	font-weight: 500;
}

.counter {
	grid-template-columns: 44px minmax(84px, 1fr) 44px;
	gap: 0;
	min-height: 46px;
	margin-top: 7px;
	border: 1px solid var(--color-border);
	border-radius: 9px;
	overflow: hidden;
}

.counter__button {
	width: 44px;
	height: 44px;
	color: var(--color-primary-strong);
	background: var(--color-primary-mist);
	border: 0;
	border-radius: 0;
}

.counter__button svg {
	width: 19px;
	height: 19px;
}

.counter__input {
	min-height: 44px;
	font-size: 20px;
	font-weight: 700;
}

.field-help {
	display: block;
	margin-top: 6px;
	font-size: 11px;
}

.amount-card {
	margin-top: 12px;
	padding: 10px 0 8px;
	border-top: 1px solid var(--color-border);
}

.amount-card .field-heading {
	justify-content: center;
}

.amount-card__value {
	align-items: baseline;
	justify-content: center;
	gap: 7px;
	margin-top: 0;
}

.amount-card__value output {
	font-size: clamp(25px, 2.5vw, 31px);
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: 0;
}

.amount-card__value span {
	font-size: 12px;
	font-weight: 600;
}

.unit-price-row {
	grid-template-columns: 1fr auto;
	gap: 8px;
	min-height: 36px;
	margin-top: 2px;
	padding: 6px 9px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	font-size: 11px;
}

.primary-cta {
	min-height: 46px;
	margin-top: 9px;
	padding: 8px 14px;
	background: var(--color-primary-strong);
	border-radius: 9px;
	box-shadow: none;
	font-size: 15px;
}

.primary-cta:hover {
	box-shadow: 0 8px 22px rgba(var(--color-primary-strong-rgb), 0.16);
}

.hero-intro {
	grid-area: intro;
	min-width: 0;
	direction: rtl;
}

.hero-copy {
	max-width: none;
	text-align: center;
}

.hero-copy h1 {
	margin: 0;
	color: var(--color-primary-strong);
	font-size: clamp(29px, 3vw, 38px);
	font-weight: 800;
	line-height: 1.45;
	letter-spacing: 0;
}

.hero-copy h1 span {
	font-size: 0.95em;
	letter-spacing: 0;
}

.hero-copy__lead {
	margin-top: 7px;
	color: var(--color-primary-strong);
	font-size: clamp(15px, 1.35vw, 18px);
	font-weight: 700;
}

.hero-copy__text {
	max-width: 490px;
	margin: 9px auto 0;
	font-size: 13px;
	line-height: 1.85;
}

.hero-showcase {
	display: grid;
	grid-template-columns: minmax(178px, 0.86fr) minmax(225px, 1.14fr);
	align-items: center;
	gap: 7px;
	min-height: 175px;
	margin-top: 8px;
	direction: rtl;
}

.hero-product {
	display: grid;
	place-items: center;
	min-width: 0;
}

.hero-product__image {
	display: block;
	width: min(100%, 300px);
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: contain;
}

.hero-rates {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-width: 0;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 11px;
}

.hero-rates__item {
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 2px;
	min-width: 0;
	min-height: 90px;
	padding: 10px 7px;
	text-align: center;
}

.hero-rates__item + .hero-rates__item {
	border-inline-start: 1px solid var(--color-border);
}

.hero-rates__item > span,
.hero-rates__item > small {
	color: var(--color-muted);
	font-size: 10px;
	white-space: nowrap;
}

.hero-rates__item > strong {
	color: var(--color-primary-strong);
	font-size: clamp(16px, 1.5vw, 20px);
	font-variant-numeric: tabular-nums;
	line-height: 1.45;
	white-space: nowrap;
}

.trust-strip {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	max-width: none;
	margin-top: 15px;
	border-top: 1px solid var(--color-border);
}

.trust-strip li {
	min-height: 52px;
	gap: 8px;
	padding: 8px 10px;
	border-left: 0;
}

.trust-strip li + li {
	border-inline-start: 1px solid var(--color-border);
}

.trust-icon {
	width: 25px;
	height: 25px;
	background: transparent;
	border: 0;
	border-radius: 0;
}

.trust-icon svg {
	width: 21px;
	height: 21px;
}

.trust-strip strong {
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.price-history {
	margin-top: 5px;
	padding: 17px 19px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 16px;
	box-shadow: 0 5px 22px rgba(var(--color-foreground-rgb), 0.035);
}

.price-history__heading {
	gap: 14px;
}

.price-history__eyebrow {
	color: var(--color-muted);
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.025em;
}

.price-history__heading h2 {
	margin-top: 1px;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.45;
}

.price-history__heading > div:first-child > p {
	display: none;
}

.price-history__periods {
	grid-template-columns: repeat(3, minmax(60px, 1fr));
	gap: 0;
	padding: 0;
	background: var(--color-surface);
	border-radius: 8px;
	overflow: hidden;
}

.price-history__periods button {
	min-height: 38px;
	padding: 5px 8px;
	border-radius: 0;
	font-size: 11px;
	font-weight: 500;
}

.price-history__periods button + button {
	border-inline-start: 1px solid var(--color-border);
}

.price-history__periods button.is-active {
	color: var(--color-primary-strong);
	background: var(--color-primary-mist);
}

.price-history__chart {
	height: 145px;
	margin-top: 11px;
	background-size: 100% 25%;
}

.price-history__line {
	stroke-width: 2;
}

.price-history__empty {
	font-size: 12px;
}

.price-history__stats {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0;
	margin-top: 11px;
	border: 1px solid var(--color-border);
	border-radius: 10px;
	overflow: hidden;
}

.price-history__stat,
.price-history__stat--current {
	align-content: center;
	justify-items: center;
	gap: 2px;
	min-height: 73px;
	padding: 8px;
	background: var(--color-surface);
	border: 0;
	border-radius: 0;
	text-align: center;
}

.price-history__stat + .price-history__stat {
	border-inline-start: 1px solid var(--color-border);
}

.price-history__stat > span {
	font-size: 11px;
}

.price-history__stat strong {
	font-size: clamp(14px, 1.45vw, 18px);
}

.price-history__change {
	font-size: 10px;
}

.market-guide {
	padding-block: 52px 64px;
}

@media (max-width: 1199px) {
	.shell {
		width: min(1100px, calc(100% - 48px));
	}

	.hero-layout {
		grid-template-columns: minmax(335px, 0.88fr) minmax(0, 1.12fr);
		gap: 28px;
	}

	.exchange-panel {
		padding: 18px;
	}

	.hero-copy h1 {
		font-size: clamp(28px, 3vw, 34px);
	}

	.hero-showcase {
		grid-template-columns: minmax(148px, 0.8fr) minmax(212px, 1.2fr);
	}
}

@media (max-width: 959px) {
	.site-header__inner,
	.site-header--with-menu .site-header__inner {
		grid-template-areas: "actions navigation brand";
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 18px;
	}

	.site-menu {
		gap: 15px;
	}

	.hero-layout {
		grid-template-areas: "intro" "exchange";
		grid-template-columns: minmax(0, 1fr);
		max-width: 630px;
		gap: 20px;
	}

	.hero-intro {
		order: initial;
	}

	.hero-showcase {
		grid-template-columns: minmax(190px, 0.9fr) minmax(225px, 1.1fr);
		max-width: 560px;
		margin-inline: auto;
	}

	.exchange-panel {
		justify-self: center;
		max-width: 470px;
	}

	.price-history__stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	body {
		padding-bottom: env(safe-area-inset-bottom);
	}

	.shell {
		width: min(520px, calc(100% - 32px));
	}

	.site-header {
		padding-top: env(safe-area-inset-top);
	}

	.site-header__inner,
	.site-header--with-menu .site-header__inner {
		position: relative;
		grid-template-areas: "actions brand";
		grid-template-columns: auto 1fr;
		gap: 8px;
		width: min(540px, calc(100% - 32px));
		min-height: 62px;
		padding: 0;
	}

	.brand-mark--custom {
		width: min(var(--brand-logo-width), 43vw, 156px);
		height: 48px;
	}

	.brand-mark--custom .brand-mark__image {
		max-width: min(var(--brand-logo-width), 43vw, 156px);
		height: 45px;
	}

	.brand-mark--wordmark > svg {
		width: 26px;
		height: 26px;
	}

	.brand-mark__wordmark {
		font-size: 17px;
	}

	.menu-toggle {
		display: grid;
	}

	.site-navigation {
		position: absolute;
		top: calc(100% + 6px);
		right: 0;
		left: 0;
		z-index: 8;
		display: none;
		padding: 7px;
		background: var(--color-surface);
		border: 1px solid var(--color-border);
		border-radius: 13px;
		box-shadow: 0 14px 36px rgba(var(--color-foreground-rgb), 0.1);
	}

	.site-navigation.is-open {
		display: block;
	}

	.site-menu {
		display: grid;
		justify-content: stretch;
		gap: 0;
		height: auto;
	}

	.site-menu > li {
		display: block;
		height: auto;
	}

	.site-menu a {
		width: 100%;
		padding-inline: 10px;
	}

	.site-menu .sub-menu {
		position: static;
		display: block;
		padding-block: 0;
		padding-inline: 12px 0;
		border: 0;
		box-shadow: none;
	}

	.hero,
	body.admin-bar .hero {
		padding-block: 16px 3px;
	}

	.hero-layout {
		gap: 13px;
	}

	.hero-copy {
		padding: 0;
	}

	.hero-copy h1 {
		font-size: clamp(23px, 6.6vw, 29px);
		line-height: 1.45;
	}

	.hero-copy__lead {
		margin-top: 2px;
		color: var(--color-primary-strong);
		font-size: 12px;
		font-weight: 600;
	}

	.hero-copy__text {
		display: none;
	}

	.hero-showcase {
		grid-template-columns: minmax(0, 1fr);
		gap: 5px;
		min-height: 0;
		margin-top: 3px;
	}

	.hero-product__image {
		width: min(238px, 75vw);
	}

	.hero-rates {
		width: min(100%, 360px);
		margin-inline: auto;
		border-radius: 9px;
	}

	.hero-rates__item {
		gap: 0;
		min-height: 65px;
		padding: 6px;
	}

	.hero-rates__item > span,
	.hero-rates__item > small {
		font-size: 10px;
	}

	.hero-rates__item > strong {
		font-size: 16px;
	}

	.exchange-panel {
		max-width: none;
		padding: 13px;
		border-radius: 14px;
		box-shadow: 0 5px 18px rgba(var(--color-foreground-rgb), 0.055);
	}

	.exchange-tab {
		min-height: 44px;
		font-size: 13px;
	}

	.exchange-form {
		padding-top: 9px;
	}

	.field-heading {
		min-height: 21px;
		font-size: 12px;
	}

	.counter {
		grid-template-columns: 44px minmax(72px, 1fr) 44px;
		min-height: 46px;
		margin-top: 5px;
	}

	.counter__button {
		width: 44px;
		height: 44px;
	}

	.counter__input {
		min-height: 44px;
		font-size: 19px;
	}

	.field-help {
		display: block;
		margin-top: 4px;
		font-size: 10px;
	}

	.amount-card {
		margin-top: 8px;
		padding: 7px 0 5px;
	}

	.amount-card__value output {
		font-size: 26px;
	}

	.unit-price-row {
		min-height: 34px;
		margin-top: 0;
		padding: 5px 8px;
		font-size: 10px;
	}

	.primary-cta {
		min-height: 45px;
		margin-top: 8px;
		font-size: 14px;
	}

	.trust-strip {
		display: none;
	}

	.price-history {
		margin-top: 13px;
		padding: 12px 10px;
		border-radius: 13px;
	}

	.price-history__heading {
		display: flex;
		align-items: center;
		gap: 7px;
	}

	.price-history__eyebrow {
		font-size: 8px;
	}

	.price-history__heading h2 {
		font-size: clamp(13px, 3.5vw, 16px);
	}

	.price-history__periods {
		grid-template-columns: repeat(3, minmax(44px, 1fr));
		width: auto;
	}

	.price-history__periods button {
		min-height: 44px;
		padding: 4px;
		font-size: 10px;
	}

	.price-history__chart {
		height: 132px;
		margin-top: 9px;
	}

	.price-history__empty {
		padding-inline: 8px;
		font-size: 10px;
	}

	.price-history__stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0;
		margin-top: 9px;
		border-radius: 8px;
	}

	.price-history__stat,
	.price-history__stat--current {
		min-height: 68px;
		padding: 5px 3px;
	}

	.price-history__stat > span {
		font-size: 10px;
	}

	.price-history__stat strong {
		font-size: clamp(10px, 3.2vw, 13px);
	}

	.price-history__stat strong small {
		font-size: 8px;
	}

	.price-history__change {
		margin-inline-start: 3px;
		font-size: 8px;
	}

	.market-guide {
		padding-block: 38px 45px;
	}
}

@media (max-width: 374px) {
	.shell,
	.site-header__inner,
	.site-header--with-menu .site-header__inner {
		width: calc(100% - 24px);
	}

	.hero-copy h1 {
		font-size: 23px;
	}

	.hero-product__image {
		width: 215px;
	}

	.price-history__periods {
		grid-template-columns: repeat(3, minmax(44px, 1fr));
		width: 100%;
	}

	.price-history__heading {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 7px;
	}

	.price-history__periods button {
		padding-inline: 2px;
		font-size: 9px;
	}

	.price-history__stat strong {
		font-size: 10px;
	}
}

@media (min-width: 960px) and (max-height: 820px) {
	.site-header__inner,
	.site-header--with-menu .site-header__inner {
		min-height: 62px;
	}

	.hero,
	body.admin-bar .hero {
		padding-block: 20px 5px;
	}

	.exchange-panel {
		padding: 16px;
	}

	.hero-showcase {
		min-height: 155px;
	}

	.trust-strip {
		margin-top: 10px;
	}

	.trust-strip li {
		min-height: 45px;
	}

	.price-history {
		padding-block: 13px;
	}

	.price-history__chart {
		height: 122px;
	}

	.price-history__stat,
	.price-history__stat--current {
		min-height: 62px;
	}
}
