@scope (htmlpress-language) {
  :scope {
    position: relative;
    display: block;
  }
  details {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  summary {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border-radius: 999px;
    color: var(--htmlpress-muted);
    cursor: pointer;
    list-style: none;
  }
  summary::-webkit-details-marker {
    display: none;
  }
  summary:hover,
  details[open] > summary {
    margin: 0;
    background: var(--htmlpress-surface);
  }
  summary > svg {
    width: 1rem;
    height: 1rem;
  }
  summary + div {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 30;
    min-width: 11rem;
    padding: 0.25rem;
    border: 1px solid var(--htmlpress-border);
    border-radius: 0.75rem;
    background: var(--htmlpress-bg);
    box-shadow: 0 8px 24px color-mix(in oklab, var(--htmlpress-text) 12%, transparent);
  }
  p {
    margin: 0;
    padding: 0.375rem 0.625rem;
    color: var(--htmlpress-muted);
    font-size: 0.75rem;
    font-weight: 500;
  }
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  li + li {
    margin-top: 0;
  }
  a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    color: var(--htmlpress-text);
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
  }
  a:hover {
    background: var(--htmlpress-surface);
  }
  a[aria-current] {
    color: var(--htmlpress-accent);
    font-weight: 500;
  }
  a > svg {
    flex: none;
    width: 1.125rem;
    height: 0.75rem;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--htmlpress-border);
  }
}
