.topic-switcher {
  height: 32px;
  margin: -2px 0 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}

.topic-switcher-scroll {
  width: 100%;
  height: 31px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.topic-switcher-scroll::-webkit-scrollbar { display: none; }

.topic-switcher-list {
  width: max-content;
  min-width: 100%;
  height: 31px;
  margin: 0;
  padding: 0 2px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(16px, 2vw, 30px);
  list-style: none;
  white-space: nowrap;
}

.topic-switcher-item {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
}

.topic-switcher-item.is-current {
  color: var(--ink);
  font-weight: 780;
}

.topic-switcher-entry { display: inline-flex; align-items: center; }
.topic-switcher-link,
.topic-switcher-label {
  padding-block: 8px;
  text-decoration: none;
}
.topic-switcher-label { box-shadow: inset 0 -1px currentColor; }
.topic-switcher-link:hover { color: var(--ink); }
.topic-switcher-link:focus-visible,
.topic-switcher-trigger:focus-visible {
  color: var(--ink);
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.topic-switcher-trigger {
  width: 18px;
  height: 24px;
  margin: 0 -4px 0 2px;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: 700 9px/1 var(--sans);
}

.topic-switcher-submenu[popover] {
  position: fixed;
  position-area: bottom span-right;
  width: max-content;
  min-width: 150px;
  max-width: min(280px, calc(100vw - 24px));
  margin: 4px 0 0;
  padding: 6px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(22, 34, 31, .14);
}

.topic-switcher-submenu-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  list-style: none;
}
.topic-switcher-submenu .topic-switcher-item { display: block; }
.topic-switcher-submenu .topic-switcher-entry { width: 100%; justify-content: space-between; }
.topic-switcher-submenu .topic-switcher-link,
.topic-switcher-submenu .topic-switcher-label {
  min-height: 30px;
  padding: 9px 8px;
  display: block;
  flex: 1 1 auto;
}
.topic-switcher-submenu .topic-switcher-link:hover { background: var(--paper-deep); }

@media (max-height: 820px) and (min-width: 761px) {
  .top-overlay-layout { top: 10px; }
  .top-controls-stack { gap: 0; }
  .filters-panel { padding-block: 0; }
  .domain-filters { row-gap: 0; }
  .utility-controls { margin-top: 4px; }
  .topic-switcher {
    height: 30px;
    margin: -11px 0 0;
  }
  .topic-switcher-scroll,
  .topic-switcher-list { height: 29px; }
}

@media (max-width: 760px) {
  .topic-switcher {
    height: 30px;
    margin-top: -7px;
    margin-bottom: 0;
  }
  .topic-switcher-scroll,
  .topic-switcher-list { height: 29px; }
  .topic-switcher-list { gap: 18px; }
}
