.site-header .header-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  display: flex;
  gap: var(--space-3);
}
.site-header .brand { margin-right: auto; flex: none; }
.site-header #theme { flex: none; }
.header-profile { position: relative; min-width: 0; max-width: min(16rem, 38vw); }
.header-profile summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--target);
  cursor: pointer;
  color: var(--text);
  font-size: .875rem;
  font-weight: 650;
  list-style: none;
}
.header-profile summary::-webkit-details-marker { display: none; }
.header-profile summary:hover, .header-profile:has([aria-current="page"]) summary { color: var(--accent); }
.header-profile:has([aria-current="page"]) summary { box-shadow: inset 0 -2px var(--accent); }
.header-profile-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  overflow: hidden;
  background: var(--inset);
  border: 1px solid var(--line);
}
.header-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
#header-profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-profile-arrow { flex: none; }
.header-profile-menu {
  position: absolute;
  z-index: 10;
  top: 100%;
  right: 0;
  min-width: 12rem;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--line);
}
.header-profile-menu a, .header-profile-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--target);
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font-size: .875rem;
}
.header-profile-menu a:hover, .header-profile-menu button:not(:disabled):hover { background: var(--inset); color: var(--accent); }
@media (max-width: 30rem) {
  .site-header .header-inner { gap: var(--space-2); }
  .header-profile { max-width: 30vw; }
}
