/**
 * Topbar, header, desktop nav, mobile drawer.
 */

.eav-topbar {
	background: var(--eav-color-dark);
	color: var(--eav-color-on-dark);
	font-size: var(--eav-text-xs);
	min-height: var(--eav-topbar-height);
}

.eav-topbar__inner {
	width: min(100% - 2rem, var(--eav-container));
	margin-inline: auto;
	min-height: var(--eav-topbar-height);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.eav-topbar__market {
	opacity: 0.9;
	font-weight: 500;
}

.eav-topbar__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.eav-topbar a {
	color: inherit;
	text-decoration: none;
	opacity: 0.92;
}

.eav-topbar a:hover,
.eav-topbar a:focus-visible {
	opacity: 1;
	color: #fff;
}

.eav-topbar__quick {
	display: none;
	gap: 0.5rem;
}

.eav-topbar__quick a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2rem;
	padding: 0.25rem 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--eav-radius-small);
	font-size: var(--eav-text-xs);
	font-weight: 600;
}

@media (max-width: 767px) {
	.eav-topbar__desktop {
		display: none;
	}

	.eav-topbar__quick {
		display: flex;
	}

	.eav-topbar__market {
		font-size: 0.7rem;
	}
}

/* Site header */
.eav-header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--eav-color-border);
	backdrop-filter: blur(8px);
	transition: background var(--eav-transition-normal), border-color var(--eav-transition-normal), box-shadow var(--eav-transition-normal);
}

body.admin-bar .eav-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .eav-header {
		top: 46px;
	}
}

.eav-header.is-scrolled {
	box-shadow: var(--eav-shadow-soft);
}

.eav-header--dark {
	background: rgba(11, 14, 17, 0.94);
	border-bottom-color: rgba(255, 255, 255, 0.08);
	color: var(--eav-color-on-dark);
}

.eav-header--transparent {
	background: transparent;
	border-bottom-color: transparent;
	color: #fff;
}

.eav-header--transparent.is-scrolled,
.eav-header--transparent.is-solid {
	background: rgba(255, 255, 255, 0.96);
	border-bottom-color: var(--eav-color-border);
	color: var(--eav-color-text);
}

.eav-header__inner {
	width: min(100% - 2rem, var(--eav-container));
	max-width: 100%;
	margin-inline: auto;
	min-height: var(--eav-header-height);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.eav-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	text-decoration: none;
	color: inherit;
	flex: 0 0 auto;
	max-width: min(14rem, 48vw);
	min-width: 0;
}

.eav-brand:hover,
.eav-brand:focus-visible {
	color: inherit;
	text-decoration: none;
}

.eav-brand__logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 2rem;
	object-fit: contain;
	object-position: left center;
	background: transparent;
	filter: none;
}

.eav-brand__wordmark {
	font-family: var(--eav-font-heading);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
	line-height: 1;
	white-space: nowrap;
}

.eav-brand__mark {
	font-family: var(--eav-font-heading);
	font-weight: 600;
	font-size: 0.75rem;
	opacity: 0.8;
	white-space: nowrap;
	align-self: flex-end;
	padding-bottom: 0.1rem;
}

/* Footer / dark surfaces: keep wordmark readable; never invent a white PNG. */
.eav-footer .eav-brand__wordmark,
.eav-footer .eav-brand__mark,
.eav-header--dark .eav-brand__wordmark,
.eav-header--dark .eav-brand__mark,
.eav-header--transparent .eav-brand__wordmark,
.eav-header--transparent .eav-brand__mark {
	color: inherit;
}

.eav-nav {
	display: none;
	flex: 1 1 auto;
	justify-content: center;
	min-width: 0;
	overflow: visible;
}

/* Desktop nav only when there is room for logo + links + tools + CTA. */
@media (min-width: 1280px) {
	.eav-nav {
		display: flex;
	}
}

.eav-nav__list {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
	max-width: 100%;
}

.eav-nav__item {
	position: relative;
	flex: 0 1 auto;
	min-width: 0;
}

.eav-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	min-height: 2.75rem;
	padding: 0.35rem 0.55rem;
	color: inherit;
	text-decoration: none;
	font-family: var(--eav-font-heading);
	font-size: var(--eav-text-sm);
	font-weight: 500;
	border-radius: var(--eav-radius-small);
	white-space: nowrap;
}

.eav-nav__link:hover,
.eav-nav__link:focus-visible,
.eav-nav__item.is-active > .eav-nav__link,
.eav-nav__link[aria-current="page"] {
	color: var(--eav-color-primary);
	text-decoration: none;
}

.eav-header--dark .eav-nav__link:hover,
.eav-header--transparent:not(.is-scrolled):not(.is-solid) .eav-nav__link:hover {
	color: var(--eav-color-primary-light);
}

.eav-nav__chevron {
	font-size: 0.65rem;
	opacity: 0.7;
}

.eav-nav__sub {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 14rem;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	background: #fff;
	color: var(--eav-color-text);
	border: 1px solid var(--eav-color-border);
	border-radius: var(--eav-radius-medium);
	box-shadow: var(--eav-shadow-soft);
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.35rem);
	transition: opacity var(--eav-transition-fast), transform var(--eav-transition-fast), visibility var(--eav-transition-fast);
	z-index: 30;
}

