.help-browse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "question" "content";
  gap: var(--space-8);
}

.help-browse-layout > .help-question,
.help-browse-content {
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
}

.help-browse-layout > .help-question { grid-area: question; }
.help-browse-content { grid-area: content; }
.help-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.help-browse-sidebar { display: none; }
.help-browse-disclosure {
  grid-area: disclosure;
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
  border-block: 1px solid var(--border);
}

.help-browse-disclosure > summary,
.help-section-tree summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.help-browse-disclosure > summary::-webkit-details-marker,
.help-section-tree summary::-webkit-details-marker { display: none; }

.help-browse-disclosure > summary::before,
.help-section-tree summary::before {
  content: "";
  flex: none;
  width: .4rem;
  height: .4rem;
  border-block-start: 1.5px solid currentColor;
  border-inline-end: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.help-browse-disclosure[open] > summary::before,
.help-section-tree details[open] > summary::before { transform: rotate(135deg); }

.help-browse-disclosure > summary {
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  color: var(--link);
}

.help-browse-disclosure > .help-section-tree { padding: 0 var(--space-3) var(--space-3); }
.help-section-tree { font-size: .875rem; overflow-wrap: anywhere; }
.help-section-tree ul { list-style: none; margin: 0; padding: 0; }
.help-section-tree ul ul {
  margin-inline-start: var(--space-2);
  padding-inline-start: var(--space-2);
  border-inline-start: 1px solid var(--border);
}

.help-section-tree summary,
.help-section-tree li > a {
  min-height: 2.75rem;
  padding: var(--space-2);
  border-radius: var(--radius);
}

.help-section-tree li > a {
  display: flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.help-section-tree summary:hover,
.help-section-tree li > a:hover { background: var(--surface); }
.help-section-tree li > a:hover { text-decoration: underline; }

.help-section-tree li > a[aria-current="page"] {
  background: var(--surface);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--canvas));
  color: var(--brand-primary);
  font-weight: 600;
}

.help-browse-with-tree { grid-template-areas: "question" "disclosure" "content"; }

@media (min-width: 53rem) {
  .help-browse-with-tree {
    grid-template-columns: 13rem minmax(0, 1fr);
    grid-template-areas: "sidebar question" "sidebar content";
  }

  .help-browse-sidebar {
    display: block;
    grid-area: sidebar;
    align-self: start;
    padding: var(--space-2) var(--space-4) var(--space-2) 0;
    border-inline-end: 1px solid var(--border);
  }

  .help-browse-sidebar-heading {
    margin: 0 0 var(--space-2);
    color: var(--text-muted);
    font: 500 .75rem/1.5 var(--brand-navigation-font);
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .help-browse-disclosure { display: none; }
  .help-section-tree summary, .help-section-tree li > a { min-height: 2rem; padding-block: var(--space-1); }
}
