.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.brand-logo {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.site-nav { display: flex; gap: 32px; }

.site-nav a,
.footer-links a {
  position: relative;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 1px;
  background: var(--brand-green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 10px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 1px;
  margin: 6px 0;
  background: currentColor;
}

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: stretch;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: clamp(40px, 8vw, 120px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
}

.hero h1,
.page-title {
  margin: 18px 0 26px;
  font-family: var(--display);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 900;
  line-height: .76;
  letter-spacing: -.065em;
}

.hero h1::after {
  content: "";
  display: block;
  width: 86px;
  height: 7px;
  margin-top: 38px;
  background: linear-gradient(90deg, var(--brand-deep) 0 50%, var(--brand-green) 50% 100%);
}

.hero-intro {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.35;
}

.brand-field {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--brand-black);
  color: var(--brand-green);
}

.brand-field-grid {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(31, 255, 147, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 147, .09) 1px, transparent 1px);
  background-size: 52px 52px;
}

.brand-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(31, 255, 147, .12), transparent 34%);
}

.brand-field-logo {
  position: relative;
  z-index: 2;
  width: min(60%, 430px);
  height: auto;
  filter: drop-shadow(0 0 32px rgba(31, 255, 147, .08));
}

.brand-field-meta {
  position: absolute;
  inset: auto 28px 24px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(31, 255, 147, .58);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .12em;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-index {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
}

/* NODE ZERO is always presented through the real NEXUS visual language. */
.nexus-project-card {
  --nx-bg: rgb(4, 8, 6);
  --nx-chrome: rgb(7, 14, 10);
  --nx-panel: rgb(8, 17, 12);
  --nx-button: rgb(12, 29, 19);
  --nx-border: rgb(25, 53, 35);
  --nx-border-bright: rgb(34, 66, 46);
  --nx-green: rgb(105, 255, 166);
  --nx-title: rgb(183, 230, 199);
  --nx-panel-title: rgb(141, 195, 160);
  --nx-value: rgb(171, 226, 190);
  --nx-copy: rgb(118, 167, 136);
  --nx-muted: rgb(66, 115, 84);

  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr);
  min-height: 590px;
  overflow: hidden;
  background: var(--nx-bg);
  border: 1px solid var(--nx-border);
  color: var(--nx-copy);
  font-family: var(--mono);
  transition: transform .22s ease, border-color .22s ease;
}

.nexus-project-card:hover {
  transform: translateY(-5px);
  border-color: var(--nx-border-bright);
}

.nexus-project-main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(105, 255, 166, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 255, 166, .025) 1px, transparent 1px),
    var(--nx-bg);
  background-size: 30px 30px;
}

.nexus-project-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 68% 36%, rgba(105, 255, 166, .09), transparent 27%);
}

.nexus-card-header {
  position: relative;
  z-index: 2;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: var(--nx-chrome);
  border-bottom: 1px solid var(--nx-border-bright);
  color: var(--nx-muted);
  font-size: .62rem;
  letter-spacing: .1em;
}

.nexus-card-copy {
  position: relative;
  z-index: 2;
  width: min(650px, 100%);
  margin: auto;
  padding: clamp(42px, 6vw, 74px);
}

.nexus-card-copy p {
  margin: 0 0 24px;
  color: var(--nx-muted);
  font-size: .68rem;
  font-weight: 700;
}

.nexus-card-copy h2 {
  margin: 0 0 12px;
  color: var(--nx-title);
  font-family: var(--mono);
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: 0;
}

.nexus-card-copy > strong {
  display: block;
  color: var(--nx-green);
  font-size: .78rem;
  letter-spacing: .04em;
}

.nexus-card-rule {
  width: min(420px, 100%);
  height: 1px;
  margin: 30px 0 22px;
  background: var(--nx-border-bright);
}

.nexus-card-copy > span {
  color: var(--nx-copy);
  font-size: .68rem;
  font-weight: 700;
}

.nexus-project-record {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 32px 30px;
  background: var(--nx-panel);
  border-left: 1px solid var(--nx-border);
}

.nexus-project-record h3 {
  margin: 0 0 20px;
  color: var(--nx-panel-title);
  font-size: .72rem;
}

.nexus-project-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(18, 39, 26, 1);
}

.nexus-project-row span {
  color: var(--nx-muted);
  font-size: .58rem;
}

.nexus-project-row strong {
  color: var(--nx-value);
  font-size: .66rem;
  text-align: right;
}

.nexus-project-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  color: var(--nx-green);
  background: var(--nx-button);
  border: 1px solid var(--nx-border-bright);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color .12s, background-color .12s, border-color .12s;
}

.nexus-project-card:hover .nexus-project-button,
.nexus-project-button:hover {
  color: rgb(145, 255, 190);
  background: rgb(17, 39, 25);
  border-color: rgb(58, 104, 73);
}

.studio-note {
  background: var(--brand-black);
  color: var(--light);
}

.studio-note-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: center;
}

.studio-note-mark {
  width: 150px;
  height: auto;
}

.about-statement h2,
.press-copy h2,
.studio-note h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(2.7rem, 5vw, 5.8rem);
  line-height: .92;
  letter-spacing: -.045em;
}

.studio-note h2 { margin-top: 18px; }

.page-main { min-height: 70svh; }

