@font-face {
  font-family: "Lumina Navigation";
  src: url("/images/home/instrument-sans.woff2") format("woff2");
  font-display: swap;
  font-weight: 400 700;
}

header:has(a[href="/"] img[src="/logo.png"]) {
  --nav-surface: var(--background, #141416);
  --nav-accent: #7650c8;
  font-family: "Lumina Navigation", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--nav-surface);
  border-bottom: 1px solid var(--border);
}
.dark header:has(a[href="/"] img[src="/logo.png"]) { --nav-accent: #cab2ff; }

header.fixed:has(a[href="/"] img[src="/logo.png"]) > div {
  max-width: 1440px;
  padding: 0 var(--lumina-nav-inset);
  transition: none;
}
header.fixed:has(a[href="/"] img[src="/logo.png"]) > div > nav {
  height: calc(var(--lumina-nav-height) - 1px);
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  transition: none;
}
header:has(a[href="/"] img[src="/logo.png"]) nav a:not(:has(img)) {
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
}
header:has(a[href="/"] img[src="/logo.png"]) nav a[aria-current="page"]:not(:has(img)) {
  color: var(--nav-accent);
  text-decoration: none;
}
header:has(a[href="/"] img[src="/logo.png"]) nav :is(a[title], button:has(.lucide-chevron-down)):is(:hover, [aria-expanded="true"]) {
  color: var(--nav-accent);
  background-color: color-mix(in srgb, var(--nav-surface) 86%, #000);
  text-decoration: none;
}
@media (min-width: 1024px) {
  header.fixed:has(a[href="/"] img[src="/logo.png"]) nav > div:first-child,
  header.sticky:has(a[href="/"] img[src="/logo.png"]) div:has(> a[href="/"] img[src="/logo.png"]) {
    flex: 0 0 174px;
    margin-inline-end: clamp(14px, 2vw, 36px);
  }
  header.fixed:has(a[href="/"] img[src="/logo.png"]) nav > div:nth-child(2),
  header.sticky:has(a[href="/"] img[src="/logo.png"]) div.ms-auto:has(nav) {
    flex: 1 1 auto;
    margin-inline-start: 0;
  }
  header.fixed:has(a[href="/"] img[src="/logo.png"]) nav > div:nth-child(2) > a + div.w-px,
  header.sticky:has(a[href="/"] img[src="/logo.png"]) div.ms-auto > div:has(> nav) {
    margin-inline-end: auto;
  }
  header.fixed:has(a[href="/"] img[src="/logo.png"]) nav > div:nth-child(2) > a + div.w-px {
    margin-inline-start: auto;
    margin-inline-end: 8px;
  }
}
@media (max-width: 480px) {
  header.fixed:has(.catalog-wallet-trigger) nav > div:first-child a { gap: 5px; }
  header.fixed:has(.catalog-wallet-trigger) nav span[title] {
    --lumina-word-width: min(110px, 100%);
    width: 110px;
  }
}
/* Header utilities: a compact balance readout and a single top-up affordance. */
header button.catalog-wallet-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 5px 0 11px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  font: 600 14px/1 "Lumina Navigation", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
header .catalog-wallet-trigger .wallet-plus,
header .catalog-wallet-trigger:not(:has(.wallet-plus))::after {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 6px;
  color: #49316f;
  background: #dccdf8;
  font: 500 18px/1 system-ui;
}
header button.catalog-wallet-trigger:is(:hover,[aria-expanded="true"]) { border-color: var(--nav-accent); }
header button:has(:is(.lucide-languages,.lucide-bell)) { width: 34px; height: 34px; border-radius: 8px; }
header button:has(:is(.lucide-languages,.lucide-bell)) svg { width: 17px; height: 17px; }
header button:has(> [data-slot="avatar"]) { width:34px; height:34px; padding:0; border-radius:5px; }
header button > [data-slot="avatar"] { width:100%; height:100%; border-radius:inherit; }
header button > [data-slot="avatar"]::after { border-radius:inherit; }
header button [data-slot="avatar-fallback"] { display:grid; place-items:center; padding:0; border-radius:inherit; line-height:1; text-align:center; }
header button [data-slot="avatar-fallback"] {
  color: #ecdefe !important;
  background: #4d3868 !important;
  box-shadow: inset 0 0 0 1px #816599;
}
@media (max-width: 480px) {
  header button.catalog-wallet-trigger { gap: 4px; padding-inline: 5px; }
  header:has(.catalog-wallet-trigger) nav > div.lg\:hidden { gap: 3px; }
}

/* Keep the same affordance on cached frontend bundles with a text-only balance button. */
header .catalog-wallet-trigger:not(:has(.wallet-plus)) {
  position: relative;
  padding-inline-end: 12px;
}
header .catalog-wallet-trigger:not(:has(.wallet-plus))::after {
  content: "+";
  position: absolute;
  inset-inline-end: 4px;
  pointer-events: none;
}

/* Match the Hot header rhythm while using the main site's artwork. */
:root {
  --lumina-nav-height: 72px;
  --lumina-nav-inset: 48px;
  --lumina-nav-word: 87px;
}
@media (max-width: 1100px) {
  :root { --lumina-nav-height: 64px; --lumina-nav-inset: 24px; }
}
@media (max-width: 860px) {
  :root { --lumina-nav-word: 75px; }
}
@media (max-width: 420px) {
  :root { --lumina-nav-inset: 12px; }
}
header.fixed nav > div:first-child a[href="/"]:has(img[src="/logo.png"]) {
  gap: 8px;
}
header.fixed nav a[href="/"] > div:has(img[src="/logo.png"]) {
  width: 28px;
  height: 28px;
}
header.fixed nav a[href="/"]:has(img[src="/logo.png"]) > span[title] {
  width: var(--lumina-nav-word);
}
header.fixed nav a[href="/"]:has(img[src="/logo.png"]) > span[title]::after {
  --lumina-lettering: url("/brand/lumina-wordmark-spaced.svg") center / contain no-repeat;
  width: min(var(--lumina-nav-word), 100%);
  aspect-ratio: 1010 / 190;
}
[data-slot="sidebar-wrapper"]:has(header.catalog-fixed-header) { --app-header-height: var(--lumina-nav-height); }
body:has(header.catalog-fixed-header) :is(.lumina-reference, .catalog-hero-wrap) { padding-top: var(--lumina-nav-height); }
@font-face {
  font-family: "Manrope";
  src: url("/brand/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
header:has(a[href="/"] img[src="/logo.png"]) nav {
  font-family: Manrope, "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (min-width: 1024px) {
  header.fixed:has(img[src="/logo.png"]) nav > div:nth-child(2) > :is(a[title],button:has(.lucide-chevron-down)) {
    font-family: inherit;
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
  }
  header.fixed:has(img[src="/logo.png"]) nav > div:nth-child(2) > :is(a[title],button:has(.lucide-chevron-down)):not(:has(.lucide-layout-dashboard)) { padding-inline: clamp(7px, .8vw, 13px); }
  header.fixed:has(img[src="/logo.png"]) nav > div:nth-child(2) > [aria-current="page"] { font-weight: 700; }
}
