@font-face {
	font-family: "Vazir";
	src: url("../fonts/Vazirmatn-FD-Regular.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Vazir";
	src: url("../fonts/Vazirmatn-FD-Medium.woff2") format("woff2");
	font-style: normal;
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: "Vazir";
	src: url("../fonts/Vazirmatn-FD-SemiBold.woff2") format("woff2");
	font-style: normal;
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Vazir";
	src: url("../fonts/Vazirmatn-FD-Bold.woff2") format("woff2");
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Vazir";
	src: url("../fonts/Vazirmatn-FD-ExtraBold.woff2") format("woff2");
	font-style: normal;
	font-weight: 800;
	font-display: swap;
}

@font-face {
	font-family: "Vazir";
	src: url("../fonts/Vazirmatn-FD-Black.woff2") format("woff2");
	font-style: normal;
	font-weight: 900;
	font-display: swap;
}

:root {
	--color-primary: #087d67;
	--color-primary-strong: #045b4c;
	--color-primary-soft: #dff7ef;
	--color-primary-mist: #f1fbf7;
	--color-art-mid: #75d7bc;
	--color-art-accent: #16b58f;
	--color-on-primary: #ffffff;
	--color-background: #fbfdfb;
	--color-surface: #ffffff;
	--color-surface-soft: #f5fbf8;
	--color-foreground: #161d1b;
	--color-muted: #5f6b67;
	--color-border: #d7ebe4;
	--color-danger: #b42318;
	--color-focus: #08a784;
	--color-primary-rgb: 8, 125, 103;
	--color-primary-strong-rgb: 4, 91, 76;
	--color-surface-rgb: 255, 255, 255;
	--color-background-rgb: 251, 253, 251;
	--color-border-rgb: 215, 235, 228;
	--color-foreground-rgb: 22, 29, 27;
	--brand-logo-width: 148px;
	--shadow-sm: 0 8px 24px rgba(var(--color-primary-strong-rgb), 0.07);
	--shadow-md: 0 22px 62px rgba(var(--color-primary-strong-rgb), 0.1);
	--radius-sm: 14px;
	--radius-md: 22px;
	--radius-lg: 32px;
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;
	--z-header: 30;
	--z-dialog: 100;
}

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

html {
	width: 100%;
	min-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	scroll-behavior: smooth;
	scrollbar-gutter: stable;
	font-family: "Vazir", Tahoma, Arial, sans-serif;
	font-synthesis: none;
}

body {
	width: 100%;
	min-height: 100%;
	min-width: 320px;
	margin: 0;
	overflow-x: hidden;
	overflow-x: clip;
	overflow-y: visible;
	background:
		radial-gradient(circle at 8% 58%, rgba(var(--color-primary-rgb), 0.09), transparent 24rem),
		radial-gradient(circle at 88% 12%, rgba(var(--color-primary-rgb), 0.06), transparent 30rem),
		var(--color-background);
	color: var(--color-foreground);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

html.has-open-dialog,
body.has-open-dialog {
	overflow: hidden;
}

button,
input,
select,
textarea,
option,
output {
	font-family: "Vazir", Tahoma, Arial, sans-serif;
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(rgba(var(--color-primary-rgb), 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.018) 1px, transparent 1px);
	background-size: 64px 64px;
	content: "";
	pointer-events: none;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

button {
	color: inherit;
}

svg {
	display: block;
}

:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 3px;
}

.shell {
	width: min(1240px, calc(100% - 40px));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	top: 12px;
	right: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: 12px 18px;
	margin: 0;
	clip: auto;
	background: var(--color-surface);
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
}

/* Header */
.site-header {
	position: relative;
	z-index: var(--z-header);
	padding-top: 8px;
}

.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas: "actions brand";
	align-items: center;
	min-height: 72px;
	padding: 8px 20px;
	direction: ltr;
	background: rgba(var(--color-surface-rgb), 0.9);
	border: 1px solid rgba(var(--color-border-rgb), 0.8);
	border-radius: 20px;
	box-shadow: var(--shadow-sm);
	backdrop-filter: blur(18px);
}

.site-header--with-rate .site-header__inner {
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "actions rate brand";
}

.brand-mark {
	grid-area: brand;
	justify-self: end;
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	color: var(--color-primary);
	border-radius: 16px;
}

.brand-mark svg,
.brand-mark img {
	width: 42px;
	height: 42px;
	object-fit: contain;
}

.brand-mark .custom-logo-link {
	display: contents;
}

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

.brand-mark--custom .brand-mark__image {
	width: 100%;
	max-width: var(--brand-logo-width);
	height: 52px;
	object-fit: contain;
}

.rate-wrap {
	position: relative;
	grid-area: rate;
	direction: rtl;
}

.rate-chip {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	gap: 10px;
	padding: 6px 15px;
	background: linear-gradient(135deg, var(--color-surface-soft), var(--color-primary-mist));
	border: 1px solid var(--color-border);
	border-radius: 15px;
	cursor: pointer;
	transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.rate-chip:hover,
.rate-chip[aria-expanded="true"] {
	border-color: var(--color-primary);
	box-shadow: 0 8px 22px rgba(var(--color-primary-strong-rgb), 0.08);
}

.rate-chip__dot {
	width: 9px;
	height: 9px;
	background: var(--color-primary);
	border-radius: 50%;
	box-shadow: 0 0 0 5px rgba(var(--color-primary-rgb), 0.1);
}

.rate-chip strong,
.rate-chip small {
	display: block;
}

.rate-chip strong {
	font-size: 14px;
	font-weight: 700;
}

.rate-chip small {
	color: var(--color-muted);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.rate-chip > svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: var(--color-primary-strong);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.2;
	transition: transform 180ms ease-out;
}

.rate-chip[aria-expanded="true"] > svg {
	transform: rotate(180deg);
}

.rate-popover {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 10;
	min-width: 230px;
	padding: 16px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 16px;
	box-shadow: var(--shadow-sm);
}

.rate-popover strong,
.rate-popover span {
	display: block;
}

.rate-popover span {
	margin-top: 3px;
	color: var(--color-muted);
	font-size: 13px;
}

.header-actions {
	grid-area: actions;
	display: flex;
	align-items: center;
	gap: 12px;
	direction: rtl;
}

.account-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 0;
	cursor: pointer;
}

.account-button {
	color: var(--color-foreground);
	background: var(--color-primary-mist);
	border: 1px solid var(--color-border);
	border-radius: 14px;
}

.account-button svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.8;
}