.page-hero {
  padding: clamp(90px, 12vw, 180px) 0 clamp(50px, 8vw, 100px);
  border-bottom: 1px solid var(--line);
}

.page-title { margin-bottom: 0; }

.about-grid,
.press-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(60px, 10vw, 160px);
}

.about-copy,
.press-copy {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--muted);
}

.about-copy p:first-child,
.press-copy p:first-of-type { margin-top: 0; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact {
  padding: 34px 28px;
  border-right: 1px solid var(--line);
}

.fact:last-child { border-right: 0; }

.fact span,
.press-details dt {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fact strong {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 3rem);
}

.nexus-inline-name,
.nexus-inline-link {
  color: rgb(10, 113, 78);
  font-family: var(--mono);
  font-weight: 800;
}

.nexus-inline-name {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  color: rgb(105, 255, 166);
  background: rgb(8, 17, 12);
  border-left: 2px solid rgb(105, 255, 166);
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.nexus-inline-link:hover {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.press-details { margin: 0; }

.press-details div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.press-details dt,
.press-details dd { margin: 0; }

.nexus-press-project {
  background: rgb(4, 8, 6);
  color: rgb(118, 167, 136);
  border-top: 1px solid rgb(25, 53, 35);
}

.nexus-press-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  background: rgb(7, 14, 10);
  border: 1px solid rgb(34, 66, 46);
  color: rgb(66, 115, 84);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
}

.nexus-press-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(40px, 8vw, 110px);
  padding: clamp(42px, 7vw, 84px);
  border: 1px solid rgb(25, 53, 35);
  border-top: 0;
}

.nexus-press-body p {
  margin: 0 0 18px;
  color: rgb(66, 115, 84);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
}

.nexus-press-body h2 {
  margin: 0 0 12px;
  color: rgb(183, 230, 199);
  font-family: var(--mono);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: .95;
}

.nexus-press-body strong {
  color: rgb(105, 255, 166);
  font-family: var(--mono);
  font-size: .76rem;
}

.nexus-press-copy > span {
  display: block;
  margin-bottom: 18px;
  color: rgb(141, 195, 160);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
}

.nexus-press-copy p {
  color: rgb(118, 167, 136);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.7;
}

.nexus-press-button {
  width: fit-content;
  padding: 0 18px;
}

.legal-page { padding: 120px 0; }

.legal-page h1,
.error-page h1 {
  margin: 18px 0 30px;
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: .85;
  letter-spacing: -.05em;
}

.legal-page h2 { margin-top: 46px; }

.legal-note {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--pad);
}

.error-page > div { max-width: 900px; }

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  margin: 0;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.footer-links { display: flex; gap: 24px; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 77px 0 0;
    z-index: 90;
    display: none;
    flex-direction: column;
    padding: 40px var(--pad);
    background: var(--bg);
  }

  body.nav-open .site-nav { display: flex; }

  .site-nav > a {
    padding: 12px 0;
    font-family: var(--display);
    font-size: 2.8rem;
    letter-spacing: -.04em;
  }

  .hero-grid,
  .nexus-project-card,
  .about-grid,
  .press-grid,
  .nexus-press-body {
    grid-template-columns: 1fr;
  }

  .hero { min-height: auto; }
  .hero-copy { min-height: 70svh; }
  .brand-field { min-height: 58svh; }

  .nexus-project-card { min-height: 0; }

  .nexus-project-record {
    border-left: 0;
    border-top: 1px solid rgb(25, 53, 35);
  }

  .studio-note-grid {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .studio-note-mark {
    width: 90px;
  }

  .fact-grid { grid-template-columns: 1fr; }

  .fact {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fact:last-child { border-bottom: 0; }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(4.2rem, 25vw, 7rem); }

  .brand-field-meta {
    flex-direction: column;
    gap: 6px;
  }

  .nexus-card-header span:last-child {
    display: none;
  }

  .nexus-card-copy {
    padding: 40px 26px;
  }

  .nexus-project-record {
    padding: 28px 24px;
  }

  .studio-note-grid {
    grid-template-columns: 1fr;
  }

  .press-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 14px 22px;
  }
}


/* ============================================================
   DARK STATIC STATE PASS
   ============================================================ */

body {
  background:
    radial-gradient(circle at 80% 0%, rgba(31, 255, 147, .035), transparent 24%),
    var(--bg);
  color: var(--ink);
}

.site-header {
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  border-bottom-color: var(--line);
}

.brand-logo {
  filter: drop-shadow(0 0 14px rgba(31, 255, 147, .08));
}

.site-nav a,
.footer-links a {
  color: var(--ink);
}

.hero-intro,
.about-copy,
.press-copy,
.project-info p,
.press-project p {
  color: var(--muted);
}

.page-hero {
  background:
    linear-gradient(rgba(31, 255, 147, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 147, .018) 1px, transparent 1px);
  background-size: 42px 42px;
}

.page-title,
.about-statement h2,
.press-copy h2,
.legal-page h1,
.error-page h1 {
  color: var(--ink);
}

.fact-grid,
.fact,
.press-details div,
.site-footer,
.page-hero {
  border-color: var(--line);
}

.fact strong {
  color: var(--ink);
}

