.site-profile-link {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
}
.site-profile-link:hover { background: var(--sage); }
.site-profile-link:focus-visible { outline-offset: 2px; }
.site-header .site-account > summary > svg { transform: none; }

@media (max-width: 1000px) {
  .site-header .menu-toggle { min-width: 44px; }
  .site-header .menu-toggle-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}

@media (max-width: 390px) {
  .site-header { padding-inline: 6px; column-gap: 1px; }
  .site-header .brand-name { font-size: clamp(17px, 5.2vw, 20px); }
  .site-header > :is(.site-profile-link, #site-search-button, .site-account, .site-notifications, .menu-toggle) {
    flex-basis: 40px;
    min-width: 40px;
    width: 40px;
  }
  .site-header :is(.site-account, .site-notifications) > summary { width: 40px; }
}

.site-notifications #exchange-notifications-count {
  position: absolute;
  inset: 1px 0 auto auto;
  min-width: 1.15rem;
  padding-inline: .25rem;
  border-radius: 1rem;
  background: var(--forest);
  color: var(--paper);
  font-size: .7rem;
  font-weight: 600;
  text-align: center;
}

.site-account-panel {
  position: absolute;
  z-index: 1;
  inset: calc(100% + .45rem) 0 auto auto;
  display: grid;
  width: min(15rem, calc(100vw - 2rem));
  padding: .35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgb(12 29 16 / 12%);
}

.site-account-panel > :is(a, button) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem .65rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  text-align: start;
}

.site-account-panel > :is(a, button):hover { background: var(--sage); }
.site-account-panel > :is(a, button):focus-visible { outline-offset: -2px; }
.site-account-panel > button:disabled { cursor: wait; }

.site-notifications .exchange-notifications-panel {
  position: absolute;
  z-index: 1;
  inset: calc(100% + .25rem) var(--gutter) auto auto;
  width: min(25rem, calc(100% - 2 * var(--gutter)));
  max-height: min(65dvh, 27rem);
  overflow: auto;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 10px 22px rgb(12 29 16 / 12%);
}

.site-notifications .exchange-notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 .75rem;
}

.site-notifications .exchange-notifications-header h2 { font-size: 1.55rem; }
.site-notifications .exchange-notifications-panel button {
  min-height: 44px;
  border: 0;
  padding: .4rem;
  background: transparent;
  font: inherit;
  font-size: .85rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.site-notifications .exchange-notifications-panel button:hover { background: var(--sage); }
.site-notifications :is(#exchange-notifications-status, #exchange-notifications-sign-in, .exchange-notification-time) {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 400;
}
.site-notifications #exchange-notifications-sign-in a { text-decoration: underline; text-underline-offset: .2em; }

.site-notifications #exchange-notifications-list {
  list-style: none;
  margin: .35rem 0 0;
  padding: 0;
}

.site-notifications #exchange-notifications-list li { border-top: 1px solid var(--line); }
.site-notifications #exchange-notifications-list a {
  display: grid;
  gap: .25rem;
  padding: .65rem .45rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.site-notifications #exchange-notifications-list a:focus-visible { outline-offset: -2px; }
.site-notifications .exchange-notification-unread { background: var(--sage); font-weight: 600; }

#site-account-status {
  padding: .45rem .65rem;
  color: var(--muted);
  font-size: .85rem;
}

#site-account-status:empty { padding: 0; }

.site-account-panel { max-height: calc(100dvh - 5rem); overflow-y: auto; }

.site-tab-icon-setting {
  display: grid;
  gap: .25rem;
  margin: .35rem .65rem;
  color: var(--muted);
  font-size: .85rem;
}
.site-tab-icon-setting select {
  min-height: 44px;
  max-width: 100%;
  padding-inline: .45rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--forest);
  font: inherit;
}