.eav-nav__item:hover > .eav-nav__sub,
.eav-nav__item:focus-within > .eav-nav__sub,
.eav-nav__item.is-open > .eav-nav__sub,
.eav-nav .menu-item:hover > .sub-menu,
.eav-nav .menu-item:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.eav-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 14rem;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	background: #fff;
	color: var(--eav-color-text);
	border: 1px solid var(--eav-color-border);
	border-radius: var(--eav-radius-medium);
	box-shadow: var(--eav-shadow-soft);
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.35rem);
	z-index: 30;
}

.eav-nav .menu-item {
	position: relative;
	flex: 0 1 auto;
	min-width: 0;
	list-style: none;
}

.eav-nav__sub a,
.eav-nav__sub .eav-nav__sublink {
	display: block;
	padding: 0.55rem 0.7rem;
	border-radius: var(--eav-radius-small);
	color: var(--eav-color-text);
	text-decoration: none;
	font-size: var(--eav-text-sm);
	white-space: normal;
}

.eav-nav__sub a:hover,
.eav-nav__sub a:focus-visible {
	background: var(--eav-color-surface);
	color: var(--eav-color-primary-dark);
}

.eav-header__tools {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin-left: auto;
	flex: 0 0 auto;
	min-width: 0;
}

.eav-header__account-link {
	display: none;
	align-items: center;
	padding: 0.45rem 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	border-radius: var(--eav-radius-small);
}

.eav-header__account-link:hover,
.eav-header__account-link:focus-visible {
	color: var(--eav-color-primary-dark);
	text-decoration: none;
	background: rgba(10, 127, 181, 0.08);
}

.eav-header--dark .eav-header__account-link:hover,
.eav-header--transparent:not(.is-scrolled):not(.is-solid) .eav-header__account-link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: inherit;
}

@media (min-width: 1100px) {
	/* Higher specificity so link/icon swap wins over .eav-icon-btn / generic anchors. */
	.eav-header__tools .eav-header__account-link {
		display: inline-flex;
	}

	.eav-header__tools .eav-header__account-icon {
		display: none;
	}
}

.eav-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.4rem;
	border: 0;
	background: transparent;
	color: inherit;
	border-radius: var(--eav-radius-small);
	cursor: pointer;
	text-decoration: none;
	flex-shrink: 0;
}

.eav-icon-btn:hover,
.eav-icon-btn:focus-visible {
	background: rgba(10, 127, 181, 0.08);
	color: inherit;
	text-decoration: none;
}

.eav-header--dark .eav-icon-btn:hover,
.eav-header--transparent:not(.is-scrolled):not(.is-solid) .eav-icon-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.eav-header__demo {
	display: none;
	flex: 0 0 auto;
	white-space: nowrap;
	padding-inline: 0.9rem;
	max-width: none;
}

/* CTA visible from tablet landscape; full desktop nav from 1280px. */
@media (min-width: 900px) {
	.eav-header__demo {
		display: inline-flex;
		margin-left: 0.15rem;
	}
}

.eav-menu-toggle {
	display: inline-flex;
}

@media (min-width: 1280px) {
	.eav-menu-toggle {
		display: none;
	}
}

/* Tighter header tools between 1280–1439 when nav is present. */
@media (min-width: 1280px) and (max-width: 1439px) {
	.eav-header__inner {
		gap: 0.5rem;
		width: min(100% - 1.5rem, var(--eav-container));
	}

	.eav-nav__link {
		padding: 0.35rem 0.4rem;
		font-size: 0.875rem;
	}

	.eav-header__demo {
		padding-inline: 0.75rem;
		font-size: 0.875rem;
	}
}

/* Mobile drawer */
.eav-drawer {
	position: fixed;
	inset: 0;
	z-index: 300;
	pointer-events: none;
}

.eav-drawer.is-open {
	pointer-events: auto;
}

.eav-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 14, 17, 0.5);
	opacity: 0;
	transition: opacity var(--eav-transition-normal);
}

.eav-drawer.is-open .eav-drawer__backdrop {
	opacity: 1;
}

.eav-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(100%, 22rem);
	height: 100%;
	background: #fff;
	color: var(--eav-color-text);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform var(--eav-transition-normal);
	box-shadow: var(--eav-shadow-soft);
}

.eav-drawer.is-open .eav-drawer__panel {
	transform: translateX(0);
}

.eav-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem;
	border-bottom: 1px solid var(--eav-color-border);
}

.eav-drawer__body {
	overflow: auto;
	padding: 0.75rem 1rem 1.5rem;
	flex: 1;
}

.eav-drawer__nav {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eav-drawer__nav > li {
	border-bottom: 1px solid var(--eav-color-border);
}

.eav-drawer__nav a,
.eav-drawer__nav button.eav-drawer__parent {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	min-height: 3rem;
	padding: 0.75rem 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-weight: 600;
	text-align: left;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.eav-drawer__sub {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0 0 0 0.75rem;
	display: none;
}

.eav-drawer__item.is-open > .eav-drawer__sub {
	display: block;
}

.eav-drawer__sub a {
	font-weight: 500;
	min-height: 2.5rem;
	color: var(--eav-color-muted);
}

.eav-drawer__cta {
	display: grid;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.eav-drawer__contacts {
	display: grid;
	gap: 0.5rem;
	margin-top: 1rem;
}