.legal-note {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.button-dark {
  color: var(--brand-black);
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.button-dark:hover {
  color: var(--brand-green);
  background: transparent;
}

.site-footer {
  background: #050705;
}

.nexus-card-wordmark {
  display: block;
  width: min(100%, 760px);
  max-height: 118px;
  margin: 0 0 10px;
  object-fit: contain;
  object-position: left center;
}

.nexus-record-title {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.nexus-record-title img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.nexus-record-title h3 {
  margin: 0;
}

.nexus-inline-name {
  gap: 10px;
}

.nexus-inline-name img,
.nexus-inline-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nexus-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.nexus-press-wordmark {
  width: min(100%, 650px);
  max-height: 102px;
  margin-bottom: 12px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 780px) {
  .site-nav {
    background: var(--bg);
  }

  .nexus-card-wordmark {
    max-height: 92px;
  }
}

@media (max-width: 520px) {
  .nexus-card-wordmark {
    max-height: 68px;
  }
}


/* ============================================================
   DISCORD ACCOUNT UI
   ============================================================ */

.auth-shell {
  position: relative;
  margin-left: 8px;
  font-family: var(--sans);
  text-transform: none;
}

.site-nav .auth-shell a::after {
  display: none;
}

.discord-login-button,
.auth-profile-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.discord-login-button {
  color: #fff !important;
  background: #5865f2;
  box-shadow: 0 8px 24px rgba(88, 101, 242, .16);
}

.discord-login-button:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.discord-login-button img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.auth-profile-button {
  cursor: pointer;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.auth-profile-button:hover,
.auth-profile-button[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.auth-profile-button img,
.auth-menu-avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #161a17;
}

.auth-profile-button img {
  width: 25px;
  height: 25px;
}

.auth-profile-button-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-chevron {
  color: var(--muted);
  font-size: .7rem;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 400;
  width: min(330px, calc(100vw - 32px));
  padding: 16px;
  color: var(--ink);
  background: #0a0e0b;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

.auth-menu[hidden] {
  display: none;
}

.auth-menu-user {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.auth-menu-avatar {
  width: 46px;
  height: 46px;
}

.auth-menu-user strong,
.auth-menu-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-user strong {
  font-size: .98rem;
}

.auth-menu-user span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
}

.auth-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 15px 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.auth-status-item {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
}

.auth-status-item span,
.auth-menu-section > span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-status-item strong {
  display: block;
  margin-top: 7px;
  color: var(--brand-green);
  font-family: var(--mono);
  font-size: .7rem;
}

.auth-menu-section {
  padding: 2px 0 14px;
}

.auth-menu-section strong {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: .78rem;
}

.auth-community-link,
.auth-logout-button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.auth-community-link {
  gap: 9px;
  margin-top: 12px;
  color: #fff !important;
  background: #5865f2;
}

.auth-community-link:hover {
  background: #4752c4;
}

.auth-community-link img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.auth-logout-button {
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.auth-logout-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.auth-loading {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
}

@media (max-width: 780px) {
  .auth-shell {
    width: 100%;
    margin: 22px 0 0;
  }

  .discord-login-button,
  .auth-profile-button {
    width: 100%;
    min-height: 48px;
  }

  .auth-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
  }
}


/* ============================================================
   HEADER NAV ALIGNMENT FIX
   Keeps the standard links aligned with the Discord auth button.
   ============================================================ */

.site-nav {
  align-items: center;
  gap: 28px;
}

.site-nav > a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.site-nav > a::after {
  bottom: 0;
}

.auth-shell {
  display: flex;
  align-items: center;
  margin-left: 4px;
}


/* ============================================================
   MOBILE NAVIGATION + DISCORD ACCOUNT FIX
   ============================================================ */

@media (max-width: 780px) {
  .nav-shell {
    min-height: 76px;
  }

  .brand,
  .nav-toggle {
    position: relative;
    z-index: 110;
  }

  .nav-toggle {
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--brand-green);
    border: 1px solid var(--line);
    border-radius: 5px;
    cursor: pointer;
  }

  .nav-toggle span:not(.sr-only) {
    position: absolute;
    left: 11px;
    width: 20px;
    height: 1px;
    margin: 0;
    background: currentColor;
    transition: top .18s ease, transform .18s ease;
  }

  .nav-toggle span:nth-child(2) { top: 16px; }
  .nav-toggle span:nth-child(3) { top: 25px; }

  body.nav-open .nav-toggle span:nth-child(2) {
    top: 20px;
    transform: rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 76px 0 0;
    z-index: 105;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    height: calc(100svh - 76px);
    padding: 28px var(--pad) max(28px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
      linear-gradient(rgba(31, 255, 147, .025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(31, 255, 147, .025) 1px, transparent 1px),
      #060807;
    background-size: 38px 38px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  }

  .site-nav::before {
    content: "STATIC STATE / PUBLIC ROUTE";
    display: block;
    margin-bottom: 16px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
  }

  body.nav-open .site-nav {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-nav > a {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .site-nav > a:first-of-type {
    border-top: 1px solid var(--line);
  }

  .site-nav > a::after {
    content: "↗";
    position: static;
    width: auto;
    height: auto;
    color: var(--muted);
    background: none;
    transform: none;
    transition: color .16s ease, transform .16s ease;
  }

  .site-nav > a:hover::after,
  .site-nav > a.active::after {
    color: var(--brand-green);
    transform: translate(2px, -2px);
  }

  .site-nav > a.active {
    color: var(--brand-green);
  }

  .auth-shell {
    width: 100%;
    display: block;
    margin: 28px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .discord-login-button,
  .auth-profile-button {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 6px;
    font-family: var(--sans);
    font-size: .9rem;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
  }

  .discord-login-button {
    justify-content: center;
  }

  .discord-login-button img {
    flex: 0 0 20px;
  }

  .auth-profile-button {
    justify-content: flex-start;
  }

  .auth-profile-button-name {
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
  }

  .auth-chevron {
    margin-left: auto;
  }

  .auth-menu {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    max-width: none;
    margin-top: 12px;
    padding: 16px;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: none;
  }

  .auth-menu-user {
    min-width: 0;
  }

  .auth-community-link,
  .auth-logout-button {
    min-height: 44px;
    padding: 0 13px;
    font-family: var(--sans);
    font-size: .72rem;
    letter-spacing: .035em;
    line-height: 1.2;
    white-space: nowrap;
  }

  .auth-community-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-loading {
    min-height: 52px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    min-height: 72px;
  }

  .brand {
    gap: 10px;
    font-size: .76rem;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  .site-nav {
    inset: 72px 0 0;
    height: calc(100svh - 72px);
    padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  }

  .site-nav > a {
    min-height: 58px;
    font-size: .9rem;
  }

  .auth-shell {
    margin-top: 24px;
    padding-top: 20px;
  }

  .auth-menu {
    padding: 14px;
  }

  .auth-status-item {
    padding: 11px 10px;
  }

  .auth-community-link,
  .auth-logout-button {
    font-size: .67rem;
  }
}

/* ============================================================
   MERGED DISCORD PROFILE CARD + ROLE SYSTEM
   ============================================================ */

.auth-shell {
  --auth-motion: 300ms cubic-bezier(.2, .75, .2, 1);
}

.auth-profile-button {
  position: relative;
  z-index: 402;
  overflow: hidden;
  transition:
    width var(--auth-motion),
    min-height var(--auth-motion),
    padding var(--auth-motion),
    border-radius var(--auth-motion),
    background-color var(--auth-motion),
    border-color var(--auth-motion),
    transform var(--auth-motion);
}

.auth-profile-button img {
  flex: 0 0 auto;
  transition: width var(--auth-motion), height var(--auth-motion);
}

.auth-profile-identity {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.auth-profile-button-name {
  width: 100%;
  transition: font-size var(--auth-motion), transform var(--auth-motion);
}

.auth-profile-button-username {
  display: block;
  width: 100%;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height var(--auth-motion),
    margin var(--auth-motion),
    opacity 180ms ease,
    transform var(--auth-motion);
}

.auth-chevron {
  display: inline-block;
  flex: 0 0 auto;
  margin-left: auto;
  transform-origin: center;
  transition: transform var(--auth-motion), color var(--auth-motion);
}

.auth-profile-button[aria-expanded="true"] .auth-chevron {
  color: var(--brand-green);
  transform: rotate(180deg);
}

.auth-menu {
  display: block;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px) scale(.985);
  transform-origin: top right;
  transition:
    max-height 360ms cubic-bezier(.2, .75, .2, 1),
    padding 260ms ease,
    margin 260ms ease,
    opacity 180ms ease,
    visibility 0s linear 360ms,
    transform var(--auth-motion);
}

.auth-shell.auth-open {
  z-index: 401;
}

.auth-shell.auth-open .auth-menu {
  max-height: 760px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    max-height 440ms cubic-bezier(.2, .75, .2, 1),
    padding 260ms ease,
    margin 260ms ease,
    opacity 210ms ease 45ms,
    visibility 0s,
    transform var(--auth-motion);
}

/* The expandable profile button is the identity header on every viewport. */
.auth-menu-user {
  display: none;
}

.auth-detail-row {
  min-height: 25px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.auth-detail-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-detail-value {
  display: inline !important;
  margin: 0 !important;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .76rem !important;
  font-weight: 800;
  letter-spacing: .025em;
}

.auth-detail-value.is-positive {
  color: var(--brand-green);
}

.auth-community-section {
  display: grid;
  gap: 4px;
  padding-top: 0;
}

.auth-community-section .auth-community-link {
  margin-top: 10px;
}

/* Desktop: the compact header drops below the navigation, widens,
   and becomes the top edge of the account card. */
@media (min-width: 781px) {
  .auth-shell {
    width: 176px;
    min-height: 40px;
    display: block;
  }

  .auth-profile-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 176px;
  }

  .auth-menu {
    top: 124px;
    right: 0;
    width: 330px;
    margin: 0;
    border-top: 0;
    border-radius: 0 0 8px 8px;
  }

  .auth-shell.auth-open .auth-profile-button {
    width: 330px;
    min-height: 72px;
    padding: 0 16px;
    background: #0a0e0b;
    border-color: var(--line-strong);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    transform: translateY(52px);
  }

  .auth-shell.auth-open .auth-profile-button img {
    width: 46px;
    height: 46px;
  }

  .auth-shell.auth-open .auth-profile-button-name {
    font-size: 1rem;
    transform: translateX(1px);
  }

  .auth-shell.auth-open .auth-profile-button-username {
    max-height: 20px;
    margin-top: 3px;
    opacity: 1;
    transform: none;
  }

  .auth-shell.auth-open .auth-menu {
    padding: 16px;
  }

  .auth-status-grid {
    margin-top: 0;
  }
}

/* Mobile: the same interaction stays in normal flow inside the menu. */
@media (max-width: 780px) {
  .auth-shell {
    border-radius: 8px;
    transition: filter var(--auth-motion);
  }

  .auth-profile-button {
    position: relative;
  }

  .auth-shell.auth-open .auth-profile-button {
    min-height: 78px;
    padding: 0 28px;
    background: #0a0e0b;
    border-color: var(--line-strong);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
  }

  .auth-shell.auth-open .auth-profile-button img {
    width: 46px;
    height: 46px;
  }

  .auth-shell.auth-open .auth-profile-button-name {
    font-size: 1.08rem;
    transform: translateX(2px);
  }

  .auth-shell.auth-open .auth-profile-button-username {
    max-height: 20px;
    margin-top: 3px;
    opacity: 1;
    transform: none;
  }

  .auth-menu {
    width: 100%;
    max-width: none;
    margin-top: 0;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    transform-origin: top center;
  }

  .auth-shell.auth-open .auth-menu {
    margin-top: 0;
    padding: 0 16px 16px;
  }

  .auth-status-grid {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .auth-shell.auth-open .auth-profile-button {
    min-height: 74px;
    padding: 0 20px;
  }

  .auth-shell.auth-open .auth-profile-button img {
    width: 44px;
    height: 44px;
  }

  .auth-shell.auth-open .auth-menu {
    padding: 0 14px 14px;
  }

  .auth-detail-row {
    gap: 6px;
  }

  .auth-detail-label {
    font-size: .58rem;
  }

  .auth-detail-value {
    font-size: .71rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-profile-button,
  .auth-profile-button img,
  .auth-profile-button-name,
  .auth-profile-button-username,
  .auth-chevron,
  .auth-menu {
    transition-duration: 1ms !important;
  }
}


/* ============================================================
   DESKTOP ACCOUNT-CARD MOTION REFINEMENT
   Expands the profile header first, then unfolds the attached card.
   ============================================================ */

@media (min-width: 781px) {
  .auth-shell {
    width: 176px;
    min-height: 40px;
    display: block;
  }

  .auth-profile-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 176px;
    min-height: 40px;
    transform: none;
    transform-origin: top right;
    transition:
      width 280ms cubic-bezier(.2, .75, .2, 1) 110ms,
      min-height 280ms cubic-bezier(.2, .75, .2, 1) 110ms,
      padding 280ms cubic-bezier(.2, .75, .2, 1) 110ms,
      border-radius 220ms ease 110ms,
      background-color 180ms ease,
      border-color 180ms ease;
  }

  .auth-menu {
    top: 72px;
    right: 0;
    width: 330px;
    max-height: none;
    margin: 0;
    padding: 16px;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-8px);
    transform-origin: top right;
    transition:
      opacity 120ms ease,
      transform 170ms ease,
      clip-path 190ms cubic-bezier(.4, 0, 1, 1),
      visibility 0s linear 190ms;
  }

  .auth-shell.auth-open .auth-profile-button {
    width: 330px;
    min-height: 72px;
    padding: 0 16px;
    background: #0a0e0b;
    border-color: var(--line-strong);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    transform: none;
    transition-delay: 0ms;
  }

  .auth-shell.auth-open .auth-menu {
    top: 72px;
    max-height: none;
    padding: 16px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    clip-path: inset(0);
    transform: none;
    transition:
      opacity 170ms ease 120ms,
      transform 230ms cubic-bezier(.2, .75, .2, 1) 90ms,
      clip-path 280ms cubic-bezier(.2, .75, .2, 1) 70ms,
      visibility 0s;
  }
}

/* ============================================================
   DESKTOP ACCOUNT LAYOUT FINAL PASS
   The account card expands inside the navigation flow so the
   page links slide left instead of being covered by the card.
   ============================================================ */

.auth-profile-button,
.auth-profile-identity,
.auth-profile-button-name,
.auth-profile-button-username {
  text-align: left;
}

.auth-profile-button {
  justify-content: flex-start;
}

.auth-profile-identity {
  width: 0;
}

.auth-profile-button-name,
.auth-profile-button-username {
  align-self: stretch;
}

@media (min-width: 781px) {
  .site-nav {
    justify-content: flex-end;
  }

  .auth-shell {
    position: relative;
    width: 176px;
    min-height: 40px;
    display: block;
    flex: 0 0 auto;
    transition:
      width 280ms cubic-bezier(.2, .75, .2, 1) 130ms,
      min-height 280ms cubic-bezier(.2, .75, .2, 1) 130ms;
  }

  .auth-shell.auth-open {
    width: 330px;
    min-height: 72px;
    transition-delay: 0ms;
  }

  .auth-profile-button,
  .auth-shell.auth-open .auth-profile-button {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    transform: none;
  }

  .auth-profile-button {
    min-height: 40px;
    padding: 0 15px;
    transition:
      min-height 280ms cubic-bezier(.2, .75, .2, 1) 130ms,
      padding 280ms cubic-bezier(.2, .75, .2, 1) 130ms,
      border-radius 220ms ease 130ms,
      background-color 180ms ease,
      border-color 180ms ease;
  }

  .auth-shell.auth-open .auth-profile-button {
    min-height: 72px;
    padding: 0 16px;
    background: #0a0e0b;
    border-color: var(--line-strong);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    transition-delay: 0ms;
  }

  .auth-menu,
  .auth-shell.auth-open .auth-menu {
    top: 72px;
    right: 0;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 16px;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    transform-origin: top center;
  }

  .auth-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-6px);
    transition:
      opacity 110ms ease,
      transform 150ms ease,
      clip-path 170ms cubic-bezier(.4, 0, 1, 1),
      visibility 0s linear 170ms;
  }

  .auth-shell.auth-open .auth-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    clip-path: inset(0);
    transform: none;
    transition:
      opacity 170ms ease 145ms,
      transform 230ms cubic-bezier(.2, .75, .2, 1) 110ms,
      clip-path 280ms cubic-bezier(.2, .75, .2, 1) 105ms,
      visibility 0s;
  }

  .auth-profile-button img {
    width: 25px;
    height: 25px;
  }

  .auth-shell.auth-open .auth-profile-button img {
    width: 46px;
    height: 46px;
  }

  .auth-profile-identity {
    flex: 1 1 auto;
    min-width: 0;
    align-items: flex-start;
    justify-content: center;
  }

  .auth-profile-button-name,
  .auth-profile-button-username {
    width: auto;
    max-width: 100%;
    text-align: left;
  }

  .auth-profile-button-name {
    transform: none;
  }

  .auth-shell.auth-open .auth-profile-button-name {
    font-size: 1rem;
    transform: none;
  }

  .auth-shell.auth-open .auth-profile-button-username {
    max-height: 20px;
    margin-top: 3px;
    opacity: 1;
    transform: none;
  }
}


/* ============================================================
   CLEAN DESKTOP ACCOUNT EXPANSION
   Expands horizontally at the existing nav height, then unfolds.
   ============================================================ */

@media (min-width: 781px) {
  .auth-shell {
    --auth-card-border: #10482f;
    width: 176px;
    min-height: 40px;
    height: 40px;
    align-self: center;
    transition: width 250ms cubic-bezier(.2, .75, .2, 1) 175ms;
  }

  .auth-shell.auth-open {
    width: 330px;
    min-height: 40px;
    height: 40px;
    transition-delay: 0ms;
  }

  .auth-profile-button,
  .auth-shell.auth-open .auth-profile-button {
    width: 100%;
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    background: #0a0e0b;
    border: 1px solid var(--auth-card-border);
    transform: none;
  }

  .auth-profile-button {
    border-radius: 6px;
    transition:
      padding 220ms ease,
      border-radius 180ms ease 175ms,
      background-color 160ms ease,
      border-color 160ms ease;
  }

  .auth-shell.auth-open .auth-profile-button {
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    transition-delay: 0ms;
  }

  .auth-profile-button img,
  .auth-shell.auth-open .auth-profile-button img {
    width: 28px;
    height: 28px;
  }

  .auth-profile-identity {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }

  .auth-profile-button-name,
  .auth-profile-button-username,
  .auth-shell.auth-open .auth-profile-button-name {
    width: auto;
    max-width: 100%;
    align-self: flex-start;
    text-align: left;
    transform: none;
  }

  .auth-profile-button-name,
  .auth-shell.auth-open .auth-profile-button-name {
    font-size: .84rem;
    line-height: 1.05;
  }

  .auth-shell.auth-open .auth-profile-button-username {
    max-height: 13px;
    margin-top: 1px;
    font-size: .62rem;
    line-height: 1.05;
    opacity: 1;
    transform: none;
  }

  .auth-menu,
  .auth-shell.auth-open .auth-menu {
    top: 40px;
    right: 0;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 16px;
    background: #0a0e0b;
    border: 1px solid var(--auth-card-border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
    transform-origin: top center;
  }

  .auth-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-4px);
    transition:
      opacity 105ms ease,
      transform 160ms ease,
      clip-path 180ms cubic-bezier(.4, 0, 1, 1),
      visibility 0s linear 180ms;
  }

  .auth-shell.auth-open .auth-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    clip-path: inset(0);
    transform: none;
    transition:
      opacity 160ms ease 185ms,
      transform 220ms cubic-bezier(.2, .75, .2, 1) 165ms,
      clip-path 260ms cubic-bezier(.2, .75, .2, 1) 150ms,
      visibility 0s;
  }
}


/* ============================================================
   FINAL DESKTOP ACCOUNT HEADER POLISH
   Larger identity block, downward-only growth, continuous edge.
   ============================================================ */

@media (min-width: 781px) {
  .auth-shell {
    --auth-card-edge: #0f4b33;
    position: relative;
    height: 40px;
    min-height: 40px;
    overflow: visible;
  }

  /* Draw the expanded header's right edge from one dedicated element
     so it cannot change shade where the header meets the dropdown. */
  .auth-shell::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: 406;
    width: 1px;
    height: 40px;
    pointer-events: none;
    background: var(--auth-card-edge);
    opacity: 0;
    transition:
      height 220ms cubic-bezier(.2, .75, .2, 1) 120ms,
      opacity 100ms ease;
  }

  .auth-shell.auth-open::after {
    height: 56px;
    opacity: 1;
    transition-delay: 120ms, 0ms;
  }

  .auth-profile-button,
  .auth-shell.auth-open .auth-profile-button {
    position: relative;
    top: 0;
    right: auto;
    width: 100%;
    padding: 0 13px;
    background: #0a0e0b;
    border-color: var(--auth-card-edge) !important;
    transform: none;
  }

  .auth-profile-button {
    height: 40px;
    min-height: 40px;
    border-radius: 6px;
    transition:
      height 220ms cubic-bezier(.2, .75, .2, 1) 175ms,
      min-height 220ms cubic-bezier(.2, .75, .2, 1) 175ms,
      padding 220ms ease 175ms,
      border-radius 180ms ease 175ms,
      background-color 160ms ease,
      border-color 160ms ease;
  }

  .auth-shell.auth-open .auth-profile-button {
    height: 56px;
    min-height: 56px;
    padding: 0 15px;
    border-right-color: transparent !important;
    border-bottom-color: transparent !important;
    border-radius: 8px 8px 0 0;
    transition-delay: 120ms;
  }

  .auth-profile-button img {
    width: 28px;
    height: 28px;
    transition:
      width 220ms cubic-bezier(.2, .75, .2, 1) 175ms,
      height 220ms cubic-bezier(.2, .75, .2, 1) 175ms;
  }

  .auth-shell.auth-open .auth-profile-button img {
    width: 36px;
    height: 36px;
    transition-delay: 120ms;
  }

  .auth-profile-identity {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }

  .auth-profile-button-name,
  .auth-profile-button-username,
  .auth-shell.auth-open .auth-profile-button-name,
  .auth-shell.auth-open .auth-profile-button-username {
    width: auto;
    max-width: 100%;
    align-self: flex-start;
    text-align: left;
    transform: none;
  }

  .auth-profile-button-name {
    font-size: .84rem;
    line-height: 1.05;
    transition:
      font-size 220ms ease 175ms,
      line-height 220ms ease 175ms;
  }

  .auth-shell.auth-open .auth-profile-button-name {
    font-size: .98rem;
    line-height: 1.08;
    transition-delay: 120ms;
  }

  .auth-profile-button-username {
    max-height: 0;
    margin-top: 0;
    font-size: .7rem;
    line-height: 1.05;
    opacity: 0;
    transform: translateY(-3px);
    transition:
      max-height 180ms ease 175ms,
      margin-top 180ms ease 175ms,
      opacity 130ms ease 175ms,
      transform 180ms ease 175ms;
  }

  .auth-shell.auth-open .auth-profile-button-username {
    max-height: 14px;
    margin-top: 2px;
    font-size: .7rem;
    line-height: 1.05;
    opacity: 1;
    transform: none;
    transition-delay: 150ms;
  }

  .auth-menu,
  .auth-shell.auth-open .auth-menu {
    top: 56px;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 16px;
    background: #0a0e0b;
    border-color: var(--auth-card-edge) !important;
    border-top: 0 !important;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .52);
  }

  .auth-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-4px);
    transition:
      opacity 100ms ease,
      transform 155ms ease,
      clip-path 175ms cubic-bezier(.4, 0, 1, 1),
      visibility 0s linear 175ms;
  }

  .auth-shell.auth-open .auth-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    clip-path: inset(0);
    transform: none;
    transition:
      opacity 160ms ease 285ms,
      transform 220ms cubic-bezier(.2, .75, .2, 1) 255ms,
      clip-path 260ms cubic-bezier(.2, .75, .2, 1) 235ms,
      visibility 0s;
  }
}