/* Hero and exchange */
.site-main {
	position: relative;
	max-height: none;
	overflow: visible;
}

.hero {
	min-height: calc(100dvh - 83px);
	padding-block: 18px 10px;
	max-height: none;
	overflow: visible;
}

@media (min-width: 960px) {
	body.admin-bar .hero {
		min-height: calc(100dvh - 115px);
	}
}

.hero-layout {
	display: grid;
	grid-template-columns: minmax(480px, 0.96fr) minmax(500px, 1.04fr);
	gap: clamp(36px, 5vw, 66px);
	align-items: center;
	direction: rtl;
	max-height: none;
	overflow: visible;
}

.exchange-panel {
	position: relative;
	padding: 24px;
	background: rgba(var(--color-surface-rgb), 0.9);
	border: 1px solid rgba(var(--color-border-rgb), 0.9);
	border-radius: 30px;
	box-shadow: var(--shadow-md);
	backdrop-filter: blur(14px);
	max-height: none;
	overflow: visible;
}

.exchange-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	padding: 5px;
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 20px;
}

.exchange-tab {
	min-height: 48px;
	padding: 8px 14px;
	color: var(--color-foreground);
	background: transparent;
	border: 0;
	border-radius: 15px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	transition: color 180ms ease-out, background 180ms ease-out, box-shadow 180ms ease-out;
}

.exchange-tab.is-active {
	color: var(--color-on-primary);
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
	box-shadow: 0 8px 20px rgba(var(--color-primary-strong-rgb), 0.2);
}

.exchange-form {
	position: relative;
	padding-top: 14px;
	max-height: none;
	overflow: visible;
}

.quantity-card,
.amount-card {
	position: relative;
	background: linear-gradient(135deg, rgba(var(--color-surface-rgb), 0.98), var(--color-surface-soft));
	border: 1px solid var(--color-border);
	border-radius: 20px;
}

