.account-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  width: 100%;
}

.account-sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--paper);
  padding: 26px 0 20px;
  z-index: 5;
}

.account-sidebar-head {
  padding: 0 22px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.account-sidebar-head span {
  display: block;
  color: var(--muted);
  font: 10px/1.4 var(--font-mono);
  letter-spacing: .09em;
}

.account-sidebar-head b {
  display: block;
  margin-top: 7px;
  font-size: 15px;
  font-weight: 680;
}

.account-sidebar-user {
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.account-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 9px 22px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 13px;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.account-sidebar-nav a::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  opacity: .68;
}

.account-sidebar-nav a:hover {
  color: var(--ink);
}

.account-sidebar-nav a.on {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
}

.account-sidebar-foot {
  margin: 18px 22px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.account-main {
  width: 100%;
  min-width: 0;
}

@media (max-width: 960px) {
  .account-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-sidebar {
    position: sticky;
    top: 64px;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px var(--site-layout-gutter);
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    backdrop-filter: blur(12px);
  }

  .account-sidebar-head,
  .account-sidebar-foot {
    display: none;
  }

  .account-sidebar-nav {
    width: max-content;
    min-width: 100%;
    flex-direction: row;
    gap: 6px;
  }

  .account-sidebar-nav a {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    white-space: nowrap;
  }

  .account-sidebar-nav a::before {
    display: none;
  }

  .account-sidebar-nav a.on {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }
}

@media (max-width: 560px) {
  .account-sidebar {
    top: 56px;
    padding-inline: 12px;
  }
}