/* ============================================================
   DISCORD USERNAME GLYPH-CLIPPING FIX
   Gives @, underscores, and descenders enough vertical breathing room.
   ============================================================ */

@media (min-width: 781px) {
  .auth-profile-button-username,
  .auth-shell.auth-open .auth-profile-button-username {
    line-height: 1.3;
    padding-block: 1px 2px;
    overflow: visible;
  }

  .auth-shell.auth-open .auth-profile-button-username {
    max-height: 20px;
    margin-top: 1px;
  }
}


/* ============================================================
   REMOVE STRAY TOP-RIGHT ACCOUNT EDGE
   The normal card borders now draw the entire connected outline.
   ============================================================ */

@media (min-width: 781px) {
  .auth-shell::after,
  .auth-shell.auth-open::after {
    content: none !important;
    display: none !important;
  }

  .auth-profile-button,
  .auth-shell.auth-open .auth-profile-button {
    border-right-color: var(--auth-card-edge) !important;
  }

  .auth-menu,
  .auth-shell.auth-open .auth-menu {
    border-right-color: var(--auth-card-edge) !important;
  }
}


/* ============================================================
   COMPACT PROFILE BUTTON OPTICAL CENTERING
   The icon, name, and arrow sat slightly high inside the 40px control.
   ============================================================ */