.quantity-card {
	padding: 14px 18px 12px;
}

.field-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	font-weight: 700;
}

.field-icon {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	color: var(--color-primary);
	background: var(--color-primary-soft);
	border: 1px solid var(--color-border);
	border-radius: 50%;
}

.field-icon svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.counter {
	display: grid;
	grid-template-columns: 48px minmax(120px, 1fr) 48px;
	align-items: center;
	gap: 14px;
	margin-top: 4px;
}

.counter__button {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	color: var(--color-primary-strong);
	background: rgba(var(--color-surface-rgb), 0.68);
	border: 1px solid var(--color-border);
	border-radius: 14px;
	cursor: pointer;
	transition: background 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out;
}

.counter__button:hover:not(:disabled) {
	background: var(--color-primary-soft);
	border-color: var(--color-primary);
}

.counter__button:active:not(:disabled) {
	transform: scale(0.97);
}

.counter__button:disabled {
	cursor: not-allowed;
	opacity: 0.42;
}

.counter__button svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2;
}

.counter__value {
	text-align: center;
}

.counter__input {
	display: block;
	width: 100%;
	min-height: 54px;
	padding: 0;
	color: var(--color-foreground);
	background: transparent;
	border: 0;
	font-family: inherit;
	font-size: clamp(40px, 4vw, 50px);
	font-weight: 800;
	line-height: 1;
	text-align: center;
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
}

.counter__input::-webkit-inner-spin-button,
.counter__input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.counter__input:focus-visible {
	border-radius: 12px;
}

.counter__value span {
	display: block;
	margin-top: 0;
	color: var(--color-muted);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.field-help {
	margin: 2px 0 0;
	color: var(--color-muted);
	font-size: 11px;
	line-height: 1.6;
	text-align: center;
}

.exchange-bridge {
	position: relative;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin: -10px auto;
	color: var(--color-primary);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 50%;
	box-shadow: 0 10px 22px rgba(var(--color-primary-strong-rgb), 0.14);
}

.exchange-bridge svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.amount-card {
	padding: 14px 18px 12px;
}

.amount-card__value {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin-top: 2px;
}

.amount-card__value output {
	color: var(--color-primary-strong);
	font-size: clamp(32px, 3.4vw, 42px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
}

.amount-card__value span {
	font-size: 15px;
	font-weight: 700;
}

.unit-price-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 14px;
	min-height: 48px;
	margin-top: 10px;
	padding: 8px 14px;
	background: rgba(var(--color-surface-rgb), 0.9);
	border: 1px solid var(--color-border);
	border-radius: 14px;
	font-size: 13px;
}

.unit-price-row strong {
	color: var(--color-primary-strong);
	font-variant-numeric: tabular-nums;
}

.live-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 8px;
	color: var(--color-primary-strong);
	background: var(--color-primary-soft);
	border-radius: 9px;
	font-size: 12px;
	font-weight: 700;
}

.live-badge i {
	width: 7px;
	height: 7px;
	background: var(--color-primary);
	border-radius: 50%;
}

.primary-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	gap: 14px;
	width: 100%;
	margin-top: 10px;
	padding: 10px 20px;
	color: var(--color-on-primary);
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
	border: 0;
	border-radius: 15px;
	box-shadow: 0 12px 28px rgba(var(--color-primary-strong-rgb), 0.17);
	cursor: pointer;
	font-size: 16px;
	font-weight: 800;
	transition: transform 180ms ease-out, box-shadow 180ms ease-out, filter 180ms ease-out;
}

.primary-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 16px 30px rgba(var(--color-primary-strong-rgb), 0.23);
	filter: saturate(1.06);
}

.primary-cta:active {
	transform: translateY(0) scale(0.995);
}

.primary-cta svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.exchange-status {
	min-height: 0;
	margin: 10px 0 0;
	color: var(--color-primary-strong);
	font-size: 13px;
	text-align: center;
}

.exchange-status:empty {
	display: none;
}

/* Hero copy and live market overview */
.hero-intro {
	min-width: 0;
}

.hero-copy {
	position: relative;
	z-index: 2;
	max-width: 590px;
}

