/* The full-width header anchors the panel, including on the framed homepage. */
header:has(#topic-menu) {
  position: relative;
  z-index: 5;
}
header #topic-menu,
header:has(#topic-menu) .mast,
header:has(#topic-menu) nav {
  position: static;
}
#topic-menu > .topic-dropdown {
  position: absolute;
  inset: 100% 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 1.1rem max(4vw, calc((100% - 1240px) / 2));
  background: var(--surface, var(--paper, #faf8f2));
  border: solid var(--rule, var(--line, #c7c9be));
  border-width: 1px 0;
  border-radius: 0;
  box-shadow: 0 8px 16px #172d2b18;
}
#topic-menu[open] > .topic-dropdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}
#topic-menu:not([open]) > .topic-dropdown {
  display: none;
}
#topic-menu .topic-dropdown a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  align-items: start;
  column-gap: .65rem;
  padding: .75rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  text-decoration: none;
}
#topic-menu .topic-dropdown a:is(:hover, :focus-visible) {
  background: #e7eddf;
}
#topic-menu .topic-dropdown svg {
  grid-row: 1 / span 2;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  color: #124e4b;
}
#topic-menu .topic-dropdown strong,
#topic-menu .topic-dropdown small {
  display: block;
}
#topic-menu .topic-dropdown small {
  grid-column: 2;
  margin-top: .2rem;
  color: #475851;
  font-size: .8rem;
  font-weight: 400;
}
@media (max-width: 720px) {
  #topic-menu[open] > .topic-dropdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: .6rem max(3vw, .5rem);
  }
  #topic-menu .topic-dropdown a {
    column-gap: .45rem;
    padding: .55rem .35rem;
  }
}