@media (min-width: 781px) {
  .auth-profile-button[aria-expanded="false"] > img,
  .auth-profile-button[aria-expanded="false"] .auth-profile-identity,
  .auth-profile-button[aria-expanded="false"] .auth-chevron {
    transform: translateY(1px);
  }
}


/* ============================================================
   COMPACT PROFILE IDENTITY SPACING
   Centers the closed-state name inside the space between the avatar
   and dropdown arrow without changing the expanded account layout.
   ============================================================ */

@media (min-width: 781px) {
  .auth-profile-button[aria-expanded="false"] {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 14px;
    column-gap: 8px;
    align-items: center;
  }

  .auth-profile-button[aria-expanded="false"] > img {
    justify-self: center;
  }

  .auth-profile-button[aria-expanded="false"] .auth-profile-identity {
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-self: stretch;
    text-align: center;
  }

  .auth-profile-button[aria-expanded="false"] .auth-profile-button-name {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .auth-profile-button[aria-expanded="false"] .auth-chevron {
    margin-left: 0;
    justify-self: center;
  }

  /* Explicitly restore the expanded layout used by the animation. */
  .auth-profile-button[aria-expanded="true"] {
    display: inline-flex;
  }

  .auth-profile-button[aria-expanded="true"] .auth-profile-identity {
    align-items: flex-start;
    text-align: left;
  }

  .auth-profile-button[aria-expanded="true"] .auth-profile-button-name,
  .auth-profile-button[aria-expanded="true"] .auth-profile-button-username {
    text-align: left;
  }
}


/* ============================================================
   LAUNCH-READY LEGAL PAGES
   ============================================================ */

.launch-legal-page {
  padding: 0;
}

.legal-hero {
  padding: clamp(88px, 11vw, 150px) 0 clamp(52px, 7vw, 86px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 18%, rgba(31, 255, 147, .07), transparent 28%),
    linear-gradient(rgba(31, 255, 147, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 147, .018) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
}

.legal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .42fr);
  gap: clamp(48px, 9vw, 130px);
  align-items: end;
  margin-top: 20px;
}