.hero-copy h1 {
	margin: 0;
	font-size: clamp(38px, 3.8vw, 54px);
	font-weight: 900;
	line-height: 1.28;
	letter-spacing: -0.045em;
}

.hero-copy h1 span {
	display: inline-block;
	font-size: 0.84em;
	letter-spacing: -0.04em;
}

.hero-copy__lead {
	margin: 12px 0 0;
	color: var(--color-primary);
	font-size: clamp(20px, 1.9vw, 26px);
	font-weight: 800;
}

.hero-copy__text {
	max-width: 600px;
	margin: 12px 0 0;
	color: var(--color-muted);
	font-size: 15px;
	line-height: 1.8;
}

.market-visual {
	width: min(490px, 100%);
	margin-top: 34px;
}

.market-visual__card {
	padding: 20px;
	background: rgba(var(--color-surface-rgb), 0.86);
	border: 1px solid var(--color-border);
	border-radius: 22px;
	box-shadow: 0 18px 50px rgba(var(--color-primary-strong-rgb), 0.075);
}

.market-visual__heading {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
}

.market-visual__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: var(--color-primary-strong);
	background: var(--color-primary-soft);
	border-radius: 14px;
}

.market-visual__icon svg {
	width: 25px;
	height: 25px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.market-visual__heading strong,
.market-visual__heading small {
	display: block;
}

.market-visual__heading strong {
	font-size: 14px;
	font-weight: 800;
}

.market-visual__heading small,
.market-visual__prices small {
	color: var(--color-muted);
	font-size: 11px;
}

.market-visual__live {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 9px;
	color: var(--color-primary-strong);
	background: var(--color-primary-mist);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.market-visual__live i {
	width: 7px;
	height: 7px;
	background: var(--color-primary);
	border-radius: 50%;
}

.market-visual__prices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 17px;
}

.market-visual__prices article {
	display: grid;
	gap: 3px;
	padding: 12px;
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 15px;
}

.market-visual__prices article > span {
	color: var(--color-muted);
	font-size: 12px;
}

.market-visual__prices strong {
	color: var(--color-primary-strong);
	font-size: 23px;
	font-variant-numeric: tabular-nums;
	line-height: 1.35;
}

.market-visual__note {
	margin: 12px 0 0;
	color: var(--color-muted);
	font-size: 11px;
}

.trust-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	max-width: 1040px;
	margin: 10px auto 0;
	padding: 0;
	list-style: none;
}

.trust-strip li {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 60px;
	padding: 8px 20px;
	border-left: 1px solid var(--color-border);
}

.trust-strip li:last-child {
	border-left: 0;
}

.trust-icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	color: var(--color-primary);
	background: var(--color-primary-mist);
	border: 1px solid var(--color-border);
	border-radius: 50%;
}

.trust-icon svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.trust-strip strong,
.trust-strip small {
	display: block;
}

.trust-strip strong {
	font-size: 14px;
	font-weight: 800;
}

.trust-strip small {
	margin-top: 2px;
	color: var(--color-muted);
	font-size: 12px;
}

/* Public, truthful TF2 price history */
.price-history {
	margin-top: 8px;
	padding: 28px;
	background: rgba(var(--color-surface-rgb), 0.88);
	border: 1px solid var(--color-border);
	border-radius: 28px;
	box-shadow: var(--shadow-sm);
}

