.community-page.community-overview {
  --hall-node-axis: 18px;
  --hall-title-inset: 43px;
  --hall-item-gutter: 6px;
  max-width: var(--study-page-width);
  color: var(--study-ink);
}

.community-page.community-overview .community-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  min-height: 0;
  margin: 0 0 18px;
  padding: 7px 0 19px;
  border-bottom: 1px solid var(--study-line);
}

.community-page.community-overview .community-header > div { grid-row: span 2; }

.community-page.community-overview .community-header h2 {
  font-size: var(--study-heading-size);
  line-height: 1.24;
  letter-spacing: -.055em;
}

.community-page.community-overview .community-header > div > p:last-child {
  margin-block-start: 7px;
  color: var(--study-muted);
  font: 400 .9375rem/1.65 var(--study-body);
}

.community-page.community-overview .community-header nav {
  position: static;
  grid-area: 1 / 2;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 15px;
  min-height: 0;
  margin: 0;
}

.community-page.community-overview .community-header nav a {
  min-height: 36px;
  color: var(--study-muted);
  font-size: .8125rem;
}

.community-overview .community-hall-all {
  position: static;
  grid-area: 2 / 2;
  justify-self: end;
  min-height: 40px;
  margin: 0;
  font: 550 .875rem/1.5 var(--study-body);
}

.community-page.community-overview :is(.community-header nav a, .community-hall-all):hover {
  color: var(--study-action-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.community-overview .community-hall-directory-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
}

.community-overview .community-hall-view {
  display: flex;
  align-items: center;
  gap: 12px;
}

.community-overview .community-hall-directory-bar .community-feed-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 3px;
  border-radius: 7px;
  background: var(--study-side);
}

.community-overview .community-hall-directory-bar .community-feed-scope a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 3px 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--study-muted);
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}

.community-overview .community-hall-directory-bar .community-feed-scope a:hover { color: var(--study-action-hover); }

.community-overview .community-hall-directory-bar .community-feed-scope a[aria-current=page] {
  border-color: var(--study-line);
  background: var(--study-surface);
  color: var(--study-ink);
  font-weight: 650;
}

.community-page.community-overview .community-hall-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.community-overview .community-hall-search-bar .community-search {
  min-width: 0;
  max-width: none;
}

.community-overview .community-hall-search-bar .community-search > div {
  gap: 0;
  padding-inline-end: 4px;
  border: 1px solid var(--study-line);
  border-radius: 7px;
  background: var(--study-surface);
}

.community-overview .community-hall-search-bar .community-search > div > .study-icon {
  inset-inline-start: 12px;
  width: 17px;
  height: 17px;
}

.community-page.community-overview .community-hall-search-bar .community-search input {
  min-width: 0;
  min-height: 44px;
  padding-inline: 36px 4px;
  border: 0;
  background: transparent;
  font-size: .875rem;
}

.community-overview .community-hall-search-bar .community-search button,
.community-overview .community-hall-search-bar .community-search button:focus-visible {
  position: static;
  width: auto;
  height: auto;
  min-height: 38px;
  padding: 4px 9px;
  clip-path: none;
  font-size: .8125rem;
}

.community-overview .community-hall-search-bar .community-search button:hover { background: var(--study-active); }

.community-overview .community-hall-search-bar .community-actions {
  justify-content: end;
  margin: 0;
}

.community-page.community-overview .community-hall-search-bar .community-actions :is(a, button) {
  min-height: 44px;
  padding-inline: 13px;
  border-radius: 6px;
  font: 550 .875rem/1.5 var(--study-body);
  white-space: nowrap;
}

.community-overview .community-hall-count {
  margin: 0;
  color: var(--study-muted);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.community-page.community-overview .community-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 44px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.community-overview .community-hall-directory-bar + .community-boards { margin-block-start: 16px; }

.community-overview .community-boards > .community-empty {
  grid-column: 1 / -1;
  border-block-start: 1px solid var(--study-line);
}

.community-overview .community-boards .community-hall-entry {
  min-width: 0;
  padding-block-end: 10px;
  border-block-start: 1px solid var(--study-line);
}

.community-page.community-overview .community-hall-entry .community-board-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: start;
  gap: 13px;
  min-height: 0;
  padding: 16px var(--hall-item-gutter) 2px;
  border-radius: 3px;
  background: transparent;
}

.community-page.community-overview .community-boards:not(.community-hall-tree) .community-board-card {
  min-height: 76px;
  padding: 12px var(--hall-item-gutter);
}

.community-page.community-overview .community-hall-entry .community-board-card:is(:hover,:focus-visible) {
  background: var(--study-active);
}

.community-page.community-overview .community-hall-entry .community-board-card::after { display: none; }

.community-overview .community-hall-emblem {
  display: grid;
  place-items: center;
  width: 24px;
  height: 30px;
  color: var(--study-action);
}