.legal-hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(4.3rem, 10vw, 9.2rem);
  font-weight: 900;
  line-height: .78;
  letter-spacing: -.06em;
}

.legal-lede {
  max-width: 720px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.4rem);
  line-height: 1.55;
}

.legal-meta {
  margin: 0;
  border-top: 1px solid var(--line);
}

.legal-meta div {
  min-height: 62px;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.legal-meta dt,
.legal-meta dd {
  margin: 0;
}

.legal-meta dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legal-meta dd {
  color: var(--ink);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.legal-meta a,
.legal-inline-link {
  color: var(--brand-green);
  text-decoration: underline;
  text-decoration-color: rgba(31, 255, 147, .38);
  text-underline-offset: 4px;
}

.legal-body-section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 780px);
  gap: clamp(48px, 8vw, 110px);
  justify-content: center;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 112px;
}

.legal-toc {
  display: grid;
  border-top: 1px solid var(--line);
}

.legal-toc .eyebrow {
  padding: 18px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.legal-toc a {
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .16s ease, padding-left .16s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  padding-left: 6px;
  color: var(--brand-green);
}

.legal-document {
  min-width: 0;
}

.legal-summary,
.legal-disclaimer {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(rgba(31, 255, 147, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 147, .018) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
}

.legal-summary .eyebrow {
  color: var(--brand-green);
}

.legal-summary p:last-child,
.legal-disclaimer p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-section {
  position: relative;
  padding: 54px 0 10px;
  scroll-margin-top: 112px;
  border-bottom: 1px solid var(--line);
}

.legal-section-number {
  margin: 0 0 8px;
  color: var(--brand-green);
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.legal-section h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .96;
  letter-spacing: -.035em;
}

.legal-section h3 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.legal-section p {
  margin: 0 0 18px;
}

.legal-section strong {
  color: var(--ink);
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
  padding-left: 22px;
}

.legal-list li::marker {
  color: var(--brand-green);
}

.legal-table-wrap {
  width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.legal-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--surface);
}

.legal-table th,
.legal-table td {
  padding: 16px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.legal-table th:last-child,
.legal-table td:last-child {
  border-right: 0;
}

.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-table th {
  color: var(--ink);
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-table td {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.legal-table code {
  color: var(--brand-green);
  font-family: var(--mono);
  font-size: .82rem;
}

.legal-contact-section {
  border-bottom: 0;
}

.legal-contact-link {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.legal-contact-link:hover {
  transform: translateY(-2px);
  border-color: var(--brand-green);
  background: var(--surface-2);
}

.legal-contact-link span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.legal-contact-link strong {
  color: var(--brand-green);
  font-family: var(--mono);
  font-size: clamp(.86rem, 2vw, 1rem);
  overflow-wrap: anywhere;
}

.legal-disclaimer {
  margin-top: 52px;
  border-color: var(--line);
}

.footer-links a.active {
  color: var(--brand-green);
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }

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

  .legal-toc .eyebrow {
    grid-column: 1 / -1;
  }

  .legal-toc a:nth-child(even) {
    border-right: 1px solid var(--line);
    padding-right: 16px;
  }

  .legal-toc a:nth-child(odd) {
    padding-left: 16px;
  }
}

@media (max-width: 780px) {
  .legal-hero-grid {
    grid-template-columns: 1fr;
  }

  .legal-meta {
    max-width: 520px;
  }

  .legal-section {
    scroll-margin-top: 88px;
  }
}

@media (max-width: 520px) {
  .legal-hero {
    padding-top: 68px;
  }

  .legal-hero h1 {
    font-size: clamp(3.65rem, 20vw, 5.7rem);
  }

  .legal-lede {
    margin-top: 26px;
  }

  .legal-meta div {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .legal-toc {
    grid-template-columns: 1fr;
  }

  .legal-toc a:nth-child(even),
  .legal-toc a:nth-child(odd) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .legal-section {
    padding-top: 44px;
  }

  .legal-summary,
  .legal-disclaimer {
    padding: 20px;
  }

  .legal-contact-link {
    min-height: 72px;
  }
}
