/* Keep panel above backdrop so taps hit menu items (not the dim layer). */
.menu-overlay .menu-overlay-backdrop {
  z-index: 0;
}
.menu-overlay .menu-panel {
  z-index: 1;
}

.menu-policy-item {
  list-style: none;
}

.menu-policy-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 7px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  position: relative;
  transition: background-color 140ms ease;
}

.menu-policy-toggle::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 4px;
  width: 0;
  max-width: calc(100% - 16px);
  height: 1px;
  background: rgba(17, 17, 17, 0.7);
  transition: width 160ms ease;
  pointer-events: none;
}

.menu-policy-toggle:hover {
  background: transparent;
}

.menu-policy-toggle:hover::after {
  width: 44%;
}

.menu-policy-toggle-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1.25rem;
}

.menu-policy-toggle-icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 3px;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.menu-policy-toggle--open .menu-policy-toggle-icon {
  transform: rotate(-135deg);
  margin-bottom: -2px;
  margin-top: 3px;
}

/* Author `display: grid` beats UA `[hidden]` otherwise — submenu stays open forever. */
.menu-policy-submenu[hidden] {
  display: none !important;
}

.menu-policy-submenu:not([hidden]) {
  display: grid;
}

.menu-policy-submenu {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 0 0 4px 10px;
  gap: 4px;
}

.menu-policy-submenu li {
  list-style: none;
}

/* Same animated line as main .menu-list links (higher specificity than .menu-list a on nested items). */
.menu-list .menu-policy-submenu a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  position: relative;
  padding: 8px 8px 7px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background-color 140ms ease;
}

.menu-list .menu-policy-submenu a::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 4px;
  width: 0;
  max-width: calc(100% - 16px);
  height: 1px;
  background: rgba(17, 17, 17, 0.7);
  transition: width 160ms ease;
}

.menu-list .menu-policy-submenu a:hover {
  background: transparent;
}

.menu-list .menu-policy-submenu a:hover::after {
  width: 44%;
}

.menu-policy-submenu a span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.88rem;
  color: #3a3a3a;
}