.community-overview .community-hall-emblem .community-board-icon {
  width: 23px;
  height: 23px;
}

.community-overview .community-board-card:is(:hover, :focus-visible) .community-hall-emblem {
  color: var(--study-action);
}

.community-page.community-overview .community-hall-entry:has(.community-hall-children[open]) .community-board-card::after {
  content: '';
  position: absolute;
  display: block;
  inset-block: 47px 0;
  inset-inline-start: var(--hall-node-axis);
  inline-size: 1px;
  block-size: auto;
  background: var(--study-signal);
  opacity: 1;
  pointer-events: none;
}

.community-overview .community-board-card-content h3 {
  margin: 0;
  color: var(--study-ink);
  font: 700 1.3rem/1.44 var(--study-title);
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.community-overview .community-board-card:hover h3 { color: var(--study-action-hover); }

.community-page.community-overview .community-board-card .community-board-description {
  margin: 4px 0 0;
  color: var(--study-muted);
  font: 400 .875rem/1.65 var(--study-body);
  overflow-wrap: anywhere;
}

.community-page.community-overview .community-board-card .community-card-path {
  margin: 3px 0 0;
  color: var(--study-action);
  font: 400 .75rem/1.6 var(--study-body);
  overflow-wrap: anywhere;
}

.community-page.community-overview .community-hall-entry .community-board-card > .community-utility-icon {
  grid-area: 1 / 3;
  width: 15px;
  height: 17px;
  margin-block-start: 7px;
  color: var(--study-muted);
}

.community-overview .community-hall-children {
  position: relative;
  margin: 0;
  font-size: .8125rem;
}

.community-overview .community-hall-children > summary {
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  min-height: 38px;
  margin-inline-start: var(--hall-title-inset);
  padding: 3px 4px 3px 0;
  color: var(--study-action);
  font-weight: 550;
}

.community-overview .community-hall-children[open] > summary::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(var(--hall-node-axis) - var(--hall-title-inset));
  border-inline-start: 1px solid var(--study-signal);
  pointer-events: none;
}

.community-overview .community-hall-children > summary::after { content: none; }

.community-overview .community-hall-children > summary > .study-icon {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.community-overview .community-hall-children[open] > summary > .study-icon { rotate: 180deg; }

.community-overview .community-hall-children ul {
  display: block;
  margin: 0 4px 0 var(--hall-node-axis);
  padding: 0;
  list-style: none;
}

.community-overview .community-hall-children li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding-inline-start: calc(var(--hall-title-inset) - var(--hall-node-axis) + 9px);
}

.community-overview .community-hall-children li::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  border-inline-start: 1px solid var(--study-signal);
}

.community-overview .community-hall-children li:last-child::before { inset-block-end: 50%; }

.community-overview .community-hall-children li::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 1px;
  width: calc(var(--hall-title-inset) - var(--hall-node-axis) + 3px);
  border-block-start: 1px solid var(--study-signal);
}

.community-overview .community-hall-children a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 4px 6px 4px 0;
  border-radius: 4px;
  color: var(--study-ink);
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.community-overview .community-hall-children a > .community-utility-icon {
  flex: 0 0 12px;
  width: 12px;
  height: 14px;
  color: var(--study-muted);
}

.community-overview .community-hall-children a:hover { background: var(--study-active); }

.community-overview .community-hall-children :is(a, summary):hover {
  color: var(--study-action-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.community-overview .community-hall-entry :is(a, summary):focus-visible {
  outline: 2px solid var(--study-action);
  outline-offset: 2px;
  scroll-margin-top: 80px;
}

.community-overview .community-page-controls {
  margin: 16px 0 0;
  color: var(--study-muted);
  font-size: .875rem;
}

@media (max-width: 740px) {
  .community-overview .community-hall-directory-bar {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
  }

  .community-overview .community-hall-directory-bar .community-feed-scope { justify-self: start; }

  .community-overview .community-hall-view { justify-content: space-between; }

  .community-page.community-overview .community-boards { column-gap: 24px; }
}

@media (max-width: 550px) {
  .community-page.community-overview .community-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin-block-end: 14px;
    padding: 0 0 12px;
  }

  .community-page.community-overview .community-header > div,
  .community-page.community-overview .community-header nav,
  .community-overview .community-hall-all { grid-area: auto; }

  .community-page.community-overview .community-header nav { justify-content: flex-start; }

  .community-overview .community-hall-all { justify-self: start; }

  .community-page.community-overview .community-boards { grid-template-columns: minmax(0, 1fr); }
}

@media (pointer: coarse) {
  .community-page.community-overview .community-header nav a,
  .community-overview .community-hall-all,
  .community-overview .community-hall-children > summary,
  .community-overview .community-hall-children a { min-height: 44px; }
}