.price-history__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.price-history__eyebrow,
.market-guide__intro > span {
	display: block;
	color: var(--color-primary);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.price-history__heading h2,
.market-guide__intro h2 {
	margin: 5px 0 0;
	font-size: clamp(21px, 2.2vw, 28px);
	line-height: 1.45;
}

.price-history__heading p,
.market-guide__intro > p {
	margin: 6px 0 0;
	color: var(--color-muted);
	font-size: 13px;
	line-height: 1.9;
}

.price-history__periods {
	display: inline-grid;
	grid-template-columns: repeat(3, minmax(74px, 1fr));
	gap: 4px;
	padding: 4px;
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 14px;
}

.price-history__periods button {
	min-height: 44px;
	padding: 6px 12px;
	background: transparent;
	border: 0;
	border-radius: 11px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	transition: color 180ms ease-out, background 180ms ease-out;
}

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

.price-history__chart {
	position: relative;
	height: 218px;
	margin-top: 22px;
	background-image: linear-gradient(rgba(var(--color-border-rgb), 0.45) 1px, transparent 1px);
	background-size: 100% 25%;
	border-bottom: 1px solid var(--color-border);
}

.price-history__chart svg {
	width: 100%;
	height: 100%;
}

.price-history__area {
	fill: url(#tf2-history-gradient);
}

.price-history__line {
	fill: none;
	stroke: var(--color-primary);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 3;
	vector-effect: non-scaling-stroke;
}

.price-history__point {
	display: none;
	fill: var(--color-primary);
	stroke: var(--color-surface);
	stroke-width: 3;
	vector-effect: non-scaling-stroke;
}

.price-history.has-chart .price-history__point {
	display: block;
}

.price-history__empty {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	margin: 0;
	color: var(--color-muted);
	font-size: 13px;
	text-align: center;
}

.price-history__empty[hidden] {
	display: none;
}

.price-history__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 20px;
}

.price-history__stat {
	display: grid;
	align-content: center;
	gap: 6px;
	min-width: 0;
	min-height: 100px;
	padding: 14px;
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 17px;
}

.price-history__stat--current {
	background: var(--color-primary-mist);
}

.price-history__stat > span {
	color: var(--color-muted);
	font-size: 12px;
}

.price-history__stat strong {
	color: var(--color-primary-strong);
	font-size: clamp(15px, 1.55vw, 20px);
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
	white-space: nowrap;
}

.price-history__stat strong b {
	font-weight: 800;
}

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

.price-history__change {
	margin-inline-start: 7px;
	color: var(--color-primary-strong);
	font-size: 11px;
	font-style: normal;
	font-variant-numeric: tabular-nums;
}

.price-history__change.is-negative {
	color: var(--color-danger);
}

/* Helpful, crawlable single-page marketplace guide */
.market-guide {
	padding-block: 70px 80px;
}

.market-guide__intro {
	max-width: 800px;
}

.market-guide__intro > p {
	font-size: 14px;
}

.market-guide__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 24px;
}

.market-guide__cards article {
	padding: 20px;
	background: rgba(var(--color-surface-rgb), 0.86);
	border: 1px solid var(--color-border);
	border-radius: 19px;
}

.market-guide__cards h3 {
	margin: 0;
	color: var(--color-primary-strong);
	font-size: 15px;
}

.market-guide__cards p,
.market-guide__faq details p {
	margin: 9px 0 0;
	color: var(--color-muted);
	font-size: 13px;
	line-height: 1.95;
}

.market-guide__faq {
	max-width: 900px;
	margin-top: 42px;
}

.market-guide__faq h2 {
	margin: 0 0 14px;
	font-size: 21px;
}

.market-guide__faq details {
	padding: 14px 16px;
	background: rgba(var(--color-surface-rgb), 0.82);
	border: 1px solid var(--color-border);
	border-radius: 14px;
}

.market-guide__faq details + details {
	margin-top: 8px;
}

.market-guide__faq summary {
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
}

/* Login dialog */
.auth-dialog {
	z-index: var(--z-dialog);
	width: min(470px, calc(100% - 32px));
	padding: 34px;
	color: var(--color-foreground);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 30px;
	box-shadow: 0 32px 90px rgba(var(--color-primary-strong-rgb), 0.22);
	text-align: right;
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.auth-dialog::backdrop {
	background: rgba(var(--color-foreground-rgb), 0.48);
	backdrop-filter: blur(5px);
}

.auth-dialog.is-open {
	position: fixed;
	inset: 50% auto auto 50%;
	display: block;
	transform: translate(-50%, -50%);
}

.dialog-close {
	position: absolute;
	top: 18px;
	left: 18px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--color-primary-mist);
	border: 1px solid var(--color-border);
	border-radius: 14px;
	cursor: pointer;
}

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

.auth-dialog__brand {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	margin-bottom: 18px;
	color: var(--color-primary);
	background: var(--color-primary-mist);
	border-radius: 19px;
}

