@font-face{font-family:Space;src:url('/fonts/SpaceGrotesk.ttf') format('truetype');font-weight:300 700;font-display:swap}
/* Four named destinations, with a thumb-friendly mobile dock. */
html { scrollbar-gutter: stable; scroll-padding-top: calc(var(--portal-header-height, 11rem) + 1rem); }
.skip {
  position: fixed;
  top: 12px;
  left: 20px;
  z-index: 100;
  max-width: calc(100% - 40px);
  border: 2px solid #30213f;
  border-radius: 10px;
  background: var(--lime);
  color: #30213f;
  font-weight: 700;
  padding: 12px;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
}
.skip:focus { top: 12px; transform: none; outline: 3px solid var(--text); outline-offset: 3px; }
.site-header.site-header--portal {
  max-width: 1410px;
  margin-inline: auto;
  padding-inline: 48px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: Space, system-ui, sans-serif;
  line-height: 1.6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand navigation tools";
  gap: 16px;
  height: auto;
  min-height: 82px;
  padding-block: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
}
.site-header--portal > .brand { grid-area: brand; display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 21px; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; text-decoration: none; }
.site-header--portal > .brand img { width: 44px; height: 44px; border-radius: 0; }
.site-header--portal .brand-light { display: block; color: #7445e0; font-size: 9px; font-weight: 700; letter-spacing: .3em; line-height: 1.4; }
:root[data-theme=dark] .site-header--portal .brand-light { color: #ba93ff; }
.site-header--portal > .header-tools { grid-area: tools; display: flex; align-items: center; }
.site-header--portal > .portal-nav { grid-area: navigation; }

.site-header .portal-nav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.site-header .portal-nav__link {
  position: relative;
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border-radius: 13px;
  color: var(--text);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
}
.portal-nav__compact { display: none; }

.portal-nav__icon {
  display: inline-grid;
  flex: 0 0 1.18rem;
  height: 1.18rem;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.portal-nav__icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.portal-nav__link[data-section=me]{--nav-accent:#ffb7ce}

.portal-nav__link[data-section=discover] { --nav-accent: #e5dcff; }
.portal-nav__link[data-section=leaderboards] { --nav-accent: #9cff57; }
.portal-nav__link[data-section=records] { --nav-accent: #ff8ba8; }
.portal-nav__link[data-section=challenges] { --nav-accent: #fff04d; }
.portal-nav__link[data-section=games] { --nav-accent: #98e5ff; }

.site-header .portal-nav__link:hover {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

@media (hover: hover) {
  .site-header .portal-nav__link:not([aria-current=page]):hover {
    color: #30213f;
    background: var(--nav-accent);
    box-shadow: 0 2px 0 #30213f;
  }
}

.site-header .portal-nav__link[aria-current=page],
.site-header .portal-nav__link[aria-current=page]:hover {
  color: #30213f;
  background: color-mix(in srgb, var(--nav-accent) 68%, white);
  box-shadow: inset 0 0 0 1px #30213fb0;
}
.site-header .portal-nav__link[aria-current=page]::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: calc(50% - 9px);
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
}

.site-header .portal-nav__link:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

@media (min-width:701px) and (max-width: 900px) {
  .site-header.site-header--portal {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand tools" "navigation navigation";
    gap: 12px;
  }
}

@media (max-width: 1150px) {
  .site-header.site-header--portal { padding-inline: 29px; }
}

@media (max-width: 700px) {
  html{scroll-padding-bottom:110px}
  body:has(.site-header--portal){padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  .site-header.site-header--portal { padding:12px 18px;grid-template-columns:1fr auto;grid-template-areas:"brand tools";min-height:72px;gap:10px; }
  .site-header--portal > .brand { font-size: 17px; gap: 7px; }
  .site-header--portal > .brand img { width: 35px; height: 35px; }
  .site-header .portal-nav {
    position:fixed;bottom:calc(10px + env(safe-area-inset-bottom,0px));left:12px;right:12px;z-index:2;
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:auto;max-width:480px;margin-inline:auto;
    border:1.5px solid var(--line);border-radius:21px;background:var(--surface);padding:5px;gap:3px;
    box-shadow:0 5px 28px #25143826,0 2px 0 #30213f22;
    overflow: visible;
  }
  .site-header .portal-nav__link {
    flex: 1 1 min-content;
    flex-direction: column;
    gap: 5px;
    min-width: 44px;
    min-height: 57px;
    padding: 7px 4px 9px;
    font-size: .6875rem;
    white-space: nowrap;
    text-align: center;
  }
  .portal-nav__link[data-compact] .portal-nav__label { display: none; }
  .portal-nav__compact { display: inline; }
  .portal-nav__icon { flex-basis: auto; }
  .site-header[inert] .portal-nav{visibility:hidden}
}

@media (max-width: 360px) {
  .site-header--portal > .brand img { display:block;width:30px;height:30px }
  .site-header--portal > .brand{font-size:14px}
  .site-header .portal-nav{left:8px;right:8px}
}

/* Leave the viewport available for content in landscape and at high zoom. */
@media (max-height: 500px) {
  html { scroll-padding-top: 1rem; }
  .site-header.site-header--portal { position: relative; }
  html{scroll-padding-bottom:1rem}
  body:has(.site-header--portal){padding-bottom:0}
  .site-header.site-header--portal{grid-template-columns:1fr auto;grid-template-areas:"brand tools" "navigation navigation"}
  .site-header .portal-nav{position:static;width:100%;max-width:none;box-shadow:none}
}
@media (prefers-reduced-motion: reduce) {
  .skip, .site-header--portal a, .site-header--portal button { transition: none; }
}
@media (forced-colors: active) {
  .site-header .portal-nav__link[aria-current=page] { outline: 2px solid CanvasText; outline-offset: -2px; }
  .site-header .portal-nav__link:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}