.auth-dialog__brand svg,
.auth-dialog__logo {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.auth-dialog h2 {
	margin: 0;
	font-size: 27px;
}

.auth-dialog > p {
	margin: 8px 0 20px;
	color: var(--color-muted);
}

.otp-form label {
	display: block;
	margin-bottom: 7px;
	font-weight: 700;
}

.otp-form input {
	width: 100%;
	min-height: 54px;
	padding: 10px 14px;
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 15px;
	direction: ltr;
	font-size: 16px;
	text-align: left;
}

.otp-form input[aria-invalid="true"] {
	border-color: var(--color-danger);
}

.otp-form .primary-cta {
	min-height: 54px;
	margin-top: 14px;
}

.field-error {
	display: block;
	min-height: 20px;
	margin-top: 5px;
	color: var(--color-danger);
	font-size: 12px;
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0;
	color: var(--color-muted);
	font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
	flex: 1;
	height: 1px;
	background: var(--color-border);
	content: "";
}

.steam-auth {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	gap: 10px;
	padding: 10px 16px;
	color: var(--color-foreground);
	background: var(--color-surface-soft);
	border: 1px solid var(--color-border);
	border-radius: 15px;
	font-weight: 700;
}

.steam-auth:hover {
	border-color: var(--color-primary);
	background: var(--color-primary-mist);
}

.steam-auth svg {
	width: 25px;
	height: 25px;
	fill: none;
	stroke: var(--color-primary);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.auth-dialog .auth-note {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.75;
}

/* Content fallback */
.content-view {
	padding-block: 56px;
}

.content-card {
	max-width: 860px;
	margin-inline: auto;
	padding: 40px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.content-card h1 {
	margin-top: 0;
}

@media (max-width: 1199px) {
	.hero-layout {
		grid-template-columns: minmax(440px, 0.95fr) minmax(440px, 1.05fr);
		gap: 34px;
	}

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

	.exchange-panel {
		padding: 22px;
	}

}

@media (max-width: 959px) {
	.hero {
		min-height: 0;
	}

	.site-header__inner {
		grid-template-columns: auto 1fr;
		grid-template-areas: "actions brand";
		padding-inline: 18px;
	}

	.site-header--with-rate .site-header__inner {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "actions rate brand";
	}

	.hero-layout {
		grid-template-columns: 1fr;
		max-width: 620px;
		margin-inline: auto;
		gap: 28px;
	}

	.hero-intro {
		order: -1;
	}

	.hero-copy {
		margin-inline: auto;
		text-align: center;
	}

	.hero-copy__text {
		margin-inline: auto;
	}

	.market-visual {
		display: none;
	}

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

	.market-guide__cards {
		grid-template-columns: 1fr;
	}
}

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

	body::before {
		background-size: 48px 48px;
		opacity: 0.55;
	}

	.shell {
		width: min(100% - 24px, 540px);
	}

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

	.site-header__inner {
		width: min(100% - 24px, 560px);
		min-height: 64px;
		padding: 6px 2px;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		backdrop-filter: none;
	}

	.brand-mark {
		width: 44px;
		height: 44px;
	}

	.brand-mark svg,
	.brand-mark img {
		width: 39px;
		height: 39px;
	}

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

	.brand-mark--custom .brand-mark__image {
		width: 100%;
		max-width: min(var(--brand-logo-width), 36vw, 136px);
		height: 46px;
	}

	.rate-wrap {
		justify-self: center;
	}

	.rate-chip {
		min-height: 44px;
		padding: 4px 11px;
		border-radius: 15px;
	}

	.rate-chip strong {
		font-size: 13px;
	}

	.rate-chip small {
		font-size: 11px;
	}

	.rate-popover {
		right: 50%;
		transform: translateX(50%);
	}

	.header-actions {
		justify-self: end;
	}

	.account-button {
		width: 44px;
		height: 44px;
		border-radius: 50%;
	}

	.hero {
		padding-block: 18px 10px;
	}

	.hero-layout {
		gap: 18px;
	}

	.hero-copy {
		padding-inline: 4px;
	}

	.hero-copy h1 {
		font-size: clamp(29px, 8.5vw, 36px);
		line-height: 1.3;
	}

	.hero-copy h1 span {
		font-size: 0.82em;
	}

	.hero-copy__lead {
		margin-top: 7px;
		color: var(--color-muted);
		font-size: 16px;
		font-weight: 600;
	}

	.hero-copy__text {
		display: none;
	}

	.exchange-panel {
		padding: 12px;
		border-radius: 24px;
		box-shadow: 0 22px 54px rgba(var(--color-primary-strong-rgb), 0.1);
	}

	.exchange-tabs {
		padding: 4px;
		border-radius: 17px;
	}

	.exchange-tab {
		min-height: 44px;
		padding-inline: 8px;
		border-radius: 13px;
		font-size: 15px;
	}

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

	.quantity-card,
	.amount-card {
		border-radius: 18px;
	}

	.quantity-card {
		padding: 12px;
	}

	.field-heading {
		min-height: 26px;
		font-size: 14px;
	}

	.field-icon {
		display: none;
	}

	.counter {
		grid-template-columns: 48px minmax(100px, 1fr) 48px;
		gap: 8px;
		margin-top: 4px;
	}

	.counter__button {
		width: 48px;
		height: 48px;
		border-radius: 14px;
	}

	.counter__input {
		min-height: 48px;
		font-size: clamp(40px, 12vw, 48px);
	}

	.field-help {
		display: none;
	}

	.exchange-bridge {
		width: 48px;
		height: 48px;
		margin: -10px auto;
	}

	.amount-card {
		padding: 12px;
	}

	.amount-card__value {
		align-items: baseline;
		margin-top: 2px;
	}

	.amount-card__value output {
		font-size: clamp(32px, 10vw, 42px);
	}

	.amount-card__value span {
		font-size: 14px;
	}

	.unit-price-row {
		grid-template-columns: 1fr auto;
		gap: 8px;
		min-height: 46px;
		margin-top: 8px;
		padding-inline: 14px;
		font-size: 13px;
	}

	.live-badge {
		display: none;
	}

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

	.trust-strip {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		margin-top: 14px;
	}

	.trust-strip li {
		justify-content: flex-start;
		min-height: 72px;
		gap: 8px;
		padding: 9px;
		background: rgba(var(--color-surface-rgb), 0.9);
		border: 1px solid var(--color-border);
		border-radius: 16px;
	}

	.trust-strip li:nth-child(3) {
		display: none;
	}

	.trust-icon {
		flex: 0 0 auto;
		width: 38px;
		height: 38px;
	}

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

	.trust-strip strong {
		font-size: 13px;
	}

	.trust-strip small {
		font-size: 10px;
		line-height: 1.6;
	}

	.price-history {
		margin-top: 14px;
		padding: 16px 13px;
		border-radius: 20px;
	}

	.price-history__heading {
		display: grid;
		gap: 13px;
	}

	.price-history__heading h2 {
		font-size: 20px;
	}

	.price-history__heading p {
		font-size: 11px;
	}

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

	.price-history__periods button {
		min-height: 44px;
		padding-inline: 6px;
	}

	.price-history__chart {
		height: 164px;
		margin-top: 15px;
	}

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

	.price-history__stats {
		gap: 8px;
		margin-top: 13px;
	}

	.price-history__stat {
		min-height: 87px;
		padding: 10px;
		border-radius: 14px;
	}

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

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

	.market-guide {
		padding-block: 44px 54px;
	}

	.market-guide__intro h2 {
		font-size: 22px;
	}

	.market-guide__intro > p {
		font-size: 13px;
	}

	.market-guide__cards {
		gap: 9px;
		margin-top: 17px;
	}

	.market-guide__cards article {
		padding: 16px;
	}

	.market-guide__faq {
		margin-top: 30px;
	}

	.market-guide__faq h2 {
		font-size: 18px;
	}

	.market-guide__faq summary {
		font-size: 12px;
	}

	.auth-dialog {
		padding: 28px 20px 22px;
		border-radius: 26px;
	}

	.dialog-close {
		top: 12px;
		left: 12px;
	}
}

@media (max-width: 374px) {
	.shell {
		width: calc(100% - 20px);
	}

	.rate-chip > svg,
	.rate-chip__dot {
		display: none;
	}

	.exchange-panel {
		padding: 10px;
	}

	.counter {
		grid-template-columns: 48px minmax(80px, 1fr) 48px;
	}

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

	.trust-strip small {
		display: none;
	}
}

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

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
